Freeciv-3.2
|
#include "support.h"
Go to the source code of this file.
Data Structures | |
struct | iterator |
Macros | |
#define | ITERATOR(p) ((struct iterator *)(p)) |
#define | generic_iterate(TYPE_it, TYPE_a, NAME_a, FUNC_size, FUNC_init, ...) |
#define | generic_iterate_end |
Functions | |
static void | iterator_next (struct iterator *it) |
static void * | iterator_get (const struct iterator *it) |
static bool | iterator_valid (const struct iterator *it) |
struct iterator * | invalid_iter_init (struct iterator *it) |
Definition at line 117 of file iterator.h.
#define generic_iterate_end |
Definition at line 129 of file iterator.h.
Definition at line 37 of file iterator.h.
Initializes the iterator vtable so that generic_iterate assumes that the iterator is invalid.
Definition at line 51 of file iterator.c.
Referenced by genhash_iter_init_common(), and startpos_iter_init().
Returns the item currently pointed to by the iterator. Note that the iterator could point to an item whose value is NULL; to actually test whether the iterator is still valid (e.g. has not gone past the end of the sequence), use iterator_valid().
Definition at line 53 of file iterator.h.
Referenced by research_player_iter_valid_state(), startpos_exclude_iter_get(), and startpos_exclude_iter_next().
Advances the iterator to point to the next item in the sequence.
Definition at line 42 of file iterator.h.
Referenced by research_player_iter_init(), startpos_exclude_iter_next(), and unit_cargo_depth().
Returns TRUE if the iterator points to an item in the sequence.
Definition at line 61 of file iterator.h.
Referenced by startpos_exclude_iter_next(), startpos_exclude_iter_valid(), and unit_cargo_depth().