WvStreams
Classes | Public Member Functions | Public Attributes | List of all members
WvListBase Class Reference
Inheritance diagram for WvListBase:
Inheritance graph
[legend]

Classes

class  IterBase
 

Public Member Functions

 WvListBase ()
 Creates an empty linked list.
 
size_t count () const
 Returns the number of elements in the list. More...
 
void reverse ()
 Reverses the order of elements in the list. More...
 
bool isempty () const
 Quickly determines if the list is empty. More...
 

Public Attributes

WvLink head
 
WvLinktail
 

Detailed Description

Definition at line 21 of file wvlinklist.h.

Member Function Documentation

◆ count()

size_t WvListBase::count ( ) const

Returns the number of elements in the list.

This function causes a full traversal of the list which may be overly inefficient depending on how and when it is used.

Returns: the number of elements

Definition at line 24 of file wvlinklist.cc.

Referenced by WvDBusMsg::variant_end(), and WvDBusMsg::varray_end().

◆ reverse()

void WvListBase::reverse ( )

Reverses the order of elements in the list.

This function traverses the list and rearranges the pointers and updates the pointers to head & tail appropriately.

It does nothing for lists of count<2

Definition at line 35 of file wvlinklist.cc.

◆ isempty()

bool WvListBase::isempty ( ) const
inline

Quickly determines if the list is empty.

This is much faster than checking count() == 0.

Returns: true if empty

Definition at line 62 of file wvlinklist.h.


The documentation for this class was generated from the following files: