base of all lists
More...
#include <zbl.hpp>
List of all members.
Classes |
class | creator |
| list creator More...
|
class | iterator |
| list iterator More...
|
Public Member Functions |
V & | operator[] (const int &key) |
| Return reference to value at index.
|
bool | empty () const |
| Check if list is empty.
|
void | clear () |
| Empty the list.
|
void | append (const V &v) |
| Add a value to the list.
|
void | appendList (const derT &v) |
| Append a list to the list.
|
const V & | at (const int &idx) const |
| Return reference to value at index.
|
int | indexOf (const V &v) const |
| Return index of specified value in list.
|
V & | front () |
| Return reference to value at start of list.
|
const V & | front () const |
| Return const reference to value at start of list.
|
V & | last () |
| Return reference to value at end of list.
|
const V & | last () const |
| Return const reference to value at end of list.
|
derT & | operator<< (const V &val) |
| Add a value to the list.
|
Private Types |
typedef containerbase< listT > | baseT |
| The base class type.
|
Detailed Description
template<typename derT, typename listT, typename iterT, typename V>
class z::listbase< derT, listT, iterT, V >
base of all lists
Member Function Documentation
void append |
( |
const V & |
v | ) |
[inline] |
Add a value to the list.
- Parameters:
-
Reimplemented in stringlist.
void appendList |
( |
const derT & |
v | ) |
[inline] |
Append a list to the list.
- Parameters:
-
const V& at |
( |
const int & |
idx | ) |
const [inline] |
Return reference to value at index.
- Parameters:
-
- Returns:
- Reference to value at specified index
bool empty |
( |
| ) |
const [inline] |
Check if list is empty.
- Returns:
- True if list is empty, else false.
Return reference to value at start of list.
- Returns:
- Reference to value at start of list
const V& front |
( |
| ) |
const [inline] |
Return const reference to value at start of list.
- Returns:
- Const reference to value at start of list
int indexOf |
( |
const V & |
v | ) |
const [inline] |
Return index of specified value in list.
- Parameters:
-
- Returns:
- Index of specified value
Return reference to value at end of list.
- Returns:
- Reference to value at end of list
const V& last |
( |
| ) |
const [inline] |
Return const reference to value at end of list.
- Returns:
- Const reference to value at end of list
derT& operator<< |
( |
const V & |
val | ) |
[inline] |
Add a value to the list.
- Parameters:
-
- Returns:
- Reference to self
V& operator[] |
( |
const int & |
key | ) |
[inline] |
Return reference to value at index.
- Parameters:
-
- Returns:
- Reference to value at specified index
The documentation for this class was generated from the following file:
- /home/renji/Data/projects/zenlang/sources/zbl/zbl.hpp