HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PDG_Node Class Reference

#include <PDG_Node.h>

+ Inheritance diagram for PDG_Node:

Classes

struct  LoopInfo
 
struct  ModTimeCacheEntry
 
class  ScopedGenerate
 

Public Types

enum  RegenerateReason {
  eRegenerateNone, eRegenerateAlways, eRegenerateFull, eRegeneratePropagate,
  eRegenerateDirty, eRegenerateDirtyInvalidate
}
 Regeneration reasons. More...
 
enum  BypassState { eBypassNone, eBypassSubnetwork, eBypassNode }
 Bypass state for the node. More...
 
- Public Types inherited from PDG_NodeInterface
using ParameterGroupArray = UT_Array< ParameterGroup >
 
using DependencyArray = UT_Array< AutoFileDependency >
 
- Public Types inherited from PDGE_DependencyOwner
using Array = UT_Array< PDGE_DependencyOwner * >
 
using Set = UT_ArraySet< PDGE_DependencyOwner * >
 

Public Member Functions

 PDG_Node (PDG_GraphContext *context, const UT_StringHolder &name, const PDG_NodeCallbackType *type_object, PDG_NodeID id=-1)
 
 ~PDG_Node () override
 
const PDG_EventFiltersupportedEventTypes () const override
 Returns the list of supported event types. More...
 
int64 getMemoryUsage (bool inclusive) const override
 
virtual void memoryInfo (PDG_MemoryInfo &memory_info, bool inclusive) const
 Returns the memory usage as a PDG_MemoryInfo struct. More...
 
int64 workItemMemory (bool attribs_only=false) const
 
PDG_NodeID getId () const
 Returns this node's id, it matches the TOP node id. More...
 
const UT_StringHoldername () const
 Returns the node's unique name. More...
 
void rename (const UT_StringHolder &new_name)
 
bool performancePath (UT_WorkBuffer &buffer, const UT_StringHolder &event_name, const PDG_WorkItem *work_item) const
 
const PDG_NodeCallbackTypetypeObject () const
 Returns the node's type object. More...
 
PDG_NodeType nodeType () const
 Returns the node type, e.g. processor, mapper, etc. More...
 
PDG_NodeSubtype nodeSubtype () const
 Returns the sub type, e.g. normal, foreach begin, foreach end, etd. More...
 
PDG_NodeState nodeState () const
 Returns the current state of the node. More...
 
fpreal nodeProgress () const
 Returns the current cook progress of the node. More...
 
const PDG_NodeOptionsnodeOptions (bool do_update)
 
const PDG_SortOptionssortOptions () const
 Returns the node's sort options struct. More...
 
const PDG_NodeStatsstats () const
 Returns the node's stat object. More...
 
PDG_NodeStatsstats ()
 
PDG_NodeCallbackcallback () const
 
void setCallback (PDG_NodeCallbackPtr callback)
 
PDG_Schedulerscheduler () const
 Gets/sets the per-node scheduler override. More...
 
void setScheduler (PDG_Scheduler *scheduler)
 
const PDG_SchedulerSetschedulerReferences () const
 
void addSchedulerReference (PDG_Scheduler *scheduler)
 
void clearSchedulerReferences ()
 
PDG_GraphContextcontext () const
 Returns the graph context that owns the node. More...
 
int loopDepth () const
 Returns the loop dpeth of the node. More...
 
PDG_ServiceResetWhen loopResetWhen () const
 Returns the loop block's service reset conditoon. More...
 
PDG_ServiceResetType loopResetType () const
 Returns the loop block's service reset type. More...
 
bool isErrorHandler () const
 Returns true if the node is an error handler. More...
 
bool isErrorHandlerBranch () const
 Returns true if the node is in an error handler branch. More...
 
void setIsErrorHandler (bool error_handler)
 Sets the error handler flag on this node. More...
 
void setIsErrorHandlerBranch (bool error_handler)
 Sets the error handler branch flag on this node. More...
 
bool hasErrors () const
 Clears and checks the error flag. More...
 
bool isGenerating () const
 
bool isDynamicEval () const
 
bool isDynamicGeneration () const
 
bool isDynamicProp () const
 
bool canHaveWorkItems () const
 
const UT_StringHolderserviceName () const
 
bool useServiceBlock () const
 
RegenerateReason regenerateReason () const
 
void setRegenerateReason (RegenerateReason reason)
 
void updateRegenerateReason (RegenerateReason reason)
 
void setBypassState (BypassState state)
 Sets the bypassed flag on this node. More...
 
bool updateBypassState (BypassState state)
 Updates the bypass flag of this node, if the new state is higher. More...
 
BypassState bypassState () const
 
bool isBypassed () const
 Returns true if the node is bypassed. More...
 
bool isLeaf () const
 Returns true if the node is a leaf, i.e it has no descendant nodes. More...
 
bool isCooked () const
 
void dirty (bool remove_outputs)
 
PDG_WorkItemDirty prepareDirty ()
 Prepares a dirty operation that can be applied later. More...
 
void appendDirty (PDG_WorkItemDirty *dirty_state)
 Appends to an existing dirty operation. More...
 
void freeze ()
 
void freezeFrom (const PDG_WorkItemArray &work_items)
 Sets the work items in the node from the input list and freezes them. More...
 
bool cook (bool blocking, UT_WorkBuffer &errors)
 
void cancel ()
 Cancels any work items scheduled by this node. More...
 
virtual bool deserializeWorkItem (PDG_WorkItem *work_item)
 
virtual void commitWorkItem (PDG_WorkItem *work_item)
 Called after a work item is completely deserialized. More...
 
virtual PDG_WorkItemCacheState outputCacheState (const PDG_WorkItem *work_item) const
 Returns the cache state of a work item in this node. More...
 
void startWorkItem (PDG_WorkItem *work_item)
 Notifies the node that the specified work item has started cooking. More...
 
int reserveIndexBlock (int number)
 
const PDG_NodeInterfacetemplateInterface () const override
 
PDG_PortaddCustomParameter (PDGT_Value::DataType type, const UT_StringHolder &name, const UT_StringHolder &label, const UT_StringArray &tags, int size)
 
int connectionCount (PDG_PortType type, bool filter_bypassed=true, bool filter_reference=true) const
 Returns node connectivity information. More...
 
void connectedNodes (PDG_NodeArray &nodes, PDG_PortType type, bool filter_bypassed=true, bool filter_reference=true) const
 
PDG_NodefirstConnectedNode (PDG_PortType type, bool filter_bypassed=true, bool filter_reference=true) const
 
void connectedAncestors (PDG_NodeSet &nodes, PDG_PortType type, bool filter_bypassed=true, bool filter_reference=true)
 
void addError (const UT_StringHolder &message) const override
 Emits a node level error from the node as PDG_Event. More...
 
void addWarning (const UT_StringHolder &message) const override
 Emits a node level warning from the node as PDG_Event. More...
 
const UT_Array< PDG_Dependency * > & dependencies () const
 
void addDependency (PDG_Dependency *dependency)
 
void removeDependency (PDG_Dependency *dependency)
 
void resolveDependencies ()
 
const PDG_WorkItemArrayworkItems () const
 
void workItemIDs (PDG_WorkItemIDArray &array, bool include_batches) const
 Returns the IDs of the work items in the node. More...
 
void workItemsCopy (PDG_WorkItemArray &array, bool include_batches) const
 Returns a safe copy of the work item array. More...
 
template<typename Filter >
void workItemsCopy (PDG_WorkItemArray &array, const Filter &filter) const
 
void batchItemsCopy (PDG_BatchWorkItemSet &set) const
 Returns a safe copy of the batch work item set. More...
 
void removeWorkItems (const PDG_WorkItemConstArray &work_items)
 Removes a list of work item from the node. More...
 
bool outputFiles (PDG_File::Array &files, bool localize) const
 
virtual void queueWorkItemDeps (PDGE_Evaluator &evaluator, PDG_NodeSet &visited_nodes, PDG_WorkItemIDSet &visited_items, PDG_Filter &filter)
 Builds evaluation dependencies to cook a specific set of work items. More...
 
bool preCook (PDG_NodeSet &dirty, PDG_NodeSet &visited, bool &save_scene, bool has_filter)
 Runs precook logic for this node and recurses into input nodes. More...
 
int preCookLoop ()
 Sets the loop depth and loop block reference on the node. More...
 
void postCook (PDG_NodeSet &visited)
 Runs postcook logic for this node and recurses into input nodes. More...
 
PDG_CacheID addOutputCacheEntry (const UT_StringHolder &file, PDG_CacheID cache_id)
 
PDG_CacheID addModTimeCacheEntry (const PDG_File &file, const PDG_WorkItem *work_item)
 
bool saveJSON (std::ostream &os, bool binary)
 Serializes the work items in the node to the specified stream. More...
 
bool saveJSON (const UT_StringHolder &file_path)
 Serializes the work items in the node to the specified file. More...
 
bool asJSON (UT_JSONWriter &writer, bool skip_defaults) const
 
- Public Member Functions inherited from PDG_NodeInterface
 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_WorkItemDataTypeworkItemDataType ()
 Queries the work item data type associated with this node. More...
 
const PDG_WorkItemDataTypeworkItemDataType () const
 
bool resolveWorkItemDataType (UT_WorkBuffer &errors)
 Resolves and caches the work item data type. More...
 
const PDG_PortArrayports (PDG_PortType type) const
 Returns the list of all ports of the specified type. More...
 
const PDG_PortArrayinputPorts () const
 
const PDG_PortArrayoutputPorts () const
 
const PDG_PortArrayparameters () const
 
const ParameterGroupArrayparameterGroups () const
 Returns the list of parameter groups for the node. More...
 
bool parametersForTag (const UT_StringHolder &tag, PDG_PortArray &parameters) const
 Returns the list of parameters with the specified tag. More...
 
const PDG_PortArraycustomParameters () const
 Returns the list of custom parameter ports. More...
 
PDG_Portport (PDG_PortType type, int index) const
 
PDG_Portport (PDG_PortType type, const UT_StringHolder &name) const
 
PDG_Portport (const UT_StringHolder &name) const
 
PDG_PortinputPort (int index) const
 Specialized functions for finding input ports by name or index. More...
 
PDG_PortinputPort (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_PortoutputPort (int index) const
 Sepcialized functions for finding output ports by name or index. More...
 
PDG_PortoutputPort (const UT_StringHolder &name) const
 
PDG_Portparameter (const UT_StringHolder &name, int multi=-1) const
 
PDGT_ValueparamValue (const UT_StringHolder &name, int index=0) const
 
PDGT_ValuedefaultParamValue (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_PortaddPort (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_PortaddParameter (PDGT_Value::DataType data_type, const UT_StringHolder &name, const UT_StringHolder &label, const UT_StringArray &tags, int size=1, bool custom=false)
 
PDG_PortaddParameter (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_StringHoldertemplateName () const
 
bool isValid () const
 Returns true if the node interface is valid. More...
 
const DependencyArrayautoDependencies () const
 Returns the list of external files that this node depends on. More...
 
const PDG_Port::ExpressionVarscommonVars () const
 
PDG_ApplicationShim::NodeappNode () const
 
template<typename T , typename... Args>
void setAppNode (Args &&...args)
 Sets the underlying app node. More...
 
const PDG_AttributeInfoattributeInfo () const
 
void setAttributeInfo (const PDG_AttributeInfo &info)
 Clears and sets the attribute info for this interface. More...
 
const PDG_JobScriptInfoscriptInfo () 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)
 
template<typename... Args>
void addErrorFmt (const char *fmt, Args &&...args) const
 Adds an error using a format string, instead of plain string. 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...
 
- Public Member Functions inherited from PDG_EventEmitter
 PDG_EventEmitter (PDG_EventQueue *event_queue, bool block_destruction)
 
virtual ~PDG_EventEmitter ()
 
int64 getMemoryUsage (bool inclusive) const
 Returns memory usage for this event emitter instance. More...
 
bool addEventHandler (PDG_EventHandler *handler)
 Adds an event handlers that listens for all types of events. More...
 
bool addEventHandler (PDG_EventHandler *handler, PDG_EventType event)
 Adds an event handlers that listens for a specific event. More...
 
bool addEventHandler (PDG_EventHandler *handler, const PDG_EventFilter &filter)
 
void removeEventHandler (PDG_EventHandler *handler)
 Removes an event handler from this emitter. More...
 
void removeAllEventHandlers (bool user_handler_only=false)
 
void emitEvent (const PDG_Event &event, bool immediate=false) const
 Emit an event to all handlers. More...
 
void eventHandlers (PDG_EventHandlerArray &handlers) const
 
void setEventQueue (PDG_EventQueue *event_queue)
 
void clearEventQueue ()
 
bool shouldEmit (const PDG_Event &event) const
 
- Public Member Functions inherited from PDGE_DependencyOwner
 PDGE_DependencyOwner ()
 Constructs a new dependency owner, which must have a string name. More...
 
virtual ~PDGE_DependencyOwner ()
 
virtual UT_StringHolder debugGroup () const
 

Static Public Member Functions

static bool fromJSON (const UT_JSONValue *value, PDG_GraphContext *context, PDG_NodePortMap &inputs, UT_WorkBuffer &errors)
 Reads and constructs a scheduler from JSON and returns the instance. More...
 
static void queueNodeDeps (PDGE_Evaluator &evaluator, const PDG_NodeSet &leaf_nodes, const PDG_NodeSet &error_handlers, bool generate_only, bool cook)
 Queues node dependencies for cooking with the evaluator. More...
 
- Static Public Member Functions inherited from PDGE_DependencyOwner
template<typename T >
static void cast (UT_Array< T > &out, const Array &in)
 Converts an owner array to an array of the specified type. More...
 
template<typename T >
static void cast (Array &out, const UT_Array< T > &in)
 Converts an array of the specified type to an owner array. More...
 

Static Public Attributes

static const UT_StringHolder theNameKey
 The key for the node name when writing the node to JSON. More...
 
static const UT_StringHolder theTypeKey
 The key for the node type when writing the node to JSON. More...
 
static const UT_StringHolder theSchedulerKey
 The key for the scheduler name when writing the node to JSON. More...
 
static const UT_StringHolder theInputsKey
 The key for the input nodes when writing the node to JSON. More...
 
static const UT_StringHolder theParametersKey
 The key for the parameters when writing the node to JSON. More...
 
- Static Public Attributes inherited from PDG_NodeInterface
static const UT_StringHolder theProcessorCommandParm
 
static const UT_StringHolder theProcessorWorkItemGenerationParm
 
static const UT_StringHolder theProcessorCacheModeParm
 
static const UT_StringHolder theProcessorCookTypeParm
 
static const UT_StringHolder theProcessorServiceNameParm
 
static const UT_StringHolder theProcessorServiceResetWhenParm
 
static const UT_StringHolder theProcessorServiceResetTypeParm
 
static const UT_StringHolder theProcessorUseServiceBlockParm
 
static const UT_StringHolder theProcessorPriorityTypeParm
 
static const UT_StringHolder theProcessorPriorityExpressionParm
 
static const UT_StringHolder theProcessorLabelTypeParm
 
static const UT_StringHolder theProcessorLabelExpressionParm
 
static const UT_StringHolder theProcessorUseScheduleWhenParm
 
static const UT_StringHolder theProcessorScheduleWhenParm
 
static const UT_StringHolder theFeedbackBeginParm
 
static const UT_StringHolder theFeedbackFilesParm
 
static const UT_StringHolder theFeedbackAttribsParm
 
static const UT_StringHolder theFeedbackAttribPatternParm
 
static const UT_StringHolder thePartitionerSortParm
 
static const UT_StringHolder thePartitionerSortAttribParm
 
static const UT_StringHolder thePartitionerSortDirectionParm
 
static const UT_StringHolder thePartitionerSortRequiredParm
 
static const UT_StringHolder thePartitionerWhenParm
 
static const UT_StringHolder thePartitionerIgnoreFailures
 
static const UT_StringHolder thePartitionerSplitEnabledParm
 
static const UT_StringHolder thePartitionerSplitAttributeParm
 
static const UT_StringHolder thePartitionerSplitMissingParm
 
static const UT_StringHolder thePartitionerSplitDefaultParm
 
static const UT_StringHolder thePartitionerSplitPartialParm
 
static const UT_StringHolder thePartitionerTargetTypeParm
 
static const UT_StringHolder thePartitionerTargetParm
 
static const UT_StringHolder thePartitionerMergeParm
 
static const UT_StringHolder thePartitionerMergeOutputsParm
 
static const UT_StringHolder thePartitionerMergeAttribsParm
 
static const UT_StringHolder thePartitionerMergeOpParm
 
static const UT_StringHolder thePartitionerMergePatternParm
 
static const UT_StringHolder thePartitionerMergePreserveParm
 
static const UT_StringHolder thePartitionerStoreIDsParm
 
static const UT_StringHolder thePartitionerIDAttribParm
 
static const UT_StringHolder thePartitionerSetFrameParm
 
static const UT_StringHolder theSchedulerWorkingDirParm
 
static const UT_StringHolder theSchedulerDataSourceParm
 
static const UT_StringHolder theSchedulerValidateOutputsParm
 
static const UT_StringHolder theSchedulerCheckExpectedOutputsParm
 
static const UT_StringHolder theSchedulerCompressWorkItemDataParm
 
static const UT_StringHolder theSchedulerTickPeriodParm
 
static const UT_StringHolder theSchedulerMaxItemsParm
 
static const UT_StringHolder theSchedulerUseMaxTasksParm
 
static const UT_StringHolder theSchedulerMaxTasksParm
 
static const UT_StringHolder theSchedulerMapModeParm
 
static const UT_StringHolder theSchedulerMapZoneParm
 
static const UT_StringHolder theSchedulerUseMapZoneParm
 
static const UT_StringHolder theSchedulerWaitForFailuresParm
 
static const UT_StringHolder theSchedulerDeleteTempDirParm
 
static const UT_StringHolder theSchedulerRpcTimeout
 
static const UT_StringHolder theSchedulerRpcRetries
 
static const UT_StringHolder theSchedulerRpcBackoff
 
static const UT_StringHolder theSchedulerRpcBatch
 
static const UT_StringHolder theSchedulerRpcRelease
 
static const UT_StringHolder theSchedulerRpcIgnoreErrors
 
static const UT_StringHolder theSchedulerRpcMaxErrors
 
static const UT_StringHolder theTagExpandName
 
static const UT_StringHolder theTagOpDepDirty
 
static const UT_StringHolder theTagOpDepRegen
 
static const UT_StringHolder theTagExtraInput
 
static const UT_StringHolder theSeparatorLabel
 
static const UT_StringHolder theGenerateMenuScript
 
static const UT_StringHolder theCacheModeMenuScript
 

Protected Types

enum  CookWhen { eCookNone, eCookDeferred, eCookImmediate }
 Enumerations of cook conditions. More...
 
enum  TargetedBy { eTargetedNone = 0x0, eTargetedAll = 0x1, eTargetedEach = 0x2 }
 Enumeration of targeting conditions. More...
 

Protected Member Functions

UT_RWLockattributeLock () const
 
PDGE_DependencycanGenerateDep ()
 
PDGE_DependencyisGeneratedDep ()
 
PDGE_DependencyisCookedDep ()
 
PDGE_PropagateGrouppropagateGroup ()
 
UT_StringHolder debugName () const override
 
void resetOwner () override
 Resets the owner. More...
 
virtual int preCookLoop (const UT_Array< LoopInfo > &begin_info)
 
virtual bool preCook (bool is_dirty, bool has_filter)
 
virtual void postCook ()
 
virtual void clearAllWorkItems ()
 
virtual void clearWorkItem (const PDG_WorkItem *work_item)
 
virtual void addWorkItem (PDG_WorkItem *work_item)
 
virtual bool queueWorkItem (PDG_WorkItem *work_item)
 
virtual bool syncWorkItem (PDG_WorkItem *work_item, const PDG_WorkItem *clone_target)
 
virtual bool cookWorkItem (PDGE_Resolutions &resolutions, PDG_WorkItem *work_item, bool did_cook)
 
virtual PDG_WorkItemState updateOutputCache (PDG_WorkItem *work_item) const
 
virtual bool cacheBuiltinParms (PDG_NodeSet &dirty, bool dynamic_inputs)
 
virtual void addInputDeps (PDG_Node *input_node)
 
virtual void addCommonDeps ()
 
virtual bool requiresCookedInputs (bool cook) const
 
virtual bool shouldSchedule (const PDG_WorkItem *work_item) const
 
void injectDynamicWorkItem (PDG_WorkItem *work_item)
 
void addPropagateDependencies (const PDG_WorkItemArray &work_items)
 
void addWorkItems (const PDG_WorkItemArray &work_items, const PDG_BatchWorkItemSet &batches, PDG_EvaluationContext::State state, bool sort_items)
 
void queueWorkItemResolutions (PDGE_Resolutions &resolutions, PDG_WorkItem *work_item, PDGE_Dependency *can_cook_dep)
 
void queueBatchWorkItemResolutions (PDGE_Resolutions &resolutions, PDG_BatchWorkItem *batch_item, PDGE_Dependency *can_cook_dep)
 
void needsNodeCook (UT_ArrayMap< PDG_Node *, bool > &needs_cook, bool generate_only, bool cook)
 
void queueNodeDeps (PDGE_Evaluator &evaluator, const UT_ArrayMap< PDG_Node *, bool > &needs_cook, const PDG_NodeSet &error_handlers, PDG_NodeSet &visited, bool generate_only, bool cook)
 
void updateInputRegeneration ()
 
void applyDirty (bool remove_outputs)
 
void prepareDirtyAll (PDG_WorkItemDirty &dirty_state, bool remove_outputs)
 
bool compactItems (bool reset_index=false)
 
bool upstreamItems (PDG_WorkItemArray &work_items, bool skip_failed=false) const
 
bool downstreamItems (PDG_WorkItemArray &work_items) const
 
void clearOutputCache ()
 
void updateModTimeCache ()
 
template<typename FieldType , typename EvalType = FieldType>
void updateBuiltinField (PDG_NodeSet &dirty, const UT_StringHolder &parm_name, FieldType &field, const FieldType &default_value, bool set_dirty=true)
 
- Protected Member Functions inherited from PDGE_DependencyOwner
virtual PDGE_Dependency::State evalResolve (PDGE_Resolutions &, const PDGE_Evaluator &, PDGE_Dependency *)
 Called when a dependency owned by this object is resolved. More...
 
virtual int evalUnresolve (PDGE_Dependency::Array &, PDGE_Dependency *)
 
virtual PDGE_Dependency::State evalPartial (PDGE_Resolutions &, const PDGE_Evaluator &, PDGE_Dependency *, const Array &)
 
const PDGE_Dependency::SetpropagateSet ()
 Returns the propagate set for this owner. More...
 
void addPropagate (PDGE_Dependency *dependency)
 Adds an entry to the propagate set. More...
 

Protected Attributes

PDG_NodeOptions myNodeOptions
 
PDG_NodeStats myNodeStats
 
PDG_SortOptions mySortOptions
 
PDGE_Dependency myCanGenerateDep
 
PDGE_Dependency myIsGeneratedDep
 
PDGE_Dependency myIsCookedDep
 
PDGE_PropagateGroup myPropagateGroup
 
PDG_WorkItemArray myWorkItems
 
PDG_BatchWorkItemSet myBatchItems
 
PDG_NodeSet myStaticAncestors
 
PDG_NodeArray myExtraInputs
 
UT_Array< PDG_Dependency * > myDependencies
 
UT_ArrayStringMap< PDG_CacheIDmyOutputCache
 
UT_StringMap< ModTimeCacheEntrymyModTimeCache
 
UT_StringHolder myName
 
PDG_NodeCallbackPtr myCallback
 
const PDG_NodeCallbackTypemyTypeObject
 
PDG_GraphContextmyContext
 
PDG_SchedulermyScheduler
 
PDG_SchedulerSet mySchedulerReferences
 
UT_StringHolder myServiceName
 
int myTargetedBy
 
int myLoopDepth
 
int myInputFilter
 
CookWhen myCookWhen
 
RegenerateReason myRegenerateReason
 
BypassState myBypassState
 
PDG_ServiceResetWhen myLoopResetWhen
 
PDG_ServiceResetType myLoopResetType
 
SYS_AtomicCounter myActiveGenerates
 
SYS_AtomicCounter myTotalGenerates
 
PDG_NodeID myId
 
int myMaxIndex
 
UT_RWLock myAttributeLock
 
UT_TBBSpinLock myWorkItemLock
 
UT_TBBSpinLock myOutputCacheLock
 
UT_TBBSpinLock myModTimeCacheLock
 
bool myIsDynamicGen
 
bool myIsDynamicEval
 
bool myIsDynamicProp
 
bool myIsAllGeneration
 
bool myHasNoGenerate
 
bool myHasError
 
bool myHasCachedParms
 
bool myCanHaveWorkItems
 
bool myIsErrorHandler
 
bool myIsErrorHandlerBranch
 
bool myIsGenerated
 
bool myIsActive
 
bool myIsCooked
 
bool myIsFrozen
 
bool myUseServiceBlock
 
- Protected Attributes inherited from PDG_NodeInterface
PDG_AttributeInfo myAttributeInfo
 

Friends

class PDG_BatchWorkItem
 
class PDG_Mapper
 
class PDG_Processor
 
class PDG_Partitioner
 
class PDG_WorkItem
 
class PDG_WorkItemDirty
 

Detailed Description

Base class for all nodes that keeps track of work items and helper data structures needed by sub classes. Defines several virtual methods that are implemented in concrete node subclasses.

Definition at line 63 of file PDG_Node.h.

Member Enumeration Documentation

Bypass state for the node.

Enumerator
eBypassNone 

The node is not bypassed.

eBypassSubnetwork 

The node is in a bypassed subnetwork.

eBypassNode 

The node itself is bypassed.

Definition at line 93 of file PDG_Node.h.

enum PDG_Node::CookWhen
protected

Enumerations of cook conditions.

Enumerator
eCookNone 

Never queue work items in this node for cooking.

eCookDeferred 

Queue work items in this node once the isGenerated dep reolves – these items will cook eventually, but may wait for targeted partitioners first.

eCookImmediate 

Queue work items for cooking immediately after they've been generated.

Definition at line 586 of file PDG_Node.h.

Regeneration reasons.

Enumerator
eRegenerateNone 

No regeneration necessary.

eRegenerateAlways 

The node should regenerate work items because of a node option that indicates it always regenerates.

eRegenerateFull 

The node should regenerate work items.

eRegeneratePropagate 

The node should regenerate work items, and any downstream nodes that try to cook will also inherit the state from this node

eRegenerateDirty 

The node will be dirtied.

eRegenerateDirtyInvalidate 

The node will be dirtied and caches invalidated.

Definition at line 69 of file PDG_Node.h.

enum PDG_Node::TargetedBy
protected

Enumeration of targeting conditions.

Enumerator
eTargetedNone 

No partitioner targets this node.

eTargetedAll 

A partitioner set to generate when all items in this node are generated

eTargetedEach 

A partitioner set to generate each time items in this node are generated

Definition at line 602 of file PDG_Node.h.

Constructor & Destructor Documentation

PDG_Node::PDG_Node ( PDG_GraphContext context,
const UT_StringHolder name,
const PDG_NodeCallbackType type_object,
PDG_NodeID  id = -1 
)
PDG_Node::~PDG_Node ( )
override

Member Function Documentation

virtual void PDG_Node::addCommonDeps ( )
protectedvirtual

Reimplemented in PDG_Partitioner.

PDG_Port* PDG_Node::addCustomParameter ( PDGT_Value::DataType  type,
const UT_StringHolder name,
const UT_StringHolder label,
const UT_StringArray tags,
int  size 
)

Adds a custom/spare parameter to the node and returns a pointer to the the parameter port.

void PDG_Node::addDependency ( PDG_Dependency dependency)
void PDG_Node::addError ( const UT_StringHolder message) const
overridevirtual

Emits a node level error from the node as PDG_Event.

Reimplemented from PDG_NodeInterface.

virtual void PDG_Node::addInputDeps ( PDG_Node input_node)
protectedvirtual

Reimplemented in PDG_Processor, PDG_Partitioner, and PDG_Mapper.

PDG_CacheID PDG_Node::addModTimeCacheEntry ( const PDG_File file,
const PDG_WorkItem work_item 
)

Adds or updates the dependent file attribute cache, and returns a new cache ID for the work itme based on the entry.

PDG_CacheID PDG_Node::addOutputCacheEntry ( const UT_StringHolder file,
PDG_CacheID  cache_id 
)

Adds or updates an existing file cache entry with the specified cache id. This will create an entry if one does not yet exist.

void PDG_Node::addPropagateDependencies ( const PDG_WorkItemArray work_items)
protected
void PDG_Node::addSchedulerReference ( PDG_Scheduler scheduler)
inline

Definition at line 210 of file PDG_Node.h.

void PDG_Node::addWarning ( const UT_StringHolder message) const
overridevirtual

Emits a node level warning from the node as PDG_Event.

Reimplemented from PDG_NodeInterface.

virtual void PDG_Node::addWorkItem ( PDG_WorkItem work_item)
protectedvirtual

Reimplemented in PDG_Processor.

void PDG_Node::addWorkItems ( const PDG_WorkItemArray work_items,
const PDG_BatchWorkItemSet batches,
PDG_EvaluationContext::State  state,
bool  sort_items 
)
protected
void PDG_Node::appendDirty ( PDG_WorkItemDirty dirty_state)

Appends to an existing dirty operation.

void PDG_Node::applyDirty ( bool  remove_outputs)
protected
bool PDG_Node::asJSON ( UT_JSONWriter writer,
bool  skip_defaults 
) const

Writes the current parameter value configuration of this node interface to JSON

UT_RWLock& PDG_Node::attributeLock ( ) const
inlineprotected

Definition at line 624 of file PDG_Node.h.

void PDG_Node::batchItemsCopy ( PDG_BatchWorkItemSet set) const

Returns a safe copy of the batch work item set.

BypassState PDG_Node::bypassState ( ) const
inline

Definition at line 329 of file PDG_Node.h.

virtual bool PDG_Node::cacheBuiltinParms ( PDG_NodeSet dirty,
bool  dynamic_inputs 
)
protectedvirtual

Reimplemented in PDG_Processor, and PDG_Partitioner.

PDG_NodeCallback* PDG_Node::callback ( ) const
inline

Gets/sets the node callback - the underlying object used to implement most of the node functionality. Can be a user defined C++ or Python instance.

Definition at line 197 of file PDG_Node.h.

void PDG_Node::cancel ( )

Cancels any work items scheduled by this node.

PDGE_Dependency* PDG_Node::canGenerateDep ( )
inlineprotected

Definition at line 627 of file PDG_Node.h.

bool PDG_Node::canHaveWorkItems ( ) const
inline

Returns true if this node can possibly create work items, based on its input configuration

Definition at line 278 of file PDG_Node.h.

virtual void PDG_Node::clearAllWorkItems ( )
protectedvirtual

Reimplemented in PDG_Processor, and PDG_Partitioner.

void PDG_Node::clearOutputCache ( )
protected
void PDG_Node::clearSchedulerReferences ( )
inline

Definition at line 212 of file PDG_Node.h.

virtual void PDG_Node::clearWorkItem ( const PDG_WorkItem work_item)
protectedvirtual

Reimplemented in PDG_Processor, and PDG_Partitioner.

virtual void PDG_Node::commitWorkItem ( PDG_WorkItem work_item)
virtual

Called after a work item is completely deserialized.

Reimplemented in PDG_Processor, and PDG_Partitioner.

bool PDG_Node::compactItems ( bool  reset_index = false)
protected
void PDG_Node::connectedAncestors ( PDG_NodeSet nodes,
PDG_PortType  type,
bool  filter_bypassed = true,
bool  filter_reference = true 
)
void PDG_Node::connectedNodes ( PDG_NodeArray nodes,
PDG_PortType  type,
bool  filter_bypassed = true,
bool  filter_reference = true 
) const
int PDG_Node::connectionCount ( PDG_PortType  type,
bool  filter_bypassed = true,
bool  filter_reference = true 
) const

Returns node connectivity information.

PDG_GraphContext* PDG_Node::context ( ) const
inline

Returns the graph context that owns the node.

Definition at line 216 of file PDG_Node.h.

bool PDG_Node::cook ( bool  blocking,
UT_WorkBuffer errors 
)

Cooks the node. This is a utility method that calls the standard cook logic on the the graph context

virtual bool PDG_Node::cookWorkItem ( PDGE_Resolutions resolutions,
PDG_WorkItem work_item,
bool  did_cook 
)
protectedvirtual

Reimplemented in PDG_Partitioner.

UT_StringHolder PDG_Node::debugName ( ) const
inlineoverrideprotectedvirtual

Debug name for this dependency owner object, used when various debug utilities are enabled

Implements PDGE_DependencyOwner.

Definition at line 637 of file PDG_Node.h.

const UT_Array<PDG_Dependency*>& PDG_Node::dependencies ( ) const

Handler for external dependencies, e.g. files. External dependencies that are added to the node will be resolved just before a work item in the node is cooked.

virtual bool PDG_Node::deserializeWorkItem ( PDG_WorkItem work_item)
virtual

Inserts a work item into the node after it has been deserialized. Based on the type of the item, it will be added to the various structures (wrapper list, partition maps, etc).

Reimplemented in PDG_Processor, and PDG_Partitioner.

void PDG_Node::dirty ( bool  remove_outputs)

Dirties the node by deleting all static and dynamic work items, and dirtying (but not deleting) wrappers

bool PDG_Node::downstreamItems ( PDG_WorkItemArray work_items) const
protected
PDG_Node* PDG_Node::firstConnectedNode ( PDG_PortType  type,
bool  filter_bypassed = true,
bool  filter_reference = true 
) const
void PDG_Node::freeze ( )

Freezes all work items in the node and their associated attribute data.

void PDG_Node::freezeFrom ( const PDG_WorkItemArray work_items)

Sets the work items in the node from the input list and freezes them.

static bool PDG_Node::fromJSON ( const UT_JSONValue value,
PDG_GraphContext context,
PDG_NodePortMap inputs,
UT_WorkBuffer errors 
)
static

Reads and constructs a scheduler from JSON and returns the instance.

PDG_NodeID PDG_Node::getId ( ) const
inline

Returns this node's id, it matches the TOP node id.

Definition at line 146 of file PDG_Node.h.

int64 PDG_Node::getMemoryUsage ( bool  inclusive) const
overridevirtual

Returns the total memory usage of the node, including any work items owned by it.

Reimplemented from PDGE_DependencyOwner.

bool PDG_Node::hasErrors ( ) const
inline

Clears and checks the error flag.

Definition at line 251 of file PDG_Node.h.

void PDG_Node::injectDynamicWorkItem ( PDG_WorkItem work_item)
protected
bool PDG_Node::isBypassed ( ) const
inline

Returns true if the node is bypassed.

Definition at line 333 of file PDG_Node.h.

bool PDG_Node::isCooked ( ) const

Returns true if the node is cooked, i.e. all wrappers and static items are cooked.

PDGE_Dependency* PDG_Node::isCookedDep ( )
inlineprotected

Definition at line 631 of file PDG_Node.h.

bool PDG_Node::isDynamicEval ( ) const
inline

Returns true if this node is dynamic for the current evaluation, e.g. if it should have the dynamic badge set in the UI. This means either this node or an upstream input is dynamic in some way.

Definition at line 263 of file PDG_Node.h.

bool PDG_Node::isDynamicGeneration ( ) const
inline

Returns true if this node itself is strictly dynamic, i.e. the work item generation requires input items to be cooked

Definition at line 268 of file PDG_Node.h.

bool PDG_Node::isDynamicProp ( ) const
inline

Returns true if this node should propagate the dynamic generation state to downstream processors

Definition at line 273 of file PDG_Node.h.

bool PDG_Node::isErrorHandler ( ) const
inline

Returns true if the node is an error handler.

Definition at line 232 of file PDG_Node.h.

bool PDG_Node::isErrorHandlerBranch ( ) const
inline

Returns true if the node is in an error handler branch.

Definition at line 236 of file PDG_Node.h.

PDGE_Dependency* PDG_Node::isGeneratedDep ( )
inlineprotected

Definition at line 629 of file PDG_Node.h.

bool PDG_Node::isGenerating ( ) const
inline

Returns true if this node is generating. This occurs when the atomic generation counter is > 0

Definition at line 257 of file PDG_Node.h.

bool PDG_Node::isLeaf ( ) const

Returns true if the node is a leaf, i.e it has no descendant nodes.

int PDG_Node::loopDepth ( ) const
inline

Returns the loop dpeth of the node.

Definition at line 220 of file PDG_Node.h.

PDG_ServiceResetType PDG_Node::loopResetType ( ) const
inline

Returns the loop block's service reset type.

Definition at line 228 of file PDG_Node.h.

PDG_ServiceResetWhen PDG_Node::loopResetWhen ( ) const
inline

Returns the loop block's service reset conditoon.

Definition at line 224 of file PDG_Node.h.

virtual void PDG_Node::memoryInfo ( PDG_MemoryInfo memory_info,
bool  inclusive 
) const
virtual

Returns the memory usage as a PDG_MemoryInfo struct.

Reimplemented in PDG_Processor, PDG_Partitioner, and PDG_Mapper.

const UT_StringHolder& PDG_Node::name ( void  ) const
inline

Returns the node's unique name.

Definition at line 150 of file PDG_Node.h.

void PDG_Node::needsNodeCook ( UT_ArrayMap< PDG_Node *, bool > &  needs_cook,
bool  generate_only,
bool  cook 
)
protected
const PDG_NodeOptions& PDG_Node::nodeOptions ( bool  do_update)

Returns the node's info object, which contains cook count and description information.

fpreal PDG_Node::nodeProgress ( ) const

Returns the current cook progress of the node.

PDG_NodeState PDG_Node::nodeState ( ) const

Returns the current state of the node.

PDG_NodeSubtype PDG_Node::nodeSubtype ( ) const

Returns the sub type, e.g. normal, foreach begin, foreach end, etd.

PDG_NodeType PDG_Node::nodeType ( ) const

Returns the node type, e.g. processor, mapper, etc.

virtual PDG_WorkItemCacheState PDG_Node::outputCacheState ( const PDG_WorkItem work_item) const
virtual

Returns the cache state of a work item in this node.

Reimplemented in PDG_Processor.

bool PDG_Node::outputFiles ( PDG_File::Array files,
bool  localize 
) const

Aggregates output files from all work items. Safe to call from multiple threads or during a cook, and will return false/empty result if the serial lock cannot be acquired

bool PDG_Node::performancePath ( UT_WorkBuffer buffer,
const UT_StringHolder event_name,
const PDG_WorkItem work_item 
) const

Returns the performance event path for the node. Returns true if the path already includes work item information.

void PDG_Node::postCook ( PDG_NodeSet visited)

Runs postcook logic for this node and recurses into input nodes.

virtual void PDG_Node::postCook ( )
protectedvirtual

Reimplemented in PDG_Processor.

bool PDG_Node::preCook ( PDG_NodeSet dirty,
PDG_NodeSet visited,
bool &  save_scene,
bool  has_filter 
)

Runs precook logic for this node and recurses into input nodes.

virtual bool PDG_Node::preCook ( bool  is_dirty,
bool  has_filter 
)
protectedvirtual

Reimplemented in PDG_Processor.

int PDG_Node::preCookLoop ( )

Sets the loop depth and loop block reference on the node.

virtual int PDG_Node::preCookLoop ( const UT_Array< LoopInfo > &  begin_info)
protectedvirtual

Reimplemented in PDG_Partitioner, and PDG_Mapper.

PDG_WorkItemDirty PDG_Node::prepareDirty ( )

Prepares a dirty operation that can be applied later.

void PDG_Node::prepareDirtyAll ( PDG_WorkItemDirty dirty_state,
bool  remove_outputs 
)
protected
PDGE_PropagateGroup* PDG_Node::propagateGroup ( )
inlineprotected

Definition at line 634 of file PDG_Node.h.

void PDG_Node::queueBatchWorkItemResolutions ( PDGE_Resolutions resolutions,
PDG_BatchWorkItem batch_item,
PDGE_Dependency can_cook_dep 
)
protected
static void PDG_Node::queueNodeDeps ( PDGE_Evaluator evaluator,
const PDG_NodeSet leaf_nodes,
const PDG_NodeSet error_handlers,
bool  generate_only,
bool  cook 
)
static

Queues node dependencies for cooking with the evaluator.

void PDG_Node::queueNodeDeps ( PDGE_Evaluator evaluator,
const UT_ArrayMap< PDG_Node *, bool > &  needs_cook,
const PDG_NodeSet error_handlers,
PDG_NodeSet visited,
bool  generate_only,
bool  cook 
)
protected
virtual bool PDG_Node::queueWorkItem ( PDG_WorkItem work_item)
inlineprotectedvirtual

Reimplemented in PDG_Partitioner.

Definition at line 650 of file PDG_Node.h.

virtual void PDG_Node::queueWorkItemDeps ( PDGE_Evaluator evaluator,
PDG_NodeSet visited_nodes,
PDG_WorkItemIDSet visited_items,
PDG_Filter filter 
)
virtual

Builds evaluation dependencies to cook a specific set of work items.

Reimplemented in PDG_Partitioner.

void PDG_Node::queueWorkItemResolutions ( PDGE_Resolutions resolutions,
PDG_WorkItem work_item,
PDGE_Dependency can_cook_dep 
)
protected
RegenerateReason PDG_Node::regenerateReason ( ) const
inline

Returns true if this node should run its automatic regeneration logic on the next cook. If this node has a callback with a custom onRegenerate implementation, that will always be run regardless of this flag

Definition at line 296 of file PDG_Node.h.

void PDG_Node::removeDependency ( PDG_Dependency dependency)
void PDG_Node::removeWorkItems ( const PDG_WorkItemConstArray work_items)

Removes a list of work item from the node.

void PDG_Node::rename ( const UT_StringHolder new_name)

Renames the node. No uniqueness validation is done on the new name - a unique name should be acquired from the graph.

virtual bool PDG_Node::requiresCookedInputs ( bool  cook) const
protectedvirtual

Reimplemented in PDG_Partitioner.

int PDG_Node::reserveIndexBlock ( int  number)

Reserves a number of work item indices in a contiguous block, and returns the first index value.

void PDG_Node::resetOwner ( )
overrideprotectedvirtual

Resets the owner.

Reimplemented from PDGE_DependencyOwner.

Reimplemented in PDG_Processor, and PDG_Partitioner.

void PDG_Node::resolveDependencies ( )
bool PDG_Node::saveJSON ( std::ostream &  os,
bool  binary 
)

Serializes the work items in the node to the specified stream.

bool PDG_Node::saveJSON ( const UT_StringHolder file_path)

Serializes the work items in the node to the specified file.

PDG_Scheduler* PDG_Node::scheduler ( ) const

Gets/sets the per-node scheduler override.

const PDG_SchedulerSet& PDG_Node::schedulerReferences ( ) const
inline

Gets/sets schedulers referenced by this node, but not used by it directly.

Definition at line 208 of file PDG_Node.h.

const UT_StringHolder& PDG_Node::serviceName ( ) const
inline

Returns the name of the service that this node should use to cook work items. Returns empty string if no service has been specified in the node configuration

Definition at line 284 of file PDG_Node.h.

void PDG_Node::setBypassState ( BypassState  state)
inline

Sets the bypassed flag on this node.

Definition at line 313 of file PDG_Node.h.

void PDG_Node::setCallback ( PDG_NodeCallbackPtr  callback)
inline

Definition at line 199 of file PDG_Node.h.

void PDG_Node::setIsErrorHandler ( bool  error_handler)
inline

Sets the error handler flag on this node.

Definition at line 240 of file PDG_Node.h.

void PDG_Node::setIsErrorHandlerBranch ( bool  error_handler)
inline

Sets the error handler branch flag on this node.

Definition at line 247 of file PDG_Node.h.

void PDG_Node::setRegenerateReason ( RegenerateReason  reason)
inline

Sets the regenerate flag, to be called when the node should consider running automatic regeneration logic during the cook

Definition at line 301 of file PDG_Node.h.

void PDG_Node::setScheduler ( PDG_Scheduler scheduler)
virtual bool PDG_Node::shouldSchedule ( const PDG_WorkItem work_item) const
inlineprotectedvirtual

Reimplemented in PDG_Processor.

Definition at line 670 of file PDG_Node.h.

const PDG_SortOptions& PDG_Node::sortOptions ( ) const
inline

Returns the node's sort options struct.

Definition at line 185 of file PDG_Node.h.

void PDG_Node::startWorkItem ( PDG_WorkItem work_item)

Notifies the node that the specified work item has started cooking.

const PDG_NodeStats& PDG_Node::stats ( ) const
inline

Returns the node's stat object.

Definition at line 189 of file PDG_Node.h.

PDG_NodeStats& PDG_Node::stats ( )
inline

Definition at line 191 of file PDG_Node.h.

const PDG_EventFilter& PDG_Node::supportedEventTypes ( ) const
overridevirtual

Returns the list of supported event types.

Implements PDG_EventEmitter.

virtual bool PDG_Node::syncWorkItem ( PDG_WorkItem work_item,
const PDG_WorkItem clone_target 
)
inlineprotectedvirtual

Reimplemented in PDG_Processor.

Definition at line 652 of file PDG_Node.h.

const PDG_NodeInterface* PDG_Node::templateInterface ( ) const
overridevirtual

Returns the node interface/template that describes the default parameters and connections for the node

Reimplemented from PDG_NodeInterface.

const PDG_NodeCallbackType* PDG_Node::typeObject ( ) const

Returns the node's type object.

template<typename FieldType , typename EvalType = FieldType>
void PDG_Node::updateBuiltinField ( PDG_NodeSet dirty,
const UT_StringHolder parm_name,
FieldType &  field,
const FieldType &  default_value,
bool  set_dirty = true 
)
inlineprotected

Definition at line 724 of file PDG_Node.h.

bool PDG_Node::updateBypassState ( BypassState  state)
inline

Updates the bypass flag of this node, if the new state is higher.

Definition at line 317 of file PDG_Node.h.

void PDG_Node::updateInputRegeneration ( )
protected
void PDG_Node::updateModTimeCache ( )
protected
virtual PDG_WorkItemState PDG_Node::updateOutputCache ( PDG_WorkItem work_item) const
inlineprotectedvirtual

Reimplemented in PDG_Processor.

Definition at line 660 of file PDG_Node.h.

void PDG_Node::updateRegenerateReason ( RegenerateReason  reason)
inline

Updates the regenerate flag, but only to mode that's higher in value then the current one

Definition at line 306 of file PDG_Node.h.

bool PDG_Node::upstreamItems ( PDG_WorkItemArray work_items,
bool  skip_failed = false 
) const
protected
bool PDG_Node::useServiceBlock ( ) const
inline

Returns true if the node is inheriting it's service from a parent service block.

Definition at line 289 of file PDG_Node.h.

void PDG_Node::workItemIDs ( PDG_WorkItemIDArray array,
bool  include_batches 
) const

Returns the IDs of the work items in the node.

int64 PDG_Node::workItemMemory ( bool  attribs_only = false) const

Returns the memory used by all work items in this node. Pass true indicate that only attribute data should be counted.

const PDG_WorkItemArray& PDG_Node::workItems ( ) const
inline

Returns the underyling work item array. This method is not safe to call from external code if a cook or dirty is in progress.

Definition at line 444 of file PDG_Node.h.

void PDG_Node::workItemsCopy ( PDG_WorkItemArray array,
bool  include_batches 
) const

Returns a safe copy of the work item array.

template<typename Filter >
void PDG_Node::workItemsCopy ( PDG_WorkItemArray array,
const Filter &  filter 
) const
inline

Returns a safe copy of the work item array with a filter. The filter function is called for each work item, and can return false to indicate that the work item shouldn't be included in the copied list

Definition at line 461 of file PDG_Node.h.

Friends And Related Function Documentation

friend class PDG_BatchWorkItem
friend

Definition at line 617 of file PDG_Node.h.

friend class PDG_Mapper
friend

Definition at line 618 of file PDG_Node.h.

friend class PDG_Partitioner
friend

Definition at line 620 of file PDG_Node.h.

friend class PDG_Processor
friend

Definition at line 619 of file PDG_Node.h.

friend class PDG_WorkItem
friend

Definition at line 621 of file PDG_Node.h.

friend class PDG_WorkItemDirty
friend

Definition at line 622 of file PDG_Node.h.

Member Data Documentation

SYS_AtomicCounter PDG_Node::myActiveGenerates
protected

Definition at line 796 of file PDG_Node.h.

UT_RWLock PDG_Node::myAttributeLock
mutableprotected

Definition at line 802 of file PDG_Node.h.

PDG_BatchWorkItemSet PDG_Node::myBatchItems
protected

Definition at line 762 of file PDG_Node.h.

BypassState PDG_Node::myBypassState
protected

Definition at line 791 of file PDG_Node.h.

PDG_NodeCallbackPtr PDG_Node::myCallback
protected

Definition at line 775 of file PDG_Node.h.

PDGE_Dependency PDG_Node::myCanGenerateDep
protected

Definition at line 756 of file PDG_Node.h.

bool PDG_Node::myCanHaveWorkItems
protected

Definition at line 815 of file PDG_Node.h.

PDG_GraphContext* PDG_Node::myContext
protected

Definition at line 778 of file PDG_Node.h.

CookWhen PDG_Node::myCookWhen
protected

Definition at line 789 of file PDG_Node.h.

UT_Array<PDG_Dependency*> PDG_Node::myDependencies
protected

Definition at line 766 of file PDG_Node.h.

PDG_NodeArray PDG_Node::myExtraInputs
protected

Definition at line 765 of file PDG_Node.h.

bool PDG_Node::myHasCachedParms
protected

Definition at line 814 of file PDG_Node.h.

bool PDG_Node::myHasError
mutableprotected

Definition at line 813 of file PDG_Node.h.

bool PDG_Node::myHasNoGenerate
protected

Definition at line 812 of file PDG_Node.h.

PDG_NodeID PDG_Node::myId
protected

Definition at line 799 of file PDG_Node.h.

int PDG_Node::myInputFilter
protected

Definition at line 787 of file PDG_Node.h.

bool PDG_Node::myIsActive
protected

Definition at line 821 of file PDG_Node.h.

bool PDG_Node::myIsAllGeneration
protected

Definition at line 810 of file PDG_Node.h.

bool PDG_Node::myIsCooked
protected

Definition at line 822 of file PDG_Node.h.

PDGE_Dependency PDG_Node::myIsCookedDep
protected

Definition at line 758 of file PDG_Node.h.

bool PDG_Node::myIsDynamicEval
protected

Definition at line 808 of file PDG_Node.h.

bool PDG_Node::myIsDynamicGen
protected

Definition at line 807 of file PDG_Node.h.

bool PDG_Node::myIsDynamicProp
protected

Definition at line 809 of file PDG_Node.h.

bool PDG_Node::myIsErrorHandler
protected

Definition at line 817 of file PDG_Node.h.

bool PDG_Node::myIsErrorHandlerBranch
protected

Definition at line 818 of file PDG_Node.h.

bool PDG_Node::myIsFrozen
protected

Definition at line 823 of file PDG_Node.h.

bool PDG_Node::myIsGenerated
protected

Definition at line 820 of file PDG_Node.h.

PDGE_Dependency PDG_Node::myIsGeneratedDep
protected

Definition at line 757 of file PDG_Node.h.

int PDG_Node::myLoopDepth
protected

Definition at line 786 of file PDG_Node.h.

PDG_ServiceResetType PDG_Node::myLoopResetType
protected

Definition at line 794 of file PDG_Node.h.

PDG_ServiceResetWhen PDG_Node::myLoopResetWhen
protected

Definition at line 793 of file PDG_Node.h.

int PDG_Node::myMaxIndex
protected

Definition at line 800 of file PDG_Node.h.

UT_StringMap<ModTimeCacheEntry> PDG_Node::myModTimeCache
protected

Definition at line 771 of file PDG_Node.h.

UT_TBBSpinLock PDG_Node::myModTimeCacheLock
mutableprotected

Definition at line 805 of file PDG_Node.h.

UT_StringHolder PDG_Node::myName
protected

Definition at line 773 of file PDG_Node.h.

PDG_NodeOptions PDG_Node::myNodeOptions
protected

Definition at line 752 of file PDG_Node.h.

PDG_NodeStats PDG_Node::myNodeStats
protected

Definition at line 753 of file PDG_Node.h.

UT_ArrayStringMap<PDG_CacheID> PDG_Node::myOutputCache
protected

Definition at line 769 of file PDG_Node.h.

UT_TBBSpinLock PDG_Node::myOutputCacheLock
mutableprotected

Definition at line 804 of file PDG_Node.h.

PDGE_PropagateGroup PDG_Node::myPropagateGroup
protected

Definition at line 759 of file PDG_Node.h.

RegenerateReason PDG_Node::myRegenerateReason
protected

Definition at line 790 of file PDG_Node.h.

PDG_Scheduler* PDG_Node::myScheduler
protected

Definition at line 780 of file PDG_Node.h.

PDG_SchedulerSet PDG_Node::mySchedulerReferences
protected

Definition at line 781 of file PDG_Node.h.

UT_StringHolder PDG_Node::myServiceName
protected

Definition at line 783 of file PDG_Node.h.

PDG_SortOptions PDG_Node::mySortOptions
protected

Definition at line 754 of file PDG_Node.h.

PDG_NodeSet PDG_Node::myStaticAncestors
protected

Definition at line 764 of file PDG_Node.h.

int PDG_Node::myTargetedBy
protected

Definition at line 785 of file PDG_Node.h.

SYS_AtomicCounter PDG_Node::myTotalGenerates
protected

Definition at line 797 of file PDG_Node.h.

const PDG_NodeCallbackType* PDG_Node::myTypeObject
protected

Definition at line 776 of file PDG_Node.h.

bool PDG_Node::myUseServiceBlock
protected

Definition at line 825 of file PDG_Node.h.

UT_TBBSpinLock PDG_Node::myWorkItemLock
mutableprotected

Definition at line 803 of file PDG_Node.h.

PDG_WorkItemArray PDG_Node::myWorkItems
protected

Definition at line 761 of file PDG_Node.h.

const UT_StringHolder PDG_Node::theInputsKey
static

The key for the input nodes when writing the node to JSON.

Definition at line 115 of file PDG_Node.h.

const UT_StringHolder PDG_Node::theNameKey
static

The key for the node name when writing the node to JSON.

Definition at line 106 of file PDG_Node.h.

const UT_StringHolder PDG_Node::theParametersKey
static

The key for the parameters when writing the node to JSON.

Definition at line 118 of file PDG_Node.h.

const UT_StringHolder PDG_Node::theSchedulerKey
static

The key for the scheduler name when writing the node to JSON.

Definition at line 112 of file PDG_Node.h.

const UT_StringHolder PDG_Node::theTypeKey
static

The key for the node type when writing the node to JSON.

Definition at line 109 of file PDG_Node.h.


The documentation for this class was generated from the following file: