OpenVDB 5.1.0

Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
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>`

Inherited by ValueAccessor0< TreeType, IsSafe >, ValueAccessor1< TreeType, IsSafe >, ValueAccessor2< TreeType, IsSafe >, ValueAccessor3< TreeType, IsSafe >, and ValueAccessor< TreeType, IsSafe, TreeType::DEPTH-1, tbb::spin_mutex >.

## 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)
ValueAccessorBase & | operator= (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::v5_1::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.

## Constructor & Destructor Documentation

## ◆ ValueAccessorBase() [1/2]

ValueAccessorBase | ( | TreeType & | tree | ) |
| inline

## ◆ ~ValueAccessorBase()

virtual ~ValueAccessorBase | ( |  | ) |
| inline virtual

## ◆ ValueAccessorBase() [2/2]

ValueAccessorBase | ( | const ValueAccessorBase< TreeType, IsSafe > & | other | ) |
| inline

## Member Function Documentation

## ◆ clear()

virtual void clear | ( |  | ) |
| pure virtual

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

## ◆ getTree()

TreeType* 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).

## ◆ isSafe()

static bool isSafe | ( |  | ) |
| inline static

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).

## ◆ operator=()

ValueAccessorBase& operator= | ( | const ValueAccessorBase< TreeType, IsSafe > & | other | ) |
| inline

## ◆ release()

virtual void release | ( |  | ) |
| inline protected virtual

## ◆ tree()

TreeType& tree | ( |  | ) | const
| inline

Return a reference to the tree associated with this accessor.

## Friends And Related Function Documentation

## ◆ Tree

friend class Tree
| friend

## Member Data Documentation

## ◆ IsConstTree

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

## ◆ mTree

TreeType* mTree
| protected

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

- ValueAccessor.h