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 node port display type, e.g. menus or toggles, for
137 /// parameters
139 {
140  /// Default display type
141  eDefault = 0x0,
142 
143  /// Dropdown menu display
144  eMenu = 0x01,
145 
146  /// Toggle display
147  eToggle = 0x02,
148 
149  /// Join-next display
150  eJoin = 0x04,
151 
152  /// Separator display
153  eSeparator = 0x08,
154 
155  /// No label display
156  eNoLabel = 0x10,
157 
158  /// Operator path display
159  eOperator = 0x20,
160 };
161 
162 /// Enumeration of node port types
163 enum class PDG_PortType
164 {
165  /// Input connection
166  eInput,
167 
168  /// Output connection
169  eOutput,
170 
171  /// Parameter
172  eParameter,
173 
174  /// Port type guard/count
175  eCount
176 };
177 
178 #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.
Operator path display.
Output connection.
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.
A utility node, such as a null or switch.
PDG_PortType
Enumeration of node port types.
int PDG_CacheID
Definition: PDG_NodeTypes.h:30