HDK
|
#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_WorkItemConstSet & | deleteSet () const |
Returns the list of work items marked for deletion. More... | |
const PDG_WorkItemConstSet & | dirtySet () const |
Returns the list of work items marked for deletion. More... | |
const PDG_File::Set & | dirtyFiles () const |
Returns the list of files from dirty work items. More... | |
const UT_ArrayStringSet & | keepFiles () 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) |
Definition at line 23 of file PDG_WorkItemDirty.h.
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.
|
inline |
Definition at line 43 of file PDG_WorkItemDirty.h.
|
inline |
Definition at line 49 of file PDG_WorkItemDirty.h.
|
inline |
Definition at line 58 of file PDG_WorkItemDirty.h.
void PDG_WorkItemDirty::applyDirty | ( | bool | remove_outputs | ) |
Applies the stored dirty operation.
|
inline |
Returns the list of work items marked for deletion.
Definition at line 75 of file PDG_WorkItemDirty.h.
|
inline |
Returns the list of files from dirty work items.
Definition at line 85 of file PDG_WorkItemDirty.h.
|
inline |
Returns the list of work items marked for deletion.
Definition at line 80 of file PDG_WorkItemDirty.h.
|
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.
|
inline |
Returns true if the item is marked for deletion.
Definition at line 94 of file PDG_WorkItemDirty.h.
|
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.
|
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.
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.