NuSMV/code/nusmv/core/utils/Slist.h File Reference

#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 Documentation

#define SLIST (  )     ((Slist_ptr) x)
Todo:
Missing synopsis
Todo:
Missing description
#define SLIST_CHECK_INSTANCE (  )     ( nusmv_assert(SLIST(x) != SLIST(NULL)) )
Todo:
Missing synopsis
Todo:
Missing description
#define SLIST_FOREACH ( list,
iter   ) 
Value:
for (iter=Slist_first(list); !Siter_is_end(iter); \
        iter=Siter_next(iter))
Todo:
Missing synopsis
Todo:
Missing description

Typedef Documentation

typedef void(* Slist_free_function)(void *)
Todo:
Missing synopsis
Todo:
Missing description
typedef struct Slist_TAG* Slist_ptr
typedef struct Snode_TAG* Snode_ptr

Function Documentation

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

See also:
Slist_first, Siter_is_end, Siter_next
boolean Siter_is_end ( Siter  iter  ) 

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

See also:
Slist_first, Siter_next, Siter_element
boolean Siter_is_last ( Siter  iter  ) 

Returns true iff the iterator points to the last element of a list.

See also:
Siter_is_end, Siter_next
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.

Precondition: this function can be applied only if Siter_is_end(iter) returns false.

See also:
Slist_first, Siter_is_end, Siter_element
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.

See also:
Siter_is_end, Siter_next, Siter_element
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)

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on 14 Oct 2015 for NuSMV Developers Manual by  doxygen 1.6.1