OpenVDB  6.1.0
Public Types | Public Member Functions | List of all members
PagedArray< ValueT, Log2PageSize, TableT >::ValueBuffer Class Reference

#include <PagedArray.h>

Public Types

using PagedArrayType = PagedArray< ValueT, Log2PageSize, TableT >
 

Public Member Functions

 ValueBuffer (PagedArray &parent)
 Constructor from a PageArray. More...
 
 ValueBuffer (const ValueBuffer &other)
 
 ~ValueBuffer ()
 Destructor that transfers an buffered values to the parent PagedArray. More...
 
ValueBufferoperator= (const ValueBuffer &)=delete
 
void push_back (const ValueT &v)
 Add a value to the buffer and increment the size. More...
 
void flush ()
 Manually transfers the values in this buffer to the parent PagedArray. More...
 
PagedArrayTypeparent () const
 Return a reference to the parent PagedArray. More...
 
size_t size () const
 Return the current number of elements cached in this buffer. More...
 

Member Typedef Documentation

using PagedArrayType = PagedArray<ValueT, Log2PageSize, TableT>

Constructor & Destructor Documentation

ValueBuffer ( PagedArray parent)
inline

Constructor from a PageArray.

ValueBuffer ( const ValueBuffer other)
inline
Warning
This copy-constructor is shallow in the sense that no elements are copied, i.e. size = 0.
~ValueBuffer ( )
inline

Destructor that transfers an buffered values to the parent PagedArray.

Member Function Documentation

void flush ( )
inline

Manually transfers the values in this buffer to the parent PagedArray.

Note
This method is also called by the destructor and push_back so it should only be called if one manually wants to sync up the buffer with the array, e.g. during debugging.
ValueBuffer& operator= ( const ValueBuffer )
delete
PagedArrayType& parent ( ) const
inline

Return a reference to the parent PagedArray.

void push_back ( const ValueT &  v)
inline

Add a value to the buffer and increment the size.

If the internal memory page is full it will automaically flush the page to the parent PagedArray.

size_t size ( ) const
inline

Return the current number of elements cached in this buffer.


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