HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VOP_Properties.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: VOP_Properties.h (VOP Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __VOP_Properties__
12 #define __VOP_Properties__
13 
14 #include "VOP_API.h"
15 #include "VOP_Node.h"
16 #include "VOP_OperatorInfo.h"
17 #include <UT/UT_ValArray.h>
18 #include <UT/UT_SymbolTable.h>
19 
20 #define VOP_PROPERTIES_NODE_NAME "properties"
21 
23 {
24 public:
25  /// Static factory function that generates VOP_Properties objects.
26  static OP_Node * myConstructor( OP_Network * net,
27  const char * name,
28  OP_Operator * entry);
29 
30  /// The list of parameters for VOP_Properties nodes.
31  static PRM_Template myTemplateList[];
32 
33  unsigned orderedInputs() const override;
34  unsigned getNumVisibleInputs() const override;
35  const char *inputLabel(unsigned idx) const override;
36 
37  unsigned getNumVisibleOutputs() const override;
38  const char *outputLabel(unsigned idx) const override;
39 
40 
41  /// Whenever the spare parameteres change, we need to update
42  /// our input list.
43  void opChanged(OP_EventType reason,
44  void *data = nullptr) override;
45 
46 protected:
47  /// Constructor.
48  VOP_Properties( OP_Network * parent,
49  const char * name,
50  OP_Operator * entry );
51  /// Destructor.
52  ~VOP_Properties() override;
53 
54  bool updateParmsFlags() override;
55 
56  /// Update the internal map of parameter inputs
57  /// based on the node's spare parameters.
58  void updateParmInputs();
59 
60  /// Return the VOP data input type that should be used
61  /// for the given parameter template.
62  VOP_Type getInputTypeByParmTemplate(
63  const PRM_Template *tplate) const;
64 
66  UT_String &in, int idx) const override;
68  const UT_String &in) const override;
70  VOP_TypeInfo &type_info, int idx) override;
71 
73  UT_String &out, int idx) const override;
75  VOP_TypeInfo &type_info, int idx) override;
76 
77  bool getRequiresInputParameters() const override;
78 
79 private:
80 
81  /// This structure contains the parameter inputs that were
82  /// derived from the node's spare parameters.
83  UT_ValArray<VOP_InOutInfo *> myParmInputs;
84 };
85 
86 #endif
87 
virtual int getInputFromNameSubclass(const UT_String &in) const
GLuint const GLchar * name
Definition: glew.h:1814
virtual unsigned getNumVisibleInputs() const
bool updateParmsFlags() override
virtual const char * inputLabel(unsigned idx) const
virtual unsigned getNumVisibleOutputs() const
virtual void getInputTypeInfoSubclass(VOP_TypeInfo &type_info, int idx)
#define VOP_API
Definition: VOP_API.h:10
GLuint in
Definition: glew.h:11510
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
virtual unsigned orderedInputs() const
virtual const char * outputLabel(unsigned idx) const
virtual void getOutputTypeInfoSubclass(VOP_TypeInfo &type_info, int idx)
virtual void getOutputNameSubclass(UT_String &out, int idx) const
OP_EventType
Definition: OP_Value.h:22
VOP_Type
Definition: VOP_Types.h:24
virtual void getInputNameSubclass(UT_String &in, int idx) const
void opChanged(OP_EventType reason, void *data=0) override
virtual bool getRequiresInputParameters() const