VLC 4.0.0-dev
Loading...
Searching...
No Matches
Collaboration diagram for Linked lists (C++ wrappers):

Files

file  vlc_list.hpp
 This provides convenience helpers for using the C linked lists extension from C++ files.
 

Data Structures

class  vlc::list_iterator_base< NodeType, ListType >
 Base class for iterators on the vlc::list's vlc_list wrapper. More...
 
class  vlc::list_reverse_iterator< NodeType, ListType >
 
class  vlc::list_base< NodeType, ListType, Iterator, ConstIterator >
 Wrapper around any type matching with vlc_list, exposing C++ iterator operations. More...
 
struct  vlc::const_list< NodeType >
 Public type-safe wrapper around const vlc_list, providing const iterator and iteration functions. More...
 
struct  vlc::list< NodeType >
 Public type-safe wrapper around mutable vlc_list, providing iterators, iteration functions and mutation on the list itself. More...
 

Typedefs

template<typename NodeType >
using vlc::list_iterator = list_iterator_base< NodeType, vlc_list >
 Iterator on vlc_list with mutable capabilities.
 
template<typename NodeType >
using vlc::list_const_iterator = list_iterator_base< NodeType, const vlc_list >
 Iterator on vlc_list with immutable capabilities.
 

Functions

bool vlc::operator== (const ::vlc_list &a, const ::vlc_list &b)
 Compare two vlc_list node and check whether they represent the same element.
 
bool vlc::operator!= (const ::vlc_list &a, const ::vlc_list &b)
 Compare two vlc_list node and check whether they representthe same element.
 
template<typename NodeType >
::vlc::list< NodeType > vlc::from (vlc_list &list, vlc_list NodeType::*node_ptr)
 Construct a vlc::list (mutable list) object from a mutable vlc_list reference.
 
template<typename NodeType >
::vlc::const_list< NodeType > vlc::from (const vlc_list &list, vlc_list NodeType::*node_ptr)
 Construct a vlc::const_list (immutable list) object from a const vlc_list reference.
 

Detailed Description

Typedef Documentation

◆ list_const_iterator

template<typename NodeType >
using vlc::list_const_iterator = typedef list_iterator_base<NodeType, const vlc_list>

Iterator on vlc_list with immutable capabilities.

◆ list_iterator

template<typename NodeType >
using vlc::list_iterator = typedef list_iterator_base<NodeType, vlc_list>

Iterator on vlc_list with mutable capabilities.

Function Documentation

◆ from() [1/2]

template<typename NodeType >
::vlc::const_list< NodeType > vlc::from ( const vlc_list list,
vlc_list NodeType::*  node_ptr 
)

Construct a vlc::const_list (immutable list) object from a const vlc_list reference.

Template Parameters
NodeTypethe type of each node from the list
Parameters
listthe vlc_list object to wrap around
node_ptra pointer to the intrusive vlc_list member from the type being stored in the list.
Returns
a vlc::const_list instance which cannot modify the vlc_list

References list.

◆ from() [2/2]

template<typename NodeType >
::vlc::list< NodeType > vlc::from ( vlc_list list,
vlc_list NodeType::*  node_ptr 
)

Construct a vlc::list (mutable list) object from a mutable vlc_list reference.

Template Parameters
NodeTypethe type of each node from the list
Parameters
listthe vlc_list object to wrap around
node_ptra pointer to the intrusive vlc_list member from the type being stored in the list.
Returns
a vlc::list instance

References list.

◆ operator!=()

bool vlc::operator!= ( const ::vlc_list a,
const ::vlc_list b 
)

Compare two vlc_list node and check whether they representthe same element.

If the element is not in a list itself, or is not a list itself, then the result is undefined.

Parameters
asome node belonging to a vlc_list
bsome node belonging to a vlc_list
Returns
false if they represent the same element or the same list, true otherwise

◆ operator==()

bool vlc::operator== ( const ::vlc_list a,
const ::vlc_list b 
)

Compare two vlc_list node and check whether they represent the same element.

If the element is not in a list itself, or is not a list itself, then the result is undefined.

Parameters
asome node belonging to a vlc_list
bsome node belonging to a vlc_list
Returns
true if they represent the same element or the same list, false otherwise