#include <array.h>

Public Member Functions | |
| dbFieldDescriptor * | dbDescribeComponents (dbFieldDescriptor *fd) |
| dbArray () | |
| Default constructor. | |
| dbArray (size_t size) | |
| Construct array with specified length. | |
| dbArray (T const *ptr, size_t size, size_t allocate=0) | |
| Construct array with specified content. | |
| dbArray (dbArray const &arr) | |
| Copy constructor. | |
| ~dbArray () | |
| Destructor. | |
| dbArray & | operator= (dbArray const &arr) |
| Assignment operator. | |
| T const & | last () |
| Get last element of the array. | |
| void | assign (T const *ptr, size_t size, bool copy=true) |
| Assign content to the array. | |
| T const & | operator[] (size_t index) const |
| Get array element with specified index. | |
| void | putat (size_t index, T const &value) |
| Store element at the specified position. | |
| T const & | getat (size_t index) const |
| Get array element with specified index. | |
| void | clear () |
| Make array empty. | |
| void | resize (size_t size) |
| Resize array. | |
| void | append (T const &value) |
| Append value to the array. | |
| void | insert (T const &value, size_t index=0) |
| Insert element in the array at specified position. | |
| void | remove (size_t index) |
| Remove element a specified position. | |
| T const * | get () const |
| Get pointer to array elements. | |
| T * | update () |
| Get pointer to array elements to perform update. | |
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 |
Friends | |
| class | dbTableDescriptor |
| dbArray | ( | ) | [inline] |
Default constructor.
| dbArray | ( | size_t | size | ) | [inline] |
Construct array with specified length.
| size | array length |
| dbArray | ( | T const * | ptr, | |
| size_t | size, | |||
| size_t | allocate = 0 | |||
| ) | [inline] |
Construct array with specified content.
| 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 |
| ~dbArray | ( | ) | [inline] |
Destructor.
| static void arrayAllocator | ( | dbAnyArray * | aArray, | |
| void * | data, | |||
| size_t | length | |||
| ) | [inline, static, protected] |
Reimplemented from dbAnyArray.
| void memcpy | ( | T * | dst, | |
| T const * | src, | |||
| size_t | len | |||
| ) | [inline, protected] |
| void memmove | ( | T * | dst, | |
| T const * | src, | |||
| size_t | len | |||
| ) | [inline, protected] |
| dbFieldDescriptor* dbDescribeComponents | ( | dbFieldDescriptor * | fd | ) | [inline] |
| T const& last | ( | ) | [inline] |
Get last element of the array.
| void assign | ( | T const * | ptr, | |
| size_t | size, | |||
| bool | copy = true | |||
| ) | [inline] |
Assign content to the array.
| 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 |
| T const& operator[] | ( | size_t | index | ) | const [inline] |
Get array element with specified index.
| index | element index |
| void putat | ( | size_t | index, | |
| T const & | value | |||
| ) | [inline] |
Store element at the specified position.
| index | element index | |
| value | stored element value |
| T const& getat | ( | size_t | index | ) | const [inline] |
Get array element with specified index.
| index | element index |
| void clear | ( | ) | [inline] |
Make array empty.
| void resize | ( | size_t | size | ) | [inline] |
Resize array.
| size | new array size |
| void append | ( | T const & | value | ) | [inline] |
Append value to the array.
| value | appended element |
| void insert | ( | T const & | value, | |
| size_t | index = 0 | |||
| ) | [inline] |
Insert element in the array at specified position.
| value | inserted value | |
| index | insert position |
| void remove | ( | size_t | index | ) | [inline] |
Remove element a specified position.
| index | position of the deleted element |
| T const* get | ( | ) | const [inline] |
Get pointer to array elements.
You should not directly change them.
| T* update | ( | ) | [inline] |
Get pointer to array elements to perform update.
friend class dbTableDescriptor [friend] |
Reimplemented from dbAnyArray.
T* data [protected] |
size_t allocated [protected] |