avcpp  2.0
Wrapper for the FFmpeg that simplify usage from C++ projects.
Public Member Functions | Friends | List of all members
av::Dictionary::Entry Class Reference

Dictionary key and value holder and accessor. More...

#include <dictionary.h>

Public Member Functions

const char * key () const noexcept
 key - item key accessor More...
 
const char * value () const noexcept
 value - item value accessor More...
 
 operator bool () const
 operator bool - converts holder to bool returns true if entry valid, false otherwise More...
 
bool isNull () const
 isNull - checks that entry invalid (null) More...
 
Entry function-like value set inteface

set - change value of the current item

Parameters
valuenew value
flagsaccess flags, FlagDontStrdupVal only accepted, other flags ignored
void set (const char *value, int flags=0) noexcept
 
void set (const std::string &value, int flags=0) noexcept
 
Entry operator[]-like value set inteface

Helper operators.

Syntax shugar.

Parameters
valuenew item value. Always strduped. Use set() to be more flexibility.
Returns
referenct to this
Entryoperator= (const char *value) noexcept
 
Entryoperator= (const std::string &value) noexcept
 

Friends

template<bool >
class DictionaryIterator
 
class Dictionary
 
bool operator== (const Entry &lhs, const Entry &rhs)
 
bool operator!= (const Entry &lhs, const Entry &rhs)
 

Detailed Description

Dictionary key and value holder and accessor.

Member Function Documentation

◆ isNull()

bool av::Dictionary::Entry::isNull ( ) const

isNull - checks that entry invalid (null)

Returns
true if entry null, false otherwise

◆ key()

const char * av::Dictionary::Entry::key ( ) const
noexcept

key - item key accessor

Returns
current item key, or null if entry null

◆ operator bool()

av::Dictionary::Entry::operator bool ( ) const

operator bool - converts holder to bool returns true if entry valid, false otherwise

◆ operator=() [1/2]

Dictionary::Entry & av::Dictionary::Entry::operator= ( const char *  value)
noexcept

◆ operator=() [2/2]

Entry& av::Dictionary::Entry::operator= ( const std::string &  value)
noexcept

◆ set() [1/2]

void av::Dictionary::Entry::set ( const char *  value,
int  flags = 0 
)
noexcept

◆ set() [2/2]

void av::Dictionary::Entry::set ( const std::string &  value,
int  flags = 0 
)
noexcept

◆ value()

const char * av::Dictionary::Entry::value ( ) const
noexcept

value - item value accessor

Returns
current item value or null if entry null

Friends And Related Function Documentation

◆ Dictionary

friend class Dictionary
friend

◆ DictionaryIterator

template<bool >
friend class DictionaryIterator
friend

◆ operator!=

bool operator!= ( const Entry lhs,
const Entry rhs 
)
friend

◆ operator==

bool operator== ( const Entry lhs,
const Entry rhs 
)
friend

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