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

#include <PDG_WorkItemHolder.h>

+ Inheritance diagram for PDG_WorkItemHolder:

Public Types

enum  CommitResult {
  eCommitUnable, eCommitFail, eCommitCancel, eCommitSuccess,
  eCommitNone
}
 Enumeration of possible commit result. More...
 

Public Member Functions

 PDG_WorkItemHolder (PDG_GraphContext *context, PDG_Processor *processor, bool commitable, bool is_static)
 
 ~PDG_WorkItemHolder ()
 
PDG_WorkItem * addWorkItem (CommitResult &result, UT_WorkBuffer &errors)
 
PDG_WorkItem * addWorkItem (CommitResult &result, const PDG_WorkItemOptions &options, UT_WorkBuffer &errors)
 
PDG_WorkItem * addWorkItem (CommitResult &result, const PDG_WorkItemOptions &options, const PDGT_ValueArgs &extra_args, UT_WorkBuffer &errors)
 
PDG_WorkItem * addWorkItemFromJSONString (CommitResult &result, const UT_StringHolder &json_data, PDG_WorkItem *parent, PDG_AttributeCollision strategy, bool preserve_type, bool preserve_index, bool add_attributes, UT_WorkBuffer &errors)
 
bool addWorkItemArrayFromJSONString (CommitResult &result, PDG_WorkItemArray &work_items, const UT_StringHolder &json_data, PDG_WorkItem *parent, PDG_AttributeCollision strategy, bool preserve_type, bool preserve_index, bool add_attributes, UT_WorkBuffer &errors)
 
PDG_WorkItem * addWorkItemFromDict (CommitResult &result, const UT_OptionsHolder &dict, PDG_WorkItem *parent, PDG_AttributeCollision strategy, bool preserve_type, bool preserve_index, bool add_attributes, UT_WorkBuffer &errors)
 
bool addWorkItemArrayFromDict (CommitResult &result, PDG_WorkItemArray &work_items, const UT_OptionsHolder &dict, PDG_WorkItem *parent, PDG_AttributeCollision strategy, bool preserve_type, bool preserve_index, bool add_attributes, UT_WorkBuffer &errors)
 
PDG_WorkItem * addWorkItemFromJSONFile (CommitResult &result, const UT_StringHolder &file_path, PDG_WorkItem *parent, PDG_AttributeCollision strategy, bool preserve_type, bool preserve_index, bool add_attributes, UT_WorkBuffer &errors)
 
bool addWorkItemArrayFromJSONFile (CommitResult &result, PDG_WorkItemArray &work_items, const UT_StringHolder &file_path, PDG_WorkItem *parent, PDG_AttributeCollision strategy, bool preserve_type, bool preserve_index, bool add_attributes, UT_WorkBuffer &errors)
 
PDG_WorkItem * addWorkItemFromWorkItem (CommitResult &result, const PDG_WorkItem *work_item, PDG_WorkItem *parent, PDG_AttributeCollision strategy, bool preserve_type, bool preserve_index, bool add_attributes, UT_WorkBuffer &errors)
 
const PDG_Processor * node () const
 
const PDG_WorkItemPtrArray & addedWorkItems () const
 
const PDG_BatchWorkItemPtrArray & addedBatchItems () const
 
const PDG_WorkItemArray & allWorkItems () const
 
const PDG_BatchWorkItemArray & allBatchItems () const
 
void addExtraWorkItems (const PDG_WorkItemArray &items)
 
bool isEmpty () const
 
bool isCommitable () const
 
int commitCount () const
 
void setCommitCount (int count)
 
bool useNodePriority () const
 
CommitResult commit ()
 
void setExistingWorkItems (const PDG_WorkItemArray &items)
 
void claimAddedWorkItems (PDG_WorkItemPtrArray &work_items, PDG_BatchWorkItemPtrArray &batches)
 
- Public Member Functions inherited from PDG_DependencyHolder
 PDG_DependencyHolder ()
 
 PDG_DependencyHolder (const PDG_WorkItemArray &valid)
 
bool addDependency (PDG_WorkItem *dependent, PDG_WorkItem *dependency, UT_WorkBuffer &errors)
 
const PDG_WorkItemPairArray & dependencyPairs () const
 

Additional Inherited Members

- Protected Member Functions inherited from PDG_DependencyHolder
bool isValid (PDG_WorkItem *work_item) const
 
- Protected Attributes inherited from PDG_DependencyHolder
PDG_WorkItemPairArray myDependencyPairs
 
PDG_WorkItemIDSet myValidSet
 

Detailed Description

Factory object that constructs and validates work items, for use with onGenerate.. The items are held in the Holder until the callbacks and committed to the node after the callback returns.

Examples:
PDG/PDG_ProcessorRandom.C, and PDG/PDG_ProcessorRandom.h.

Definition at line 41 of file PDG_WorkItemHolder.h.

Member Enumeration Documentation

Enumeration of possible commit result.

Enumerator
eCommitUnable 
eCommitFail 
eCommitCancel 
eCommitSuccess 
eCommitNone 

Definition at line 45 of file PDG_WorkItemHolder.h.

Constructor & Destructor Documentation

PDG_WorkItemHolder::PDG_WorkItemHolder ( PDG_GraphContext *  context,
PDG_Processor *  processor,
bool  commitable,
bool  is_static 
)
PDG_WorkItemHolder::~PDG_WorkItemHolder ( )

Member Function Documentation

const PDG_BatchWorkItemPtrArray& PDG_WorkItemHolder::addedBatchItems ( ) const
inline

Definition at line 167 of file PDG_WorkItemHolder.h.

const PDG_WorkItemPtrArray& PDG_WorkItemHolder::addedWorkItems ( ) const
inline

Definition at line 164 of file PDG_WorkItemHolder.h.

void PDG_WorkItemHolder::addExtraWorkItems ( const PDG_WorkItemArray &  items)
PDG_WorkItem* PDG_WorkItemHolder::addWorkItem ( CommitResult &  result,
UT_WorkBuffer &  errors 
)
PDG_WorkItem* PDG_WorkItemHolder::addWorkItem ( CommitResult &  result,
const PDG_WorkItemOptions &  options,
UT_WorkBuffer &  errors 
)
PDG_WorkItem* PDG_WorkItemHolder::addWorkItem ( CommitResult &  result,
const PDG_WorkItemOptions &  options,
const PDGT_ValueArgs &  extra_args,
UT_WorkBuffer &  errors 
)
bool PDG_WorkItemHolder::addWorkItemArrayFromDict ( CommitResult &  result,
PDG_WorkItemArray &  work_items,
const UT_OptionsHolder &  dict,
PDG_WorkItem *  parent,
PDG_AttributeCollision  strategy,
bool  preserve_type,
bool  preserve_index,
bool  add_attributes,
UT_WorkBuffer &  errors 
)
bool PDG_WorkItemHolder::addWorkItemArrayFromJSONFile ( CommitResult &  result,
PDG_WorkItemArray &  work_items,
const UT_StringHolder &  file_path,
PDG_WorkItem *  parent,
PDG_AttributeCollision  strategy,
bool  preserve_type,
bool  preserve_index,
bool  add_attributes,
UT_WorkBuffer &  errors 
)
bool PDG_WorkItemHolder::addWorkItemArrayFromJSONString ( CommitResult &  result,
PDG_WorkItemArray &  work_items,
const UT_StringHolder &  json_data,
PDG_WorkItem *  parent,
PDG_AttributeCollision  strategy,
bool  preserve_type,
bool  preserve_index,
bool  add_attributes,
UT_WorkBuffer &  errors 
)
PDG_WorkItem* PDG_WorkItemHolder::addWorkItemFromDict ( CommitResult &  result,
const UT_OptionsHolder &  dict,
PDG_WorkItem *  parent,
PDG_AttributeCollision  strategy,
bool  preserve_type,
bool  preserve_index,
bool  add_attributes,
UT_WorkBuffer &  errors 
)
PDG_WorkItem* PDG_WorkItemHolder::addWorkItemFromJSONFile ( CommitResult &  result,
const UT_StringHolder &  file_path,
PDG_WorkItem *  parent,
PDG_AttributeCollision  strategy,
bool  preserve_type,
bool  preserve_index,
bool  add_attributes,
UT_WorkBuffer &  errors 
)
PDG_WorkItem* PDG_WorkItemHolder::addWorkItemFromJSONString ( CommitResult &  result,
const UT_StringHolder &  json_data,
PDG_WorkItem *  parent,
PDG_AttributeCollision  strategy,
bool  preserve_type,
bool  preserve_index,
bool  add_attributes,
UT_WorkBuffer &  errors 
)
PDG_WorkItem* PDG_WorkItemHolder::addWorkItemFromWorkItem ( CommitResult &  result,
const PDG_WorkItem *  work_item,
PDG_WorkItem *  parent,
PDG_AttributeCollision  strategy,
bool  preserve_type,
bool  preserve_index,
bool  add_attributes,
UT_WorkBuffer &  errors 
)
const PDG_BatchWorkItemArray& PDG_WorkItemHolder::allBatchItems ( ) const
inline

Definition at line 171 of file PDG_WorkItemHolder.h.

const PDG_WorkItemArray& PDG_WorkItemHolder::allWorkItems ( ) const
inline

Definition at line 169 of file PDG_WorkItemHolder.h.

void PDG_WorkItemHolder::claimAddedWorkItems ( PDG_WorkItemPtrArray &  work_items,
PDG_BatchWorkItemPtrArray &  batches 
)
CommitResult PDG_WorkItemHolder::commit ( )
int PDG_WorkItemHolder::commitCount ( ) const
inline

Definition at line 182 of file PDG_WorkItemHolder.h.

bool PDG_WorkItemHolder::isCommitable ( ) const
inline

Definition at line 179 of file PDG_WorkItemHolder.h.

bool PDG_WorkItemHolder::isEmpty ( ) const
inline

Definition at line 177 of file PDG_WorkItemHolder.h.

const PDG_Processor* PDG_WorkItemHolder::node ( ) const
inline

Definition at line 162 of file PDG_WorkItemHolder.h.

void PDG_WorkItemHolder::setCommitCount ( int  count)
inline

Definition at line 184 of file PDG_WorkItemHolder.h.

void PDG_WorkItemHolder::setExistingWorkItems ( const PDG_WorkItemArray &  items)
bool PDG_WorkItemHolder::useNodePriority ( ) const

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