9 #ifndef __PDG_NODE_INTERFACE_H__
10 #define __PDG_NODE_INTERFACE_H__
31 #define PDG_BUILTIN_PARAM_PREFIX "pdg_"
32 #define PDG_BUILTIN_TAG_PREFIX "pdg::"
34 #define PDG_BUILTIN_PARAM(name) PDG_BUILTIN_PARAM_PREFIX name
35 #define PDG_SEP_PARAM(index) "sepparm" #index
36 #define PDG_BUILTIN_TAG(name) PDG_BUILTIN_TAG_PREFIX name
162 int64 getMemoryUsage(
bool inclusive)
const;
169 void addBuiltinPorts(
175 {
return myWorkItemDataType; }
177 {
return myWorkItemDataType; }
190 {
return myParameterGroups; }
193 bool parametersForTag(
211 bool inputPortsForNode(
214 bool inputPortsForWorkItem(
217 bool isWorkItemFromInputPort(
244 int inputCount()
const;
245 int outputCount()
const;
246 int parameterCount()
const;
250 bool hasUnorderedPorts()
const;
251 int numOrderedPorts()
const;
263 bool custom =
false);
273 bool custom =
false);
281 bool custom =
false);
288 void addFileDependency(
292 void addParameterGroup(
295 bool multiparm =
false);
298 void endParameterGroup();
303 {
return myTemplateName; }
307 {
return myValidFlag; }
311 {
return myAutoDependencies; }
317 {
return myCommonVars; }
322 {
return myAppNode.get(); }
325 template <
typename T,
typename... Args>
328 myAppNode = UTmakeUnique<T>(
329 std::forward<Args>(
args)...);
338 {
return myAttributeInfo; }
342 { myAttributeInfo = info; }
346 {
return myScriptInfo; }
350 { myScriptInfo = info; }
354 void setServiceCompatibility(
363 template <
typename... Args>
366 Args&&...
args)
const
370 fmt, std::forward<Args>(
args)...);
371 addError(buffer.
buffer());
379 template <
typename... Args>
382 Args&&...
args)
const
386 fmt, std::forward<Args>(
args)...);
387 addWarning(buffer.
buffer());
391 template <
typename T>
398 PDG_Port* parm = parameter(name, multi);
406 addError(errors.
buffer());
419 PDG_Port* parm = parameter(name, multi);
427 addError(errors.
buffer());
432 template <
typename T>
439 PDG_Port* parm = parameter(name, multi);
444 if (parm->
evaluate(result, work_item, errors))
447 addError(errors.
buffer());
463 bool builtin =
false);
487 int myCurrentParameterGroup;
488 int myNumOrderedPorts;
490 bool myUnorderedFlag;
492 bool myNoSchedulerParams;
493 bool myHasCustomInputs;
494 bool myHasCustomOutputs;
static const UT_StringHolder thePartitionerMergeOpParm
GLuint GLsizei const GLchar * message
static const UT_StringHolder theTagOpDepDirty
PDG_NodeSubtype
Enumeration of node subtypes.
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
PDG_NodeType
Enumeration of node types in a PDG graph.
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 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.
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
PDG_PortType
Enumeration of node port types.
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
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
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
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 theSchedulerDeleteTempDir
static const UT_StringHolder theSchedulerRpcBackoff
const ParameterGroupArray & parameterGroups() const
Returns the list of parameter groups for the node.
static const UT_StringHolder theSchedulerWaitForFailures
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