avcpp 3.2.1
Wrapper for the FFmpeg that simplify usage from C++ projects.
Loading...
Searching...
No Matches
av::ArrayView< T, U, Policy > Class Template Reference

C-array (FFmpeg) wrapper witch can iterate over collection and represents any element via light-weight view U. More...

#include <avutils.h>

Inheritance diagram for av::ArrayView< T, U, Policy >:

Public Member Functions

constexpr ArrayView (T *ptr, Policy policy)
 Wrap an array with a policy that defines where it ends.
auto constexpr begin () const noexcept
 First element.
auto constexpr end () const noexcept
 End of the range.

Detailed Description

template<typename T, typename U, class Policy>
class av::ArrayView< T, U, Policy >

Policy maybe std::size_t that just defines input array size

Constructor & Destructor Documentation

◆ ArrayView()

template<typename T, typename U, class Policy>
av::ArrayView< T, U, Policy >::ArrayView ( T * ptr,
Policy policy )
inlineconstexpr
Parameters
ptrfirst element; may be null
policyeither an element count or a sentinel policy
Note
Non-owning: the array must outlive the view.

Member Function Documentation

◆ begin()

template<typename T, typename U, class Policy>
auto constexpr av::ArrayView< T, U, Policy >::begin ( ) const
inlineconstexprnoexcept
Returns
an iterator at the beginning of the range

◆ end()

template<typename T, typename U, class Policy>
auto constexpr av::ArrayView< T, U, Policy >::end ( ) const
inlineconstexprnoexcept
Returns
an iterator or a sentinel, depending on the policy

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