avcpp  2.0
Wrapper for the FFmpeg that simplify usage from C++ projects.
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
av::LinkedListWrapper< T, W, N, C, R, D, I > Class Template Reference

Universal wrapper for one directional linked list elements. More...

#include <linkedlistutils.h>

Classes

class  base_iterator
 

Public Types

typedef T element_type
 
typedef W element_wrapper_type
 
typedef N next_element_type
 
typedef C wrapper_cast_type
 
typedef R wrapper_reset_type
 
typedef D deleter_type
 
typedef I iterator_category
 
using iterator = base_iterator< false >
 
using const_iterator = base_iterator< true >
 

Public Member Functions

 LinkedListWrapper ()
 
 LinkedListWrapper (element_type *begin)
 
 ~LinkedListWrapper ()
 
bool isValid ()
 
element_typeraw ()
 
const element_typeraw () const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
size_t count () const
 Log(N) complexity! More...
 
element_wrapper_type at (size_t idx) const
 Log(N) complexity. More...
 

Protected Attributes

wrapper_cast_type m_wrapperCast
 
element_typem_begin
 
element_typem_end
 

Detailed Description

template<typename T, typename W, typename N = DefaultNextElement<T>, typename C = DefaultWrapperCast<T, W>, typename R = DefaultResetPtr<T, W>, typename D = NullDeleter<T>, typename I = std::forward_iterator_tag>
class av::LinkedListWrapper< T, W, N, C, R, D, I >

Universal wrapper for one directional linked list elements.

Next element taked with functor that described by N template parameter.

T - type of wrapped elements W - type of element wrapper, must have ctor from T pointer, method reset(T * ptr) to reset current pointer N - functor that return next element in list C - functor that used to cast wrapper to its raw value R - functor that used to reset pointer value in wrapper to new one D - deleter, by default NullDeleter that does not free any resources I - Iterator cathegory (???)

Member Typedef Documentation

◆ const_iterator

template<typename T , typename W , typename N = DefaultNextElement<T>, typename C = DefaultWrapperCast<T, W>, typename R = DefaultResetPtr<T, W>, typename D = NullDeleter<T>, typename I = std::forward_iterator_tag>
using av::LinkedListWrapper< T, W, N, C, R, D, I >::const_iterator = base_iterator<true>

◆ deleter_type

template<typename T , typename W , typename N = DefaultNextElement<T>, typename C = DefaultWrapperCast<T, W>, typename R = DefaultResetPtr<T, W>, typename D = NullDeleter<T>, typename I = std::forward_iterator_tag>
typedef D av::LinkedListWrapper< T, W, N, C, R, D, I >::deleter_type

◆ element_type

template<typename T , typename W , typename N = DefaultNextElement<T>, typename C = DefaultWrapperCast<T, W>, typename R = DefaultResetPtr<T, W>, typename D = NullDeleter<T>, typename I = std::forward_iterator_tag>
typedef T av::LinkedListWrapper< T, W, N, C, R, D, I >::element_type

◆ element_wrapper_type

template<typename T , typename W , typename N = DefaultNextElement<T>, typename C = DefaultWrapperCast<T, W>, typename R = DefaultResetPtr<T, W>, typename D = NullDeleter<T>, typename I = std::forward_iterator_tag>
typedef W av::LinkedListWrapper< T, W, N, C, R, D, I >::element_wrapper_type

◆ iterator

template<typename T , typename W , typename N = DefaultNextElement<T>, typename C = DefaultWrapperCast<T, W>, typename R = DefaultResetPtr<T, W>, typename D = NullDeleter<T>, typename I = std::forward_iterator_tag>
using av::LinkedListWrapper< T, W, N, C, R, D, I >::iterator = base_iterator<false>

◆ iterator_category

template<typename T , typename W , typename N = DefaultNextElement<T>, typename C = DefaultWrapperCast<T, W>, typename R = DefaultResetPtr<T, W>, typename D = NullDeleter<T>, typename I = std::forward_iterator_tag>
typedef I av::LinkedListWrapper< T, W, N, C, R, D, I >::iterator_category

◆ next_element_type

template<typename T , typename W , typename N = DefaultNextElement<T>, typename C = DefaultWrapperCast<T, W>, typename R = DefaultResetPtr<T, W>, typename D = NullDeleter<T>, typename I = std::forward_iterator_tag>
typedef N av::LinkedListWrapper< T, W, N, C, R, D, I >::next_element_type

◆ wrapper_cast_type

template<typename T , typename W , typename N = DefaultNextElement<T>, typename C = DefaultWrapperCast<T, W>, typename R = DefaultResetPtr<T, W>, typename D = NullDeleter<T>, typename I = std::forward_iterator_tag>
typedef C av::LinkedListWrapper< T, W, N, C, R, D, I >::wrapper_cast_type

◆ wrapper_reset_type

template<typename T , typename W , typename N = DefaultNextElement<T>, typename C = DefaultWrapperCast<T, W>, typename R = DefaultResetPtr<T, W>, typename D = NullDeleter<T>, typename I = std::forward_iterator_tag>
typedef R av::LinkedListWrapper< T, W, N, C, R, D, I >::wrapper_reset_type

Constructor & Destructor Documentation

◆ LinkedListWrapper() [1/2]

template<typename T , typename W , typename N = DefaultNextElement<T>, typename C = DefaultWrapperCast<T, W>, typename R = DefaultResetPtr<T, W>, typename D = NullDeleter<T>, typename I = std::forward_iterator_tag>
av::LinkedListWrapper< T, W, N, C, R, D, I >::LinkedListWrapper ( )
inline

◆ LinkedListWrapper() [2/2]

template<typename T , typename W , typename N = DefaultNextElement<T>, typename C = DefaultWrapperCast<T, W>, typename R = DefaultResetPtr<T, W>, typename D = NullDeleter<T>, typename I = std::forward_iterator_tag>
av::LinkedListWrapper< T, W, N, C, R, D, I >::LinkedListWrapper ( element_type begin)
inlineexplicit

◆ ~LinkedListWrapper()

template<typename T , typename W , typename N = DefaultNextElement<T>, typename C = DefaultWrapperCast<T, W>, typename R = DefaultResetPtr<T, W>, typename D = NullDeleter<T>, typename I = std::forward_iterator_tag>
av::LinkedListWrapper< T, W, N, C, R, D, I >::~LinkedListWrapper ( )
inline

Member Function Documentation

◆ at()

template<typename T , typename W , typename N = DefaultNextElement<T>, typename C = DefaultWrapperCast<T, W>, typename R = DefaultResetPtr<T, W>, typename D = NullDeleter<T>, typename I = std::forward_iterator_tag>
element_wrapper_type av::LinkedListWrapper< T, W, N, C, R, D, I >::at ( size_t  idx) const
inline

Log(N) complexity.

Parameters
idx
Returns

◆ begin() [1/2]

template<typename T , typename W , typename N = DefaultNextElement<T>, typename C = DefaultWrapperCast<T, W>, typename R = DefaultResetPtr<T, W>, typename D = NullDeleter<T>, typename I = std::forward_iterator_tag>
iterator av::LinkedListWrapper< T, W, N, C, R, D, I >::begin ( )
inline

◆ begin() [2/2]

template<typename T , typename W , typename N = DefaultNextElement<T>, typename C = DefaultWrapperCast<T, W>, typename R = DefaultResetPtr<T, W>, typename D = NullDeleter<T>, typename I = std::forward_iterator_tag>
const_iterator av::LinkedListWrapper< T, W, N, C, R, D, I >::begin ( ) const
inline

◆ count()

template<typename T , typename W , typename N = DefaultNextElement<T>, typename C = DefaultWrapperCast<T, W>, typename R = DefaultResetPtr<T, W>, typename D = NullDeleter<T>, typename I = std::forward_iterator_tag>
size_t av::LinkedListWrapper< T, W, N, C, R, D, I >::count ( ) const
inline

Log(N) complexity!

◆ end() [1/2]

template<typename T , typename W , typename N = DefaultNextElement<T>, typename C = DefaultWrapperCast<T, W>, typename R = DefaultResetPtr<T, W>, typename D = NullDeleter<T>, typename I = std::forward_iterator_tag>
iterator av::LinkedListWrapper< T, W, N, C, R, D, I >::end ( )
inline

◆ end() [2/2]

template<typename T , typename W , typename N = DefaultNextElement<T>, typename C = DefaultWrapperCast<T, W>, typename R = DefaultResetPtr<T, W>, typename D = NullDeleter<T>, typename I = std::forward_iterator_tag>
const_iterator av::LinkedListWrapper< T, W, N, C, R, D, I >::end ( ) const
inline

◆ isValid()

template<typename T , typename W , typename N = DefaultNextElement<T>, typename C = DefaultWrapperCast<T, W>, typename R = DefaultResetPtr<T, W>, typename D = NullDeleter<T>, typename I = std::forward_iterator_tag>
bool av::LinkedListWrapper< T, W, N, C, R, D, I >::isValid ( )
inline

◆ raw() [1/2]

template<typename T , typename W , typename N = DefaultNextElement<T>, typename C = DefaultWrapperCast<T, W>, typename R = DefaultResetPtr<T, W>, typename D = NullDeleter<T>, typename I = std::forward_iterator_tag>
element_type* av::LinkedListWrapper< T, W, N, C, R, D, I >::raw ( )
inline

◆ raw() [2/2]

template<typename T , typename W , typename N = DefaultNextElement<T>, typename C = DefaultWrapperCast<T, W>, typename R = DefaultResetPtr<T, W>, typename D = NullDeleter<T>, typename I = std::forward_iterator_tag>
const element_type* av::LinkedListWrapper< T, W, N, C, R, D, I >::raw ( ) const
inline

Member Data Documentation

◆ m_begin

template<typename T , typename W , typename N = DefaultNextElement<T>, typename C = DefaultWrapperCast<T, W>, typename R = DefaultResetPtr<T, W>, typename D = NullDeleter<T>, typename I = std::forward_iterator_tag>
element_type* av::LinkedListWrapper< T, W, N, C, R, D, I >::m_begin
protected

◆ m_end

template<typename T , typename W , typename N = DefaultNextElement<T>, typename C = DefaultWrapperCast<T, W>, typename R = DefaultResetPtr<T, W>, typename D = NullDeleter<T>, typename I = std::forward_iterator_tag>
element_type* av::LinkedListWrapper< T, W, N, C, R, D, I >::m_end
protected

◆ m_wrapperCast

template<typename T , typename W , typename N = DefaultNextElement<T>, typename C = DefaultWrapperCast<T, W>, typename R = DefaultResetPtr<T, W>, typename D = NullDeleter<T>, typename I = std::forward_iterator_tag>
wrapper_cast_type av::LinkedListWrapper< T, W, N, C, R, D, I >::m_wrapperCast
protected

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