SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
A "handle" for a VTK entity (file, block, side set, or node set) More...
#include <Session.h>
Public Member Functions | |
EntityHandle () | |
Construct an invalid handle. | |
EntityHandle (int emod, vtkDataObject *obj, SessionPtr sess) | |
Construct a possibly-valid handle (of a top-level model). | |
EntityHandle (int emod, vtkDataObject *obj, vtkDataObject *parent, int idxInParent, SessionPtr sess) | |
Construct a possibly-valid handle (of a non-top-level entity). | |
bool | isValid () const |
Returns true when the object is owned by a session and has a non-nullptr pointer. | |
EntityType | entityType () const |
Return the type of object this handle represents (or EXO_INVALID). | |
std::string | name () const |
Return the name assigned to this object. More... | |
int | pedigree () const |
Return the pedigree ID assigned to this object. More... | |
bool | visible () const |
Return the default visibility assigned to this object. | |
int | modelNumber () const |
EntityHandle | parent () const |
Given a handle, return its parent if it has one. | |
template<typename T > | |
T * | object () const |
template<typename T > | |
T | childrenAs (int depth) const |
template<typename T > | |
void | appendChildrenTo (T &container, int depth) const |
bool | operator== (const EntityHandle &other) const |
bool | operator!= (const EntityHandle &other) const |
Public Attributes | |
int | m_modelNumber |
An offset in the vector of models (m_models) owned by the session, whose model owns m_object. More... | |
vtkSmartPointer< vtkDataObject > | m_object |
The dataset being presented as this entity. | |
SessionPtr | m_session |
The session owning this entity. | |
A "handle" for a VTK entity (file, block, side set, or node set)
std::string smtk::session::vtk::EntityHandle::name | ( | ) | const |
Return the name assigned to this object.
Note that this is not the same as the block name that VTK uses!
int smtk::session::vtk::EntityHandle::pedigree | ( | ) | const |
Return the pedigree ID assigned to this object.
For Exodus files, this is the block or set ID. For SLAC files, it is the block index.
int smtk::session::vtk::EntityHandle::m_modelNumber |
An offset in the vector of models (m_models) owned by the session, whose model owns m_object.