![]() |
Vcsn
2.8
Be Rational
|
The class returned by [] operators. More...
#include <configuration.hh>
Classes | |
class | BadNode |
Public Types | |
using | iterator = Node::iterator |
Public Member Functions | |
value (Node n) | |
value (const config &) | |
value (const value &other) | |
value & | operator= (value rhs) |
Assign a new value to this key. More... | |
template<typename T > | |
T | as () const |
std::string | str () const |
Get the node value as a string. More... | |
value | operator[] (const std::string &key) const |
std::vector< std::string > | keys () const |
bool | is_valid (const std::string &key) const |
Check that this node refers to a key that exists in the tree. More... | |
void | remove (const std::string &key) |
Remove a key. More... | |
iterator | begin () |
iterator | end () |
void | merge (const value &from) |
Merge a value into another one - and modify the first. More... | |
std::ostream & | print (std::ostream &out) const |
Private Member Functions | |
std::unique_ptr< std::vector< std::string > > | gen_keys () const |
Private Attributes | |
std::unique_ptr< const std::vector< std::string > > | keys_ |
Node | node_ |
Friends | |
void | swap (value &first, value &second) |
The class returned by [] operators.
Definition at line 28 of file configuration.hh.
using vcsn::detail::config::value::iterator = Node::iterator |
Definition at line 60 of file configuration.hh.
vcsn::detail::config::value::value | ( | Node | n | ) |
Definition at line 47 of file configuration.cc.
Referenced by operator[](), and vcsn::detail::config::operator[]().
vcsn::detail::config::value::value | ( | const config & | c | ) |
Definition at line 55 of file configuration.cc.
References vcsn::detail::config::config_tree_.
vcsn::detail::config::value::value | ( | const value & | other | ) |
Definition at line 51 of file configuration.cc.
References node_.
|
inline |
Definition at line 42 of file configuration.hh.
References is_valid(), keys(), node_, operator[](), and str().
auto vcsn::detail::config::value::begin | ( | ) |
Definition at line 104 of file configuration.cc.
References node_, and vcsn::require().
auto vcsn::detail::config::value::end | ( | ) |
Definition at line 110 of file configuration.cc.
References node_.
|
private |
Definition at line 128 of file configuration.cc.
References node_, vcsn::require(), vcsn::res, and vcsn::sort().
Referenced by keys().
bool vcsn::detail::config::value::is_valid | ( | const std::string & | key | ) | const |
Check that this node refers to a key that exists in the tree.
Definition at line 90 of file configuration.cc.
References node_.
Referenced by as().
std::vector< std::string > vcsn::detail::config::value::keys | ( | ) | const |
Definition at line 82 of file configuration.cc.
References gen_keys(), and keys_.
Referenced by as(), vcsn::detail::dot_impl< Aut >::print_prologue_(), and vcsn::detail::dot_impl< Aut >::print_states_().
Merge a value into another one - and modify the first.
Definition at line 115 of file configuration.cc.
References node_.
config::value & vcsn::detail::config::value::operator= | ( | value | rhs | ) |
config::value vcsn::detail::config::value::operator[] | ( | const std::string & | key | ) | const |
Definition at line 72 of file configuration.cc.
References node_, vcsn::require(), and value().
Referenced by as().
std::ostream & vcsn::detail::config::value::print | ( | std::ostream & | out | ) | const |
Definition at line 122 of file configuration.cc.
References node_.
Referenced by vcsn::detail::operator<<().
void vcsn::detail::config::value::remove | ( | const std::string & | key | ) |
std::string vcsn::detail::config::value::str | ( | ) | const |
|
friend |
Definition at line 141 of file configuration.cc.
Referenced by operator=(), and vcsn::detail::swap().
|
mutableprivate |
Definition at line 73 of file configuration.hh.
Referenced by keys(), and vcsn::detail::swap().
|
private |
Definition at line 74 of file configuration.hh.
Referenced by as(), begin(), end(), gen_keys(), is_valid(), merge(), operator[](), print(), remove(), vcsn::detail::swap(), and value().