|
ALPSCore reference
|
#include <dict_value.hpp>

Public Types | |
| typedef boost::make_variant_over< detail::dict_all_types >::type | value_type |
| typedef detail::None | None |
| "Empty value" type More... | |
Public Member Functions | |
| dict_value () | |
| Constructs the empty nameless value. More... | |
| dict_value (const std::string &name) | |
| Constructs the empty value. More... | |
| bool | empty () const |
| whether the value contains None More... | |
| template<typename X > | |
| bool | isType () const |
| check the type of the containing value More... | |
| template<typename T > | |
| const T & | operator= (const T &rhs) |
| Assignment operator (with conversion) More... | |
| const char * | operator= (const char *rhs) |
Assignment operator (with conversion from const char*) More... | |
| template<typename T > | |
| T | as () const |
| Shortcut for explicit conversion to a target type. More... | |
| template<typename T , typename std::enable_if< detail::is_allowed< T >::value, int >::type = 0> | |
| operator T () const | |
| Conversion to a target type, explicit or implicit. More... | |
| void | clear () |
| Reset to an empty value. More... | |
| template<typename T > | |
| int | compare (const T &rhs) const |
| Comparison. More... | |
| int | compare (const dict_value &rhs) const |
| bool | equals (const dict_value &rhs) const |
| Returns true if the objects hold the same type and value, false otherwise. More... | |
| void | save (alps::hdf5::archive &ar) const |
| Saves the value to an archive. More... | |
| void | load (alps::hdf5::archive &ar) |
| Loads the value from an archive. More... | |
| template<typename F > | |
| F::result_type | apply_visitor (F &visitor) const |
| Const-access visitor to the bound value. More... | |
| template<typename F > | |
| F::result_type | apply_visitor (const F &visitor) const |
| Const-access visitor to the bound value. More... | |
Friends | |
| std::ostream & | print (std::ostream &, const dict_value &, bool terse) |
| Print the value, possibly together with type, in a human-readable format. More... | |
Definition at line 62 of file dict_value.hpp.
| typedef detail::None alps::params_ns::dict_value::None |
"Empty value" type
Definition at line 66 of file dict_value.hpp.
| typedef boost::make_variant_over<detail::dict_all_types>::type alps::params_ns::dict_value::value_type |
Definition at line 65 of file dict_value.hpp.
|
inline |
Constructs the empty nameless value.
Definition at line 76 of file dict_value.hpp.
|
inlineexplicit |
Constructs the empty value.
Definition at line 79 of file dict_value.hpp.
| F::result_type alps::params_ns::dict_value::apply_visitor | ( | F & | visitor | ) | const |
Const-access visitor to the bound value.
| visitor | functor should be callable as R result=visitor(bound_value_const_ref) |
The functor type F must define typename F::result_type.
Definition at line 368 of file dict_value_impl.hpp.
| F::result_type alps::params_ns::dict_value::apply_visitor | ( | const F & | visitor | ) | const |
Const-access visitor to the bound value.
| visitor | functor should be callable as R result=visitor(bound_value_const_ref) |
The functor type F must define typename F::result_type.
Definition at line 373 of file dict_value_impl.hpp.
|
inline |
Shortcut for explicit conversion to a target type.
Definition at line 398 of file dict_value_impl.hpp.
|
inline |
Reset to an empty value.
Definition at line 416 of file dict_value_impl.hpp.
|
inline |
Comparison.
a.compare(b) returns 0 if a==b, !=0 if a!=b. if well-ordered, returns -1 if a<b, +1 if a>b.
Definition at line 419 of file dict_value_impl.hpp.
| int alps::params_ns::dict_value::compare | ( | const dict_value & | rhs | ) | const |
Definition at line 98 of file dict_value.cpp.
|
inline |
whether the value contains None
Definition at line 377 of file dict_value_impl.hpp.
| bool alps::params_ns::dict_value::equals | ( | const dict_value & | rhs | ) | const |
Returns true if the objects hold the same type and value, false otherwise.
Definition at line 110 of file dict_value.cpp.
|
inline |
check the type of the containing value
Definition at line 382 of file dict_value_impl.hpp.
| void alps::params_ns::dict_value::load | ( | alps::hdf5::archive & | ar | ) |
Loads the value from an archive.
Definition at line 120 of file dict_value.cpp.
|
inline |
Conversion to a target type, explicit or implicit.
Definition at line 105 of file dict_value.hpp.
|
inline |
Assignment operator (with conversion)
Definition at line 387 of file dict_value_impl.hpp.
|
inline |
Assignment operator (with conversion from const char*)
Definition at line 392 of file dict_value_impl.hpp.
| void alps::params_ns::dict_value::save | ( | alps::hdf5::archive & | ar | ) | const |
Saves the value to an archive.
Definition at line 115 of file dict_value.cpp.
|
friend |
Print the value, possibly together with type, in a human-readable format.
Definition at line 186 of file dict_value.cpp.
1.8.11