9 #ifndef __PDG_BATCHWORKITEM_H__
10 #define __PDG_BATCHWORKITEM_H__
24 bool is_static =
true,
26 PDG_WorkItemInvalidID,
34 bool inclusive)
const override;
38 int batchStart()
const;
41 int batchSize()
const;
45 {
return myBatchItems; }
69 void initBatchItems();
76 void setIsPartialCook(
bool is_partial);
79 void setIsDynamicBatch(
bool is_dynamic);
85 bool shell=
false)
override;
93 bool shell=
false)
override;
97 {
return myIsPartialCook; }
102 {
return myIsDynamicBatch; }
105 void setOffset(
int offset);
113 void setActivationMode(
118 void setActivationCount(
119 int activation_count);
125 int activationCount()
const;
128 void setStartIndex(
int index);
132 bool batched)
override;
136 {
return &myNotCachedDep; }
167 bool unresolve)
override;
194 int myActivationCount;
195 mutable int myActiveBatchIndex;
198 bool myIsPartialCook;
199 bool myIsDynamicBatch;
exint PDG_WorkItemID
Type defs for unique work item IDs.
virtual PDG_WorkItemState checkCached(bool add_outputs)
const PDG_WorkItemArray & batchItems() const
Returns the list of sub items in the batch.
bool isPartialCook() const
Returns the partial batch flag.
void resetOwner() override
Resets the work item's dependency objects.
virtual bool setFrameInternal(fpreal frame, fpreal frame_step, bool check_dirty, bool emit)
Internal method for setting the frame.
**But if you need a result
PDG_WorkItemPendingDirty
Enumeration of pending work item dirty states.
virtual void syncCacheId()
Syncs a work item's cache with its dependents.
PDG_WorkItemState
Enum of possible work item states.
PDGE_Dependency * notCachedDep()
Returns the can cook dependency object for this work item.
friend class PDG_BatchWorkItem
virtual PDG_WorkItemCacheState outputCacheState() const
Returns the output file cache state of this work item.
PDGE_Dependency::State evalResolve(PDGE_Resolutions &resolutions, const PDGE_Evaluator &evaluator, PDGE_Dependency *dependency) override
virtual bool setPlatformCommands(const UT_StringHolder &linux, const UT_StringHolder &mac, const UT_StringHolder &windows, bool shell=false)
Sets a per-platform work item command.
virtual void setPendingDirty(PDG_WorkItemPendingDirty pending)
Sets the pending dirty flag on the work item, used for regeneration.
UT_StringHolder batchName() const
Returns the batch name; the prefix given to all sub items.
bool isDynamicBatch() const
StatType
Enumeration of stats stored in this object.
virtual void memoryInfo(PDG_MemoryInfo &memory_info, bool inclusive) const
Returns a break down of the memory used by the work item.
virtual fpreal setTimeStat(PDG_WorkItemStats::StatType stat, bool batched)
Sets a stat to the current time.
virtual bool setCommand(const UT_StringHolder &command, bool shell=false)
Sets the work item command directly.
virtual void notifyCook(PDGE_Resolutions &resolutions, PDG_WorkItemState result, int batch_index, fpreal duration, bool notify_all, bool static_cook, bool unresolve)
Notifies this work item that is has cooked.
UT_StringHolder name() const
Returns the name of the work item, guaranteed to be unique.