HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_NodeType.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  * COMMENTS:
7  */
8 
9 #ifndef __HOM_NodeType_h__
10 #define __HOM_NodeType_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_Defines.h"
14 #include "HOM_Errors.h"
15 #include "HOM_EnumValue.h"
16 #include "HOM_Color.h"
17 #include "HOM_Module.h"
18 #include "HOM_ParmTemplate.h"
19 #include "HOM_PtrOrNull.h"
20 #include <string>
21 
22 class HOM_HDADefinition;
23 class HOM_HDAModule;
26 
27 SWIGOUT(%rename(NodeType) HOM_NodeType;)
28 
30 {
31 public:
33  { HOM_CONSTRUCT_OBJECT(this) }
35  { HOM_CONSTRUCT_OBJECT(this) }
36  virtual ~HOM_NodeType()
37  { HOM_DESTRUCT_OBJECT(this) }
38 
39  virtual bool operator==(HOM_PtrOrNull<HOM_NodeType> node_type) = 0;
40  virtual bool operator!=(HOM_PtrOrNull<HOM_NodeType> node_type) = 0;
41 
42  virtual int __hash__() = 0;
43 
44  virtual std::string __repr__() = 0;
45 
46  virtual HOM_NodeTypeCategory &category() = 0;
47 
48  virtual std::string name() = 0;
49  virtual std::vector<std::string> nameComponents() = 0;
50  virtual std::string description() = 0;
51  virtual std::string nameWithCategory() = 0;
52  virtual std::vector<std::string> namespaceOrder() = 0;
53 
54  virtual HOM_EnumValue &source() = 0;
55  virtual std::string sourcePath() = 0;
56 
57  SWIGOUT(%newobject sourceNetwork;)
58  virtual HOM_Node *sourceNetwork() = 0;
59 
60  SWIGOUT(%newobject definition;)
61  virtual HOM_HDADefinition *definition() = 0;
62 
63  virtual std::vector<HOM_ElemPtr<HOM_HDADefinition> >
64  allInstalledDefinitions() = 0;
65 
66  virtual std::string icon() = 0;
67  virtual int minNumInputs() = 0;
68  virtual int maxNumInputs() = 0;
69  virtual int maxNumOutputs() = 0;
70 
71  // generatorFlag() is deprecated in favour of isGenerator().
72  virtual bool isGenerator() = 0;
74  { return isGenerator(); }
75 
76  // managerFlag() is deprecated in favour of isManager().
77  SWIGOUT(%kwargs isManager);
78  virtual bool isManager(bool include_management_types=true) = 0;
79  bool managerFlag()
80  { return isManager(); }
81 
82  // unorderedInputsFlag() is deprecated in favour of hasUnorderedInputs().
83  virtual bool hasUnorderedInputs() = 0;
85  { return hasUnorderedInputs(); }
86 
87  virtual bool hasEditableInputData() = 0;
88 
89  virtual std::vector<std::string> aliases() = 0;
90  virtual void addAlias(const char *alias) = 0;
91  virtual void removeAlias(const char *alias) = 0;
92 
93  virtual bool hidden() = 0;
94  virtual void setHidden(bool hidden) = 0;
95 
96  virtual bool deprecated() = 0;
97  virtual std::map<std::string, hboost::any> deprecationInfo() = 0;
98 
99  virtual std::vector<HOM_ElemPtr<HOM_Node> > instances() = 0;
100 
101  virtual std::vector<HOM_ElemPtr<HOM_ParmTemplate> > parmTemplates() = 0;
102 
103  // This method was implemented for the experimental edit optype parms
104  // workflow that is currently disabled.
105  SWIGOUT(%ignore reloadParmTemplates;)
106  virtual void reloadParmTemplates() = 0;
107 
108  SWIGOUT(%newobject parmTemplateGroup;)
109  virtual HOM_ParmTemplateGroup *parmTemplateGroup() = 0;
110 
111  // This method was implemented for the experimental edit optype parms
112  // workflow that is currently disabled.
113  SWIGOUT(%ignore baseParmTemplateGroup;)
114  SWIGOUT(%newobject baseParmTemplateGroup;)
115  virtual HOM_ParmTemplateGroup *baseParmTemplateGroup() = 0;
116 
117  virtual void uninstallFromPath(const char *path) = 0;
118 
119  SWIGOUT(%newobject hdaModule;)
120  virtual HOM_HDAModule *hdaModule() = 0;
121 
122  virtual bool hasPermanentUserDefaults() = 0;
123 
124  virtual bool isReadable() = 0;
125  virtual bool isWritable() = 0;
126  virtual bool areContentsViewable() = 0;
127 
128  virtual std::vector<std::string> containedNodeTypes() = 0;
129 
130  virtual HOM_NodeTypeCategory *childTypeCategory() = 0;
131 
132  virtual std::string helpUrl() = 0;
133  virtual std::string defaultHelpUrl() = 0;
134 
135  virtual std::string embeddedHelp() = 0;
136 
137  virtual std::string defaultShape() = 0;
138  virtual void setDefaultShape(const char *shape) = 0;
139  virtual HOM_Color defaultColor() = 0;
140  virtual void setDefaultColor(HOM_Color *color) = 0;
141 
142  virtual void *_asVoidPointer() = 0;
143 
144  // We need a quick way to get the OP_OpTypeId from C++ code so we know
145  // which subclass of HOM_NodeType we should cast to, so that's why
146  // opTypeIdAsInt() exists.
147  SWIGOUT(%ignore opTypeIdAsInt;)
148  virtual int opTypeIdAsInt() = 0;
149 };
150 
151 #endif
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1053
std::vector< HOM_ElemPtr< HOM_ParmTemplate > > parmTemplates()
GLsizei const GLchar *const * string
Definition: glcorearb.h:813
GLuint color
Definition: glcorearb.h:1260
GLsizei const GLchar *const * path
Definition: glcorearb.h:3340
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:344
#define HOM_API
Definition: HOM_API.h:13
virtual ~HOM_NodeType()
Definition: HOM_NodeType.h:36
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1052
GLsizei GLsizei GLchar * source
Definition: glcorearb.h:802
bool operator!=(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Inequality operator, does exact floating point comparisons.
Definition: Mat3.h:604
GLuint const GLchar * name
Definition: glcorearb.h:785
bool unorderedInputsFlag()
Definition: HOM_NodeType.h:84
HOM_NodeType(const HOM_NodeType &)
Definition: HOM_NodeType.h:34
bool generatorFlag()
Definition: HOM_NodeType.h:73
bool managerFlag()
Definition: HOM_NodeType.h:79
bool operator==(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Equality operator, does exact floating point comparisons.
Definition: Mat3.h:590