Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::Value::Dict Class Reference

Dictionary Value Container Type. More...

#include <Value.h>

Public Types

using Raw = std::map<String, std::shared_ptr<Value>>
 
using Iterator = Raw::iterator
 
using ConstIterator = Raw::const_iterator
 
using ReverseIterator = Raw::reverse_iterator
 
using ConstReverseIterator = Raw::const_reverse_iterator
 

Public Member Functions

 Dict ()=default
 
 ~Dict ()
 
 Dict (Dict &&other) noexcept
 
Dictoperator= (Dict &&other) noexcept
 
 Dict (const Dict &other)=delete
 
Dictoperator= (const Dict &other)=delete
 
bool empty () const
 
size_t size () const
 
void clear ()
 
bool contains (const String &key) const
 
Iterator begin ()
 
ConstIterator begin () const
 
Iterator end ()
 
ConstIterator end () const
 
ConstIterator cbegin () const
 
ConstIterator cend () const
 
ReverseIterator rbegin ()
 
ConstReverseIterator rbegin () const
 
ReverseIterator rend ()
 
ConstReverseIterator rend () const
 
Iterator erase (const Iterator &it)
 
Iterator erase (const ConstIterator &it)
 
const std::shared_ptr< Valuefind (const String &key) const
 
std::shared_ptr< Valuefind (const String &key)
 
std::shared_ptr< ValuesetRef (const String &key, Value &&value)
 Set a Value to the Dictionary, and return a reference to the set Value.
 
void set (const String &key, Value &&value) &
 
void set (const String &key, bool value) &
 
void set (const String &key, Integer value) &
 
void set (const String &key, double value) &
 
void set (const String &key, const char *value) &
 
void set (const String &key, const char *value, size_t length) &
 
void set (const String &key, String &&value) &
 
void set (const String &key, Blob &&value) &
 
void set (const String &key, List &&value) &
 
void set (const String &key, Dict &&value) &
 
Dict && set (const String &key, Value &&value) &&
 
Dict && set (const String &key, bool value) &&
 
Dict && set (const String &key, Integer value) &&
 
Dict && set (const String &key, double value) &&
 
Dict && set (const String &key, const char *value) &&
 
Dict && set (const String &key, const char *value, size_t length) &&
 
Dict && set (const String &key, String &&value) &&
 
Dict && set (const String &key, Blob &&value) &&
 
Dict && set (const String &key, List &&value) &&
 
Dict && set (const String &key, Dict &&value) &&
 
bool remove (const String &key)
 

Private Attributes

Raw map
 

Detailed Description

Dictionary Value Container Type.

Member Typedef Documentation

◆ ConstIterator

using sese::Value::Dict::ConstIterator = Raw::const_iterator

◆ ConstReverseIterator

using sese::Value::Dict::ConstReverseIterator = Raw::const_reverse_iterator

◆ Iterator

using sese::Value::Dict::Iterator = Raw::iterator

◆ Raw

using sese::Value::Dict::Raw = std::map<String, std::shared_ptr<Value>>

◆ ReverseIterator

using sese::Value::Dict::ReverseIterator = Raw::reverse_iterator

Constructor & Destructor Documentation

◆ Dict() [1/3]

sese::Value::Dict::Dict ( )
default

◆ ~Dict()

Dict::~Dict ( )

◆ Dict() [2/3]

Dict::Dict ( Dict && other)
noexcept

◆ Dict() [3/3]

sese::Value::Dict::Dict ( const Dict & other)
delete

Member Function Documentation

◆ begin() [1/2]

Dict::Iterator Dict::begin ( )

◆ begin() [2/2]

Dict::ConstIterator Dict::begin ( ) const
nodiscard

◆ cbegin()

Dict::ConstIterator Dict::cbegin ( ) const
nodiscard

◆ cend()

Dict::ConstIterator Dict::cend ( ) const
nodiscard

◆ clear()

void Dict::clear ( )

◆ contains()

bool Dict::contains ( const String & key) const
nodiscard

◆ empty()

bool Dict::empty ( ) const
nodiscard

◆ end() [1/2]

Dict::Iterator Dict::end ( )

◆ end() [2/2]

Dict::ConstIterator Dict::end ( ) const
nodiscard

◆ erase() [1/2]

Dict::Iterator Dict::erase ( const ConstIterator & it)

◆ erase() [2/2]

Dict::Iterator Dict::erase ( const Iterator & it)

◆ find() [1/2]

std::shared_ptr< Value > Dict::find ( const String & key)

◆ find() [2/2]

const std::shared_ptr< Value > Dict::find ( const String & key) const
nodiscard

◆ operator=() [1/2]

Dict & sese::Value::Dict::operator= ( const Dict & other)
delete

◆ operator=() [2/2]

Dict & Dict::operator= ( Dict && other)
noexcept

◆ rbegin() [1/2]

Dict::ReverseIterator Dict::rbegin ( )

◆ rbegin() [2/2]

Dict::ConstReverseIterator Dict::rbegin ( ) const
nodiscard

◆ remove()

bool Dict::remove ( const String & key)

◆ rend() [1/2]

Dict::ReverseIterator Dict::rend ( )

◆ rend() [2/2]

Dict::ConstReverseIterator Dict::rend ( ) const
nodiscard

◆ set() [1/20]

void Dict::set ( const String & key,
Blob && value ) &

◆ set() [2/20]

Dict && Dict::set ( const String & key,
Blob && value ) &&

◆ set() [3/20]

void Dict::set ( const String & key,
bool value ) &

◆ set() [4/20]

Dict && Dict::set ( const String & key,
bool value ) &&

◆ set() [5/20]

void Dict::set ( const String & key,
const char * value ) &

◆ set() [6/20]

Dict && Dict::set ( const String & key,
const char * value ) &&

◆ set() [7/20]

void Dict::set ( const String & key,
const char * value,
size_t length ) &

◆ set() [8/20]

Dict && Dict::set ( const String & key,
const char * value,
size_t length ) &&

◆ set() [9/20]

void Dict::set ( const String & key,
Dict && value ) &

◆ set() [10/20]

Dict && Dict::set ( const String & key,
Dict && value ) &&

◆ set() [11/20]

void Dict::set ( const String & key,
double value ) &

◆ set() [12/20]

Dict && Dict::set ( const String & key,
double value ) &&

◆ set() [13/20]

void Dict::set ( const String & key,
Integer value ) &

◆ set() [14/20]

Dict && Dict::set ( const String & key,
Integer value ) &&

◆ set() [15/20]

void Dict::set ( const String & key,
List && value ) &

◆ set() [16/20]

Dict && Dict::set ( const String & key,
List && value ) &&

◆ set() [17/20]

void Dict::set ( const String & key,
String && value ) &

◆ set() [18/20]

Dict && Dict::set ( const String & key,
String && value ) &&

◆ set() [19/20]

void Dict::set ( const String & key,
Value && value ) &

◆ set() [20/20]

Dict && Dict::set ( const String & key,
Value && value ) &&

◆ setRef()

std::shared_ptr< Value > Dict::setRef ( const String & key,
Value && value )

Set a Value to the Dictionary, and return a reference to the set Value.

Parameters
keyKey to set
valueValue to set
Returns
Reference to the set Value

◆ size()

size_t Dict::size ( ) const
nodiscard

Member Data Documentation

◆ map

Raw sese::Value::Dict::map
private

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