VLC 4.0.0-dev
|
This provides convenience helpers for using the C linked lists extension from C++ files. More...
Go to the source code of this file.
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... | |
Namespaces | |
namespace | vlc |
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. | |
This provides convenience helpers for using the C linked lists extension from C++ files.
A list wrapper should be used on an existing list:
Using vlc::from
will automatically select the correct variant for the list depending on the constness of the vlc_list
list, and it can allow only iteration if the list is const.
Iteration includes standard iterators and for range-based loops, as well as reversed list.