Account
ArmsysApi 0.12.18 |
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
BArray< T > Class Template Reference
#include <BArray.h>
Public Member Functions | |
BArray () | |
BArray (const BArray< T > &a) | |
BArray (BUInt size, T *data=0) | |
~BArray () | |
BUInt | size () |
returns the number of elements in the array More... | |
BUInt | number () |
returns the number of elements in the array More... | |
T & | get (BUInt i) |
Access one of the arrays elements. More... | |
const T & | get (BUInt i) const |
Access one of the arrays elements. More... | |
void | clear () |
Clear the array. More... | |
void | resize (BUInt size) |
Sets the arrays size. More... | |
void | append (const T &value) |
Appemd an element to the end of the array. More... | |
void | insert (BUInt i, const T &value) |
Insert an element before the position given. More... | |
void | del (BUInt i, BUInt num=1) |
Delete the given number of elements from the arrays starting at position given. More... | |
BUInt | dataSize () |
Size of raw data in bytes. More... | |
T * | data () |
Access to raw data. More... | |
BArray< T > & | operator= (const BArray< T > &a) |
Array copy. More... | |
T & | operator[] (int i) |
Access one of the arrays elements. More... | |
const T & | operator[] (int i) const |
Access one of the arrays elements. More... | |
operator T* () | |
Access raw data. More... | |
Private Member Functions | |
void | allocate (BUInt size) |
void | rellocate (BUInt size) |
Reallocate the arrays memory to a new size. More... | |
Private Attributes | |
BUInt | osize |
The number of elements in the array. More... | |
BUInt | odataSize |
The actual size in elements of the array. More... | |
T * | odata |
The array data itself. More... | |
Static Private Attributes | |
static BUInt | chunkSize = 8 |
The data allocation chunk size. More... | |
Constructor & Destructor Documentation
◆ BArray() [1/3]
◆ BArray() [2/3]
◆ BArray() [3/3]
◆ ~BArray()
Member Function Documentation
◆ allocate()
◆ append()
template<class T>
void BArray< T >::append | ( | const T & | value | ) |
Appemd an element to the end of the array.
◆ clear()
template<class T >
void BArray< T >::clear | ( | ) |
Clear the array.
◆ data()
template<class T >
T * BArray< T >::data | ( | ) |
Access to raw data.
◆ dataSize()
◆ del()
Delete the given number of elements from the arrays starting at position given.
◆ get() [1/2]
◆ get() [2/2]
◆ insert()
Insert an element before the position given.
◆ number()
◆ operator T*()
template<class T >
BArray< T >::operator T* | ( | ) |
Access raw data.
◆ operator=()
◆ operator[]() [1/2]
template<class T >
T & BArray< T >::operator[] | ( | int | i | ) |
Access one of the arrays elements.
◆ operator[]() [2/2]
template<class T >
const T & BArray< T >::operator[] | ( | int | i | ) | const |
Access one of the arrays elements.
◆ rellocate()
Reallocate the arrays memory to a new size.
◆ resize()
◆ size()
Member Data Documentation
◆ chunkSize
◆ odata
template<class T>
| private |
The array data itself.
◆ odataSize
◆ osize
The documentation for this class was generated from the following files:
Generated by 1.8.15