HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 std::vector<std::string> aliases() = 0;
88  virtual void addAlias(const char *alias) = 0;
89  virtual void removeAlias(const char *alias) = 0;
90 
91  virtual bool hidden() = 0;
92  virtual void setHidden(bool hidden) = 0;
93 
94  virtual bool deprecated() = 0;
95  virtual std::map<std::string, hboost::any> deprecationInfo() = 0;
96 
97  virtual std::vector<HOM_ElemPtr<HOM_Node> > instances() = 0;
98 
99  virtual std::vector<HOM_ElemPtr<HOM_ParmTemplate> > parmTemplates() = 0;
100 
101  // This method was implemented for the experimental edit optype parms workflow
102  // that is currently disabled.
103  SWIGOUT(%ignore reloadParmTemplates;)
104  virtual void reloadParmTemplates() = 0;
105 
106  SWIGOUT(%newobject parmTemplateGroup;)
107  virtual HOM_ParmTemplateGroup *parmTemplateGroup() = 0;
108 
109  // This method was implemented for the experimental edit optype parms workflow
110  // that is currently disabled.
111  SWIGOUT(%ignore baseParmTemplateGroup;)
112  SWIGOUT(%newobject baseParmTemplateGroup;)
113  virtual HOM_ParmTemplateGroup *baseParmTemplateGroup() = 0;
114 
115  virtual void uninstallFromPath(const char *path) = 0;
116 
117  SWIGOUT(%newobject hdaModule;)
118  virtual HOM_HDAModule *hdaModule() = 0;
119 
120  virtual bool hasPermanentUserDefaults() = 0;
121 
122  virtual bool isReadable() = 0;
123  virtual bool isWritable() = 0;
124  virtual bool areContentsViewable() = 0;
125 
126  virtual std::vector<std::string> containedNodeTypes() = 0;
127 
128  virtual HOM_NodeTypeCategory *childTypeCategory() = 0;
129 
130  virtual std::string helpUrl() = 0;
131  virtual std::string defaultHelpUrl() = 0;
132 
133  virtual std::string embeddedHelp() = 0;
134 
135  virtual std::string defaultShape() = 0;
136  virtual void setDefaultShape(const char *shape) = 0;
137  virtual HOM_Color defaultColor() = 0;
138  virtual void setDefaultColor(HOM_Color *color) = 0;
139 
140  virtual void *_asVoidPointer() = 0;
141 
142  // We need a quick way to get the OP_OpTypeId from C++ code so we know
143  // which subclass of HOM_NodeType we should cast to, so that's why
144  // opTypeIdAsInt() exists.
145  SWIGOUT(%ignore opTypeIdAsInt;)
146  virtual int opTypeIdAsInt() = 0;
147 };
148 
149 #endif
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:974
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
virtual std::string __repr__()=0
#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:973
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:610
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:596