Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::Alina::PropertyTree Class Reference
Collaboration diagram for Arcane::Alina::PropertyTree:

Public Member Functions

 PropertyTree (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 &param)
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

Private Attributes

void * m_property_tree = nullptr
bool m_is_own = false

Friends

ARCCORE_ALINA_EXPORT friend std::ostream & operator<< (std::ostream &o, const PropertyTree &obj)

Detailed Description

Definition at line 106 of file AlinaUtils.h.

Constructor & Destructor Documentation

◆ PropertyTree() [1/2]

Arcane::Alina::PropertyTree::PropertyTree ( )

Definition at line 76 of file AlinaUtils.cc.

◆ PropertyTree() [2/2]

Arcane::Alina::PropertyTree::PropertyTree ( const PropertyTree & rhs)

Definition at line 86 of file AlinaUtils.cc.

◆ ~PropertyTree()

Arcane::Alina::PropertyTree::~PropertyTree ( )

Definition at line 111 of file AlinaUtils.cc.

Member Function Documentation

◆ _addChild()

void Arcane::Alina::PropertyTree::_addChild ( const std::string & path,
const char * name,
const PropertyTree & obj )

Definition at line 212 of file AlinaUtils.cc.

◆ check_params() [1/2]

void Arcane::Alina::PropertyTree::check_params ( const std::set< std::string > & names) const

Definition at line 223 of file AlinaUtils.cc.

◆ check_params() [2/2]

void Arcane::Alina::PropertyTree::check_params ( const std::set< std::string > & names,
const std::set< std::string > & opt_names ) const

Definition at line 246 of file AlinaUtils.cc.

◆ count()

size_t Arcane::Alina::PropertyTree::count ( const char * name) const

Definition at line 143 of file AlinaUtils.cc.

◆ erase()

bool Arcane::Alina::PropertyTree::erase ( const char * name)

Definition at line 134 of file AlinaUtils.cc.

◆ get() [1/8]

template<typename DataType>
requires (std::is_enum_v<DataType>)
DataType Arcane::Alina::PropertyTree::get ( const char * param_type,
const DataType & default_value ) const
inline

Definition at line 135 of file AlinaUtils.h.

◆ get() [2/8]

std::string Arcane::Alina::PropertyTree::get ( const char * param_type,
const std::string & default_value ) const

Definition at line 179 of file AlinaUtils.cc.

◆ get() [3/8]

double * Arcane::Alina::PropertyTree::get ( const char * param_type,
double * default_value ) const

Definition at line 171 of file AlinaUtils.cc.

◆ get() [4/8]

double Arcane::Alina::PropertyTree::get ( const char * param_type,
double default_value ) const

Definition at line 167 of file AlinaUtils.cc.

◆ get() [5/8]

Int32 Arcane::Alina::PropertyTree::get ( const char * param_type,
Int32 default_value ) const

Definition at line 159 of file AlinaUtils.cc.

◆ get() [6/8]

Int64 Arcane::Alina::PropertyTree::get ( const char * param_type,
Int64 default_value ) const

Definition at line 163 of file AlinaUtils.cc.

◆ get() [7/8]

size_t Arcane::Alina::PropertyTree::get ( const char * param_type,
size_t default_value ) const
inline

Definition at line 125 of file AlinaUtils.h.

◆ get() [8/8]

void * Arcane::Alina::PropertyTree::get ( const char * param_type,
void * default_value ) const

Definition at line 175 of file AlinaUtils.cc.

◆ get_child_empty()

PropertyTree Arcane::Alina::PropertyTree::get_child_empty ( const std::string & path) const

Definition at line 121 of file AlinaUtils.cc.

◆ put() [1/8]

template<typename DataType>
requires (std::is_enum_v<DataType>)
void Arcane::Alina::PropertyTree::put ( const std::string & path,
const DataType & value )
inline

Definition at line 162 of file AlinaUtils.h.

◆ put() [2/8]

void Arcane::Alina::PropertyTree::put ( const std::string & path,
const std::string & value )

Definition at line 196 of file AlinaUtils.cc.

◆ put() [3/8]

void Arcane::Alina::PropertyTree::put ( const std::string & path,
double * value )

Definition at line 200 of file AlinaUtils.cc.

◆ put() [4/8]

void Arcane::Alina::PropertyTree::put ( const std::string & path,
double value )

Definition at line 192 of file AlinaUtils.cc.

◆ put() [5/8]

void Arcane::Alina::PropertyTree::put ( const std::string & path,
Int32 value )

Definition at line 184 of file AlinaUtils.cc.

◆ put() [6/8]

void Arcane::Alina::PropertyTree::put ( const std::string & path,
Int64 value )

Definition at line 188 of file AlinaUtils.cc.

◆ put() [7/8]

void Arcane::Alina::PropertyTree::put ( const std::string & path,
size_t value )
inline

Definition at line 151 of file AlinaUtils.h.

◆ put() [8/8]

void Arcane::Alina::PropertyTree::put ( const std::string & path,
void * value )

Definition at line 204 of file AlinaUtils.cc.

◆ putKeyValue()

void Arcane::Alina::PropertyTree::putKeyValue ( const std::string & param)

Definition at line 276 of file AlinaUtils.cc.

◆ read_json()

void Arcane::Alina::PropertyTree::read_json ( const std::string & filename)

Definition at line 152 of file AlinaUtils.cc.

◆ operator<<

ARCCORE_ALINA_EXPORT friend std::ostream & operator<< ( std::ostream & o,
const PropertyTree & obj )
friend

Definition at line 301 of file AlinaUtils.cc.

Member Data Documentation

◆ m_is_own

bool Arcane::Alina::PropertyTree::m_is_own = false
private

Definition at line 194 of file AlinaUtils.h.

◆ m_property_tree

void* Arcane::Alina::PropertyTree::m_property_tree = nullptr
private

Definition at line 193 of file AlinaUtils.h.


The documentation for this class was generated from the following files: