HDK
|
#include <PDG_CustomHandlers.h>
Classes | |
class | CacheHandler |
class | DirtyHandler |
Custom functor for handling dirtied work items, and possibly output. More... | |
class | PreflightHandler |
Custom handler functor for running pre-flight logic before a cook. More... | |
class | RegenerationHandler |
class | StatHandler |
Custom functor for stating a file and returning a size/hash. More... | |
struct | StatPair |
class | TransferHandler |
struct | TransferPair |
Public Member Functions | |
const CacheHandlerMap & | cacheHandlers () const |
Returns the map of cache handlers, tag -> handler. More... | |
const StatHandlerMap & | statHandlers () const |
Returns the map of stat handlers, tag -> handler. More... | |
const TransferHandlerMap & | transferHandlers () const |
Returns the map of transfer handlers, tag -> handler. More... | |
const DirtyHandlerArray & | dirtyHandlers () const |
Returns the array of dirty handlers. More... | |
const RegenHandlerArray & | regenerationHandlers () const |
const PreflightHandlerArray & | preflightHandlers () const |
bool | addCacheHandler (const UT_StringHolder &tag, CacheHandler *handler) |
bool | addStatHandler (const UT_StringHolder &tag, StatHandler *handler) |
void | addDirtyHandler (DirtyHandler *handler) |
Adds a custom delete handler. More... | |
void | addRegenerationHandler (RegenerationHandler *handler) |
Adds a custom regeneration handler. More... | |
bool | addTransferHandler (const UT_StringHolder &tag, TransferHandler *handler) |
Adds a custom transfer handler. More... | |
void | addPreflightHandler (PreflightHandler *handler) |
Adds a custom preflight handler. More... | |
bool | hasDirtyHandlers (DirtyHandlerType type) const |
Returns true if there are any custom dirty handlers registered. More... | |
void | clearHandlers () |
Clears all cache and delete handlers. More... | |
CacheResult | handleCache (const UT_StringHolder &local_path, const PDG_File &file, const PDG_WorkItem *work_item) const |
Checks if a given file path is cached. More... | |
StatPair | handleStat (const UT_StringHolder &local_path, const PDG_File &file, const PDG_WorkItem *work_item) const |
Returns the hash/mod time of the file. More... | |
void | handleDirtyGlobal (bool delete_items, bool remove_outputs) const |
bool | handleDirty (const PDG_WorkItem *work_item, const PDG_File::Set &files, bool delete_items, bool remove_outputs) const |
RegenerateResult | handleRegenerate (PDG_Node *node, const PDG_WorkItemArray &items) |
TransferPair | handleTransfer (const UT_FileStat &local_stat, const UT_StringHolder &local_path, const UT_StringHolder &remote_path, const PDG_File &file, const PDG_WorkItem *work_item, const PDG_Scheduler *scheduler, exint last_update) const |
bool | handlePreflight (const PDG_CookOptions &options, PDG_GraphContext *context, UT_WorkBuffer &errors) |
Protected Member Functions | |
PDG_CustomHandlers () | |
Constructs a new instance of the table. More... | |
Protected Member Functions inherited from UT_NonCopyableNS::UT_NonCopyable | |
UT_NonCopyable ()=default | |
~UT_NonCopyable ()=default | |
UT_NonCopyable (const UT_NonCopyable &)=delete | |
UT_NonCopyable & | operator= (const UT_NonCopyable &)=delete |
Friends | |
class | PDG_TypeRegistry |
Definition at line 36 of file PDG_CustomHandlers.h.
Cache handler map.
Definition at line 258 of file PDG_CustomHandlers.h.
Unique pointer to a custom cache handler.
Definition at line 255 of file PDG_CustomHandlers.h.
Delete handler map.
Definition at line 272 of file PDG_CustomHandlers.h.
Unique pointer to a custom delete handler.
Definition at line 269 of file PDG_CustomHandlers.h.
Preflight handler array.
Definition at line 293 of file PDG_CustomHandlers.h.
Unique pointer to a custom preflight handler.
Definition at line 290 of file PDG_CustomHandlers.h.
Regeneration handler array.
Definition at line 279 of file PDG_CustomHandlers.h.
Unique pointer to a custom regeneration handler.
Definition at line 276 of file PDG_CustomHandlers.h.
State handler map.
Definition at line 265 of file PDG_CustomHandlers.h.
Unique pointer to a custom stat handler.
Definition at line 262 of file PDG_CustomHandlers.h.
Transfer handler array.
Definition at line 286 of file PDG_CustomHandlers.h.
Unique pointer to a custom transfer handler.
Definition at line 283 of file PDG_CustomHandlers.h.
Return result for custom cache handlers.
Definition at line 40 of file PDG_CustomHandlers.h.
Enumeration of different levels of dirty handler.
Definition at line 89 of file PDG_CustomHandlers.h.
Enunmerations of different work item regeneration levels that can returned by the correpsonding handler.
Definition at line 54 of file PDG_CustomHandlers.h.
Enumeration of different file transfer handle results.
Definition at line 71 of file PDG_CustomHandlers.h.
|
protected |
Constructs a new instance of the table.
bool PDG_CustomHandlers::addCacheHandler | ( | const UT_StringHolder & | tag, |
CacheHandler * | handler | ||
) |
Adds a custom tag prefix -> cache handler mapping. Returns true if an existing entry was replaced.
void PDG_CustomHandlers::addDirtyHandler | ( | DirtyHandler * | handler | ) |
Adds a custom delete handler.
void PDG_CustomHandlers::addPreflightHandler | ( | PreflightHandler * | handler | ) |
Adds a custom preflight handler.
void PDG_CustomHandlers::addRegenerationHandler | ( | RegenerationHandler * | handler | ) |
Adds a custom regeneration handler.
bool PDG_CustomHandlers::addStatHandler | ( | const UT_StringHolder & | tag, |
StatHandler * | handler | ||
) |
Adds a custom tag prefix -> hash handler mapping. Returns true if an existing entry was replaced.
bool PDG_CustomHandlers::addTransferHandler | ( | const UT_StringHolder & | tag, |
TransferHandler * | handler | ||
) |
Adds a custom transfer handler.
|
inline |
Returns the map of cache handlers, tag -> handler.
Definition at line 297 of file PDG_CustomHandlers.h.
void PDG_CustomHandlers::clearHandlers | ( | ) |
Clears all cache and delete handlers.
|
inline |
Returns the array of dirty handlers.
Definition at line 309 of file PDG_CustomHandlers.h.
CacheResult PDG_CustomHandlers::handleCache | ( | const UT_StringHolder & | local_path, |
const PDG_File & | file, | ||
const PDG_WorkItem * | work_item | ||
) | const |
Checks if a given file path is cached.
bool PDG_CustomHandlers::handleDirty | ( | const PDG_WorkItem * | work_item, |
const PDG_File::Set & | files, | ||
bool | delete_items, | ||
bool | remove_outputs | ||
) | const |
Called when a work item should delete files, and runs any custom handlers that match the item
void PDG_CustomHandlers::handleDirtyGlobal | ( | bool | delete_items, |
bool | remove_outputs | ||
) | const |
Called before a dirty w/ deleted outputs, in order to run global delete handlers
bool PDG_CustomHandlers::handlePreflight | ( | const PDG_CookOptions & | options, |
PDG_GraphContext * | context, | ||
UT_WorkBuffer & | errors | ||
) |
Called when the graph run preflight logic, and returns false if any of the handlers fail.
RegenerateResult PDG_CustomHandlers::handleRegenerate | ( | PDG_Node * | node, |
const PDG_WorkItemArray & | items | ||
) |
Called when a node is going to regenerate work items, to see if it should.
StatPair PDG_CustomHandlers::handleStat | ( | const UT_StringHolder & | local_path, |
const PDG_File & | file, | ||
const PDG_WorkItem * | work_item | ||
) | const |
Returns the hash/mod time of the file.
TransferPair PDG_CustomHandlers::handleTransfer | ( | const UT_FileStat & | local_stat, |
const UT_StringHolder & | local_path, | ||
const UT_StringHolder & | remote_path, | ||
const PDG_File & | file, | ||
const PDG_WorkItem * | work_item, | ||
const PDG_Scheduler * | scheduler, | ||
exint | last_update | ||
) | const |
Called when a file needs to be transfered to the working directory of a scheduler
bool PDG_CustomHandlers::hasDirtyHandlers | ( | DirtyHandlerType | type | ) | const |
Returns true if there are any custom dirty handlers registered.
|
inline |
Definition at line 317 of file PDG_CustomHandlers.h.
|
inline |
Definition at line 313 of file PDG_CustomHandlers.h.
|
inline |
Returns the map of stat handlers, tag -> handler.
Definition at line 301 of file PDG_CustomHandlers.h.
|
inline |
Returns the map of transfer handlers, tag -> handler.
Definition at line 305 of file PDG_CustomHandlers.h.
|
friend |
Definition at line 407 of file PDG_CustomHandlers.h.