commore  1.0.6-SNAPSHOT
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List.h File Reference
#include "BaseList.h"

Go to the source code of this file.

Classes

class  commore::List< T, A >
 
class  commore::List< T, A >::iterator
 
class  commore::List< T, A >::const_iterator
 

Namespaces

 commore
 

Macros

#define cmr_foreach(T, V, L)
 
#define cmr_const_foreach(T, V, L)
 
#define cmr_foreach_enum(T, V, L, I)
 
#define cmr_const_foreach_enum(T, V, L, I)
 
#define cmr_foreach_while(T, V, L, M)
 
#define cmr_const_foreach_while(T, V, L, M)
 
#define cmr_remove_where(T, V, L, M)
 
#define cmr_move_where(T, V, S, D, M)
 

Functions

bool __trueset (bool &b, bool v)
 

Macro Definition Documentation

#define cmr_const_foreach (   T,
  V,
 
)
Value:
if (bool continue__ = true) \
for (commore::List<T>::const_iterator i__ = L.begin(); continue__ && i__; i__++) \
if (bool b__ = true) if (__trueset(continue__, false)) \
for (const T& V = *i__;b__; b__ = false,continue__ = true)
Definition: List.h:111
bool __trueset(bool &b, bool v)
Definition: List.h:631

For each item V (type T const) of list L do the following instruction

#define cmr_const_foreach_enum (   T,
  V,
  L,
 
)
Value:
if (bool continue__ = true) \
if (int I = 1) if (I--)\
for (commore::List<T>::const_iterator i__ = L.begin(); continue__ && i__; i__++, I++) \
if (bool b__ = true) if (__trueset(continue__, false))\
for (const T& V = *i__;b__; b__ = false,continue__ = true)
bool __trueset(bool &b, bool v)
Definition: List.h:631

For each item V (type T const) of list L do the following instruction I is the name of the int item count variable

#define cmr_const_foreach_while (   T,
  V,
  L,
 
)
Value:
if (bool continue__ = true) \
for (commore::List<T>::const_iterator i__ = L.begin(); M && i__; i__++) \
if (bool b__ = true) if (__trueset(continue__, false)) \
for (const T& V = *i__;b__; b__ = false,continue__ = true)
Definition: List.h:111
bool __trueset(bool &b, bool v)
Definition: List.h:631
#define cmr_foreach (   T,
  V,
 
)
Value:
if (bool continue__ = true) \
for (commore::List<T>::iterator i__ = L.begin(); continue__ && i__; i__++) \
if (bool b__ = true) if (__trueset(continue__, false)) \
for (T& V = *i__;b__; b__ = false,continue__ = true)
Definition: List.h:29
bool __trueset(bool &b, bool v)
Definition: List.h:631

For each item V (type T) of list L do the following instruction

Examples:
/examples/coding/Logs.cpp.
#define cmr_foreach_enum (   T,
  V,
  L,
 
)
Value:
if (bool continue__ = true) \
if (int I = 1) if (I--)\
for (commore::List<T>::iterator i__ = L.begin(); continue__ && i__; i__++, I++) \
if (bool b__ = true) if (__trueset(continue__, false))\
for (T& V = *i__;b__; b__ = false,continue__ = true)
bool __trueset(bool &b, bool v)
Definition: List.h:631

For each item V (type T) of list L do the following instruction I is the name of the int item count variable

#define cmr_foreach_while (   T,
  V,
  L,
 
)
Value:
if (bool continue__ = true) \
for (commore::List<T>::iterator i__ = L.begin(); M && i__; i__++) \
if (bool b__ = true) if (__trueset(continue__, false)) \
for (T& V = *i__;b__; b__ = false,continue__ = true)
Definition: List.h:29
bool __trueset(bool &b, bool v)
Definition: List.h:631

For each item V (type T) of list L while condition M is true do the following instruction

#define cmr_move_where (   T,
  V,
  S,
  D,
 
)
Value:
if (bool keep__ = true) \
if (bool continue__ = true) \
for (commore::List<T>::iterator i__ = S.begin(); continue__ && i__; keep__ ? i__++ : D.move_before(D.end(), i__++)) \
if (bool b__ = true) if (__trueset(continue__, false)) \
for (T& V = *i__;b__; b__ = false,continue__ = true,(keep__ = !(M)))\
if (M)
Definition: List.h:29
bool __trueset(bool &b, bool v)
Definition: List.h:631

Move item v (Type T) from list S to list D where M is true

#define cmr_remove_where (   T,
  V,
  L,
 
)
Value:
if (bool keep__ = true) \
if (bool continue__ = true) \
for (commore::List<T>::iterator i__ = L.begin(); continue__ && i__; keep__ ? i__++ : i__.erase()) \
if (bool b__ = true) if (__trueset(continue__, false)) \
for (T& V = *i__;b__; b__ = false,continue__ = true,(keep__ = !(M)))\
if (M)
Definition: List.h:29
iterator & erase()
Definition: List.h:54
bool __trueset(bool &b, bool v)
Definition: List.h:631

Remove item v (Type T) from list L where M is true

Function Documentation

bool __trueset ( bool &  b,
bool  v 
)
inline