List of all members.
Public Member Functions |
dbFieldDescriptor * | dbDescribeComponents (dbFieldDescriptor *fd) |
| dbArray () |
| dbArray (size_t size) |
| dbArray (T const *ptr, size_t size, size_t allocate=0) |
| dbArray (dbArray< T > const &arr) |
| ~dbArray () |
dbArray< T > & | operator= (dbArray< T > const &arr) |
T const & | last () |
void | assign (T const *ptr, size_t size, bool copy=true) |
T const & | operator[] (size_t index) const |
void | putat (size_t index, T const &value) |
T const & | getat (size_t index) const |
void | clear () |
void | resize (size_t size) |
void | append (T const &value) |
bool | contains (T const &value) |
bool | appendUnique (T const &value) |
void | insert (T const &value, size_t index=0) |
void | remove (size_t index) |
T const * | get () const |
T * | update () |
size_t | length () const |
void const * | base () const |
Protected Member Functions |
void | memcpy (T *dst, T const *src, size_t len) |
void | memmove (T *dst, T const *src, size_t len) |
Static Protected Member Functions |
static void | arrayAllocator (dbAnyArray *aArray, void *data, size_t length) |
Protected Attributes |
T * | data |
size_t | allocated |
size_t | len |
Friends |
class | dbTableDescriptor |
Detailed Description
template<class T>
class dbArray< T >
Template for arrays
Constructor & Destructor Documentation
Construct array with specified length
- Parameters:
-
template<class T>
dbArray< T >::dbArray |
( |
T const * |
ptr, |
|
|
size_t |
size, |
|
|
size_t |
allocate = 0 | |
|
) |
| | [inline] |
Construct array with specified content
- Parameters:
-
| ptr | pointer to the elements |
| size | size of array |
| allocate | if 0, then array will just points to specified location of elements, otherwise elements will be copied to the created buffer |
Copy constructor
- Parameters:
-
Member Function Documentation
template<class T>
void dbArray< T >::append |
( |
T const & |
value |
) |
[inline] |
Append value to the array
- Parameters:
-
template<class T>
bool dbArray< T >::appendUnique |
( |
T const & |
value |
) |
[inline] |
Append value to the array, only if the value isn't already there
- Parameters:
-
template<class T>
void dbArray< T >::assign |
( |
T const * |
ptr, |
|
|
size_t |
size, |
|
|
bool |
copy = true | |
|
) |
| | [inline] |
Assign content to the array
- Parameters:
-
| ptr | pointer to the assigned elements |
| size | number of elements |
| copy | if 0, then array will just points to specified location of elements, otherwise elements will be copied to the created buffer |
void const* dbAnyArray::base |
( |
|
) |
const [inline, inherited] |
Get pointer to array elements. You should not update them directly.
- Returns:
- pointer to array element
template<class T>
void dbArray< T >::clear |
( |
|
) |
[inline] |
template<class T>
bool dbArray< T >::contains |
( |
T const & |
value |
) |
[inline] |
template<class T>
T const* dbArray< T >::get |
( |
|
) |
const [inline] |
Get pointer to array elements. You should not directly change them.
- Returns:
- array elements
template<class T>
T const& dbArray< T >::getat |
( |
size_t |
index |
) |
const [inline] |
Get array element with specified index.
- Parameters:
-
- Returns:
- element with specified index
template<class T>
void dbArray< T >::insert |
( |
T const & |
value, |
|
|
size_t |
index = 0 | |
|
) |
| | [inline] |
template<class T>
T const& dbArray< T >::last |
( |
|
) |
[inline] |
Get last element of the array
- Returns:
- last element of the array
size_t dbAnyArray::length |
( |
|
) |
const [inline, inherited] |
Get number of elements
- Returns:
- array length
Assignment operator
- Returns:
- this
template<class T>
T const& dbArray< T >::operator[] |
( |
size_t |
index |
) |
const [inline] |
Get array element with specified index.
- Parameters:
-
- Returns:
- element with specified index
template<class T>
void dbArray< T >::putat |
( |
size_t |
index, |
|
|
T const & |
value | |
|
) |
| | [inline] |
Store element at the specified position
- Parameters:
-
| index | element index |
| value | stored element value |
template<class T>
void dbArray< T >::remove |
( |
size_t |
index |
) |
[inline] |
Remove element a specified position.
- Parameters:
-
| index | position of the deleted element |
template<class T>
void dbArray< T >::resize |
( |
size_t |
size |
) |
[inline] |
template<class T>
T* dbArray< T >::update |
( |
|
) |
[inline] |
Get pointer to array elements to perform update.
- Returns:
- array elements
The documentation for this class was generated from the following file: