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