$treeview $search $mathjax
|
Palabos
Version 1.1
$projectbrief
|
$projectbrief
|
$searchbox |
A simple class for handling buffer memory. More...
#include <util.h>
Public Member Functions | |
| Buffer () | |
| Default constructor allcoates no memory. | |
| Buffer (pluint bufferSize_) | |
| Constructor with buffer size; buffer elements are not default-initialized. | |
| Buffer (Buffer< T > const &rhs) | |
| ~Buffer () | |
| Buffer< T > & | operator= (Buffer< T > const &rhs) |
| Assignment-operator is thread-safe. | |
| void | swap (Buffer< T > &rhs) |
| Swap with other buffer; this operation cannot throw. | |
| void | resize (pluint newBufferSize) |
| Resize the buffer, and keep values from before. | |
| void | reallocate (pluint newBufferSize) |
| Resize the buffer, but don't keep values from before. | |
| T * | get () |
| Pointer to raw data. | |
| T const * | get () const |
| Const-pointer to raw data. | |
| T & | operator[] (pluint index) |
| Element access. | |
| T const & | operator[] (pluint index) const |
| Const-element access. | |
| pluint | size () const |
A simple class for handling buffer memory.
This class can be seen as a replacement of the std::vector template. It is less powerful, but at least, unlike std::vector, it treats the type bool appropriately (this is the only reason why class Buffer was written). Note that class Buffer is not STL compatible (it is not an STL container), but it is thread- safe.
| plb::util::Buffer< T >::Buffer | ( | ) | [inline] |
Default constructor allcoates no memory.
| plb::util::Buffer< T >::Buffer | ( | pluint | bufferSize_ | ) | [inline] |
Constructor with buffer size; buffer elements are not default-initialized.
| plb::util::Buffer< T >::Buffer | ( | Buffer< T > const & | rhs | ) | [inline] |
| plb::util::Buffer< T >::~Buffer | ( | ) | [inline] |
| T const* plb::util::Buffer< T >::get | ( | ) | const [inline] |
Const-pointer to raw data.
| T* plb::util::Buffer< T >::get | ( | ) | [inline] |
Pointer to raw data.
| Buffer<T>& plb::util::Buffer< T >::operator= | ( | Buffer< T > const & | rhs | ) | [inline] |
Assignment-operator is thread-safe.
References plb::util::Buffer< T >::swap().
| T const& plb::util::Buffer< T >::operator[] | ( | pluint | index | ) | const [inline] |
Const-element access.
References PLB_PRECONDITION.
| T& plb::util::Buffer< T >::operator[] | ( | pluint | index | ) | [inline] |
Element access.
References PLB_PRECONDITION.
| void plb::util::Buffer< T >::reallocate | ( | pluint | newBufferSize | ) | [inline] |
Resize the buffer, but don't keep values from before.
References plb::util::Buffer< T >::swap().
| void plb::util::Buffer< T >::resize | ( | pluint | newBufferSize | ) | [inline] |
Resize the buffer, and keep values from before.
References plb::util::Buffer< T >::swap().
| pluint plb::util::Buffer< T >::size | ( | ) | const [inline] |
| void plb::util::Buffer< T >::swap | ( | Buffer< T > & | rhs | ) | [inline] |
Swap with other buffer; this operation cannot throw.
Referenced by plb::util::Buffer< T >::operator=(), plb::util::Buffer< T >::reallocate(), and plb::util::Buffer< T >::resize().
1.6.3
1.6.3