Class to store parameters as a hierarchical key/value tree. More...
Public Member Functions | |
| PropertyTree (const PropertyTree &rhs) | |
| PropertyTree & | operator= (const PropertyTree &rhs) |
| Int32 | get (const char *param_type, Int32 default_value) const |
| Int64 | get (const char *param_type, Int64 default_value) const |
| size_t | get (const char *param_type, size_t default_value) const |
| double | get (const char *param_type, double default_value) const |
| double * | get (const char *param_type, double *default_value) const |
| void * | get (const char *param_type, void *default_value) const |
| std::string | get (const char *param_type, const std::string &default_value) const |
| template<typename DataType> requires (std::is_enum_v<DataType>) | |
| DataType | get (const char *param_type, const DataType &default_value) const |
| void | put (const std::string &path, Int32 value) |
| void | put (const std::string &path, Int64 value) |
| void | put (const std::string &path, size_t value) |
| void | put (const std::string &path, double value) |
| void | put (const std::string &path, const std::string &value) |
| void | put (const std::string &path, double *value) |
| void | put (const std::string &path, void *value) |
| template<typename DataType> requires (std::is_enum_v<DataType>) | |
| void | put (const std::string &path, const DataType &value) |
| void | putKeyValue (const std::string ¶m) |
| PropertyTree | get_child_empty (const std::string &path) const |
| bool | erase (const char *name) |
| size_t | count (const char *name) const |
| void | _addChild (const std::string &path, const char *name, const PropertyTree &obj) |
| void | read_json (const std::string &filename) |
| void | check_params (const std::set< std::string > &names) const |
| void | check_params (const std::set< std::string > &names, const std::set< std::string > &opt_names) const |
Protected Member Functions | |
| PropertyTree (detail::PropertyTreeImpl *p, bool is_own) | |
Private Attributes | |
| detail::PropertyTreeImpl * | m_property_tree = nullptr |
| bool | m_is_own = false |
Friends | |
| ARCCORE_ALINA_EXPORT friend std::ostream & | operator<< (std::ostream &o, const PropertyTree &obj) |
Class to store parameters as a hierarchical key/value tree.
It wraps the internal implementation 'detail::PropertyTreeImpl'
Definition at line 112 of file AlinaUtils.h.
| Arcane::Alina::PropertyTree::PropertyTree | ( | ) |
Definition at line 453 of file AlinaUtils.cc.
| Arcane::Alina::PropertyTree::PropertyTree | ( | const PropertyTree & | rhs | ) |
Definition at line 463 of file AlinaUtils.cc.
| Arcane::Alina::PropertyTree::~PropertyTree | ( | ) |
Definition at line 495 of file AlinaUtils.cc.
| void Arcane::Alina::PropertyTree::_addChild | ( | const std::string & | path, |
| const char * | name, | ||
| const PropertyTree & | obj ) |
Definition at line 625 of file AlinaUtils.cc.
| void Arcane::Alina::PropertyTree::check_params | ( | const std::set< std::string > & | names | ) | const |
Definition at line 635 of file AlinaUtils.cc.
| void Arcane::Alina::PropertyTree::check_params | ( | const std::set< std::string > & | names, |
| const std::set< std::string > & | opt_names ) const |
Definition at line 658 of file AlinaUtils.cc.
| size_t Arcane::Alina::PropertyTree::count | ( | const char * | name | ) | const |
Definition at line 527 of file AlinaUtils.cc.
| bool Arcane::Alina::PropertyTree::erase | ( | const char * | name | ) |
Definition at line 518 of file AlinaUtils.cc.
|
inline |
Definition at line 144 of file AlinaUtils.h.
| std::string Arcane::Alina::PropertyTree::get | ( | const char * | param_type, |
| const std::string & | default_value ) const |
Definition at line 589 of file AlinaUtils.cc.
| double * Arcane::Alina::PropertyTree::get | ( | const char * | param_type, |
| double * | default_value ) const |
Definition at line 575 of file AlinaUtils.cc.
| double Arcane::Alina::PropertyTree::get | ( | const char * | param_type, |
| double | default_value ) const |
Definition at line 568 of file AlinaUtils.cc.
Definition at line 554 of file AlinaUtils.cc.
Definition at line 561 of file AlinaUtils.cc.
|
inline |
Definition at line 134 of file AlinaUtils.h.
| void * Arcane::Alina::PropertyTree::get | ( | const char * | param_type, |
| void * | default_value ) const |
Definition at line 582 of file AlinaUtils.cc.
| PropertyTree Arcane::Alina::PropertyTree::get_child_empty | ( | const std::string & | path | ) | const |
Definition at line 505 of file AlinaUtils.cc.
| PropertyTree & Arcane::Alina::PropertyTree::operator= | ( | const PropertyTree & | rhs | ) |
Definition at line 479 of file AlinaUtils.cc.
|
inline |
Definition at line 171 of file AlinaUtils.h.
| void Arcane::Alina::PropertyTree::put | ( | const std::string & | path, |
| const std::string & | value ) |
Definition at line 609 of file AlinaUtils.cc.
| void Arcane::Alina::PropertyTree::put | ( | const std::string & | path, |
| double * | value ) |
Definition at line 613 of file AlinaUtils.cc.
| void Arcane::Alina::PropertyTree::put | ( | const std::string & | path, |
| double | value ) |
Definition at line 605 of file AlinaUtils.cc.
| void Arcane::Alina::PropertyTree::put | ( | const std::string & | path, |
| Int32 | value ) |
Definition at line 597 of file AlinaUtils.cc.
| void Arcane::Alina::PropertyTree::put | ( | const std::string & | path, |
| Int64 | value ) |
Definition at line 601 of file AlinaUtils.cc.
|
inline |
Definition at line 160 of file AlinaUtils.h.
| void Arcane::Alina::PropertyTree::put | ( | const std::string & | path, |
| void * | value ) |
Definition at line 617 of file AlinaUtils.cc.
| void Arcane::Alina::PropertyTree::putKeyValue | ( | const std::string & | param | ) |
Definition at line 688 of file AlinaUtils.cc.
| void Arcane::Alina::PropertyTree::read_json | ( | const std::string & | filename | ) |
Definition at line 536 of file AlinaUtils.cc.
|
friend |
Definition at line 712 of file AlinaUtils.cc.
|
private |
Definition at line 203 of file AlinaUtils.h.
|
private |
Definition at line 202 of file AlinaUtils.h.