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

#include <PDG_WorkItemDirty.h>

Public Types

enum  Type { eDirtyInvalid, eDirtyWorkItem, eDirtyNode, eDirtyGraph }
 Enumeration of dirty types. More...
 

Public Member Functions

 PDG_WorkItemDirty ()
 
 PDG_WorkItemDirty (PDG_GraphContext *context, bool is_delete, Type dirty_type=eDirtyInvalid)
 
 PDG_WorkItemDirty (PDG_GraphContext *context, PDG_Node *node, bool is_delete, bool emit_graph_events)
 
Type dirtyType () const
 Returns the dirty type. More...
 
const PDG_File::SetdirtyFiles () const
 Returns the list of files from dirty work items. More...
 
const UT_ArrayStringSetkeepFiles () const
 Returns the list of files that are prevented from being deleted. More...
 
PDG_WorkItemSet dirtySet () const
 Returns the set of work items marked for deletiong. More...
 
PDG_WorkItemSet deleteSet () const
 Returns the set of work items marked for dirtying. More...
 
bool isDeleted (const PDG_WorkItem *work_item) const
 Returns true if the item is marked for deletion. More...
 
bool isDirty (const PDG_WorkItem *work_item) const
 Returns true if the item is marked for any kind of dirtying operation. More...
 
bool isDataDirty (const PDG_WorkItem *work_item) const
 Returns true if the data for the work item is dirty. More...
 
void dirtyWorkItem (const PDG_WorkItem *work_item, bool is_delete)
 Adds a work item to the dirty set(s) More...
 
void reset ()
 Resets this object to a clean state. More...
 
void prepareDirty (PDG_WorkItem *work_item)
 Adds a work item and its dependencies to the dirty sets. More...
 
void prepareDirty (PDG_Node *node, bool will_remove_outputs)
 Adds a node to the pending dirty operation. More...
 
void applyDirty (bool remove_outputs)
 Applies the stored dirty operation. More...
 
bool updateDirtyData (const PDG_WorkItem *work_item, bool is_dirty_data)
 
void updateCacheId (const PDG_WorkItem *dependent, const PDG_WorkItem *dependency)
 Updates the cache ID of the work item for a dependency. More...
 
bool removeDependency (const PDG_WorkItem *dependent, const PDG_WorkItem *dependency)
 
void keepFilePath (const UT_StringHolder &file_path)
 

Detailed Description

Definition at line 26 of file PDG_WorkItemDirty.h.

Member Enumeration Documentation

Enumeration of dirty types.

Enumerator
eDirtyInvalid 

Invalid/uninitialized dirty operation.

eDirtyWorkItem 

Dirty of a single work iem.

eDirtyNode 

Dirty of a single node.

eDirtyGraph 

Dirty of the entire graph.

Definition at line 30 of file PDG_WorkItemDirty.h.

Constructor & Destructor Documentation

PDG_WorkItemDirty::PDG_WorkItemDirty ( )
inline

Definition at line 46 of file PDG_WorkItemDirty.h.

PDG_WorkItemDirty::PDG_WorkItemDirty ( PDG_GraphContext context,
bool  is_delete,
Type  dirty_type = eDirtyInvalid 
)
inline

Definition at line 52 of file PDG_WorkItemDirty.h.

PDG_WorkItemDirty::PDG_WorkItemDirty ( PDG_GraphContext context,
PDG_Node node,
bool  is_delete,
bool  emit_graph_events 
)
inline

Definition at line 61 of file PDG_WorkItemDirty.h.

Member Function Documentation

void PDG_WorkItemDirty::applyDirty ( bool  remove_outputs)

Applies the stored dirty operation.

PDG_WorkItemSet PDG_WorkItemDirty::deleteSet ( ) const

Returns the set of work items marked for dirtying.

const PDG_File::Set& PDG_WorkItemDirty::dirtyFiles ( ) const
inline

Returns the list of files from dirty work items.

Definition at line 78 of file PDG_WorkItemDirty.h.

PDG_WorkItemSet PDG_WorkItemDirty::dirtySet ( ) const

Returns the set of work items marked for deletiong.

Type PDG_WorkItemDirty::dirtyType ( ) const
inline

Returns the dirty type.

Definition at line 73 of file PDG_WorkItemDirty.h.

void PDG_WorkItemDirty::dirtyWorkItem ( const PDG_WorkItem work_item,
bool  is_delete 
)

Adds a work item to the dirty set(s)

bool PDG_WorkItemDirty::isDataDirty ( const PDG_WorkItem work_item) const

Returns true if the data for the work item is dirty.

bool PDG_WorkItemDirty::isDeleted ( const PDG_WorkItem work_item) const

Returns true if the item is marked for deletion.

bool PDG_WorkItemDirty::isDirty ( const PDG_WorkItem work_item) const

Returns true if the item is marked for any kind of dirtying operation.

void PDG_WorkItemDirty::keepFilePath ( const UT_StringHolder file_path)

Adds a request to preserve a file, even if the file would normally be deleted by a dirty operation.

const UT_ArrayStringSet& PDG_WorkItemDirty::keepFiles ( ) const
inline

Returns the list of files that are prevented from being deleted.

Definition at line 83 of file PDG_WorkItemDirty.h.

void PDG_WorkItemDirty::prepareDirty ( PDG_WorkItem work_item)

Adds a work item and its dependencies to the dirty sets.

void PDG_WorkItemDirty::prepareDirty ( PDG_Node node,
bool  will_remove_outputs 
)

Adds a node to the pending dirty operation.

bool PDG_WorkItemDirty::removeDependency ( const PDG_WorkItem dependent,
const PDG_WorkItem dependency 
)

Flags a dependency relationship for removal. This is necessary because it's possible for only some dependencies of a partition to be deleted during a dependency operation, which still leaves the partition behind. This method returns true if the removal corresponds to the last entry in the partition, which indicates that the partition itself should also be deleted

void PDG_WorkItemDirty::reset ( )

Resets this object to a clean state.

void PDG_WorkItemDirty::updateCacheId ( const PDG_WorkItem dependent,
const PDG_WorkItem dependency 
)

Updates the cache ID of the work item for a dependency.

bool PDG_WorkItemDirty::updateDirtyData ( const PDG_WorkItem work_item,
bool  is_dirty_data 
)

Updates the dirty data map for the work item, and returns true if the dirtying operaton should proceed. Returns false if no dirtying should occur.


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