#include "nusmv/core/utils/defs.h"
#include "nusmv/core/node/printers/MasterPrinter.h"
Go to the source code of this file.
Data Structures | |
struct | Siter |
Defines | |
#define | SLIST(x) ((Slist_ptr) x) |
#define | SLIST_CHECK_INSTANCE(x) ( nusmv_assert(SLIST(x) != SLIST(NULL)) ) |
#define | SLIST_FOREACH(list, iter) |
Typedefs | |
typedef void(* | Slist_free_function )(void *) |
typedef struct Slist_TAG * | Slist_ptr |
typedef struct Snode_TAG * | Snode_ptr |
Functions | |
void * | Siter_element (Siter iter) |
Returns a value of a list element pointed by a provided iterator. | |
boolean | Siter_is_end (Siter iter) |
Returns true iff an iterator points past the last element of a list. | |
boolean | Siter_is_last (Siter iter) |
Returns true iff the iterator points to the last element of a list. | |
Siter | Siter_next (Siter iter) |
Returns an iterator pointing to the next element of a list w.r.t. the element pointed by a provided iterator. | |
Siter | Slist_end (void) |
Returns an iterator pointing past the last element of the list. | |
void | Slist_print (Slist_ptr const self, MasterPrinter_ptr wffprint, void(*printer)(FILE *file, void *el, void *arg), FILE *file, void *printer_arg) |
Prints a list. |
#define SLIST_CHECK_INSTANCE | ( | x | ) | ( nusmv_assert(SLIST(x) != SLIST(NULL)) ) |
#define SLIST_FOREACH | ( | list, | |||
iter | ) |
for (iter=Slist_first(list); !Siter_is_end(iter); \ iter=Siter_next(iter))
typedef void(* Slist_free_function)(void *) |
typedef struct Slist_TAG* Slist_ptr |
typedef struct Snode_TAG* Snode_ptr |
void* Siter_element | ( | Siter | iter | ) |
Returns a value of a list element pointed by a provided iterator.
Precondition: this function can be applied only if Siter_is_end(iter) returns false
Returns true iff an iterator points past the last element of a list.
The iterator must have been created with function Slist_first or Slist_next
Returns true iff the iterator points to the last element of a list.
Returns an iterator pointing to the next element of a list w.r.t. the element pointed by a provided iterator.
Precondition: this function can be applied only if Siter_is_end(iter) returns false.
Siter Slist_end | ( | void | ) |
Returns an iterator pointing past the last element of the list.
Siter_is_end(Slist_end()) is always true. NOTE: there is no need to free the iterator after using it. NOTE: it is allowed to assign one iterator to another one.
void Slist_print | ( | Slist_ptr const | self, | |
MasterPrinter_ptr | wffprint, | |||
void(*)(FILE *file, void *el, void *arg) | printer, | |||
FILE * | file, | |||
void * | printer_arg | |||
) |
Prints a list.
Prints a lust to the specified file stream. Third parameter printer is a callback to be used when printing elements. If NULL, elements will be assumed to be node_ptr and print_node is called. printer_arg is an optional argument to be passed to the printer (can be NULL)