HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PDG_NodeTypes.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 __PDG_NODE_TYPES_H__
10 #define __PDG_NODE_TYPES_H__
11 
12 #include <UT/UT_Array.h>
13 #include <UT/UT_ArraySet.h>
14 #include <UT/UT_ArrayStringMap.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringMap.h>
17 #include <UT/UT_UniquePtr.h>
18 
19 class PDG_Dependency;
20 class PDG_Node;
21 class PDG_NodeCallback;
22 class PDG_Port;
23 
24 /// Type defs for registered type objects
27 
28 /// Node ID type
29 using PDG_NodeID = int;
30 using PDG_CacheID = int;
31 
32 /// Array, set and map of nodes
35 
39 
40 /// Array of input/output/parameter ports
42 
43 using PDG_NodePortPair = std::pair<UT_StringHolder, UT_StringHolder>;
46 
47 /// Enumeration of callback return types
49 {
50  /// The callback failed to execute
51  eFailure,
52 
53  /// The callback executed successfully
54  eSuccess,
55 
56  /// The callback is missing or undefined
57  eMissing,
58 
59  /// Special "None" case -- the callback took no action or returned no
60  /// results
61  eNone,
62 
63  /// Special "All" case -- the callback returned all results
64  eAll,
65 };
66 
67 /// Node state, used for UI/progress reporting.
68 enum class PDG_NodeState
69 {
70  /// The node is uncooked, either because it wasn't on the cook path or
71  /// because it chose to generate no items
72  eUncooked,
73 
74  /// The node is actively cooking work items
75  eCooking,
76 
77  /// The node is completely cooked
78  eCooked,
79 
80  /// One or more work items failed during the cook
81  eFailed,
82 
83  /// One or more work items were canceled during the cook
84  eCanceled,
85 
86  /// The node is waiting on upstream nodes to make progress
87  eWaiting,
88 
89  /// The node is partially cooked, and likely won't make any progress
90  /// during the rest of the active cook
92 };
93 
94 /// Enumeration of node types in a PDG graph
95 enum class PDG_NodeType
96 {
97  /// Mapper nodes -- add dependencies between upstream and downstream
98  /// work items [Deprecated]
99  eMapper,
100 
101  /// Partitioner nodes -- group multiple upstream work items into
102  /// partitions with a common property
103  ePartitioner,
104 
105  /// Processor nodes -- generate zero more more new work items from
106  /// upstream work items that perform real work
107  eProcessor,
108 
109  /// Scheduler nodes -- submits work items to some sort of scheduling
110  /// or farm system
111  eScheduler,
112 
113  /// Placeholder/undefined node type
114  eUndefined
115 };
116 
117 /// Enumeration of node subtypes
118 enum class PDG_NodeSubtype
119 {
120  /// A regular node -- default value
121  eRegular,
122 
123  /// A feedback begin node -- part of a feedback block
125 
126  /// A feedback end node -- part of a feedback block
127  eFeedbackEnd,
128 
129  /// A utility node, such as a null or switch
130  eUtility,
131 
132  /// Placeholder/undefined node subtype
133  eUndefined
134 };
135 
136 /// Enumeration of reasons why a node may need to regenerate its work items
137 /// Regeneration reasons
139 {
140  /// No regeneration necessary
141  eNone,
142 
143  /// The node should regenerate work items because of a node option
144  /// that indicates it always regenerates.
145  eAlways,
146 
147  /// The node should regenerate work items
148  eFull,
149 
150  /// The node should regenerate work items, and any downstream nodes
151  /// that try to cook will also inherit the state from this node
152  ePropagate,
153 
154  /// The node will be dirtied.
155  eDirty,
156 
157  /// The node will be dirtied and caches invalidated
159 };
160 
161 /// Enumeration of node port display type, e.g. menus or toggles, for
162 /// parameters
164 {
165  /// Default display type
166  eDefault = 0x0,
167 
168  /// Dropdown menu display
169  eMenu = 0x01,
170 
171  /// Toggle display
172  eToggle = 0x02,
173 
174  /// Join-next display
175  eJoin = 0x04,
176 
177  /// Separator display
178  eSeparator = 0x08,
179 
180  /// No label display
181  eNoLabel = 0x10,
182 
183  /// Operator path display
184  eOperator = 0x20,
185 };
186 
187 /// Enumeration of node port types
188 enum class PDG_PortType
189 {
190  /// Input connection
191  eInput,
192 
193  /// Output connection
194  eOutput,
195 
196  /// Parameter
197  eParameter,
198 
199  /// Port type guard/count
200  eCount
201 };
202 
203 #endif /* __PDG_NODE_TYPES_H__ */
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
The node is completely cooked.
A feedback end node – part of a feedback block.
Placeholder/undefined node subtype.
UT_SharedPtr< PDG_Dependency > PDG_DependencyPtr
Type defs for registered type objects.
Definition: PDG_NodeTypes.h:25
Placeholder/undefined node type.
The callback is missing or undefined.
Dropdown menu display.
The callback failed to execute.
UT_UniquePtr< PDG_Node > PDG_NodePtr
Array, set and map of nodes.
Definition: PDG_NodeTypes.h:33
A feedback begin node – part of a feedback block.
A regular node – default value.
Input connection.
Join-next display.
std::pair< UT_StringHolder, UT_StringHolder > PDG_NodePortPair
Definition: PDG_NodeTypes.h:43
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition: UT_UniquePtr.h:39
PDG_NodeType
Enumeration of node types in a PDG graph.
Definition: PDG_NodeTypes.h:95
UT_SharedPtr< PDG_NodeCallback > PDG_NodeCallbackPtr
Definition: PDG_NodeTypes.h:26
No error was specified, i.e. the ref is valid.
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
PDG_NodeState
Node state, used for UI/progress reporting.
Definition: PDG_NodeTypes.h:68
Default display type.
The node will be dirtied and caches invalidated.
The node should regenerate work items.
Operator path display.
Output connection.
PDG_NodeRegenerateReason
int PDG_NodeID
Node ID type.
Definition: PDG_NodeTypes.h:29
No cast error occured (success)
PDG_PortDisplayType
Port type guard/count.
PDG_CallbackResult
Enumeration of callback return types.
Definition: PDG_NodeTypes.h:48
PDG_NodeSubtype
Enumeration of node subtypes.
One or more work items were canceled during the cook.
The node is waiting on upstream nodes to make progress.
One or more work items failed during the cook.
The node is actively cooking work items.
The node will be dirtied.
A utility node, such as a null or switch.
PDG_PortType
Enumeration of node port types.
int PDG_CacheID
Definition: PDG_NodeTypes.h:30