ArmSys Support
ArmsysApi  0.12.18

#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]

template<class T >
BArray< T >::BArray ( )

◆ BArray() [2/3]

template<class T>
BArray< T >::BArray ( const BArray< T > &  a)

◆ BArray() [3/3]

template<class T>
BArray< T >::BArray ( BUInt  size,
T *  data = 0 
)

◆ ~BArray()

template<class T >
BArray< T >::~BArray ( )

Member Function Documentation

◆ allocate()

template<class T >
void BArray< T >::allocate ( BUInt  size)
private

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

template<class T >
BUInt BArray< T >::dataSize ( )

Size of raw data in bytes.

◆ del()

template<class T >
void BArray< T >::del ( BUInt  i,
BUInt  num = 1 
)

Delete the given number of elements from the arrays starting at position given.

◆ get() [1/2]

template<class T >
T & BArray< T >::get ( BUInt  i)

Access one of the arrays elements.

◆ get() [2/2]

template<class T >
const T & BArray< T >::get ( BUInt  i) const

Access one of the arrays elements.

◆ insert()

template<class T>
void BArray< T >::insert ( BUInt  i,
const T &  value 
)

Insert an element before the position given.

◆ number()

template<class T >
BUInt BArray< T >::number ( )

returns the number of elements in the array

◆ operator T*()

template<class T >
BArray< T >::operator T* ( )

Access raw data.

◆ operator=()

template<class T>
BArray< T > & BArray< T >::operator= ( const BArray< T > &  a)

Array copy.

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

template<class T >
void BArray< T >::rellocate ( BUInt  size)
private

Reallocate the arrays memory to a new size.

◆ resize()

template<class T >
void BArray< T >::resize ( BUInt  size)

Sets the arrays size.

◆ size()

template<class T >
BUInt BArray< T >::size ( )

returns the number of elements in the array

Member Data Documentation

◆ chunkSize

template<class T>
BUInt BArray< T >::chunkSize = 8
staticprivate

The data allocation chunk size.

◆ odata

template<class T>
T* BArray< T >::odata
private

The array data itself.

◆ odataSize

template<class T>
BUInt BArray< T >::odataSize
private

The actual size in elements of the array.

◆ osize

template<class T>
BUInt BArray< T >::osize
private

The number of elements in the array.


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