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

#include <PagedArray.h>

Public Types

typedef PagedArray< ValueT,
Log2PageSize, TableT > 
PagedArrayType
 

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

Detailed Description

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

Definition at line 625 of file PagedArray.h.

Member Typedef Documentation

template<typename ValueT , size_t Log2PageSize = 10UL, template< typename...> class TableT = std::vector>
typedef PagedArray<ValueT, Log2PageSize, TableT> openvdb::OPENVDB_VERSION_NAME::util::PagedArray< ValueT, Log2PageSize, TableT >::ValueBuffer::PagedArrayType

Definition at line 629 of file PagedArray.h.

Constructor & Destructor Documentation

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

Constructor from a PageArray.

Definition at line 631 of file PagedArray.h.

template<typename ValueT , size_t Log2PageSize = 10UL, template< typename...> class TableT = std::vector>
openvdb::OPENVDB_VERSION_NAME::util::PagedArray< ValueT, Log2PageSize, TableT >::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 634 of file PagedArray.h.

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

Destructor that transfers an buffered values to the parent PagedArray.

Definition at line 636 of file PagedArray.h.

Member Function Documentation

template<typename ValueT , size_t Log2PageSize = 10UL, template< typename...> class TableT = std::vector>
void openvdb::OPENVDB_VERSION_NAME::util::PagedArray< ValueT, Log2PageSize, TableT >::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 653 of file PagedArray.h.

template<typename ValueT , size_t Log2PageSize = 10UL, template< typename...> class TableT = std::vector>
ValueBuffer& openvdb::OPENVDB_VERSION_NAME::util::PagedArray< ValueT, Log2PageSize, TableT >::ValueBuffer::operator= ( const ValueBuffer )
delete
template<typename ValueT , size_t Log2PageSize = 10UL, template< typename...> class TableT = std::vector>
PagedArrayType& openvdb::OPENVDB_VERSION_NAME::util::PagedArray< ValueT, Log2PageSize, TableT >::ValueBuffer::parent ( void  ) const
inline

Return a reference to the parent PagedArray.

Definition at line 659 of file PagedArray.h.

template<typename ValueT , size_t Log2PageSize = 10UL, template< typename...> class TableT = std::vector>
void openvdb::OPENVDB_VERSION_NAME::util::PagedArray< ValueT, Log2PageSize, TableT >::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 644 of file PagedArray.h.

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

Return the current number of elements cached in this buffer.

Definition at line 661 of file PagedArray.h.


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