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