Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
#include <Variant.h>
Public Types | |
enum | VariantType { VariantTypeNull , VariantTypeConstNull , VariantTypeInteger , VariantTypeUnsignedInteger , VariantTypeBoolean , VariantTypeDouble , VariantTypeString , VariantTypeWideString , VariantTypeArray , VariantTypeObject } |
typedef VariantArray::iterator | iterator_array |
typedef VariantArray::const_iterator | const_iterator_array |
typedef VariantMap::iterator | iterator_map |
typedef VariantMap::const_iterator | const_iterator_map |
Public Member Functions | |
CVariant () | |
CVariant (VariantType type) | |
CVariant (int integer) | |
CVariant (int64_t integer) | |
CVariant (unsigned int unsignedinteger) | |
CVariant (uint64_t unsignedinteger) | |
CVariant (double value) | |
CVariant (float value) | |
CVariant (bool boolean) | |
CVariant (const char *str) | |
CVariant (const char *str, unsigned int length) | |
CVariant (const std::string &str) | |
CVariant (std::string &&str) | |
CVariant (const wchar_t *str) | |
CVariant (const wchar_t *str, unsigned int length) | |
CVariant (const std::wstring &str) | |
CVariant (std::wstring &&str) | |
CVariant (const std::vector< std::string > &strArray) | |
CVariant (std::vector< std::string > &&strArray) | |
CVariant (const std::map< std::string, std::string > &strMap) | |
CVariant (std::map< std::string, std::string > &&strMap) | |
CVariant (const std::map< std::string, CVariant > &variantMap) | |
CVariant (std::map< std::string, CVariant > &&variantMap) | |
CVariant (const CVariant &variant) | |
CVariant (CVariant &&rhs) noexcept | |
~CVariant () | |
bool | isInteger () const |
bool | isSignedInteger () const |
bool | isUnsignedInteger () const |
bool | isBoolean () const |
bool | isString () const |
bool | isWideString () const |
bool | isDouble () const |
bool | isArray () const |
bool | isObject () const |
bool | isNull () const |
VariantType | type () const |
int64_t | asInteger (int64_t fallback=0) const |
int32_t | asInteger32 (int32_t fallback=0) const |
uint64_t | asUnsignedInteger (uint64_t fallback=0u) const |
uint32_t | asUnsignedInteger32 (uint32_t fallback=0u) const |
bool | asBoolean (bool fallback=false) const |
std::string | asString (std::string_view="") const & |
std::string | asString (std::string_view="") && |
std::wstring | asWideString (std::wstring_view=L"") const & |
std::wstring | asWideString (std::wstring_view=L"") && |
double | asDouble (double fallback=0.0) const |
float | asFloat (float fallback=0.0f) const |
CVariant & | operator[] (const std::string &key) & |
const CVariant & | operator[] (const std::string &key) const & |
CVariant | operator[] (const std::string &key) && |
CVariant & | operator[] (unsigned int position) & |
const CVariant & | operator[] (unsigned int position) const & |
CVariant | operator[] (unsigned int position) && |
CVariant & | operator= (const CVariant &rhs) |
CVariant & | operator= (CVariant &&rhs) noexcept |
bool | operator== (const CVariant &rhs) const |
bool | operator!= (const CVariant &rhs) const |
void | reserve (size_t length) |
void | push_back (const CVariant &variant) |
void | push_back (CVariant &&variant) |
void | append (const CVariant &variant) |
void | append (CVariant &&variant) |
const char * | c_str () const |
void | swap (CVariant &rhs) noexcept |
iterator_array | begin_array () |
const_iterator_array | begin_array () const |
iterator_array | end_array () |
const_iterator_array | end_array () const |
iterator_map | begin_map () |
const_iterator_map | begin_map () const |
iterator_map | end_map () |
const_iterator_map | end_map () const |
unsigned int | size () const |
bool | empty () const |
void | clear () |
void | erase (const std::string &key) |
void | erase (unsigned int position) |
bool | isMember (const std::string &key) const |
Static Public Attributes | |
static CVariant | ConstNullVariant = CVariant::VariantTypeConstNull |
VariantArray::const_iterator CVariant::const_iterator_array |
VariantMap::const_iterator CVariant::const_iterator_map |
VariantArray::iterator CVariant::iterator_array |
VariantMap::iterator CVariant::iterator_map |
CVariant::CVariant | ( | ) |
CVariant::CVariant | ( | VariantType | type | ) |
CVariant::CVariant | ( | int | integer | ) |
CVariant::CVariant | ( | int64_t | integer | ) |
CVariant::CVariant | ( | unsigned int | unsignedinteger | ) |
CVariant::CVariant | ( | uint64_t | unsignedinteger | ) |
CVariant::CVariant | ( | double | value | ) |
CVariant::CVariant | ( | float | value | ) |
CVariant::CVariant | ( | bool | boolean | ) |
CVariant::CVariant | ( | const char * | str | ) |
CVariant::CVariant | ( | const char * | str, |
unsigned int | length ) |
CVariant::CVariant | ( | const std::string & | str | ) |
CVariant::CVariant | ( | std::string && | str | ) |
CVariant::CVariant | ( | const wchar_t * | str | ) |
CVariant::CVariant | ( | const wchar_t * | str, |
unsigned int | length ) |
CVariant::CVariant | ( | const std::wstring & | str | ) |
CVariant::CVariant | ( | std::wstring && | str | ) |
CVariant::CVariant | ( | const std::vector< std::string > & | strArray | ) |
CVariant::CVariant | ( | std::vector< std::string > && | strArray | ) |
CVariant::CVariant | ( | const std::map< std::string, std::string > & | strMap | ) |
CVariant::CVariant | ( | std::map< std::string, std::string > && | strMap | ) |
CVariant::CVariant | ( | const std::map< std::string, CVariant > & | variantMap | ) |
CVariant::CVariant | ( | std::map< std::string, CVariant > && | variantMap | ) |
CVariant::CVariant | ( | const CVariant & | variant | ) |
|
noexcept |
CVariant::~CVariant | ( | ) |
double CVariant::asDouble | ( | double | fallback = 0.0 | ) | const |
float CVariant::asFloat | ( | float | fallback = 0.0f | ) | const |
int32_t CVariant::asInteger32 | ( | int32_t | fallback = 0 | ) | const |
std::string CVariant::asString | ( | std::string_view | fallback = "" | ) | && |
std::string CVariant::asString | ( | std::string_view | fallback = "" | ) | const & |
uint64_t CVariant::asUnsignedInteger | ( | uint64_t | fallback = 0u | ) | const |
uint32_t CVariant::asUnsignedInteger32 | ( | uint32_t | fallback = 0u | ) | const |
std::wstring CVariant::asWideString | ( | std::wstring_view | fallback = L"" | ) | && |
std::wstring CVariant::asWideString | ( | std::wstring_view | fallback = L"" | ) | const & |
CVariant::iterator_array CVariant::begin_array | ( | ) |
CVariant::const_iterator_array CVariant::begin_array | ( | ) | const |
CVariant::iterator_map CVariant::begin_map | ( | ) |
CVariant::const_iterator_map CVariant::begin_map | ( | ) | const |
const char * CVariant::c_str | ( | ) | const |
void CVariant::clear | ( | ) |
bool CVariant::empty | ( | ) | const |
CVariant::iterator_array CVariant::end_array | ( | ) |
CVariant::const_iterator_array CVariant::end_array | ( | ) | const |
CVariant::iterator_map CVariant::end_map | ( | ) |
CVariant::const_iterator_map CVariant::end_map | ( | ) | const |
void CVariant::erase | ( | const std::string & | key | ) |
bool CVariant::isArray | ( | ) | const |
bool CVariant::isBoolean | ( | ) | const |
bool CVariant::isDouble | ( | ) | const |
bool CVariant::isInteger | ( | ) | const |
bool CVariant::isMember | ( | const std::string & | key | ) | const |
bool CVariant::isNull | ( | ) | const |
bool CVariant::isObject | ( | ) | const |
bool CVariant::isSignedInteger | ( | ) | const |
bool CVariant::isString | ( | ) | const |
bool CVariant::isUnsignedInteger | ( | ) | const |
bool CVariant::isWideString | ( | ) | const |
CVariant & CVariant::operator[] | ( | const std::string & | key | ) | & |
CVariant CVariant::operator[] | ( | const std::string & | key | ) | && |
const CVariant & CVariant::operator[] | ( | const std::string & | key | ) | const & |
void CVariant::reserve | ( | size_t | length | ) |
unsigned int CVariant::size | ( | ) | const |
CVariant::VariantType CVariant::type | ( | ) | const |
|
static |