HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessorBase< TreeType, IsSafe > Class Template Referenceabstract

This base class for ValueAccessors manages registration of an accessor with a tree so that the tree can automatically clear the accessor whenever one of its nodes is deleted. More...

#include <ValueAccessor.h>

+ Inheritance diagram for openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessorBase< TreeType, IsSafe >:

Public Member Functions

 ValueAccessorBase (TreeType &tree)
 
virtual ~ValueAccessorBase ()
 
TreeType * getTree () const
 Return a pointer to the tree associated with this accessor. More...
 
TreeType & tree () const
 Return a reference to the tree associated with this accessor. More...
 
 ValueAccessorBase (const ValueAccessorBase &other)
 
ValueAccessorBaseoperator= (const ValueAccessorBase &other)
 
virtual void clear ()=0
 

Static Public Member Functions

static bool isSafe ()
 Return true if this accessor is safe, i.e. registered by the tree from which it is constructed. Un-registered accessors can in rare cases be faster because it avoids the (small) overhead of registration, but they are unsafe if the tree is modified. So unless you're an expert it is highly recommended to set IsSafe = true (which is the default). More...
 

Static Public Attributes

static const bool IsConstTree = std::is_const<TreeType>::value
 

Protected Member Functions

virtual void release ()
 

Protected Attributes

TreeType * mTree
 

Friends

template<typename >
class Tree
 

Detailed Description

template<typename TreeType, bool IsSafe>
class openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessorBase< TreeType, IsSafe >

This base class for ValueAccessors manages registration of an accessor with a tree so that the tree can automatically clear the accessor whenever one of its nodes is deleted.

Definition at line 122 of file ValueAccessor.h.

Constructor & Destructor Documentation

template<typename TreeType, bool IsSafe>
openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessorBase< TreeType, IsSafe >::ValueAccessorBase ( TreeType &  tree)
inline

Definition at line 135 of file ValueAccessor.h.

template<typename TreeType, bool IsSafe>
virtual openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessorBase< TreeType, IsSafe >::~ValueAccessorBase ( )
inlinevirtual

Definition at line 140 of file ValueAccessor.h.

template<typename TreeType, bool IsSafe>
openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessorBase< TreeType, IsSafe >::ValueAccessorBase ( const ValueAccessorBase< TreeType, IsSafe > &  other)
inline

Definition at line 150 of file ValueAccessor.h.

Member Function Documentation

template<typename TreeType, bool IsSafe>
virtual void openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessorBase< TreeType, IsSafe >::clear ( )
pure virtual

Implemented in openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor3< TreeType, IsSafe, L0, L1, L2 >, openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor3< TreeType, IsSafe >, openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor2< TreeType, IsSafe, L0, L1 >, openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor2< TreeType, IsSafe >, openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor1< TreeType, IsSafe, L0 >, openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor1< TreeType, IsSafe >, openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor0< TreeType, IsSafe >, openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >, openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< TreeT >, openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< BoolTreeType >, openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< TreeType, IsSafe, TreeType::DEPTH-1, tbb::spin_mutex >, openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< const TreeType, IsSafe >, openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< const TreeT, false >, openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< const TreeType >, openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< UCharTreeType >, openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< const InputTreeType >, openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< const TreeT >, openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< Int16TreeType >, openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< IntTreeT >, openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< Int32TreeType >, openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< Index32TreeType >, and openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< TreeType >.

template<typename TreeType, bool IsSafe>
TreeType* openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessorBase< TreeType, IsSafe >::getTree ( ) const
inline

Return a pointer to the tree associated with this accessor.

The pointer will be null only if the tree from which this accessor was constructed was subsequently deleted (which generally leaves the accessor in an unsafe state).

Definition at line 146 of file ValueAccessor.h.

template<typename TreeType, bool IsSafe>
static bool openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessorBase< TreeType, IsSafe >::isSafe ( )
inlinestatic

Return true if this accessor is safe, i.e. registered by the tree from which it is constructed. Un-registered accessors can in rare cases be faster because it avoids the (small) overhead of registration, but they are unsafe if the tree is modified. So unless you're an expert it is highly recommended to set IsSafe = true (which is the default).

Definition at line 133 of file ValueAccessor.h.

template<typename TreeType, bool IsSafe>
ValueAccessorBase& openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessorBase< TreeType, IsSafe >::operator= ( const ValueAccessorBase< TreeType, IsSafe > &  other)
inline

Definition at line 155 of file ValueAccessor.h.

template<typename TreeType, bool IsSafe>
virtual void openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessorBase< TreeType, IsSafe >::release ( )
inlineprotectedvirtual

Definition at line 171 of file ValueAccessor.h.

template<typename TreeType, bool IsSafe>
TreeType& openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessorBase< TreeType, IsSafe >::tree ( ) const
inline

Return a reference to the tree associated with this accessor.

Definition at line 148 of file ValueAccessor.h.

Friends And Related Function Documentation

template<typename TreeType, bool IsSafe>
template<typename >
friend class Tree
friend

Definition at line 169 of file ValueAccessor.h.

Member Data Documentation

template<typename TreeType, bool IsSafe>
const bool openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessorBase< TreeType, IsSafe >::IsConstTree = std::is_const<TreeType>::value
static

Definition at line 125 of file ValueAccessor.h.

template<typename TreeType, bool IsSafe>
TreeType* openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessorBase< TreeType, IsSafe >::mTree
protected

Definition at line 173 of file ValueAccessor.h.


The documentation for this class was generated from the following file: