Top   Types   Functions   Classes   Options   Index   Sources 

struct List / List_t

Concrete Class


Description

The List Class

Implements doubly or singly linked lists.

Throughout the documentation, the following prefixes will be used:

Global_

The library prefix: for applications, this is typically empty, for an xyz-Library, this is either XYZ_, xyz_ or Xyz, depending on the identifier in occurs in.

TemplateInstantiation
Global_LIST_OKXYZ_LIST_OK
Global_list_newxyz_list_new
List_

This is equivalent to Global_list_oType, or the name that was set with -name=... for this data structure. The case and underbar convention is adjusted, too.

Assuming a library prefix xyz and oType == int, you get:

TemplateInstantiation
List_txyz_list_int_t
List_ALLOW_NULLXYZ_LIST_INT_ALLOW_NULL
List_class

This is the name of the data structure type in C++: capitalised and with underbars removed:

List_tList_class
list_int_tListInt

Members

voidclear_errno()
intget_errno()
List_t const &static_zero()
voidoperator delete(void *, size_t)
voidoperator delete[](void *, size_t)
void *operator new(size_t)
void *operator new[](size_t)
List()
List(oTypeTouched)
~List()
operator List_t *()
operator List_t const *() const
List_t &operator<<(oTypeTouched o)
List_t &operator=(List_t const &)
List_t &operator=(List_t const *)
void_constructor()
void_destructor()
Global_list_key_tappend(oTypeTouched o)
List_t &append(List_t const * x)
List_t &append(List_t const & x)
List_t &append_list(List_t const * x)
List_t &append_list(List_t const & x)
Global_list_key_tback() const
List_t &clear()
voidclear_errno() const
boolempty() const
voiderase(Global_list_key_t k)
voiderase(Global_list_key_t & iter, Global_list_key_t k, bool reverse = false)
voiderase_in_loop(Global_list_key_t & iter, Global_list_key_t k, bool reverse = false)
oTypeResultfirst() const
Global_list_key_tfront() const
intget_errno() const
Global_list_key_tinit_iterator() const
Global_list_key_tinit_iterator_reverse() const
Global_list_key_tinsert(Global_list_key_t k, oTypeTouched o, bool backwards)
List_t &insert(Global_list_key_t k, List_t const * x, bool backwards)
List_t &insert(Global_list_key_t k, List_t const & x, bool backwards)
Global_list_key_tinsert_after(Global_list_key_t k, oTypeTouched o)
List_t &insert_after(Global_list_key_t k, List_t const * x)
List_t &insert_after(Global_list_key_t k, List_t const & x)
Global_list_key_tinsert_before(Global_list_key_t k, oTypeTouched o)
List_t &insert_before(Global_list_key_t k, List_t const * x)
List_t &insert_before(Global_list_key_t k, List_t const & x)
List_t &insert_list(Global_list_key_t k, List_t const * x, bool backwards)
List_t &insert_list(Global_list_key_t k, List_t const & x, bool backwards)
List_t &insert_list_after(Global_list_key_t k, List_t const * x)
List_t &insert_list_after(Global_list_key_t k, List_t const & x)
List_t &insert_list_before(Global_list_key_t k, List_t const * x)
List_t &insert_list_before(Global_list_key_t k, List_t const & x)
oTypeResultlast() const
intnentries() const
Global_list_key_tnext(Global_list_key_t k) const
boolnext_iteration(Global_list_key_t * a, oType * b) const
boolnext_iteration_ptr(Global_list_key_t * a, oTypeVar * * b)
boolnext_iteration_ptr_reverse(Global_list_key_t * a, oTypeVar * * b)
boolnext_iteration_reverse(Global_list_key_t * a, oType * b) const
boolnon_empty() const
oTypeResultnth(int k) const
Global_list_key_tnth_key(int k) const
voidoverwrite(Global_list_key_t k, oTypeTouched o)
Global_list_key_tprepend(oTypeTouched o)
List_t &prepend(List_t const * x)
List_t &prepend(List_t const & x)
List_t &prepend_list(List_t const * x)
List_t &prepend_list(List_t const & x)
Global_list_key_tprev(Global_list_key_t k) const
Global_list_key_tprevious(Global_list_key_t k) const
oTypeResultvalue(Global_list_key_t k) const
List_element_ptr_tvalue_ptr(Global_list_key_t k)
List_element_ref_tvalue_ref(Global_list_key_t k)


Detailed Descriptions


#if !Global_ERWIN_DEFAULT_NEW_DELETE

static void * operator new (size_t)

C++: void * List_t::operator new (size_t)
#endif
Declaration  ]


#if !Global_ERWIN_DEFAULT_NEW_DELETE

static void operator delete (void *, size_t)

C++: void List_t::operator delete (void *, size_t)
#endif
Declaration  ]


#if !Global_ERWIN_DEFAULT_NEW_DELETE

static void * operator new[] (size_t)

C++: void * List_t::operator new[] (size_t)
#endif
Declaration  ]


#if !Global_ERWIN_DEFAULT_NEW_DELETE

static void operator delete[] (void *, size_t)

C++: void List_t::operator delete[] (void *, size_t)
#endif
Declaration  ]


[constructor] List ()

C++: List_t::List ()

Creation

Declaration  ]


static List_t const & static_zero ()

C++: List_t const & List_t::static_zero ()
Declaration  ]


#if List_DYN_ZERO

[constructor] List (oTypeTouched)

C++: List_t::List (oTypeTouched)
#endif
Declaration  ]


void _constructor ()

C++: void List_t::_constructor ()
Declaration  ]


void _destructor ()

C++: void List_t::_destructor ()
Declaration  ]


#if !Global_ERWIN_GLOBAL_ERRNO

int get_errno () const

C++: int List_t::get_errno () const
#endif
Declaration & Source  ]


#if !Global_ERWIN_GLOBAL_ERRNO

void clear_errno () const

C++: void List_t::clear_errno () const
C: void List_clear_errno (List_t const * self)

If you compiled Erwin with Global_ERWIN_THREAD_SAFE, this is the way to get the status code of a given list.

If you do not have a thread-safe Erwin library, there is a macro with the same name as this function.

Error Codes (Global_list_errno)

#endif
C Declaration  | C++ Declaration & Source  ]


#if Global_ERWIN_GLOBAL_ERRNO

static int get_errno ()

C++: int List_t::get_errno ()
#endif
Declaration & Source  ]


#if Global_ERWIN_GLOBAL_ERRNO

static void clear_errno ()

C++: void List_t::clear_errno ()
#endif
Declaration & Source  ]


List_t & clear ()

C++: List_t & List_t::clear ()
C: void List_clear (List_t * self)

Deletes everything in the list and the list structure itself. List_delete is NULL safe (self may be NULL without crash or failed assertion).

C Declaration  | C++ Declaration & Source  ]


List_t & operator= (List_t const &)

C++: List_t & List_t::operator= (List_t const &)

Assignment

Declaration  ]


List_t & operator= (List_t const *)

C++: List_t & List_t::operator= (List_t const *)
Declaration  ]


[destructor] ~List ()

C++: List_t::~List ()

Destruction

Declaration  ]


operator List_t const * () const

C++: List_t::operator List_t const * () const

Conversion to C type

Declaration & Source  ]


operator List_t * ()

C++: List_t::operator List_t * ()
Declaration & Source  ]


Global_list_key_t front () const

C++: Global_list_key_t List_t::front () const
C: Global_list_key_t List_front (List_t const * self)

Returns the position of the first element or List_KEY_ZERO if the list is empty

C Declaration  | C++ Declaration & Source  ]


Global_list_key_t back () const

C++: Global_list_key_t List_t::back () const
C: Global_list_key_t List_back (List_t const * self)

Returns the position of the last element or List_KEY_ZERO if the list is empty

C Declaration  | C++ Declaration & Source  ]


Global_list_key_t previous (Global_list_key_t k) const

C++: Global_list_key_t List_t::previous (Global_list_key_t k) const
C: Global_list_key_t List_previous (List_t const * self, Global_list_key_t key)

Returns the previous element in the list or NULL if non exists.

If key == Global_LIST_KEY_ZERO, List_back() is returned.

C Declaration  | C++ Declaration & Source  ]


Global_list_key_t prev (Global_list_key_t k) const

C++: Global_list_key_t List_t::prev (Global_list_key_t k) const
Declaration & Source  ]


Global_list_key_t next (Global_list_key_t k) const

C++: Global_list_key_t List_t::next (Global_list_key_t k) const
C: Global_list_key_t List_next (List_t const * self, Global_list_key_t key)

Returns the next element in the list or NULL if non exists

If key == Global_LIST_KEY_ZERO, List_front() is returned.

C Declaration  | C++ Declaration & Source  ]


Global_list_key_t nth_key (int k) const

C++: Global_list_key_t List_t::nth_key (int k) const
C: Global_list_key_t List_nth_key (List_t const * self, int index)

Returns the key of the nth element or the zero element. Returns LIST_ZERO if the element does not exist.

C Declaration  | C++ Declaration & Source  ]


oTypeResult nth (int k) const

C++: oTypeResult List_t::nth (int k) const
C: oTypeResult List_nth (List_t const * self, int index)

Returns the nth element or the zero element.

C Declaration  | C++ Declaration & Source  ]


void erase (Global_list_key_t k)

C++: void List_t::erase (Global_list_key_t k)
C: void List_erase (List_t * self, Global_list_key_t key)

Erases an new element from the list. NEVER use this function to modify a list you are currently iterating! Use List_erase_in_loop for that.

Invocation is only valid for key != Global_LIST_KEY_ZERO.

After this invocation, the key handle becomes invalid. Do not use it anymore!

C Declaration  | C++ Declaration & Source  ]


void erase (Global_list_key_t & iter, Global_list_key_t k, bool reverse = false)

C++: void List_t::erase (Global_list_key_t & iter, Global_list_key_t k, bool reverse = false)
C: void List_erase_in_loop (Global_list_key_t * iterator, List_t * self, Global_list_key_t key, Global_ERWIN_BOOL reverse)

Erases an new element from the list when you are inside an iterator. A pointer to an iterator is provided to this function for changing if necessary. The 'reverse' argument specifies whether you are running forward (false) or backward (true) over the list.

The pointer to the iterator must be != NULL.

Invocation is only valid for key != Global_LIST_KEY_ZERO.

Note that this function not only works in the standard iterators defined in this file, but also in your own loops that you implement using e.g. List_front(), List_next() or List_back(), List_previous(). In these lists, too, you can pass the iterator to List_erase_in_loop().

After this invocation, the key handle becomes invalid. Do not use it anymore!

C Declaration  | C++ Declaration & Source  ]


void erase_in_loop (Global_list_key_t & iter, Global_list_key_t k, bool reverse = false)

C++: void List_t::erase_in_loop (Global_list_key_t & iter, Global_list_key_t k, bool reverse = false)
C: void List_erase_in_loop (Global_list_key_t * iterator, List_t * self, Global_list_key_t key, Global_ERWIN_BOOL reverse)

Erases an new element from the list when you are inside an iterator. A pointer to an iterator is provided to this function for changing if necessary. The 'reverse' argument specifies whether you are running forward (false) or backward (true) over the list.

The pointer to the iterator must be != NULL.

Invocation is only valid for key != Global_LIST_KEY_ZERO.

Note that this function not only works in the standard iterators defined in this file, but also in your own loops that you implement using e.g. List_front(), List_next() or List_back(), List_previous(). In these lists, too, you can pass the iterator to List_erase_in_loop().

After this invocation, the key handle becomes invalid. Do not use it anymore!

C Declaration  | C++ Declaration & Source  ]


oTypeResult value (Global_list_key_t k) const

C++: oTypeResult List_t::value (Global_list_key_t k) const
C: oTypeResult List_value (List_t const * self, Global_list_key_t key)

Returns the value for the given key or the zero element.

Invocation is only valid for key != Global_LIST_KEY_ZERO.

C Declaration  | C++ Declaration & Source  ]


oTypeResult first () const

C++: oTypeResult List_t::first () const
C: oTypeResult List_first (List_t const * self)

Returns the first element or the zero element if no first element exists.

C Declaration  | C++ Declaration & Source  ]


oTypeResult last () const

C++: oTypeResult List_t::last () const
C: oTypeResult List_last (List_t const * self)

Returns the last element or the zero element.

C Declaration  | C++ Declaration & Source  ]


List_element_ptr_t value_ptr (Global_list_key_t k)

C++: List_element_ptr_t List_t::value_ptr (Global_list_key_t k)
C: List_element_ptr_t List_value_ptr (List_t const * self, Global_list_key_t key)

Returns a pointer to the value for the given key or NULL.

Invocation is only valid for key != Global_LIST_KEY_ZERO.

C Declaration  | C++ Declaration & Source  ]


List_element_ref_t value_ref (Global_list_key_t k)

C++: List_element_ref_t List_t::value_ref (Global_list_key_t k)
C: List_element_ptr_t List_value_ptr (List_t const * self, Global_list_key_t key)

Returns a pointer to the value for the given key or NULL.

Invocation is only valid for key != Global_LIST_KEY_ZERO.

C Declaration  | C++ Declaration & Source  ]


Global_list_key_t append (oTypeTouched o)

C++: Global_list_key_t List_t::append (oTypeTouched o)
C: Global_list_key_t List_append (List_t * self, oTypeTouched value)

Appends a new element to the list (and copies it if necessary)

C Declaration  | C++ Declaration & Source  ]


Global_list_key_t prepend (oTypeTouched o)

C++: Global_list_key_t List_t::prepend (oTypeTouched o)
C: Global_list_key_t List_prepend (List_t * self, oTypeTouched value)

Preprends a new element to the list (and copies it if necessary)

C Declaration  | C++ Declaration & Source  ]


Global_list_key_t insert_before (Global_list_key_t k, oTypeTouched o)

C++: Global_list_key_t List_t::insert_before (Global_list_key_t k, oTypeTouched o)
C: Global_list_key_t List_insert_before (List_t * self, Global_list_key_t pos, oTypeTouched value)

Inserts a new element into the list after the given one. If pos is List_KEY_ZERO, then List_prepend is invoked.

C Declaration  | C++ Declaration & Source  ]


Global_list_key_t insert_after (Global_list_key_t k, oTypeTouched o)

C++: Global_list_key_t List_t::insert_after (Global_list_key_t k, oTypeTouched o)
C: Global_list_key_t List_insert_after (List_t * self, Global_list_key_t pos, oTypeTouched value)

Inserts a new element into the list after the given one. If pos is List_KEY_ZERO, then List_append is invoked.

C Declaration  | C++ Declaration & Source  ]


void overwrite (Global_list_key_t k, oTypeTouched o)

C++: void List_t::overwrite (Global_list_key_t k, oTypeTouched o)
C: void List_overwrite (List_t * self, Global_list_key_t key, oTypeTouched value)

Sets the values of the given key. This overwrites the old value.

Invocation is only valid for key != Global_LIST_KEY_ZERO.

C Declaration  | C++ Declaration & Source  ]


Global_list_key_t insert (Global_list_key_t k, oTypeTouched o, bool backwards)

C++: Global_list_key_t List_t::insert (Global_list_key_t k, oTypeTouched o, bool backwards)
C: Global_list_key_t List_insert (List_t * self, Global_list_key_t pos, oTypeTouched value, Global_ERWIN_BOOL backward)

Inserts a new element into the list after or before a given one. If pos is List_KEY_ZERO, then List_append or List_prepend is invoked. This is the combined functionality of append, prepend, insert_after, insert_before.

C Declaration  | C++ Declaration & Source  ]


List_t & operator<< (oTypeTouched o)

C++: List_t & List_t::operator<< (oTypeTouched o)
C: Global_list_key_t List_append (List_t * self, oTypeTouched value)

Appends a new element to the list (and copies it if necessary)

C Declaration  | C++ Declaration & Source  ]


List_t & append_list (List_t const * x)

C++: List_t & List_t::append_list (List_t const * x)
C: void List_append_list (List_t * self, List_t const * values)

Appends a new element to the list (and copies it if necessary)

C Declaration  | C++ Declaration & Source  ]


List_t & append_list (List_t const & x)

C++: List_t & List_t::append_list (List_t const & x)
C: void List_append_list (List_t * self, List_t const * values)

Appends a new element to the list (and copies it if necessary)

C Declaration  | C++ Declaration & Source  ]


List_t & prepend_list (List_t const * x)

C++: List_t & List_t::prepend_list (List_t const * x)
C: void List_prepend_list (List_t * self, List_t const * values)

Preprends a new element to the list (and copies it if necessary)

C Declaration  | C++ Declaration & Source  ]


List_t & prepend_list (List_t const & x)

C++: List_t & List_t::prepend_list (List_t const & x)
C: void List_prepend_list (List_t * self, List_t const * values)

Preprends a new element to the list (and copies it if necessary)

C Declaration  | C++ Declaration & Source  ]


List_t & insert_list_before (Global_list_key_t k, List_t const * x)

C++: List_t & List_t::insert_list_before (Global_list_key_t k, List_t const * x)
C: void List_insert_list_before (List_t * self, Global_list_key_t pos, List_t const * values)

Inserts a new element into the list after the given one. If pos is List_KEY_ZERO, then List_prepend is invoked.

C Declaration  | C++ Declaration & Source  ]


List_t & insert_list_before (Global_list_key_t k, List_t const & x)

C++: List_t & List_t::insert_list_before (Global_list_key_t k, List_t const & x)
C: void List_insert_list_before (List_t * self, Global_list_key_t pos, List_t const * values)

Inserts a new element into the list after the given one. If pos is List_KEY_ZERO, then List_prepend is invoked.

C Declaration  | C++ Declaration & Source  ]


List_t & insert_list_after (Global_list_key_t k, List_t const * x)

C++: List_t & List_t::insert_list_after (Global_list_key_t k, List_t const * x)
C: void List_insert_list_after (List_t * self, Global_list_key_t pos, List_t const * values)

Inserts a new element into the list after the given one. If pos is List_KEY_ZERO, then List_append is invoked.

C Declaration  | C++ Declaration & Source  ]


List_t & insert_list_after (Global_list_key_t k, List_t const & x)

C++: List_t & List_t::insert_list_after (Global_list_key_t k, List_t const & x)
C: void List_insert_list_after (List_t * self, Global_list_key_t pos, List_t const * values)

Inserts a new element into the list after the given one. If pos is List_KEY_ZERO, then List_append is invoked.

C Declaration  | C++ Declaration & Source  ]


List_t & insert_list (Global_list_key_t k, List_t const * x, bool backwards)

C++: List_t & List_t::insert_list (Global_list_key_t k, List_t const * x, bool backwards)
C: void List_insert_list (List_t * self, Global_list_key_t pos, List_t const * values, Global_ERWIN_BOOL backward)

Inserts a new element into the list after the given one. If pos is List_KEY_ZERO, then List_prepend is invoked.

C Declaration  | C++ Declaration & Source  ]


List_t & insert_list (Global_list_key_t k, List_t const & x, bool backwards)

C++: List_t & List_t::insert_list (Global_list_key_t k, List_t const & x, bool backwards)
C: void List_insert_list (List_t * self, Global_list_key_t pos, List_t const * values, Global_ERWIN_BOOL backward)

Inserts a new element into the list after the given one. If pos is List_KEY_ZERO, then List_prepend is invoked.

C Declaration  | C++ Declaration & Source  ]


#if List_DIRECT_RECURSION == 0

List_t & append (List_t const * x)

C++: List_t & List_t::append (List_t const * x)
C: void List_append_list (List_t * self, List_t const * values)

Appends a new element to the list (and copies it if necessary)

#endif
C Declaration  | C++ Declaration & Source  ]


#if List_DIRECT_RECURSION == 0

List_t & append (List_t const & x)

C++: List_t & List_t::append (List_t const & x)
C: void List_append_list (List_t * self, List_t const * values)

Appends a new element to the list (and copies it if necessary)

#endif
C Declaration  | C++ Declaration & Source  ]


#if List_DIRECT_RECURSION == 0

List_t & prepend (List_t const * x)

C++: List_t & List_t::prepend (List_t const * x)
C: void List_prepend_list (List_t * self, List_t const * values)

Preprends a new element to the list (and copies it if necessary)

#endif
C Declaration  | C++ Declaration & Source  ]


#if List_DIRECT_RECURSION == 0

List_t & prepend (List_t const & x)

C++: List_t & List_t::prepend (List_t const & x)
C: void List_prepend_list (List_t * self, List_t const * values)

Preprends a new element to the list (and copies it if necessary)

#endif
C Declaration  | C++ Declaration & Source  ]


#if List_DIRECT_RECURSION == 0

List_t & insert_before (Global_list_key_t k, List_t const * x)

C++: List_t & List_t::insert_before (Global_list_key_t k, List_t const * x)
C: void List_insert_list_before (List_t * self, Global_list_key_t pos, List_t const * values)

Inserts a new element into the list after the given one. If pos is List_KEY_ZERO, then List_prepend is invoked.

#endif
C Declaration  | C++ Declaration & Source  ]


#if List_DIRECT_RECURSION == 0

List_t & insert_before (Global_list_key_t k, List_t const & x)

C++: List_t & List_t::insert_before (Global_list_key_t k, List_t const & x)
C: void List_insert_list_before (List_t * self, Global_list_key_t pos, List_t const * values)

Inserts a new element into the list after the given one. If pos is List_KEY_ZERO, then List_prepend is invoked.

#endif
C Declaration  | C++ Declaration & Source  ]


#if List_DIRECT_RECURSION == 0

List_t & insert_after (Global_list_key_t k, List_t const * x)

C++: List_t & List_t::insert_after (Global_list_key_t k, List_t const * x)
C: void List_insert_list_after (List_t * self, Global_list_key_t pos, List_t const * values)

Inserts a new element into the list after the given one. If pos is List_KEY_ZERO, then List_append is invoked.

#endif
C Declaration  | C++ Declaration & Source  ]


#if List_DIRECT_RECURSION == 0

List_t & insert_after (Global_list_key_t k, List_t const & x)

C++: List_t & List_t::insert_after (Global_list_key_t k, List_t const & x)
C: void List_insert_list_after (List_t * self, Global_list_key_t pos, List_t const * values)

Inserts a new element into the list after the given one. If pos is List_KEY_ZERO, then List_append is invoked.

#endif
C Declaration  | C++ Declaration & Source  ]


#if List_DIRECT_RECURSION == 0

List_t & insert (Global_list_key_t k, List_t const * x, bool backwards)

C++: List_t & List_t::insert (Global_list_key_t k, List_t const * x, bool backwards)
C: void List_insert_list (List_t * self, Global_list_key_t pos, List_t const * values, Global_ERWIN_BOOL backward)

Inserts a new element into the list after the given one. If pos is List_KEY_ZERO, then List_prepend is invoked.

#endif
C Declaration  | C++ Declaration & Source  ]


#if List_DIRECT_RECURSION == 0

List_t & insert (Global_list_key_t k, List_t const & x, bool backwards)

C++: List_t & List_t::insert (Global_list_key_t k, List_t const & x, bool backwards)
C: void List_insert_list (List_t * self, Global_list_key_t pos, List_t const * values, Global_ERWIN_BOOL backward)

Inserts a new element into the list after the given one. If pos is List_KEY_ZERO, then List_prepend is invoked.

#endif
C Declaration  | C++ Declaration & Source  ]


Global_list_key_t init_iterator () const

C++: Global_list_key_t List_t::init_iterator () const
Declaration & Source  ]


Global_list_key_t init_iterator_reverse () const

C++: Global_list_key_t List_t::init_iterator_reverse () const
Declaration & Source  ]


bool next_iteration (Global_list_key_t * a, oType * b) const

C++: bool List_t::next_iteration (Global_list_key_t * a, oType * b) const
C: Global_ERWIN_BOOL List_next_iteration (List_t const * self, Global_list_key_t * key, oType * valuep)
C Declaration  | C++ Declaration & Source  ]


bool next_iteration_ptr (Global_list_key_t * a, oTypeVar * * b)

C++: bool List_t::next_iteration_ptr (Global_list_key_t * a, oTypeVar * * b)
C: Global_ERWIN_BOOL List_next_iteration_ptr (List_t * self, Global_list_key_t * key, oTypeVar * * valuepp)
C Declaration  | C++ Declaration & Source  ]


bool next_iteration_reverse (Global_list_key_t * a, oType * b) const

C++: bool List_t::next_iteration_reverse (Global_list_key_t * a, oType * b) const
C: Global_ERWIN_BOOL List_next_iteration_reverse (List_t const * self, Global_list_key_t * key, oType * valuep)
C Declaration  | C++ Declaration & Source  ]


bool next_iteration_ptr_reverse (Global_list_key_t * a, oTypeVar * * b)

C++: bool List_t::next_iteration_ptr_reverse (Global_list_key_t * a, oTypeVar * * b)
C: Global_ERWIN_BOOL List_next_iteration_ptr_reverse (List_t * self, Global_list_key_t * key, oTypeVar * * valuepp)
C Declaration  | C++ Declaration & Source  ]


int nentries () const

C++: int List_t::nentries () const
C: int List_nentries (List_t const * self)

Returns the number of entries in the list.

Note

If you compile lists to use minimal space, then no element counter is implemented. In this case, this is slow, it has to iterate the whole list.

The #define to determine whether an element counter is not implemented is List_SLOW_NENTRIES, which is 0 by default.

C Declaration  | C++ Declaration & Source  ]


bool empty () const

C++: bool List_t::empty () const
C: Global_ERWIN_BOOL List_empty (List_t const * self)

Returns whether the list contains no elements.

C Declaration  | C++ Declaration & Source  ]


bool non_empty () const

C++: bool List_t::non_empty () const
C: Global_ERWIN_BOOL List_empty (List_t const * self)

Returns whether the list contains no elements.

C Declaration  | C++ Declaration & Source  ]


Occurrences of List_t

List_t const *Global_erwin_ptr_const_of(List_t const * x)
List_t const *Global_erwin_ptr_const_of(List_t const & x)
List_t *Global_erwin_ptr_of(List_t * x)
List_t *Global_erwin_ptr_of(List_t & x)
Global_list_key_tList_append(List_t * self, oTypeTouched value)
voidList_append_list(List_t * self, List_t const * values)
Global_list_key_tList_back(List_t const * self)
voidList_clear(List_t * self)
voidList_clear_errno(List_t const * self)
intList_cmp(List_t const *, List_t const *, List_cmp_t cmp)
List_t *List_copy(List_t const * self)
List_t *List_copy_err(List_t const * self, int * err)
voidList_delete(List_t * self)
Global_ERWIN_BOOLList_empty(List_t const * self)
voidList_erase(List_t * self, Global_list_key_t key)
voidList_erase_in_loop(Global_list_key_t * iterator, List_t * self, Global_list_key_t key, Global_ERWIN_BOOL reverse)
intList_errno(List_t const *)
oTypeResultList_first(List_t const * self)
Global_list_key_tList_front(List_t const * self)
Global_hashval_tList_hash(List_t const *)
Global_hashval_tList_hash(List_t const * x)
Global_hashval_tList_hash_raw(List_t const *)
Global_list_key_tList_insert(List_t * self, Global_list_key_t pos, oTypeTouched value, Global_ERWIN_BOOL backward)
Global_list_key_tList_insert_after(List_t * self, Global_list_key_t pos, oTypeTouched value)
Global_list_key_tList_insert_before(List_t * self, Global_list_key_t pos, oTypeTouched value)
voidList_insert_list(List_t * self, Global_list_key_t pos, List_t const * values, Global_ERWIN_BOOL backward)
voidList_insert_list_after(List_t * self, Global_list_key_t pos, List_t const * values)
voidList_insert_list_before(List_t * self, Global_list_key_t pos, List_t const * values)
oTypeResultList_last(List_t const * self)
voidList_map(List_t * self, List_map_t map)
intList_nentries(List_t const * self)
List_t *List_new()
List_t *List_new_with_zero(oTypeTouched zero)
Global_list_key_tList_next(List_t const * self, Global_list_key_t key)
Global_ERWIN_BOOLList_next_iteration(List_t const * self, Global_list_key_t * key, oType * valuep)
Global_ERWIN_BOOLList_next_iteration_ptr(List_t * self, Global_list_key_t * key, oTypeVar * * valuepp)
Global_ERWIN_BOOLList_next_iteration_ptr_reverse(List_t * self, Global_list_key_t * key, oTypeVar * * valuepp)
Global_ERWIN_BOOLList_next_iteration_reverse(List_t const * self, Global_list_key_t * key, oType * valuep)
oTypeResultList_nth(List_t const * self, int index)
Global_list_key_tList_nth_key(List_t const * self, int index)
voidList_overwrite(List_t * self, Global_list_key_t key, oTypeTouched value)
Global_list_key_tList_prepend(List_t * self, oTypeTouched value)
voidList_prepend_list(List_t * self, List_t const * values)
Global_list_key_tList_previous(List_t const * self, Global_list_key_t key)
oTypeResultList_value(List_t const * self, Global_list_key_t key)
List_element_ptr_tList_value_ptr(List_t const * self, Global_list_key_t key)
oTypeResultList_zero(List_t const * self)
List_t const &List_t::static_zero()
List_t::List()
List_t::List(oTypeTouched)
List_t::operator List_t *()
List_t::operator List_t const *() const
boolList_t::operator!=(List_t const & b) const
boolList_t::operator!=(List_t const * b) const
boolList_t::operator<(List_t const & b) const
boolList_t::operator<(List_t const * b) const
List_t &List_t::operator<<(oTypeTouched o)
boolList_t::operator<=(List_t const & b) const
boolList_t::operator<=(List_t const * b) const
List_t &List_t::operator=(List_t const &)
List_t &List_t::operator=(List_t const *)
boolList_t::operator==(List_t const & b) const
boolList_t::operator==(List_t const * b) const
boolList_t::operator>(List_t const & b) const
boolList_t::operator>(List_t const * b) const
boolList_t::operator>=(List_t const & b) const
boolList_t::operator>=(List_t const * b) const
List_t &List_t::append(List_t const * x)
List_t &List_t::append(List_t const & x)
List_t &List_t::append_list(List_t const * x)
List_t &List_t::append_list(List_t const & x)
List_t &List_t::clear()
intList_t::cmp(List_t const * other, List_cmp_t cmp = List_CMP_T_NULL) const
intList_t::cmp(List_t const & other, List_cmp_t cmp_func = List_CMP_T_NULL) const
List_t &List_t::insert(Global_list_key_t k, List_t const * x, bool backwards)
List_t &List_t::insert(Global_list_key_t k, List_t const & x, bool backwards)
List_t &List_t::insert_after(Global_list_key_t k, List_t const * x)
List_t &List_t::insert_after(Global_list_key_t k, List_t const & x)
List_t &List_t::insert_before(Global_list_key_t k, List_t const * x)
List_t &List_t::insert_before(Global_list_key_t k, List_t const & x)
List_t &List_t::insert_list(Global_list_key_t k, List_t const * x, bool backwards)
List_t &List_t::insert_list(Global_list_key_t k, List_t const & x, bool backwards)
List_t &List_t::insert_list_after(Global_list_key_t k, List_t const * x)
List_t &List_t::insert_list_after(Global_list_key_t k, List_t const & x)
List_t &List_t::insert_list_before(Global_list_key_t k, List_t const * x)
List_t &List_t::insert_list_before(Global_list_key_t k, List_t const & x)
List_t &List_t::prepend(List_t const * x)
List_t &List_t::prepend(List_t const & x)
List_t &List_t::prepend_list(List_t const * x)
List_t &List_t::prepend_list(List_t const & x)

Index

Stoppt die Vorratsdatenspeicherung
November 26th, 2007
Comments? Suggestions? Corrections? You can drop me a line.
zpentrabvagiktu@theiling.de
Schwerpunktpraxis