Golias Engine
A C++ 20 'game engine' built with SDL3 with wide platform support.
Public Member Functions | List of all members
Dictionary Class Reference

#include <dictionary.h>

Public Member Functions

 Dictionary ()=default
 
size_t size () const
 
bool is_empty () const
 
void clear ()
 
template<typename T >
void set (const String &key, const T &value)
 
template<typename T >
get (const String &key, const T &default_value=T{}) const
 
bool has (const String &key) const
 
bool erase (const String &key)
 
Vector< Stringkeys () const
 
template<typename T >
bool is_type (const String &key) const
 
std::type_index get_type (const String &key) const
 
void merge (const Dictionary &other, bool overwrite=false)
 
template<typename Func >
void for_each (Func func)
 
auto begin ()
 
auto end ()
 
auto begin () const
 
auto end () const
 

Constructor & Destructor Documentation

◆ Dictionary()

Dictionary::Dictionary ( )
default

Member Function Documentation

◆ begin() [1/2]

auto Dictionary::begin ( )

◆ begin() [2/2]

auto Dictionary::begin ( ) const

◆ clear()

void Dictionary::clear ( )

◆ end() [1/2]

auto Dictionary::end ( )

◆ end() [2/2]

auto Dictionary::end ( ) const

◆ erase()

bool Dictionary::erase ( const String key)

◆ for_each()

template<typename Func >
void Dictionary::for_each ( Func  func)
inline

◆ get()

template<typename T >
T Dictionary::get ( const String key,
const T &  default_value = T{} 
) const
inline

◆ get_type()

std::type_index Dictionary::get_type ( const String key) const

◆ has()

bool Dictionary::has ( const String key) const

◆ is_empty()

bool Dictionary::is_empty ( ) const

◆ is_type()

template<typename T >
bool Dictionary::is_type ( const String key) const
inline

◆ keys()

Vector< String > Dictionary::keys ( ) const

◆ merge()

void Dictionary::merge ( const Dictionary other,
bool  overwrite = false 
)

◆ set()

template<typename T >
void Dictionary::set ( const String key,
const T &  value 
)
inline

◆ size()

size_t Dictionary::size ( ) const

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