HDK
|
#include <GABC_Util.h>
Public Member Functions | |
Walker () | |
virtual | ~Walker () |
virtual bool | preProcess (const GABC_IObject &node) |
virtual bool | process (const GABC_IObject &node)=0 |
virtual bool | interrupted () const |
Allow for interruption of walk. More... | |
bool | walkChildren (const GABC_IObject &node) |
void | computeTimeRange (const GABC_IObject &obj) |
bool | computedValidTimeRange () const |
Returns true if a valid time range has been computed during the walk. More... | |
fpreal | getStartTime () const |
Get global start and end times, computed when walking the archive. More... | |
fpreal | getEndTime () const |
bool | badArchive () const |
Return whether the walking error was caused by a bad Alembic archive. More... | |
const std::vector< std::string > & | filenames () const |
void | setFilenames (const std::vector< std::string > &f) |
Friends | |
class | GABC_Util |
Class used in traversal of Alembic trees
For standard walking of the tree, you'd likely have a process() method like this:
However, if you have to pass information to the child nodes, you might want to do something like:
Definition at line 94 of file GABC_Util.h.
|
inline |
Definition at line 97 of file GABC_Util.h.
|
inlinevirtual |
Definition at line 104 of file GABC_Util.h.
|
inline |
Return whether the walking error was caused by a bad Alembic archive.
Definition at line 144 of file GABC_Util.h.
|
inline |
Returns true if a valid time range has been computed during the walk.
Definition at line 128 of file GABC_Util.h.
void GABC_NAMESPACE::GABC_Util::Walker::computeTimeRange | ( | const GABC_IObject & | obj | ) |
Recomputes the time range of the archive given a new object during a walk.
|
inline |
Access the current filenames
Definition at line 138 of file GABC_Util.h.
|
inline |
Definition at line 134 of file GABC_Util.h.
|
inline |
Get global start and end times, computed when walking the archive.
Definition at line 132 of file GABC_Util.h.
|
inlinevirtual |
Allow for interruption of walk.
Reimplemented in GABC_NAMESPACE::GABC_GEOWalker.
Definition at line 117 of file GABC_Util.h.
|
inlinevirtual |
preProcess()
is called on the "root" of the walk. The root may not be the root of the Alembic file (i.e. when walking lists of objects). The preProcess()
method will be called one time only.
Reimplemented in GABC_NAMESPACE::GABC_GEOWalker.
Definition at line 109 of file GABC_Util.h.
|
pure virtual |
Return true to continue traveral and process the children of the given node. Returning false will process the next sibling. Use interrupted() to perform an early termination.
Implemented in GABC_NAMESPACE::GABC_GEOWalker.
|
inline |
Access the current filenames
Definition at line 139 of file GABC_Util.h.
bool GABC_NAMESPACE::GABC_Util::Walker::walkChildren | ( | const GABC_IObject & | node | ) |
Manually walk children of the given node. Returns false if the walk was interrupted, true if the walk was completed.
Definition at line 153 of file GABC_Util.h.