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  virtual HOM_BinaryString sectionData(const char *name) = 0;
57  virtual bool hasSectionData(const char *name) = 0;
58 
59  virtual HOM_EnumValue &source() = 0;
60  virtual std::string sourcePath() = 0;
61 
62  SWIGOUT(%newobject sourceNetwork;)
63  virtual HOM_Node *sourceNetwork() = 0;
64 
65  SWIGOUT(%newobject definition;)
66  virtual HOM_HDADefinition *definition() = 0;
67 
68  virtual std::vector<HOM_ElemPtr<HOM_HDADefinition> >
69  allInstalledDefinitions() = 0;
70 
71  virtual std::string icon() = 0;
72  virtual int minNumInputs() = 0;
73  virtual int maxNumInputs() = 0;
74  virtual int maxNumOutputs() = 0;
75 
76  // generatorFlag() is deprecated in favour of isGenerator().
77  virtual bool isGenerator() = 0;
79  { return isGenerator(); }
80 
81  // managerFlag() is deprecated in favour of isManager().
82  SWIGOUT(%kwargs isManager);
83  virtual bool isManager(bool include_management_types=true) = 0;
84  bool managerFlag()
85  { return isManager(); }
86 
87  // unorderedInputsFlag() is deprecated in favour of hasUnorderedInputs().
88  virtual bool hasUnorderedInputs() = 0;
90  { return hasUnorderedInputs(); }
91 
92  virtual bool hasEditableInputData() = 0;
93 
94  virtual std::vector<std::string> aliases() = 0;
95  virtual void addAlias(const char *alias) = 0;
96  virtual void removeAlias(const char *alias) = 0;
97 
98  virtual bool hidden() = 0;
99  virtual void setHidden(bool hidden) = 0;
100 
101  virtual bool deprecated() = 0;
102  virtual std::map<std::string, hboost::any> deprecationInfo() = 0;
103 
104  virtual std::vector<HOM_ElemPtr<HOM_Node> > instances() = 0;
105 
106  virtual std::vector<HOM_ElemPtr<HOM_ParmTemplate> > parmTemplates() = 0;
107 
108  // This method was implemented for the experimental edit optype parms
109  // workflow that is currently disabled.
110  SWIGOUT(%ignore reloadParmTemplates;)
111  virtual void reloadParmTemplates() = 0;
112 
113  SWIGOUT(%newobject parmTemplateGroup;)
114  virtual HOM_ParmTemplateGroup *parmTemplateGroup() = 0;
115 
116  // This method was implemented for the experimental edit optype parms
117  // workflow that is currently disabled.
118  SWIGOUT(%ignore baseParmTemplateGroup;)
119  SWIGOUT(%newobject baseParmTemplateGroup;)
120  virtual HOM_ParmTemplateGroup *baseParmTemplateGroup() = 0;
121 
122  virtual void uninstallFromPath(const char *path) = 0;
123 
124  SWIGOUT(%newobject hdaModule;)
125  virtual HOM_HDAModule *hdaModule() = 0;
126  SWIGOUT(%newobject hdaViewerStateModule;)
127  virtual HOM_HDAViewerStateModule *hdaViewerStateModule() = 0;
128 
129  virtual bool hasPermanentUserDefaults() = 0;
130 
131  virtual bool isReadable() = 0;
132  virtual bool isWritable() = 0;
133  virtual bool areContentsViewable() = 0;
134 
135  virtual std::vector<std::string> containedNodeTypes() = 0;
136 
137  virtual HOM_NodeTypeCategory *childTypeCategory() = 0;
138 
139  virtual std::string helpUrl() = 0;
140  virtual std::string defaultHelpUrl() = 0;
141 
142  virtual std::string embeddedHelp() = 0;
143 
144  virtual std::string defaultShape() = 0;
145  virtual void setDefaultShape(const char *shape) = 0;
146  virtual HOM_Color defaultColor() = 0;
147  virtual void setDefaultColor(HOM_Color *color) = 0;
148 
149  virtual void *_asVoidPointer() = 0;
150 
151  // We need a quick way to get the OP_OpTypeId from C++ code so we know
152  // which subclass of HOM_NodeType we should cast to, so that's why
153  // opTypeIdAsInt() exists.
154  SWIGOUT(%ignore opTypeIdAsInt;)
155  virtual int opTypeIdAsInt() = 0;
156 };
157 
158 #endif
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1130
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:1129
bool operator!=(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Inequality operator, does exact floating point comparisons.
Definition: Mat3.h:604
GLuint color
Definition: glew.h:7902
GLsizei const GLchar *const * path
Definition: glew.h:6461
bool unorderedInputsFlag()
Definition: HOM_NodeType.h:89
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:78
bool managerFlag()
Definition: HOM_NodeType.h:84
bool operator==(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Equality operator, does exact floating point comparisons.
Definition: Mat3.h:590