UPnPsdk 0.1
Universal Plug and Play +, Software Development Kit
 
Loading...
Searching...
No Matches
list.hpp File Reference

Trivial list management interface, patterned on std::list. More...

+ Include dependency graph for list.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  UpnpListHead
 List anchor structure. More...
 

Typedefs

typedef struct UpnpListHead UpnpListHead
 List anchor structure.
 
typedef UpnpListHeadUpnpListIter
 List iterator. Not strictly necessary, but clarifies the interface.
 

Functions

PUPNP_Api void UpnpListInit (UpnpListHead *list)
 Initialize empty list.
 
PUPNP_Api UpnpListIter UpnpListBegin (UpnpListHead *list)
 Return iterator pointing to the first list element, or UpnpListEnd(list) if the list is empty.
 
PUPNP_Api UpnpListIter UpnpListEnd (UpnpListHead *list)
 Return end of list sentinel iterator (not an element)
 
PUPNP_Api UpnpListIter UpnpListNext (UpnpListHead *list, UpnpListIter pos)
 Return iterator pointing to element after pos, or end()
 
PUPNP_Api UpnpListIter UpnpListInsert (UpnpListHead *list, UpnpListIter pos, UpnpListHead *elt)
 Insert element before pos, returns iterator pointing to inserted element.
 
PUPNP_Api UpnpListIter UpnpListErase (UpnpListHead *list, UpnpListIter pos)
 Erase element at pos, return next one, or end()
 

Detailed Description

Trivial list management interface, patterned on std::list.

It aims more at being familiar than at being minimal. The implementation does not perform any allocation or deallocation.

Definition in file list.hpp.


Class Documentation

◆ UpnpListHead

struct UpnpListHead

List anchor structure.

This should be the first entry in list member objects, except if you want to do member offset arithmetic instead of simple casts (look up "containerof"). The list code itself does not care.

Definition at line 56 of file list.hpp.

+ Collaboration diagram for UpnpListHead:
Class Members
struct UpnpListHead * next Points to next entry in the list.
struct UpnpListHead * prev Points to previous entry in the list.

Typedef Documentation

◆ UpnpListHead

typedef struct UpnpListHead UpnpListHead

List anchor structure.

This should be the first entry in list member objects, except if you want to do member offset arithmetic instead of simple casts (look up "containerof"). The list code itself does not care.

◆ UpnpListIter

List iterator. Not strictly necessary, but clarifies the interface.

Definition at line 62 of file list.hpp.

Function Documentation

◆ UpnpListInit()

PUPNP_Api void UpnpListInit ( UpnpListHead list)

Initialize empty list.

Definition at line 44 of file list.cpp.

+ Here is the caller graph for this function:

◆ UpnpListBegin()

PUPNP_Api UpnpListIter UpnpListBegin ( UpnpListHead list)

Return iterator pointing to the first list element, or UpnpListEnd(list) if the list is empty.

Definition at line 51 of file list.cpp.

+ Here is the caller graph for this function:

◆ UpnpListEnd()

PUPNP_Api UpnpListIter UpnpListEnd ( UpnpListHead list)

Return end of list sentinel iterator (not an element)

Definition at line 58 of file list.cpp.

+ Here is the caller graph for this function:

◆ UpnpListNext()

PUPNP_Api UpnpListIter UpnpListNext ( UpnpListHead list,
UpnpListIter  pos 
)

Return iterator pointing to element after pos, or end()

Definition at line 60 of file list.cpp.

+ Here is the caller graph for this function:

◆ UpnpListInsert()

PUPNP_Api UpnpListIter UpnpListInsert ( UpnpListHead list,
UpnpListIter  pos,
UpnpListHead elt 
)

Insert element before pos, returns iterator pointing to inserted element.

Definition at line 68 of file list.cpp.

+ Here is the caller graph for this function:

◆ UpnpListErase()

PUPNP_Api UpnpListIter UpnpListErase ( UpnpListHead list,
UpnpListIter  pos 
)

Erase element at pos, return next one, or end()

Definition at line 80 of file list.cpp.

+ Here is the caller graph for this function: