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  virtual unsigned orderedInputs() const;
34  virtual unsigned getNumVisibleInputs() const;
35  virtual const char *inputLabel(unsigned idx) const;
36 
37  virtual unsigned getNumVisibleOutputs() const;
38  virtual const char *outputLabel(unsigned idx) const;
39 
40 
41  /// Whenever the spare parameteres change, we need to update
42  /// our input list.
43  virtual void opChanged(OP_EventType reason, void *data=0);
44 
45 protected:
46  /// Constructor.
47  VOP_Properties( OP_Network * parent,
48  const char * name,
49  OP_Operator * entry );
50  /// Destructor.
51  virtual ~VOP_Properties();
52 
53  virtual bool updateParmsFlags();
54 
55  /// Update the internal map of parameter inputs
56  /// based on the node's spare parameters.
57  void updateParmInputs();
58 
59  /// Return the VOP data input type that should be used
60  /// for the given parameter template.
61  VOP_Type getInputTypeByParmTemplate(
62  const PRM_Template *tplate) const;
63 
64  virtual void getInputNameSubclass(
65  UT_String &in, int idx) const;
66  virtual int getInputFromNameSubclass(
67  const UT_String &in) const;
68  virtual void getInputTypeInfoSubclass(
69  VOP_TypeInfo &type_info, int idx);
70 
71  virtual void getOutputNameSubclass(
72  UT_String &out, int idx) const;
73  virtual void getOutputTypeInfoSubclass(
74  VOP_TypeInfo &type_info, int idx);
75 
76  virtual bool getRequiresInputParameters() const;
77 
78 private:
79 
80  /// This structure contains the parameter inputs that were
81  /// derived from the node's spare parameters.
82  UT_ValArray<VOP_InOutInfo *> myParmInputs;
83 };
84 
85 #endif
86 
virtual int getInputFromNameSubclass(const UT_String &in) const
virtual bool updateParmsFlags()
virtual unsigned getNumVisibleInputs() const
virtual const char * inputLabel(unsigned idx) const
virtual void opChanged(OP_EventType reason, void *data=0)
virtual unsigned getNumVisibleOutputs() const
virtual void getInputTypeInfoSubclass(VOP_TypeInfo &type_info, int idx)
#define VOP_API
Definition: VOP_API.h:10
virtual unsigned orderedInputs() const
GLboolean * data
Definition: glcorearb.h:130
GLuint const GLchar * name
Definition: glcorearb.h:785
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
virtual bool getRequiresInputParameters() const