MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Dynamic_array< Elem > Class Template Reference

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

template<class Elem>
bool Dynamic_array< Elem >::append ( const Elem &  el)
inline
Return values
falseok
trueOOM, my_error() has been called.

Definition at line 165 of file sql_array.h.

Here is the caller graph for this function:

template<class Elem>
Elem& Dynamic_array< Elem >::at ( int  idx)
inline
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.

Here is the caller graph for this function:

template<class Elem>
Elem* Dynamic_array< Elem >::back ( )
inline
Returns
pointer to last element; undefined behaviour if array is empty.

Definition at line 148 of file sql_array.h.

Here is the caller graph for this function:

template<class Elem>
const Elem* Dynamic_array< Elem >::back ( ) const
inline
Returns
pointer to last element; undefined behaviour if array is empty.

Definition at line 155 of file sql_array.h.

template<class Elem>
Elem* Dynamic_array< Elem >::front ( )
inline
Returns
pointer to first element; undefined behaviour if array is empty

Definition at line 134 of file sql_array.h.

template<class Elem>
const Elem* Dynamic_array< Elem >::front ( ) const
inline
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: