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_WorkItemConstSetdeleteSet () const
 Returns the list of work items marked for deletion. More...
 
const PDG_WorkItemConstSetdirtySet () const
 Returns the list of work items marked for deletion. 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...
 
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 23 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 27 of file PDG_WorkItemDirty.h.

Constructor & Destructor Documentation

PDG_WorkItemDirty::PDG_WorkItemDirty ( )
inline

Definition at line 43 of file PDG_WorkItemDirty.h.

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

Definition at line 49 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 58 of file PDG_WorkItemDirty.h.

Member Function Documentation

void PDG_WorkItemDirty::applyDirty ( bool  remove_outputs)

Applies the stored dirty operation.

const PDG_WorkItemConstSet& PDG_WorkItemDirty::deleteSet ( ) const
inline

Returns the list of work items marked for deletion.

Definition at line 75 of file PDG_WorkItemDirty.h.

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

Returns the list of files from dirty work items.

Definition at line 85 of file PDG_WorkItemDirty.h.

const PDG_WorkItemConstSet& PDG_WorkItemDirty::dirtySet ( ) const
inline

Returns the list of work items marked for deletion.

Definition at line 80 of file PDG_WorkItemDirty.h.

Type PDG_WorkItemDirty::dirtyType ( ) const
inline

Returns the dirty type.

Definition at line 70 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
inline

Returns true if the item is marked for deletion.

Definition at line 94 of file PDG_WorkItemDirty.h.

bool PDG_WorkItemDirty::isDirty ( const PDG_WorkItem work_item) const
inline

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

Definition at line 98 of file PDG_WorkItemDirty.h.

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 90 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: