Public Types | |
using | Size_T = int32_t |
Public Member Functions | |
size_t | capacity () const noexcept |
bool | empty () const |
void | set_size (size_t N) |
Set the array size to N , which the current array must have enough capacity for. | |
size_t | size () const |
Protected Member Functions | |
SmallVectorBase ()=delete | |
SmallVectorBase (void *FirstEl, size_t TotalCapacity) | |
void | grow_pod (void *FirstEl, size_t MinSize, size_t TSize) |
This is an implementation of the grow() method which only works on POD-like data types and is out of line to reduce code duplication. | |
bool | Owns () const |
If false, the RVec is in "memory adoption" mode, i.e. it is acting as a view on a memory buffer it does not own. | |
Static Protected Member Functions | |
static void | report_at_maximum_capacity () |
Report that this vector is already at maximum capacity. | |
static void | report_size_overflow (size_t MinSize) |
Report that MinSize doesn't fit into this vector's size type. | |
static constexpr size_t | SizeTypeMax () |
The maximum value of the Size_T used. | |
Protected Attributes | |
void * | fBeginX |
Size_T | fCapacity |
Always >= -1. fCapacity == -1 indicates the RVec is in "memory adoption" mode. | |
Size_T | fSize = 0 |
Always >= 0. | |
#include <ROOT/RVec.hxx>
|
protecteddelete |
|
inlineprotected |
|
inlinenoexcept |
|
inline |
|
inlineprotected |
|
staticprotected |
|
staticprotected |
|
inline |
Set the array size to N
, which the current array must have enough capacity for.
This does not construct or destroy any elements in the vector.
Clients can use this in conjunction with capacity() to write past the end of the buffer when they know that more elements are available, and only update the size later. This avoids the cost of value initializing elements which will only be overwritten.
|
inline |
|
protected |
|
protected |
|
protected |