MAIA bb96820c
Multiphysics at AIA
|
#include <cpptoml.h>
Public Types | |
using | iterator = string_to_base_map::iterator |
using | const_iterator = string_to_base_map::const_iterator |
Public Member Functions | |
std::shared_ptr< base > | clone () const override |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
MBool | is_table () const override |
MBool | empty () const |
MBool | contains (const std::string &key) const |
MBool | contains_qualified (const std::string &key) const |
std::shared_ptr< base > | get (const std::string &key) const |
std::shared_ptr< base > | get_qualified (const std::string &key) const |
std::shared_ptr< table > | get_table (const std::string &key) const |
std::shared_ptr< table > | get_table_qualified (const std::string &key) const |
std::shared_ptr< array > | get_array (const std::string &key) const |
std::shared_ptr< array > | get_array_qualified (const std::string &key) const |
std::shared_ptr< table_array > | get_table_array (const std::string &key) const |
std::shared_ptr< table_array > | get_table_array_qualified (const std::string &key) const |
template<class T > | |
option< T > | get_as (const std::string &key) const |
template<class T > | |
option< T > | get_qualified_as (const std::string &key) const |
template<class T > | |
array_of_trait< T >::return_type | get_array_of (const std::string &key) const |
template<class T > | |
array_of_trait< T >::return_type | get_qualified_array_of (const std::string &key) const |
void | insert (const std::string &key, const std::shared_ptr< base > &value) |
template<class T > | |
void | insert (const std::string &key, T &&val, typename value_traits< T >::type *=0) |
void | erase (const std::string &key) |
table (const table &obj)=delete | |
table & | operator= (const table &rhs)=delete |
template<> | |
array_of_trait< array >::return_type | get_array_of (const std::string &key) const |
template<> | |
array_of_trait< array >::return_type | get_qualified_array_of (const std::string &key) const |
Public Member Functions inherited from cpptoml::base | |
virtual | ~base ()=default |
virtual std::shared_ptr< base > | clone () const =0 |
virtual MBool | is_value () const |
virtual MBool | is_table () const |
std::shared_ptr< table > | as_table () |
virtual MBool | is_array () const |
std::shared_ptr< array > | as_array () |
virtual MBool | is_table_array () const |
std::shared_ptr< table_array > | as_table_array () |
template<class T > | |
std::shared_ptr< value< T > > | as () |
template<class T > | |
std::shared_ptr< const value< T > > | as () const |
template<class Visitor , class... Args> | |
void | accept (Visitor &&visitor, Args &&... args) const |
base_type | type () const |
template<> | |
std::shared_ptr< value< double > > | as () |
template<> | |
std::shared_ptr< const value< double > > | as () const |
Private Member Functions | |
table () | |
table () | |
std::vector< std::string > | split (const std::string &value, char separator) const |
MBool | resolve_qualified (const std::string &key, std::shared_ptr< base > *p=nullptr) const |
Private Attributes | |
string_to_base_map | map_ |
Friends | |
class | table_array |
std::shared_ptr< table > | make_table () |
Additional Inherited Members | |
Protected Member Functions inherited from cpptoml::base | |
base (const base_type t) | |
base () | |
using cpptoml::table::const_iterator = string_to_base_map::const_iterator |
using cpptoml::table::iterator = string_to_base_map::iterator |
|
inlineprivate |
|
inlineprivate |
|
delete |
|
inline |
|
inlineoverridevirtual |
Implements cpptoml::base.
Definition at line 1453 of file cpptoml.h.
|
inline |
|
inline |
Determines if this key table contains the given key. Will resolve "qualified keys". Qualified keys are the full access path separated with dots like "grandparent.parent.child".
Definition at line 1102 of file cpptoml.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Obtains an array for a given key.
|
inline |
Helper function that attempts to get an array of values of a given type corresponding to the template parameter for a given key.
If the key doesn't exist, doesn't exist as an array type, or one or more keys inside the array type are not of type T, an empty option is returned. Otherwise, an option containing a vector of the values is returned.
Definition at line 1227 of file cpptoml.h.
|
inline |
Helper function that attempts to get an array of arrays for a given key.
If the key doesn't exist, doesn't exist as an array type, or one or more keys inside the array type are not of type T, an empty option is returned. Otherwise, an option containing a vector of the values is returned.
Definition at line 1364 of file cpptoml.h.
|
inline |
Obtains an array for a given key. Will resolve "qualified keys".
Definition at line 1152 of file cpptoml.h.
|
inline |
Helper function that attempts to get a value corresponding to the template parameter from a given key.
|
inline |
Obtains the base for a given key. Will resolve "qualified keys". Qualified keys are the full access path separated with dots like "grandparent.parent.child".
std::out_of_range | if the key does not exist |
Definition at line 1117 of file cpptoml.h.
|
inline |
Helper function that attempts to get an array of values of a given type corresponding to the template parameter for a given key. Will resolve "qualified keys".
If the key doesn't exist, doesn't exist as an array type, or one or more keys inside the array type are not of type T, an empty option is returned. Otherwise, an option containing a vector of the values is returned.
Definition at line 1255 of file cpptoml.h.
|
inline |
Helper function that attempts to get an array of arrays for a given key. Will resolve "qualified keys".
If the key doesn't exist, doesn't exist as an array type, or one or more keys inside the array type are not of type T, an empty option is returned. Otherwise, an option containing a vector of the values is returned.
Definition at line 1392 of file cpptoml.h.
|
inline |
Helper function that attempts to get a value corresponding to the template parameter from a given key. Will resolve "qualified keys".
Definition at line 1201 of file cpptoml.h.
|
inline |
|
inline |
Obtains a table_array for a given key, if possible.
|
inline |
Obtains a table_array for a given key, if possible. Will resolve "qualified keys".
Definition at line 1169 of file cpptoml.h.
|
inline |
|
inline |
|
inline |
Convenience shorthand for adding a simple element to the keytable.
Definition at line 1282 of file cpptoml.h.
|
inlineoverridevirtual |
Determines if the given TOML element is a table.
Reimplemented from cpptoml::base.
Definition at line 1088 of file cpptoml.h.
|
inlineprivate |
Definition at line 1326 of file cpptoml.h.
|
inlineprivate |
Definition at line 1309 of file cpptoml.h.
|
friend |
|
friend |
|
private |