OpenVDB: PagedArray< ValueT, Log2PageSize >::ValueBuffer Class Reference

OpenVDB 10.0.1

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

`#include <openvdb/util/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...
ValueBuffer & | operator= (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...
PagedArrayType & | parent () 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 ()

## Member Typedef Documentation

## ◆ PagedArrayType

using PagedArrayType = PagedArray<ValueT, Log2PageSize>

## Constructor & Destructor Documentation

## ◆ ValueBuffer() [1/2]

ValueBuffer | ( | PagedArray & | parent | ) |
| inline

Constructor from a PageArray.

## ◆ ValueBuffer() [2/2]

ValueBuffer | ( | const ValueBuffer & | other | ) |
| inline

Warning
  This copy-constructor is shallow in the sense that no elements are copied, i.e. size = 0.

## ◆ ~ValueBuffer()

~ValueBuffer | ( |  | ) |
| inline

Destructor that transfers an buffered values to the parent PagedArray.

## Member Function Documentation

## ◆ flush()

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.

## ◆ operator=()

ValueBuffer & operator= | ( | const ValueBuffer & |  | ) |
| delete

## ◆ pageSize()

static size_t pageSize | ( |  | ) |
| inlinestatic

## ◆ parent()

PagedArrayType & parent | ( |  | ) | const
| inline

Return a reference to the parent PagedArray.

## ◆ push_back()

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

size_t size | ( |  | ) | const
| inline

Return the current number of elements cached in this buffer.