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_WorkItemaddWorkItem (CommitResult &result, UT_WorkBuffer &errors)
 
PDG_WorkItemaddWorkItem (CommitResult &result, const PDG_WorkItemOptions &options, UT_WorkBuffer &errors)
 
PDG_WorkItemaddWorkItem (CommitResult &result, const PDG_WorkItemOptions &options, const PDGT_ValueArgs &extra_args, UT_WorkBuffer &errors)
 
PDG_WorkItemaddWorkItemFromJSONString (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_WorkItemaddWorkItemFromDict (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_WorkItemaddWorkItemFromJSONFile (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_WorkItemaddWorkItemFromWorkItem (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_Processornode () const
 
const PDG_WorkItemArrayaddedWorkItems () const
 
const PDG_BatchWorkItemSetaddedBatchItems () const
 
const PDG_WorkItemArrayallWorkItems () const
 
const PDG_BatchWorkItemSetallBatchItems () 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 clearAddedItems (bool delete_items)
 
void setExistingItems (const PDG_WorkItemArray &items)
 
- 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_WorkItemPairArraydependencyPairs () 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_BatchWorkItemSet& PDG_WorkItemHolder::addedBatchItems ( ) const
inline

Definition at line 166 of file PDG_WorkItemHolder.h.

const PDG_WorkItemArray& 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_BatchWorkItemSet& PDG_WorkItemHolder::allBatchItems ( ) const
inline

Definition at line 170 of file PDG_WorkItemHolder.h.

const PDG_WorkItemArray& PDG_WorkItemHolder::allWorkItems ( ) const
inline

Definition at line 168 of file PDG_WorkItemHolder.h.

void PDG_WorkItemHolder::clearAddedItems ( bool  delete_items)
CommitResult PDG_WorkItemHolder::commit ( )
int PDG_WorkItemHolder::commitCount ( ) const
inline

Definition at line 181 of file PDG_WorkItemHolder.h.

bool PDG_WorkItemHolder::isCommitable ( ) const
inline

Definition at line 178 of file PDG_WorkItemHolder.h.

bool PDG_WorkItemHolder::isEmpty ( ) const
inline

Definition at line 176 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 183 of file PDG_WorkItemHolder.h.

void PDG_WorkItemHolder::setExistingItems ( const PDG_WorkItemArray items)
bool PDG_WorkItemHolder::useNodePriority ( ) const

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