HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::util::PagedArray< ValueT, Log2PageSize >::ValueBuffer Class Reference

#include <PagedArray.h>

Public Types

using PagedArrayType = PagedArray< ValueT, Log2PageSize >
 

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

Static Public Member Functions

static size_t pageSize ()
 

Detailed Description

template<typename ValueT, size_t Log2PageSize = 10UL>
class openvdb::OPENVDB_VERSION_NAME::util::PagedArray< ValueT, Log2PageSize >::ValueBuffer

Definition at line 539 of file PagedArray.h.

Member Typedef Documentation

template<typename ValueT , size_t Log2PageSize = 10UL>
using openvdb::OPENVDB_VERSION_NAME::util::PagedArray< ValueT, Log2PageSize >::ValueBuffer::PagedArrayType = PagedArray<ValueT, Log2PageSize>

Definition at line 543 of file PagedArray.h.

Constructor & Destructor Documentation

template<typename ValueT , size_t Log2PageSize = 10UL>
openvdb::OPENVDB_VERSION_NAME::util::PagedArray< ValueT, Log2PageSize >::ValueBuffer::ValueBuffer ( PagedArray parent)
inline

Constructor from a PageArray.

Definition at line 545 of file PagedArray.h.

template<typename ValueT , size_t Log2PageSize = 10UL>
openvdb::OPENVDB_VERSION_NAME::util::PagedArray< ValueT, Log2PageSize >::ValueBuffer::ValueBuffer ( const ValueBuffer other)
inline
Warning
This copy-constructor is shallow in the sense that no elements are copied, i.e. size = 0.

Definition at line 548 of file PagedArray.h.

template<typename ValueT , size_t Log2PageSize = 10UL>
openvdb::OPENVDB_VERSION_NAME::util::PagedArray< ValueT, Log2PageSize >::ValueBuffer::~ValueBuffer ( )
inline

Destructor that transfers an buffered values to the parent PagedArray.

Definition at line 550 of file PagedArray.h.

Member Function Documentation

template<typename ValueT , size_t Log2PageSize = 10UL>
void openvdb::OPENVDB_VERSION_NAME::util::PagedArray< ValueT, Log2PageSize >::ValueBuffer::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.

Definition at line 567 of file PagedArray.h.

template<typename ValueT , size_t Log2PageSize = 10UL>
ValueBuffer& openvdb::OPENVDB_VERSION_NAME::util::PagedArray< ValueT, Log2PageSize >::ValueBuffer::operator= ( const ValueBuffer )
delete
template<typename ValueT , size_t Log2PageSize = 10UL>
static size_t openvdb::OPENVDB_VERSION_NAME::util::PagedArray< ValueT, Log2PageSize >::ValueBuffer::pageSize ( )
inlinestatic

Definition at line 576 of file PagedArray.h.

template<typename ValueT , size_t Log2PageSize = 10UL>
PagedArrayType& openvdb::OPENVDB_VERSION_NAME::util::PagedArray< ValueT, Log2PageSize >::ValueBuffer::parent ( ) const
inline

Return a reference to the parent PagedArray.

Definition at line 573 of file PagedArray.h.

template<typename ValueT , size_t Log2PageSize = 10UL>
void openvdb::OPENVDB_VERSION_NAME::util::PagedArray< ValueT, Log2PageSize >::ValueBuffer::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.

Definition at line 558 of file PagedArray.h.

template<typename ValueT , size_t Log2PageSize = 10UL>
size_t openvdb::OPENVDB_VERSION_NAME::util::PagedArray< ValueT, Log2PageSize >::ValueBuffer::size ( void  ) const
inline

Return the current number of elements cached in this buffer.

Definition at line 575 of file PagedArray.h.


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