Public Types |
typedef int(* | CMP_FUNC )(const Elem *el1, const Elem *el2) |
Public Member Functions |
| Dynamic_array (uint prealloc=16, uint increment=16) |
void | init (uint prealloc=16, uint increment=16) |
Elem & | at (int idx) |
const Elem & | at (int idx) const |
| Const variant of at(), which cannot change data.
|
Elem * | front () |
const Elem * | front () const |
Elem * | back () |
const Elem * | back () const |
bool | append (const Elem &el) |
Elem & | pop () |
| Pops the last element. Does nothing if array is empty.
|
void | del (uint idx) |
int | elements () const |
void | elements (uint num_elements) |
void | clear () |
void | set (uint idx, const Elem &el) |
void | sort (CMP_FUNC cmp_func) |
Detailed Description
template<class Elem>
class Dynamic_array< Elem >
Definition at line 105 of file sql_array.h.
Member Function Documentation
- Return values
-
false | ok |
true | OOM, my_error() has been called. |
Definition at line 165 of file sql_array.h.
- Note
- Though formally this could be declared "const" it would be misleading at it returns a non-const pointer to array's data.
Definition at line 123 of file sql_array.h.
- Returns
- pointer to last element; undefined behaviour if array is empty.
Definition at line 148 of file sql_array.h.
- Returns
- pointer to last element; undefined behaviour if array is empty.
Definition at line 155 of file sql_array.h.
- Returns
- pointer to first element; undefined behaviour if array is empty
Definition at line 134 of file sql_array.h.
- Returns
- pointer to first element; undefined behaviour if array is empty
Definition at line 141 of file sql_array.h.
The documentation for this class was generated from the following file: