Elm
1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/genstruct/Table.h>
Classes | |
class | Iterator |
Public Member Functions | |
Table (void) | |
Table (T *table, int count) | |
Table (const Table< T > &table) | |
int | size (void) const |
const T & | get (int index) const |
T & | get (int index) |
void | set (int index, const T &value) |
bool | isEmpty (void) const |
void | copy (const Table< T > &table) |
const T & | operator[] (int index) const |
T & | operator[] (int index) |
Table< T > & | operator= (const Table &table) |
operator bool (void) const | |
const T * | operator* (void) const |
T * | operator* (void) |
int | count (void) const |
const T * | table (void) const |
T * | table (void) |
Static Public Attributes | |
static Table< T > | EMPTY |
Protected Attributes | |
T * | tab |
int | cnt |
This class allows handling simple table stored as C tables with an item count.
T | Type of the items in the table. |
elm::genstruct::Table< T >::Table | ( | void | ) |
elm::genstruct::Table< T >::Table | ( | T * | table, |
int | count | ||
) |
Build a new table.
table | C table containings items. |
count | Item count. |
elm::genstruct::Table< T >::Table | ( | const Table< T > & | table | ) |
void elm::genstruct::Table< T >::copy | ( | const Table< T > & | table | ) |
Referenced by elm::genstruct::DeletableTable< elm::String >::copy(), elm::genstruct::Table< bool >::operator=(), elm::genstruct::Table< elm::String >::operator=(), elm::genstruct::AllocatedTable< bool >::operator=(), elm::genstruct::DeletableTable< elm::String >::operator=(), and elm::genstruct::Table< bool >::Table().
int elm::genstruct::Table< T >::count | ( | void | ) | const |
Get the items count in the table.
Referenced by elm::serial2::__serialize(), elm::genstruct::AllocatedTable< T >::allocate(), elm::genstruct::DeletableTable< elm::String >::copy(), elm::genstruct::AllocatedTable< T >::operator=(), and elm::genstruct::Table< bool >::Table().
T elm::genstruct::Table< T >::get | ( | int | index | ) | const |
Get a table item.
index | Index of the item to get. |
T & elm::genstruct::Table< T >::get | ( | int | index | ) |
Get a reference on a table item.
index | Index of the item to get. |
bool elm::genstruct::Table< T >::isEmpty | ( | void | ) | const |
elm::genstruct::Table< T >::operator bool | ( | void | ) | const |
const T* elm::genstruct::Table< T >::operator* | ( | void | ) | const |
T* elm::genstruct::Table< T >::operator* | ( | void | ) |
Table< T > & elm::genstruct::Table< T >::operator= | ( | const Table< T > & | table | ) |
T elm::genstruct::Table< T >::operator[] | ( | int | index | ) | const |
Same as Table::get() const.
T & elm::genstruct::Table< T >::operator[] | ( | int | index | ) |
void elm::genstruct::Table< T >::set | ( | int | index, |
const T & | value | ||
) |
Set the value of an item.
index | Item index. |
value | Item value. |
int elm::genstruct::Table< T >::size | ( | void | ) | const |
Referenced by elm::genstruct::DeletableTable< elm::String >::copy().
const T * elm::genstruct::Table< T >::table | ( | void | ) | const |
Get the C table as writable.
T * elm::genstruct::Table< T >::table | ( | void | ) |
Get the C table as read-only.
|
protected |
|
static |
|
protected |