avcpp
2.0
Wrapper for the FFmpeg that simplify usage from C++ projects.
|
Go to the documentation of this file.
61 template<
typename T,
typename W>
75 template<
typename T,
typename W>
99 typename N = DefaultNextElement<T>,
100 typename C = DefaultWrapperCast<T, W>,
101 typename R = DefaultResetPtr<T, W>,
102 typename D = NullDeleter<T>,
103 typename I = std::forward_iterator_tag>
115 template<
bool constIterator = false>
120 std::iterator_traits<base_iterator>
d;
123 using value_type =
typename std::conditional<constIterator, const element_wrapper_type, element_wrapper_type>::type;
129 using ElementType =
typename std::conditional<constIterator, const element_type, element_type>::type;
130 using WrapperType =
typename std::conditional<constIterator, const element_wrapper_type, element_wrapper_type>::type;
141 resetPtr(wrapper, ptr);
149 ptr = getNextPtr(ptr);
150 resetPtr(wrapper, ptr);
243 return std::distance(
begin(),
end());
253 size_t size =
count();
258 std::advance(it, idx);
iterator_category iterator_category
Definition: linkedlistutils.h:122
This functor uses increment operation to take next element in list/array.
Definition: linkedlistutils.h:49
Universal wrapper for one directional linked list elements.
Definition: linkedlistutils.h:104
WrapperType * operator->() noexcept
Definition: linkedlistutils.h:170
LinkedListWrapper()
Definition: linkedlistutils.h:180
element_type * m_begin
Definition: linkedlistutils.h:265
element_type * raw()
Definition: linkedlistutils.h:205
This deleter simple call 'delete' operator.
Definition: linkedlistutils.h:22
iterator begin()
Definition: linkedlistutils.h:215
T * operator()(const W &wrapper) const
Definition: linkedlistutils.h:64
T element_type
Definition: linkedlistutils.h:107
T * operator()(T *x) const
Definition: linkedlistutils.h:38
N next_element_type
Definition: linkedlistutils.h:109
This deleter does nothing.
Definition: linkedlistutils.h:11
void operator()(T *) const
Definition: linkedlistutils.h:13
const_iterator end() const
Definition: linkedlistutils.h:233
value_type & reference
Definition: linkedlistutils.h:126
element_type * m_end
Definition: linkedlistutils.h:266
std::iterator_traits< base_iterator > d
Definition: linkedlistutils.h:120
This functor uses simple notation to take next element from linked list.
Definition: linkedlistutils.h:36
T * operator()(T *x) const
Definition: linkedlistutils.h:51
ptrdiff_t difference_type
Definition: linkedlistutils.h:124
I iterator_category
Definition: linkedlistutils.h:113
typename std::conditional< constIterator, const element_wrapper_type, element_wrapper_type >::type value_type
Definition: linkedlistutils.h:123
const_iterator begin() const
Definition: linkedlistutils.h:227
bool operator==(const base_iterator &rhs) const
Definition: linkedlistutils.h:162
This functor used by default to take access to raw pointer that wrapped by W wrapper.
Definition: linkedlistutils.h:62
base_iterator & operator++()
Definition: linkedlistutils.h:147
size_t count() const
Log(N) complexity!
Definition: linkedlistutils.h:241
bool isValid()
Definition: linkedlistutils.h:200
void operator()(T *x) const
Definition: linkedlistutils.h:24
~base_iterator()
Definition: linkedlistutils.h:144
WrapperType & operator*() noexcept
Definition: linkedlistutils.h:165
value_type * pointer
Definition: linkedlistutils.h:125
void operator()(W &wrapper, T *ptr) const
Definition: linkedlistutils.h:78
base_iterator operator++(int)
Definition: linkedlistutils.h:155
~LinkedListWrapper()
Definition: linkedlistutils.h:193
base_iterator< false > iterator
Definition: linkedlistutils.h:177
base_iterator(element_type *ptr)
Definition: linkedlistutils.h:138
const element_type * raw() const
Definition: linkedlistutils.h:210
bool operator!=(const base_iterator &rhs) const
Definition: linkedlistutils.h:163
base_iterator< true > const_iterator
Definition: linkedlistutils.h:178
Definition: audioresampler.cpp:8
element_wrapper_type at(size_t idx) const
Log(N) complexity.
Definition: linkedlistutils.h:251
Definition: linkedlistutils.h:116
R wrapper_reset_type
Definition: linkedlistutils.h:111
This functor used by default to set new pointer that will be wrapped by W wrapper.
Definition: linkedlistutils.h:76
LinkedListWrapper(element_type *begin)
Definition: linkedlistutils.h:186
iterator end()
Definition: linkedlistutils.h:221
C wrapper_cast_type
Definition: linkedlistutils.h:110
W element_wrapper_type
Definition: linkedlistutils.h:108
D deleter_type
Definition: linkedlistutils.h:112
wrapper_cast_type m_wrapperCast
Definition: linkedlistutils.h:264