DD::Image::OpTreeHandler Class Reference

This component of an op handles the manipulations of its trees: adding to, removing from, checking statuses, etc. More...

Public Member Functions

bool addTree (OpTree *lpTree)
 Returns true if the op was added to the tree, or false if only a ref was added. See OpFns.cpp for further details.
 
bool removeTree (OpTree *lpTree)
 Returns true if the op was removed from the tree, or false if only a ref was removed. See OpFns.cpp for further details.
 
bool isInTree (OpTree *lpTree) const
 Returns whether this handler's op is in the given tree.
 
bool isInAnyTree () const
 Returns true iff this handler's op is in at least one op tree.
 
int getNumTrees () const
 Returns the number of trees the handler's op is in.
 
bool wasConnectedTreeAborted () const
 Returns true iff any of the trees this handler's op is in was aborted.
 
bool wasConnectedTreeCancelled () const
 Returns true iff any of the trees this handler's op is in was cancelled.
 
void abortConnectedTrees () const
 
void cancelConnectedTrees () const
 
void addOpToTrees (Op *lpOp) const
 If valid, adds the op to each tree.
 
void removeOpFromTrees (Op *lpOp) const
 If valid, removes the op from each tree.
 
void removeMessageOpFromTrees (Op *lpOp) const
 Removes the op from the list of message ops on each tree; does not remove it from the tree itself.
 
const std::vector< OpTree * > & lockTrees () const
 
void unlockTrees ()
 Unlocks tree access. Must be called after using lockTrees.
 
std::string getTreeDebugText () const
 Returns a string describing the trees that this op belongs to.
 
std::string getDetailedTreeDebugText () const
 
bool wasWarningGiven () const
 True when a warning for missing op trees has been given.
 
void setWarningGiven () const
 Set that the warning has been given.
 
bool allowsNoTrees () const
 True iff having no trees should be handled as a normal case.
 
void disallowNoTrees ()
 Set that the object must have trees for normal operation.
 

Detailed Description

This component of an op handles the manipulations of its trees: adding to, removing from, checking statuses, etc.

Member Function Documentation

const std::vector< OpTree * > & OpTreeHandler::lockTrees ( ) const

Locks the vector of the processing trees that this op belongs to, and returns a reference to it. Make sure you call unlockTrees after calling this. Avoid calling this externally. It's only public for access in message observer notifications.

References DD::Image::RecursiveLock::lock().

Referenced by DD::Image::Op::arePopUpsEnabled(), DD::Image::Op::critical(), DD::Image::Op::debug(), DD::Image::Op::error(), and DD::Image::Op::warning().



©2022 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.thefoundry.co.uk