|
Zero
0.1.0
|
Iterator for a list. More...
#include <w_list.h>
Public Member Functions | |
| w_list_i () | |
| w_list_i (const w_list_t< T, LOCK > &l, bool backwards=false) | |
| virtual | ~w_list_i () |
| void | reset (const w_list_t< T, LOCK > &l, bool backwards=false) |
| T * | next () |
| T * | curr () const |
| Return the current item in the list. More... | |
Protected Attributes | |
| const w_list_t< T, LOCK > * | _list |
Private Member Functions | |
| w_list_i (w_list_i< T, LOCK > &) | |
| w_list_i< T, LOCK > & | operator= (w_list_i< T, LOCK > &) |
Private Attributes | |
| w_link_t * | _next |
| T * | _curr |
| bool | _backwards |
Additional Inherited Members | |
Public Types inherited from w_base_t | |
| enum | CompareOp { badOp = 0x0, eqOp = 0x1, gtOp = 0x2, geOp = 0x3, ltOp = 0x4, leOp = 0x5, NegInf = 0x100, eqNegInf, gtNegInf, geNegInf, ltNegInf, leNegInf, PosInf = 0x400, eqPosInf, gtPosInf, gePosInf, ltPosInf, lePosInf } |
| Comparison Operators. More... | |
| typedef unsigned char | u_char |
| typedef unsigned short | u_short |
| typedef unsigned long | u_long |
| typedef uint64_t | large_stat_t |
| typedef int32_t | base_stat_t |
| typedef float | base_float_t |
| typedef float | f4_t |
| typedef double | f8_t |
Static Public Member Functions inherited from w_base_t | |
| static bool | is_aligned (size_t sz) |
| static bool | is_aligned (const void *s) |
| static bool | is_big_endian () |
| static bool | is_little_endian () |
| static int64_t | strtoi8 (const char *, char **end=0, int base=0) |
| Convert string to 8-byte integer. More... | |
| static uint64_t | strtou8 (const char *, char **end=0, int base=0) |
| Convert string to 8-byte unsigned integer. More... | |
| static bool | is_finite (const f8_t x) |
| static bool | is_infinite (const f8_t x) |
| static bool | is_nan (const f8_t x) |
| static bool | is_infinite_or_nan (const f8_t x) |
| static uint16_t | w_ntohs (uint16_t) |
| static uint16_t | w_htons (uint16_t) |
| static uint32_t | w_ntohl (uint32_t) |
| static uint32_t | w_htonl (uint32_t) |
| static void | assert_failed (const char *desc, const char *file, uint32_t line) |
| print a message and abort More... | |
| static void | abort () |
| dump core More... | |
Static Public Attributes inherited from w_base_t | |
| static const int8_t | int1_max = 0x7f |
| static const int8_t | int1_min = (int8_t)0x80u |
| static const int16_t | int2_max = 0x7fff |
| static const int16_t | int2_min = (int16_t)0x8000u |
| static const int32_t | int4_max = 0x7fffffff |
| static const int32_t | int4_min = 0x80000000 |
| static const int64_t | int8_max |
| static const int64_t | int8_min |
| static const uint8_t | uint1_max = 0xff |
| static const uint8_t | uint1_min = 0x0 |
| static const uint16_t | uint2_max = 0xffff |
| static const uint16_t | uint2_min = 0x0 |
| static const uint32_t | uint4_max = 0xffffffff |
| static const uint32_t | uint4_min = 0x0 |
| static const uint64_t | uint8_max |
| static const uint64_t | uint8_min |
Iterator for a list.
Example of use:
Create a forward iterator. Since the list to be iterated isn't given, you must call reset() before you can use this iterator.
|
inline |
Create a forward or backward iterator iterator for the given list. Don't allow updating of the list while iterating.
|
private |
|
inline |
Make an iterator usable (possibly again), for the given list, backward or forward.
1.8.12