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_Node.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_Node
25 {
26 public:
28  : HOM_NetworkMovableItem(HOM_networkItemType::Node)
29  { HOM_CONSTRUCT_OBJECT(this) }
30  HOM_TopNode(const HOM_TopNode &pop_node)
31  : HOM_Node(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  virtual void generateStaticWorkItems(bool block=false) = 0;
81 
82  virtual void dirtyAllWorkItems(bool remove_outputs) = 0;
83  virtual void dirtyWorkItems(bool remove_outputs) = 0;
84 
85  // This method is deprecated, use generateStaticWorkItems instead
86  virtual void generateStaticItems(bool block=false) = 0;
87 
88  // This method is deprecated, use dirtyAllWorkItems instead
89  virtual void dirtyAllTasks(bool remove_outputs) = 0;
90 
91  // This method is deprecated, use dirtyWorkItems instead
92  virtual void dirtyTasks(bool remove_outputs) = 0;
93 
94  // This method is deprecated, use cookWorkItems or cookOutputWorkItems
95  // instead
96  virtual void executeGraph(bool filter_static=false,
97  bool block=false,
98  bool generate_only=false,
99  bool tops_only=false) = 0;
100 
101  virtual std::string graphCommands() = 0;
102  virtual std::string taskGraphCommands() = 0;
103 
104  virtual void setSelectedWorkItem(int idx) = 0;
105  virtual int getSelectedWorkItem() = 0;
106  virtual std::string getWorkItemName(int idx) = 0;
107  virtual std::string getPDGGraphContextName() = 0;
108  virtual std::string getPDGNodeName() = 0;
109  virtual int getPDGNodeId() = 0;
110  virtual void cancelCook() = 0;
111  virtual void pauseCook() = 0;
112 
113  virtual void addPDGFilter(int idx) = 0;
114  virtual void removePDGFilter(int idx) = 0;
115  virtual bool isPDGFilter(int idx) = 0;
116  virtual void enablePDGFilter(bool filter_on) = 0;
117 
118  virtual bool isProcessor() = 0;
119  virtual bool isPartitioner() = 0;
120  virtual bool isMapper() = 0;
121  virtual bool isScheduler() = 0;
122  virtual bool isFilterOn() = 0;
123  virtual std::vector<HOM_ElemPtr<HOM_Node> > getFilterNodes() = 0;
124 
125  virtual std::vector<std::string> outputDataTypes() = 0;
126  virtual std::vector<std::string> inputDataTypes() = 0;
127 
128  virtual HOM_EnumValue &getCookState(bool force) = 0;
129 
130  virtual int getDataLayerInterfaceId() = 0;
131 };
132 
133 #endif
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1238
OIIO_API bool rename(string_view from, string_view to, std::string &err)
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:353
~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:1237
GLsizei const GLchar *const * string
Definition: glcorearb.h:813
HOM_TopNode(const HOM_TopNode &pop_node)
Definition: HOM_TopNode.h:30