Citlali
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
YamlConfig Struct Reference

The YamlConfig struct This is a thin wrapper around YAML::Node. More...

Collaboration diagram for YamlConfig:
Collaboration graph

Public Types

using key_t = std::string
 
using value_t = YAML::Node
 
using storage_t = YAML::Node
 

Public Member Functions

 YamlConfig ()=default
 
 YamlConfig (storage_t node)
 
std::string dump_to_str () const
 
template<typename T >
auto get_typed (const key_t &key) const
 
template<typename T >
auto get_typed (const key_t &key, T &&defval) const
 
auto get_str (const key_t &key) const
 
auto get_str (const key_t &key, const std::string &defval) const
 
decltype(auto) operator[] (const key_t &key) const
 
bool has (const key_t &key) const
 
template<typename T >
bool has_typed (const key_t &key) const
 

Static Public Member Functions

static auto load_from_str (std::string s)
 

Private Attributes

storage_t m_node
 

Friends

std::ostream & operator<< (std::ostream &os, const YamlConfig &config)
 

Detailed Description

The YamlConfig struct This is a thin wrapper around YAML::Node.

Member Typedef Documentation

◆ key_t

using YamlConfig::key_t = std::string

◆ storage_t

using YamlConfig::storage_t = YAML::Node

◆ value_t

using YamlConfig::value_t = YAML::Node

Constructor & Destructor Documentation

◆ YamlConfig() [1/2]

YamlConfig::YamlConfig ( )
default
Here is the caller graph for this function:

◆ YamlConfig() [2/2]

YamlConfig::YamlConfig ( storage_t  node)
inlineexplicit

Member Function Documentation

◆ dump_to_str()

std::string YamlConfig::dump_to_str ( ) const
inline
Here is the caller graph for this function:

◆ get_str() [1/2]

auto YamlConfig::get_str ( const key_t key) const
inline

◆ get_str() [2/2]

auto YamlConfig::get_str ( const key_t key,
const std::string &  defval 
) const
inline

◆ get_typed() [1/2]

template<typename T >
auto YamlConfig::get_typed ( const key_t key) const
inline

◆ get_typed() [2/2]

template<typename T >
auto YamlConfig::get_typed ( const key_t key,
T &&  defval 
) const
inline

◆ has()

bool YamlConfig::has ( const key_t key) const
inline
Here is the caller graph for this function:

◆ has_typed()

template<typename T >
bool YamlConfig::has_typed ( const key_t key) const
inline
Here is the call graph for this function:

◆ load_from_str()

static auto YamlConfig::load_from_str ( std::string  s)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator[]()

decltype(auto) YamlConfig::operator[] ( const key_t key) const
inline

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const YamlConfig config 
)
friend

Member Data Documentation

◆ m_node

storage_t YamlConfig::m_node
private

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