avcpp 3.2.1
Wrapper for the FFmpeg that simplify usage from C++ projects.
Loading...
Searching...
No Matches
av::hw::PixelFormatRange::iterator Class Reference

Forward iterator over a null-terminated AVPixelFormat array.

#include <hwcontext.h>

Public Types

using iterator_category = std::forward_iterator_tag
 Standard iterator category tag.
using value_type = PixelFormat
 Type produced by dereferencing.
using difference_type = std::ptrdiff_t
 Distance type required by the iterator traits.
using pointer = void
 No pointer-to-element type: the value is produced on dereference.
using reference = PixelFormat
 Dereference result type.

Public Member Functions

 iterator ()=default
 End iterator.
 iterator (const AVPixelFormat *ptr) noexcept
 Point the iterator at an array element.
PixelFormat operator* () const noexcept
 Format at the current position.
iterator & operator++ () noexcept
 Advance to the next format.
iterator operator++ (int) noexcept
 Advance, returning the previous position.
bool operator== (const iterator &other) const noexcept
 Compare positions.
bool operator!= (const iterator &other) const noexcept
 Compare positions.

Constructor & Destructor Documentation

◆ iterator()

av::hw::PixelFormatRange::iterator::iterator ( const AVPixelFormat * ptr)
inlineexplicitnoexcept
Parameters
ptrposition in the array

Member Function Documentation

◆ operator!=()

bool av::hw::PixelFormatRange::iterator::operator!= ( const iterator & other) const
inlinenoexcept
Parameters
otherthe iterator to compare with
Returns
true when the iterators point at different elements

◆ operator*()

PixelFormat av::hw::PixelFormatRange::iterator::operator* ( ) const
inlinenoexcept
Returns
the wrapped format

◆ operator++() [1/2]

iterator & av::hw::PixelFormatRange::iterator::operator++ ( )
inlinenoexcept
Returns
this iterator

◆ operator++() [2/2]

iterator av::hw::PixelFormatRange::iterator::operator++ ( int )
inlinenoexcept
Returns
a copy of the iterator before advancing

◆ operator==()

bool av::hw::PixelFormatRange::iterator::operator== ( const iterator & other) const
inlinenoexcept
Parameters
otherthe iterator to compare with
Returns
true when both point at the same element

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