9 #ifndef __PDG_NODE_INTERFACE_H__
10 #define __PDG_NODE_INTERFACE_H__
30 #define PDG_BUILTIN_PARAM_PREFIX "pdg_"
31 #define PDG_BUILTIN_TAG_PREFIX "pdg::"
33 #define PDG_BUILTIN_PARAM(name) PDG_BUILTIN_PARAM_PREFIX name
34 #define PDG_SEP_PARAM(index) "sepparm" #index
35 #define PDG_BUILTIN_TAG(name) PDG_BUILTIN_TAG_PREFIX name
161 int64 getMemoryUsage(
bool inclusive)
const;
168 void addBuiltinPorts(
174 {
return myWorkItemDataType; }
176 {
return myWorkItemDataType; }
189 {
return myParameterGroups; }
192 bool parametersForTag(
210 bool inputPortsForNode(
213 bool inputPortsForWorkItem(
216 bool isWorkItemFromInputPort(
243 int inputCount()
const;
244 int outputCount()
const;
245 int parameterCount()
const;
249 bool hasUnorderedPorts()
const;
250 int numOrderedPorts()
const;
262 bool custom =
false);
272 bool custom =
false);
280 bool custom =
false);
287 void addFileDependency(
291 void addParameterGroup(
294 bool multiparm =
false);
297 void endParameterGroup();
302 {
return myTemplateName; }
312 {
return myValidFlag; }
316 {
return myAutoDependencies; }
322 {
return myCommonVars; }
327 {
return myAppNode.get(); }
330 template <
typename T,
typename... Args>
333 myAppNode = UTmakeUnique<T>(
334 std::forward<Args>(
args)...);
343 {
return myAttributeInfo; }
347 { myAttributeInfo = info; }
351 {
return myScriptInfo; }
355 { myScriptInfo = info; }
359 void setServiceCompatibility(
368 template <
typename... Args>
371 Args&&...
args)
const
375 fmt, std::forward<Args>(
args)...);
376 addError(buffer.
buffer());
384 template <
typename... Args>
387 Args&&...
args)
const
391 fmt, std::forward<Args>(
args)...);
392 addWarning(buffer.
buffer());
396 template <
typename T>
403 PDG_Port* parm = parameter(name, multi);
411 addError(errors.
buffer());
424 PDG_Port* parm = parameter(name, multi);
432 addError(errors.
buffer());
437 template <
typename T>
444 PDG_Port* parm = parameter(name, multi);
449 if (parm->
evaluate(result, work_item, errors))
452 addError(errors.
buffer());
468 bool builtin =
false);
492 int myCurrentParameterGroup;
493 int myNumOrderedPorts;
495 bool myUnorderedFlag;
497 bool myNoSchedulerParams;
498 bool myHasCustomInputs;
499 bool myHasCustomOutputs;
static const UT_StringHolder thePartitionerMergeOpParm
GLuint GLsizei const GLchar * message
static const UT_StringHolder theTagOpDepDirty
GLuint GLsizei const GLchar * label
static const UT_StringHolder thePartitionerSplitAttributeParm
static const UT_StringHolder thePartitionerSortParm
static const UT_StringHolder theProcessorCookTypeParm
void setAttributeInfo(const PDG_AttributeInfo &info)
Clears and sets the attribute info for this interface.
static const UT_StringHolder theSchedulerRpcTimeout
void addWarningFmt(const char *fmt, Args &&...args) const
Adds a warning using a format string, instead of plain string.
static const UT_StringHolder thePartitionerSortDirectionParm
static const UT_StringHolder thePartitionerTargetParm
static const UT_StringHolder thePartitionerSplitDefaultParm
static const UT_StringHolder theTagOpDepRegen
static const UT_StringHolder theSchedulerDeleteTempDirParm
static const UT_StringHolder theProcessorUseServiceBlockParm
static const UT_StringHolder theSchedulerUseMaxTasksParm
static const UT_StringHolder theProcessorCacheModeParm
SYS_FORCE_INLINE const char * buffer() const
static const UT_StringHolder theSchedulerMaxTasksParm
**But if you need a result
virtual void addWarning(const UT_StringHolder &message) const
Adds a warning to the node interface – implemented in subclasses.
static const UT_StringHolder theSchedulerCompressWorkItemDataParm
static const UT_StringHolder theGenerateMenuScript
bool isValid() const
Returns true if the node interface is valid.
bool evaluateRaw(UT_StringHolder &result, const UT_StringHolder &name, const PDG_WorkItem *work_item=nullptr, int index=0, int multi=-1) const
PDG_WorkItemDataType * workItemDataType()
Queries the work item data type associated with this node.
const PDG_Port::ExpressionVars & commonVars() const
static const UT_StringHolder theProcessorServiceResetTypeParm
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
PDG_NodeType
Enumeration of node types in a PDG graph.
static const UT_StringHolder theProcessorServiceResetWhenParm
static const UT_StringHolder theSchedulerUseMapZoneParm
static const UT_StringHolder theTagExtraInput
void addErrorFmt(const char *fmt, Args &&...args) const
Adds an error using a format string, instead of plain string.
static const UT_StringHolder theProcessorLabelTypeParm
static const UT_StringHolder thePartitionerSplitEnabledParm
static const UT_StringHolder theProcessorWorkItemGenerationParm
static const UT_StringHolder theProcessorServiceNameParm
static const UT_StringHolder thePartitionerMergeParm
static const UT_StringHolder thePartitionerMergePatternParm
static const UT_StringHolder thePartitionerStoreIDsParm
const UT_StringHolder & templateName() const
static const UT_StringHolder thePartitionerIDAttribParm
virtual void addError(const UT_StringHolder &message) const
Adds an error to the node interface – implemented in subclasses.
static const UT_StringHolder theSchedulerRpcBatch
static const UT_StringHolder theProcessorScheduleWhenParm
static const UT_StringHolder theFeedbackBeginParm
static const UT_StringHolder theSchedulerWaitForFailuresParm
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.
static const UT_StringHolder theProcessorCommandParm
const PDG_WorkItemDataType * workItemDataType() const
const PDG_AttributeInfo & attributeInfo() const
PDG_ApplicationShim::Node * appNode() const
static const UT_StringHolder thePartitionerMergeOutputsParm
GLuint const GLchar * name
virtual const PDG_NodeInterface * templateInterface() const
SYS_DECLARE_LEGACY_TR(GU_Detail)
static const UT_StringHolder theSchedulerTickPeriodParm
static const UT_StringHolder theCacheModeMenuScript
static const UT_StringHolder thePartitionerMergePreserveParm
static const UT_StringHolder thePartitionerSplitMissingParm
static const UT_StringHolder theSchedulerMapModeParm
static const UT_StringHolder theSchedulerRpcIgnoreErrors
static const UT_StringHolder thePartitionerWhenParm
static const UT_StringHolder thePartitionerIgnoreFailures
void setScriptInfo(const PDG_JobScriptInfo &info)
Sets the script info for the interface.
static const UT_StringHolder theSchedulerValidateOutputsParm
static const UT_StringHolder thePartitionerSetFrameParm
static const UT_StringHolder theSchedulerMapZoneParm
static const UT_StringHolder theSchedulerRpcMaxErrors
static const UT_StringHolder theFeedbackFilesParm
size_t format(const char *fmt, const Args &...args)
static const UT_StringHolder theProcessorPriorityExpressionParm
void setAppNode(Args &&...args)
Sets the underlying app node.
static const UT_StringHolder theSchedulerWorkingDirParm
static const UT_StringHolder theTagExpandName
static const UT_StringHolder theFeedbackAttribPatternParm
static const UT_StringHolder thePartitionerMergeAttribsParm
static const UT_StringHolder theSeparatorLabel
**If you just want to fire and args
const PDG_JobScriptInfo & scriptInfo() const
Returns the script info for this node interface.
static const UT_StringHolder theSchedulerMaxItemsParm
static const UT_StringHolder thePartitionerTargetTypeParm
static const UT_StringHolder theProcessorPriorityTypeParm
static const UT_StringHolder thePartitionerSortRequiredParm
PDG_NodeSubtype
Enumeration of node subtypes.
static const UT_StringHolder thePartitionerSortAttribParm
static const UT_StringHolder theSchedulerRpcRelease
static const UT_StringHolder thePartitionerSplitPartialParm
static const UT_StringHolder theFeedbackAttribsParm
static const UT_StringHolder theSchedulerCheckExpectedOutputsParm
const DependencyArray & autoDependencies() const
Returns the list of external files that this node depends on.
bool evaluate(int index, fpreal &result, const PDG_WorkItem *work_item, UT_WorkBuffer &errors) const
bool evaluateRaw(int index, UT_StringHolder &result, const PDG_WorkItem *work_item, UT_WorkBuffer &errors) const
static const UT_StringHolder theProcessorLabelExpressionParm
static const UT_StringHolder theSchedulerDataSourceParm
static const UT_StringHolder theProcessorUseScheduleWhenParm
static const UT_StringHolder theSchedulerRpcBackoff
const ParameterGroupArray & parameterGroups() const
Returns the list of parameter groups for the node.
PDG_PortType
Enumeration of node port types.
PDG_AttributeInfo myAttributeInfo
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.
static const UT_StringHolder theSchedulerRpcRetries