HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_TopNode.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_TopNode_h__
10 #define __HOM_TopNode_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_Defines.h"
14 #include "HOM_Errors.h"
15 #include "HOM_OpNode.h"
16 #include "HOM_IterableList.h"
17 #include "HOM_PtrOrNull.h"
18 
19 class HOM_Point;
20 class TOP_Node;
21 
22 SWIGOUT(%rename(TopNode) HOM_TopNode;)
23 
24 class HOM_API HOM_TopNode : virtual public HOM_OpNode
25 {
26 public:
28  : HOM_NetworkMovableItem(HOM_networkItemType::Node)
29  { HOM_CONSTRUCT_OBJECT(this) }
30  HOM_TopNode(const HOM_TopNode &pop_node)
31  : HOM_OpNode(pop_node),
32  HOM_NetworkMovableItem(pop_node)
33  { HOM_CONSTRUCT_OBJECT(this) }
34  ~HOM_TopNode() override
35  { HOM_DESTRUCT_OBJECT(this) }
36 
37  // Let swig know we're overriding __repr__ for this class so it doesn't
38  // provide its own __repr__.
39  SWIGOUT(virtual std::string __repr__() = 0;)
40 
41  virtual bool isBypassed() = 0;
42  virtual void bypass(bool on) = 0;
43  virtual bool isDisplayFlagSet() = 0;
44  virtual void setDisplayFlag(bool on) = 0;
45  virtual bool isRenderFlagSet() = 0;
46  virtual void setRenderFlag(bool on) = 0;
47 
48  SWIGOUT(%newobject displayNode;)
49  virtual HOM_Node *displayNode() = 0;
50  SWIGOUT(%newobject renderNode;)
51  virtual HOM_Node *renderNode() = 0;
52  SWIGOUT(%newobject outputNode;)
53  virtual HOM_Node *outputNode() = 0;
54 
55  SWIGOUT(%newobject topParent;)
56  virtual HOM_Node *topParent() = 0;
57 
58  SWIGOUT(%kwargs cookWorkItems;)
59  virtual void cookWorkItems(
60  bool block=false,
61  bool generate_only=false,
62  bool tops_only=false,
63  bool save_prompt=false,
64  const std::vector<HOM_Node *>& nodes
65  = std::vector<HOM_Node*>()) = 0;
66  SWIGOUT(%kwargs cookOutputWorkItems;)
67  virtual void cookOutputWorkItems(
68  bool block=false,
69  bool generate_only=false,
70  bool tops_only=false,
71  bool save_prompt=false) = 0;
72  SWIGOUT(%kwargs cookAllOutputWorkItems;)
73  virtual void cookAllOutputWorkItems(
74  bool include_display_node,
75  bool block=false,
76  bool generate_only=false,
77  bool tops_only=false,
78  bool save_prompt=false) = 0;
79 
80  SWIGOUT(%kwargs generateStaticWorkItems;)
81  virtual void generateStaticWorkItems(
82  bool block=false,
83  const std::vector<HOM_Node *>& nodes
84  = std::vector<HOM_Node*>()) = 0;
85 
86  virtual void dirtyAllWorkItems(bool remove_outputs) = 0;
87  virtual void dirtyWorkItems(bool remove_outputs) = 0;
88 
89  // This method is deprecated, use generateStaticWorkItems instead
90  virtual void generateStaticItems(bool block=false) = 0;
91 
92  // This method is deprecated, use dirtyAllWorkItems instead
93  virtual void dirtyAllTasks(bool remove_outputs) = 0;
94 
95  // This method is deprecated, use dirtyWorkItems instead
96  virtual void dirtyTasks(bool remove_outputs) = 0;
97 
98  // This method is deprecated, use cookWorkItems or cookOutputWorkItems
99  // instead
100  virtual void executeGraph(bool filter_static=false,
101  bool block=false,
102  bool generate_only=false,
103  bool tops_only=false) = 0;
104 
105  virtual std::string graphCommands() = 0;
106  virtual std::string taskGraphCommands() = 0;
107 
108  virtual bool setSelectedWorkItem(int idx) = 0;
109  virtual int getSelectedWorkItem() = 0;
110  virtual std::string getWorkItemName(int idx) = 0;
111  virtual std::string getPDGGraphContextName() = 0;
112  virtual std::string getPDGNodeName() = 0;
113  virtual int getPDGNodeId() = 0;
114  virtual void cancelCook() = 0;
115  virtual void pauseCook() = 0;
116 
117  virtual void addPDGFilter(int idx) = 0;
118  virtual void removePDGFilter(int idx) = 0;
119  virtual bool isPDGFilter(int idx) = 0;
120  virtual void enablePDGFilter(bool filter_on) = 0;
121 
122  virtual std::vector<int> workItemStates() = 0;
123 
124  virtual std::vector<int> collapsedItems() = 0;
125  virtual int collapsedItem(int idx) = 0;
126  virtual std::vector<int> workItemsInCollapsedItemIds(int id) = 0;
127 
128  virtual bool isProcessor() = 0;
129  virtual bool isPartitioner() = 0;
130  virtual bool isMapper() = 0;
131  virtual bool isScheduler() = 0;
132  virtual bool isServiceCompatible(const char* service_name) = 0;
133  virtual bool isFilterOn() = 0;
134  virtual std::vector<HOM_ElemPtr<HOM_Node> > getFilterNodes() = 0;
135 
136  virtual std::vector<std::string> outputDataTypes() = 0;
137  virtual std::vector<std::string> inputDataTypes() = 0;
138 
139  virtual HOM_EnumValue &getCookState(bool force) = 0;
140 
141  virtual int getDataLayerInterfaceId() = 0;
142 };
143 
144 #endif
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1303
Definition: Node.h:52
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:349
~HOM_TopNode() override
Definition: HOM_TopNode.h:34
#define HOM_API
Definition: HOM_API.h:13
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1302
HOM_TopNode(const HOM_TopNode &pop_node)
Definition: HOM_TopNode.h:30
SIM_API const UT_StringHolder force
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)