|
HDK
|
#include <PDG_NodeInterface.h>
Inheritance diagram for PDG_NodeInterface:Classes | |
| struct | AutoFileDependency |
| struct | ParameterGroup |
Public Types | |
| using | ParameterGroupArray = UT_Array< ParameterGroup > |
| using | DependencyArray = UT_Array< AutoFileDependency > |
Public Member Functions | |
| PDG_NodeInterface (UT_StringHolder name="", UT_StringHolder data_type="") | |
| virtual | ~PDG_NodeInterface () |
| int64 | getMemoryUsage (bool inclusive) const |
| void | cloneFrom (const PDG_NodeInterface &interface) |
| void | addBuiltinPorts (PDG_NodeType type, PDG_NodeSubtype sub_type) |
| Adds builtin ports for the specified node type and subtype. More... | |
| PDG_WorkItemDataType * | workItemDataType () |
| Queries the work item data type associated with this node. More... | |
| const PDG_WorkItemDataType * | workItemDataType () const |
| bool | resolveWorkItemDataType (UT_WorkBuffer &errors) |
| Resolves and caches the work item data type. More... | |
| const PDG_PortArray & | ports (PDG_PortType type) const |
| Returns the list of all ports of the specified type. More... | |
| const PDG_PortArray & | inputPorts () const |
| const PDG_PortArray & | outputPorts () const |
| const PDG_PortArray & | parameters () const |
| const ParameterGroupArray & | parameterGroups () const |
| Returns the list of parameter groups for the node. More... | |
| bool | parametersForTag (const UT_StringHolder &tag, PDG_PortArray ¶meters) const |
| Returns the list of parameters with the specified tag. More... | |
| const PDG_PortArray & | customParameters () const |
| Returns the list of custom parameter ports. More... | |
| PDG_Port * | port (PDG_PortType type, int index) const |
| PDG_Port * | port (PDG_PortType type, const UT_StringHolder &name) const |
| PDG_Port * | port (const UT_StringHolder &name) const |
| PDG_Port * | inputPort (int index) const |
| Specialized functions for finding input ports by name or index. More... | |
| PDG_Port * | inputPort (const UT_StringHolder &name) const |
| bool | inputPortsForNode (PDG_Node *node, PDG_PortArray &ports) const |
| bool | inputPortsForWorkItem (const PDG_WorkItem *work_item, PDG_PortArray &ports) const |
| bool | isWorkItemFromInputPort (const PDG_WorkItem *work_item, const UT_StringHolder &name) const |
| PDG_Port * | outputPort (int index) const |
| Sepcialized functions for finding output ports by name or index. More... | |
| PDG_Port * | outputPort (const UT_StringHolder &name) const |
| PDG_Port * | parameter (const UT_StringHolder &name, int multi=-1) const |
| PDGT_Value * | paramValue (const UT_StringHolder &name, int index=0) const |
| PDGT_Value * | defaultParamValue (const UT_StringHolder &name, int index=0) const |
| int | portCount (PDG_PortType type) const |
| int | inputCount () const |
| int | outputCount () const |
| int | parameterCount () const |
| bool | hasUnorderedPorts () const |
| int | numOrderedPorts () const |
| PDG_Port * | addPort (PDG_PortType type, const PDG_WorkItemDataType *data_type, const UT_StringHolder &name, const UT_StringHolder &label, const UT_StringArray &tags=UT_StringArray(), int size=0, bool ordered=true, bool custom=false) |
| PDG_Port * | addParameter (PDGT_Value::DataType data_type, const UT_StringHolder &name, const UT_StringHolder &label, const UT_StringArray &tags, int size=1, bool custom=false) |
| PDG_Port * | addParameter (PDGT_Value::DataType data_type, const UT_StringHolder &name, const UT_StringHolder &label, int size=1, bool custom=false) |
| Adds a parameter with a data type, name, label and optional size. More... | |
| bool | removeParameter (const UT_StringHolder &name) |
| void | addFileDependency (const UT_StringHolder &file_path) |
| Adds a new file dependency to the node interface. More... | |
| void | addParameterGroup (const UT_StringHolder &name, bool root=true, bool multiparm=false) |
| Adds a new parameter group to the node interface. More... | |
| void | endParameterGroup () |
| Ends the current parameter group. More... | |
| const UT_StringHolder & | templateName () const |
| virtual const PDG_NodeInterface * | templateInterface () const |
| bool | isValid () const |
| Returns true if the node interface is valid. More... | |
| const DependencyArray & | autoDependencies () const |
| Returns the list of external files that this node depends on. More... | |
| const PDG_Port::ExpressionVars & | commonVars () const |
| PDG_ApplicationShim::Node * | appNode () const |
| template<typename T , typename... Args> | |
| void | setAppNode (Args &&...args) |
| Sets the underlying app node. More... | |
| const PDG_AttributeInfo & | attributeInfo () const |
| void | setAttributeInfo (const PDG_AttributeInfo &info) |
| Clears and sets the attribute info for this interface. More... | |
| const PDG_JobScriptInfo & | scriptInfo () const |
| Returns the script info for this node interface. More... | |
| void | setScriptInfo (const PDG_JobScriptInfo &info) |
| Sets the script info for the interface. More... | |
| void | setServiceCompatibility (const UT_StringHolder &service_type_name, bool compatible) |
| virtual void | addError (const UT_StringHolder &message) const |
| Adds an error to the node interface – implemented in subclasses. More... | |
| template<typename... Args> | |
| void | addErrorFmt (const char *fmt, Args &&...args) const |
| Adds an error using a format string, instead of plain string. More... | |
| virtual void | addWarning (const UT_StringHolder &message) const |
| Adds a warning to the node interface – implemented in subclasses. More... | |
| template<typename... Args> | |
| void | addWarningFmt (const char *fmt, Args &&...args) const |
| Adds a warning using a format string, instead of plain string. More... | |
| template<typename T > | |
| bool | evaluate (T &result, const UT_StringHolder &name, const PDG_WorkItem *work_item=nullptr, int index=0, int multi=-1) const |
| Evaluates a parameter and reports errors if desired. More... | |
| bool | evaluateRaw (UT_StringHolder &result, const UT_StringHolder &name, const PDG_WorkItem *work_item=nullptr, int index=0, int multi=-1) const |
| template<typename T > | |
| bool | evaluateArray (T &result, const UT_StringHolder &name, const PDG_WorkItem *work_item=nullptr, int multi=-1) const |
| Evaluates a parameter as an array and reports errors if desired. More... | |
Protected Attributes | |
| PDG_AttributeInfo | myAttributeInfo |
| PDG_JobScriptInfo | myScriptInfo |
Friends | |
| class | PDG_NodeTemplate |
Definition at line 41 of file PDG_NodeInterface.h.
Definition at line 63 of file PDG_NodeInterface.h.
Definition at line 54 of file PDG_NodeInterface.h.
| PDG_NodeInterface::PDG_NodeInterface | ( | UT_StringHolder | name = "", |
| UT_StringHolder | data_type = "" |
||
| ) |
|
virtual |
| void PDG_NodeInterface::addBuiltinPorts | ( | PDG_NodeType | type, |
| PDG_NodeSubtype | sub_type | ||
| ) |
Adds builtin ports for the specified node type and subtype.
|
inlinevirtual |
Adds an error to the node interface – implemented in subclasses.
Reimplemented in PDG_Scheduler, and PDG_Node.
Definition at line 367 of file PDG_NodeInterface.h.
|
inline |
Adds an error using a format string, instead of plain string.
Definition at line 372 of file PDG_NodeInterface.h.
| void PDG_NodeInterface::addFileDependency | ( | const UT_StringHolder & | file_path | ) |
Adds a new file dependency to the node interface.
| PDG_Port* PDG_NodeInterface::addParameter | ( | PDGT_Value::DataType | data_type, |
| const UT_StringHolder & | name, | ||
| const UT_StringHolder & | label, | ||
| const UT_StringArray & | tags, | ||
| int | size = 1, |
||
| bool | custom = false |
||
| ) |
Adds a parameter with the specified data type, size, name, label and tag list. Returns the parameter on success, or nullptr on failure.
| PDG_Port* PDG_NodeInterface::addParameter | ( | PDGT_Value::DataType | data_type, |
| const UT_StringHolder & | name, | ||
| const UT_StringHolder & | label, | ||
| int | size = 1, |
||
| bool | custom = false |
||
| ) |
Adds a parameter with a data type, name, label and optional size.
| void PDG_NodeInterface::addParameterGroup | ( | const UT_StringHolder & | name, |
| bool | root = true, |
||
| bool | multiparm = false |
||
| ) |
Adds a new parameter group to the node interface.
| PDG_Port* PDG_NodeInterface::addPort | ( | PDG_PortType | type, |
| const PDG_WorkItemDataType * | data_type, | ||
| const UT_StringHolder & | name, | ||
| const UT_StringHolder & | label, | ||
| const UT_StringArray & | tags = UT_StringArray(), |
||
| int | size = 0, |
||
| bool | ordered = true, |
||
| bool | custom = false |
||
| ) |
Adds the specified port, which can be an input, output or a parameter. Returns the new port on success, else returns failure.
|
inlinevirtual |
Adds a warning to the node interface – implemented in subclasses.
Reimplemented in PDG_Scheduler, and PDG_Node.
Definition at line 383 of file PDG_NodeInterface.h.
|
inline |
Adds a warning using a format string, instead of plain string.
Definition at line 388 of file PDG_NodeInterface.h.
|
inline |
Returns the underlying application node associated with this PDG node, for example a TOP node or TOP scheduler. This may be null.
Definition at line 329 of file PDG_NodeInterface.h.
|
inline |
Returns the attribute info object for this node interface. If this is a template loaded from .json, the attribute info object contains the definition as it was specified in the template. Otherwise, if this is a cooked node, then it contains the evaluated attribute info from the last cook.
Definition at line 345 of file PDG_NodeInterface.h.
|
inline |
Returns the list of external files that this node depends on.
Definition at line 318 of file PDG_NodeInterface.h.
| void PDG_NodeInterface::cloneFrom | ( | const PDG_NodeInterface & | interface | ) |
Clones the template interface into the ports/parameters on this interface.
|
inline |
Returns the list of common expression variables, available on all parameters on this node interface.
Definition at line 324 of file PDG_NodeInterface.h.
| const PDG_PortArray& PDG_NodeInterface::customParameters | ( | ) | const |
Returns the list of custom parameter ports.
| PDGT_Value* PDG_NodeInterface::defaultParamValue | ( | const UT_StringHolder & | name, |
| int | index = 0 |
||
| ) | const |
| void PDG_NodeInterface::endParameterGroup | ( | ) |
Ends the current parameter group.
|
inline |
Evaluates a parameter and reports errors if desired.
Definition at line 400 of file PDG_NodeInterface.h.
|
inline |
Evaluates a parameter as an array and reports errors if desired.
Definition at line 441 of file PDG_NodeInterface.h.
|
inline |
Evaluates a string parameter as a raw string, and reports errors if desired.
Definition at line 420 of file PDG_NodeInterface.h.
| int64 PDG_NodeInterface::getMemoryUsage | ( | bool | inclusive | ) | const |
| bool PDG_NodeInterface::hasUnorderedPorts | ( | ) | const |
Returns information about the number of ordered vs. unordered input ports on this node.
| int PDG_NodeInterface::inputCount | ( | ) | const |
Specialized functions for finding input ports by name or index.
| PDG_Port* PDG_NodeInterface::inputPort | ( | const UT_StringHolder & | name | ) | const |
| const PDG_PortArray& PDG_NodeInterface::inputPorts | ( | ) | const |
| bool PDG_NodeInterface::inputPortsForNode | ( | PDG_Node * | node, |
| PDG_PortArray & | ports | ||
| ) | const |
| bool PDG_NodeInterface::inputPortsForWorkItem | ( | const PDG_WorkItem * | work_item, |
| PDG_PortArray & | ports | ||
| ) | const |
|
inline |
Returns true if the node interface is valid.
Definition at line 314 of file PDG_NodeInterface.h.
| bool PDG_NodeInterface::isWorkItemFromInputPort | ( | const PDG_WorkItem * | work_item, |
| const UT_StringHolder & | name | ||
| ) | const |
| int PDG_NodeInterface::numOrderedPorts | ( | ) | const |
| int PDG_NodeInterface::outputCount | ( | ) | const |
Sepcialized functions for finding output ports by name or index.
| PDG_Port* PDG_NodeInterface::outputPort | ( | const UT_StringHolder & | name | ) | const |
| const PDG_PortArray& PDG_NodeInterface::outputPorts | ( | ) | const |
| PDG_Port* PDG_NodeInterface::parameter | ( | const UT_StringHolder & | name, |
| int | multi = -1 |
||
| ) | const |
Returns the parameter with the specified name, or nullptr if no such parameter exists.
| int PDG_NodeInterface::parameterCount | ( | ) | const |
|
inline |
Returns the list of parameter groups for the node.
Definition at line 191 of file PDG_NodeInterface.h.
| const PDG_PortArray& PDG_NodeInterface::parameters | ( | ) | const |
| bool PDG_NodeInterface::parametersForTag | ( | const UT_StringHolder & | tag, |
| PDG_PortArray & | parameters | ||
| ) | const |
Returns the list of parameters with the specified tag.
| PDGT_Value* PDG_NodeInterface::paramValue | ( | const UT_StringHolder & | name, |
| int | index = 0 |
||
| ) | const |
Returns the value and default value of the parameter with the specified name and index. If no parameter is found or the index is out of range, nullptr is returned.
| PDG_Port* PDG_NodeInterface::port | ( | PDG_PortType | type, |
| int | index | ||
| ) | const |
Find a port by type, index and/or name. If no matching port is found, nullptr is returned.
| PDG_Port* PDG_NodeInterface::port | ( | PDG_PortType | type, |
| const UT_StringHolder & | name | ||
| ) | const |
| PDG_Port* PDG_NodeInterface::port | ( | const UT_StringHolder & | name | ) | const |
| int PDG_NodeInterface::portCount | ( | PDG_PortType | type | ) | const |
Returns the numbers of ports with the specified type (input, output, etc).
| const PDG_PortArray& PDG_NodeInterface::ports | ( | PDG_PortType | type | ) | const |
Returns the list of all ports of the specified type.
| bool PDG_NodeInterface::removeParameter | ( | const UT_StringHolder & | name | ) |
Removes the specified parameter by name, and returns true if the parameter was found and successfully removed.
| bool PDG_NodeInterface::resolveWorkItemDataType | ( | UT_WorkBuffer & | errors | ) |
Resolves and caches the work item data type.
|
inline |
Returns the script info for this node interface.
Definition at line 353 of file PDG_NodeInterface.h.
|
inline |
Sets the underlying app node.
Definition at line 334 of file PDG_NodeInterface.h.
|
inline |
Clears and sets the attribute info for this interface.
Definition at line 349 of file PDG_NodeInterface.h.
|
inline |
Sets the script info for the interface.
Definition at line 357 of file PDG_NodeInterface.h.
| void PDG_NodeInterface::setServiceCompatibility | ( | const UT_StringHolder & | service_type_name, |
| bool | compatible | ||
| ) |
Adds a single entry to the job script info's service compatiblity list
|
inlinevirtual |
Returns the template interface that defined how this interface was created
Reimplemented in PDG_Node, and PDG_Scheduler.
Definition at line 310 of file PDG_NodeInterface.h.
|
inline |
If this interface represents a template, returns the name of that template
Definition at line 304 of file PDG_NodeInterface.h.
|
inline |
Queries the work item data type associated with this node.
Definition at line 176 of file PDG_NodeInterface.h.
|
inline |
Definition at line 178 of file PDG_NodeInterface.h.
|
friend |
Definition at line 474 of file PDG_NodeInterface.h.
|
protected |
Definition at line 460 of file PDG_NodeInterface.h.
|
protected |
Definition at line 461 of file PDG_NodeInterface.h.
|
static |
Definition at line 156 of file PDG_NodeInterface.h.
|
static |
Definition at line 93 of file PDG_NodeInterface.h.
|
static |
Definition at line 92 of file PDG_NodeInterface.h.
|
static |
Definition at line 90 of file PDG_NodeInterface.h.
|
static |
Definition at line 91 of file PDG_NodeInterface.h.
|
static |
Definition at line 155 of file PDG_NodeInterface.h.
|
static |
Definition at line 119 of file PDG_NodeInterface.h.
|
static |
Definition at line 100 of file PDG_NodeInterface.h.
|
static |
Definition at line 113 of file PDG_NodeInterface.h.
|
static |
Definition at line 114 of file PDG_NodeInterface.h.
|
static |
Definition at line 112 of file PDG_NodeInterface.h.
|
static |
Definition at line 110 of file PDG_NodeInterface.h.
|
static |
Definition at line 115 of file PDG_NodeInterface.h.
|
static |
Definition at line 116 of file PDG_NodeInterface.h.
|
static |
Definition at line 121 of file PDG_NodeInterface.h.
|
static |
Definition at line 96 of file PDG_NodeInterface.h.
|
static |
Definition at line 97 of file PDG_NodeInterface.h.
|
static |
Definition at line 95 of file PDG_NodeInterface.h.
|
static |
Definition at line 98 of file PDG_NodeInterface.h.
|
static |
Definition at line 103 of file PDG_NodeInterface.h.
|
static |
Definition at line 105 of file PDG_NodeInterface.h.
|
static |
Definition at line 102 of file PDG_NodeInterface.h.
|
static |
Definition at line 104 of file PDG_NodeInterface.h.
|
static |
Definition at line 106 of file PDG_NodeInterface.h.
|
static |
Definition at line 118 of file PDG_NodeInterface.h.
|
static |
Definition at line 109 of file PDG_NodeInterface.h.
|
static |
Definition at line 108 of file PDG_NodeInterface.h.
|
static |
Definition at line 99 of file PDG_NodeInterface.h.
|
static |
Definition at line 75 of file PDG_NodeInterface.h.
|
static |
Definition at line 73 of file PDG_NodeInterface.h.
|
static |
UT_StringHolder instances for built in PDG parm/data field names. Since some of these are used during the cook, it's advantageous to store them as static instances and refer to them using PDG_NodeInterace::theXYZX rather just referring to them with a const char* to avoid rehashing for map lookups.
Definition at line 72 of file PDG_NodeInterface.h.
|
static |
Definition at line 76 of file PDG_NodeInterface.h.
|
static |
Definition at line 85 of file PDG_NodeInterface.h.
|
static |
Definition at line 84 of file PDG_NodeInterface.h.
|
static |
Definition at line 82 of file PDG_NodeInterface.h.
|
static |
Definition at line 81 of file PDG_NodeInterface.h.
|
static |
Definition at line 88 of file PDG_NodeInterface.h.
|
static |
Definition at line 77 of file PDG_NodeInterface.h.
|
static |
Definition at line 79 of file PDG_NodeInterface.h.
|
static |
Definition at line 78 of file PDG_NodeInterface.h.
|
static |
Definition at line 87 of file PDG_NodeInterface.h.
|
static |
Definition at line 80 of file PDG_NodeInterface.h.
|
static |
Definition at line 74 of file PDG_NodeInterface.h.
|
static |
Definition at line 126 of file PDG_NodeInterface.h.
|
static |
Definition at line 127 of file PDG_NodeInterface.h.
|
static |
Definition at line 124 of file PDG_NodeInterface.h.
|
static |
Definition at line 136 of file PDG_NodeInterface.h.
|
static |
Definition at line 132 of file PDG_NodeInterface.h.
|
static |
Definition at line 133 of file PDG_NodeInterface.h.
|
static |
Definition at line 129 of file PDG_NodeInterface.h.
|
static |
Definition at line 131 of file PDG_NodeInterface.h.
|
static |
Definition at line 142 of file PDG_NodeInterface.h.
|
static |
Definition at line 143 of file PDG_NodeInterface.h.
|
static |
Definition at line 145 of file PDG_NodeInterface.h.
|
static |
Definition at line 146 of file PDG_NodeInterface.h.
|
static |
Definition at line 144 of file PDG_NodeInterface.h.
|
static |
Definition at line 141 of file PDG_NodeInterface.h.
|
static |
Definition at line 140 of file PDG_NodeInterface.h.
|
static |
Definition at line 128 of file PDG_NodeInterface.h.
|
static |
Definition at line 138 of file PDG_NodeInterface.h.
|
static |
Definition at line 137 of file PDG_NodeInterface.h.
|
static |
Definition at line 134 of file PDG_NodeInterface.h.
|
static |
Definition at line 130 of file PDG_NodeInterface.h.
|
static |
Definition at line 125 of file PDG_NodeInterface.h.
|
static |
Definition at line 135 of file PDG_NodeInterface.h.
|
static |
Definition at line 123 of file PDG_NodeInterface.h.
|
static |
Definition at line 153 of file PDG_NodeInterface.h.
|
static |
Definition at line 148 of file PDG_NodeInterface.h.
|
static |
Definition at line 151 of file PDG_NodeInterface.h.
|
static |
Definition at line 149 of file PDG_NodeInterface.h.
|
static |
Definition at line 150 of file PDG_NodeInterface.h.