![]() |
Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
A dictionary of arbitrary properties. More...
#include <bayeux/datatools/properties.h>
Classes | |
| struct | basic_key_validator |
| Pure abstract class for key validator. More... | |
| class | config |
| Class for ASCII file I/O operations with properties objects. More... | |
| class | data |
| Internal data stored within the dictionary of the properties class. More... | |
| class | default_key_validator |
| Default abstract class for key validator. More... | |
Public Types | |
| typedef std::vector< std::string > | keys_col_type |
Public Types inherited from datatools::i_tree_dumpable | |
| enum | ostream_type { OSTREAM_COUT = 1, OSTREAM_CERR = 2, OSTREAM_CLOG = 3 } |
| Enumeration for standard output streams. More... | |
Public Member Functions | |
| properties () | |
| Default constructor with embedded default key validator. More... | |
| properties (const std::string &desc_) | |
| Constructor with explicit description and embedded default key validator. More... | |
| properties (const std::string &desc_, const basic_key_validator &) | |
| Constructor with explicit description and explicit key validator. More... | |
| properties (const basic_key_validator &) | |
| Constructor with explicit key validator. More... | |
| properties (const std::string &desc_, const basic_key_validator *, bool deletion_on_destroy_=true) | |
| Constructor with explicit description and explicit external key validator. More... | |
| properties (const basic_key_validator *, bool deletion_on_destroy_=true) | |
| Constructor with explicit external key validator. More... | |
| virtual | ~properties () |
| Destructor. More... | |
| int32_t | size () const |
| Returns the number of stored properties. More... | |
| bool | empty () const |
| Check if the properties container is empty. More... | |
| void | set_description (const std::string &) |
| const std::string & | get_description () const |
| Returns the description string of the properties container. More... | |
| bool | fetch_short_description (std::string &) const |
| Fetch the short description string associated to the container. More... | |
| bool | has_short_description () const |
| Check if a short description string is associated to the container. More... | |
| std::string | get_short_description () const |
| Get the short description string associated to the container. More... | |
| bool | has_auxiliary_descriptions () const |
| Check if some auxiliary descriptions are set. More... | |
| bool | fetch_auxiliary_descriptions (std::vector< std::string > &) const |
| Fetch the auxiliary description strings associated to the container. More... | |
| void | unset_key_validator () |
| Unset the current key validator. More... | |
| void | set_default_key_validator () |
| Use the default key validator. More... | |
| void | set_key_validator (const basic_key_validator &) |
| Set the current key validator. More... | |
| void | set_key_validator (const basic_key_validator *, bool deletion_on_destroy_=true) |
| Set the current key validator with ownership. More... | |
| std::vector< std::string > | keys () const |
| Returns the list of keys stored in the map (read-only). More... | |
| const std::string & | key (int) const |
| Returns the ith key. More... | |
| void | keys (std::vector< std::string > &) const |
| Set the list of keys. More... | |
| const data & | get (const std::string &prop_key_) const |
| Access to a non-mutable reference to a property data object. More... | |
| void | store (const std::string &key_, const data &value_) |
| Store data item with supplied key. More... | |
| void | keys_not_starting_with (std::vector< std::string > &, const std::string &prefix_) const |
| builds the list of keys (by reference) stored in the map that start with prefix. More... | |
| std::vector< std::string > | keys_not_starting_with (const std::string &prefix_) const |
| returns the list of keys stored in the map that start with prefix. More... | |
| void | keys_starting_with (std::vector< std::string > &, const std::string &prefix_) const |
| builds the list of keys (by reference) stored in the map that start with prefix. More... | |
| std::vector< std::string > | keys_starting_with (const std::string &prefix_) const |
| returns the list of keys stored in the map that start with prefix. More... | |
| void | keys_not_ending_with (std::vector< std::string > &, const std::string &suffix_) const |
| builds the list of keys (by reference) stored in the map that end with suffix. More... | |
| std::vector< std::string > | keys_not_ending_with (const std::string &suffix_) const |
| returns the list of keys stored in the map that end with suffix. More... | |
| void | keys_ending_with (std::vector< std::string > &, const std::string &suffix_) const |
| builds the list of keys (by reference) stored in the map that end with suffix. More... | |
| std::vector< std::string > | keys_ending_with (const std::string &suffix_) const |
| returns the list of keys stored in the map that end with suffix. More... | |
| void | lock (const std::string &prop_key_) |
| Lock the properties dictionary. More... | |
| void | unlock (const std::string &prop_key_) |
| Unlock the properties dictionary. More... | |
| bool | is_locked (const std::string &prop_key_) const |
| Check if the instance is locked. More... | |
| bool | is_private (const std::string &prop_key_) const |
| Check if data with name 'prop_key_' is private. More... | |
| bool | is_public (const std::string &prop_key_) const |
| Check if data with name 'prop_key_' is public. More... | |
| bool | is_boolean (const std::string &prop_key_) const |
| Check if data with name 'prop_key_' is boolean. More... | |
| bool | is_integer (const std::string &prop_key_) const |
| Check if data with name 'prop_key_' is integer. More... | |
| bool | is_real (const std::string &prop_key_) const |
| Check if data with name 'prop_key_' is real. More... | |
| bool | is_string (const std::string &prop_key_) const |
| Check if data with name 'prop_key_' is string. More... | |
| bool | is_scalar (const std::string &prop_key_) const |
| Check if data with name 'prop_key_' is scalar. More... | |
| bool | is_vector (const std::string &prop_key_) const |
| Check if data with name 'prop_key_' is vector. More... | |
| int32_t | size (const std::string &prop_key_) const |
| int32_t | key_size (const std::string &prop_key_) const |
| Returns the size of the data stored with a given key/name. More... | |
| bool | has_key (const std::string &prop_key_) const |
| Check if a property with given key/name exists. More... | |
| void | key_lock (const std::string &prop_key_) |
| Lock a property with given key/name. More... | |
| void | key_unlock (const std::string &prop_key_) |
| Unlock a property with given key/name. More... | |
| const std::string & | get_key_description (const std::string &prop_key_) const |
| Get the description string associated to a property with given key/name. More... | |
| void | set_key_description (const std::string &prop_key_, const std::string &desc_) |
| Set the description string associated to a property with given key/name. More... | |
| void | erase (const std::string &key_) |
| Rename a property with a new name. More... | |
| void | erase_all () |
| Erase all properties. More... | |
| void | erase_all_starting_with (const std::string &prefix_) |
| Erase all properties with key/name starting with prefix. More... | |
| void | erase_all_not_starting_with (const std::string &prefix_) |
| Erase all properties with key/name not starting with prefix. More... | |
| void | export_all (properties &props_) const |
| Export all properties into another properties container. More... | |
| void | export_all_adding_prefix (properties &props_, const std::string &prefix_) const |
| Export all properties into another properties container adding a prefix. More... | |
| void | export_starting_with (properties &props_, const std::string &prop_key_prefix_) const |
| Export all properties with key/name starting with a given prefix to another properties container. More... | |
| void | export_and_rename_starting_with (properties &props_, const std::string &prop_key_prefix_, const std::string &new_prefix_) const |
| Export all properties with key/name starting with a given prefix to another properties container but renaming the prefix on the fly. More... | |
| void | export_not_starting_with (properties &props_, const std::string &prop_key_prefix_) const |
| Export all properties with key/name not starting with a given suffix to another properties container. More... | |
| template<class key_predicate > | |
| void | export_if (properties &props_, const key_predicate &predicate_) const |
| Export all properties with key/name fulfilling a given predicate. More... | |
| template<class key_predicate > | |
| void | export_not_if (properties &props_, const key_predicate &predicate_) const |
| Export all properties with key/name not fulfilling a given predicate. More... | |
| void | erase_all_ending_with (const std::string &suffix_) |
| Erase all properties with key/name ending with a given suffix. More... | |
| void | erase_all_not_ending_with (const std::string &suffix_) |
| Erase all properties with key/name not ending with a given suffix. More... | |
| void | export_ending_with (properties &props_, const std::string &suffix_) const |
| Export all properties with key/name ending with a given suffix to another properties container. More... | |
| void | export_not_ending_with (properties &props, const std::string &suffix_) const |
| Export all properties with key/name not ending with a given suffix to another properties container. More... | |
| void | clean (const std::string &prop_key_) |
| Remove a property with a given key/name. More... | |
| virtual void | clear () |
| Reset method (from the datatools::i_clear interface). More... | |
| void | reset () |
| Reset method. More... | |
| void | store_flag (const std::string &prop_key_, const std::string &desc_="", bool lock_=false) |
| Set a boolean 'true' flag with a given key/name, a description string and a lock request. More... | |
| void | set_flag (const std::string &prop_key_) |
| Set a boolean 'true' flag with a given key/name. More... | |
| void | unset_flag (const std::string &prop_key_) |
| Remove a boolean flag with a given key/name. More... | |
| void | store (const std::string &prop_key_, bool value_, const std::string &desc_="", bool lock_=false) |
| Store a boolean property with a given key/name and value. More... | |
| void | store_boolean (const std::string &prop_key_, bool value_, const std::string &desc_="", bool lock_=false) |
| Store a boolean property with a given key/name and value. More... | |
| void | store (const std::string &prop_key_, int value_, const std::string &desc_="", bool lock_=false) |
| Store an integer property with a given key/name and value. More... | |
| void | store_integer (const std::string &prop_key_, int value_, const std::string &desc_="", bool lock_=false) |
| Store an integer property with a given key/name and value. More... | |
| void | store (const std::string &prop_key_, double value_, const std::string &desc_="", bool lock_=false) |
| Store a real property with a given key/name and value. More... | |
| void | store_real (const std::string &prop_key_, double value_, const std::string &desc_="", bool lock_=false) |
| Store a real property with a given key/name and value. More... | |
| void | store_real_with_explicit_unit (const std::string &prop_key_, double value_, const std::string &desc="", bool lock_=false) |
| Store a real property with a given key/name and value with the explicit unit flag. More... | |
| void | store_with_explicit_unit (const std::string &prop_key_, double value_, const std::string &desc="", bool lock_=false) |
| void | set_explicit_unit (const std::string &prop_key_, bool a_explicit_unit=true) |
| Set flag for explicit unit for a real property with a given key/name. More... | |
| bool | has_explicit_unit (const std::string &prop_key_) const |
| Check flag for explicit unit for a real property with a given key/name. More... | |
| void | set_unit_symbol (const std::string &prop_key_, const std::string &unit_symbol="") |
| Set the unit symbol for a real property with a given key/name. More... | |
| bool | has_unit_symbol (const std::string &prop_key_) const |
| Check flag for unit symbol for a real property with a given key/name. More... | |
| const std::string & | get_unit_symbol (const std::string &prop_key_) const |
| Return the unit symbol for a real property with a given key/name. More... | |
| void | set_explicit_path (const std::string &prop_key_, bool a_explicit_path=true) |
| Set flag for explicit path for a string property with a given key/name. More... | |
| bool | is_explicit_path (const std::string &prop_key_) const |
| Check flag for explicit path for a string property with a given key/name. More... | |
| void | store (const std::string &prop_key_, const std::string &value_, const std::string &desc_="", bool lock_=false) |
| Store a string property with a given key/name and value. More... | |
| void | store_string (const std::string &prop_key_, const std::string &value_, const std::string &desc_="", bool lock_=false) |
| Store a string property with a given key/name and value. More... | |
| void | store_path (const std::string &prop_key_, const std::string &path_value_, const std::string &desc_="", bool lock_=false) |
| Store a path property with a given key/name and value. More... | |
| void | store (const std::string &prop_key_, const char *value_, const std::string &desc_="", bool lock_=false) |
| Store a string property with a given key/name and value (C style) More... | |
| void | store (const std::string &prop_key_, const data::vbool &value_, const std::string &desc_="", bool lock_=false) |
| Store a boolean vector property with a given key/name and value. More... | |
| void | store (const std::string &prop_key_, const data::vint &value_, const std::string &desc_="", bool lock_=false) |
| Store a integer vector property with a given key/name and value. More... | |
| void | store (const std::string &prop_key_, const data::vdouble &value_, const std::string &desc_="", bool lock_=false) |
| Store a real vector property with a given key/name and value. More... | |
| void | store (const std::string &prop_key_, const data::vstring &value_, const std::string &desc_="", bool lock_=false) |
| Store a string vector property with a given key/name and value. More... | |
| void | store_paths (const std::string &prop_key_, const data::vstring &path_value_, const std::string &desc_="", bool lock_=false) |
| Store a path string vector property with a given key/name and value. More... | |
| void | change (const std::string &key_, bool value_, int index_=0) |
| Change the value of an existing boolean property with a given key/name and index. More... | |
| void | change_boolean (const std::string &key_, bool value_, int index_=0) |
| Change the value of an existing boolean property with a given key/name and index. More... | |
| void | change_boolean_scalar (const std::string &key_, bool value_) |
| Change the value of an existing scalar boolean property with a given key/name. More... | |
| void | change_boolean_vector (const std::string &key_, bool value_, int index_) |
| Change the value of an existing vector boolean property with a given key/name and index. More... | |
| void | change (const std::string &key_, int value_, int index_=0) |
| Change the value of an existing integer property with a given key/name and index. More... | |
| void | change_integer (const std::string &key_, int value_, int index_=0) |
| Change the value of an existing integer property with a given key/name and index. More... | |
| void | change_integer_scalar (const std::string &key_, int value_) |
| Change the value of an existing integer scalar property with a given key/name. More... | |
| void | change_integer_vector (const std::string &key_, int value_, int index_) |
| Change the value of an existing integer vector property with a given key/name and index. More... | |
| void | change (const std::string &key_, double value_, int index_=0) |
| Change the value of an existing real property with a given key/name and index. More... | |
| void | change_real (const std::string &key_, double value_, int index_=0) |
| Change the value of an existing real property with a given key/name and index. More... | |
| void | change_real_scalar (const std::string &key_, double value_) |
| Change the value of an existing real scalar property with a given key/name. More... | |
| void | change_real_vector (const std::string &key_, double value_, int index_) |
| Change the value of an existing real vector property with a given key/name and index. More... | |
| void | change (const std::string &key_, const std::string &value_, int index_=0) |
| Change the value of an existing string property with a given key/name and index. More... | |
| void | change_string (const std::string &key_, const std::string &value_, int index_=0) |
| Change the value of an existing string property with a given key/name and index. More... | |
| void | change_string_scalar (const std::string &key_, const std::string &value_) |
| Change the value of an existing string scalar property with a given key/name. More... | |
| void | change_string_vector (const std::string &key_, const std::string &value_, int index_) |
| Change the value of an existing string vector property with a given key/name and index. More... | |
| void | change (const std::string &key_, const char *value_, int index_=0) |
| Change the value of an existing string property (C style) with a given key/name and index. More... | |
| void | change (const std::string &key_, const data::vbool &values_) |
| Change the full contents of an existing boolean vector property with a given key/name. More... | |
| void | change (const std::string &key_, const data::vint &values_) |
| Change the full contents of an existing integer vector property with a given key/name. More... | |
| void | change (const std::string &key_, const data::vdouble &values_) |
| Change the full contents of an existing real vector property with a given key/name. More... | |
| void | change (const std::string &key_, const data::vstring &values_) |
| Change the full contents of an existing string vector property with a given key/name. More... | |
| void | update_flag (const std::string &key_) |
| Update a boolean flag to true with a given key/name. More... | |
| void | update (const std::string &key_, bool value_) |
| Update a boolean flag with a given key/name and value. More... | |
| void | update_boolean (const std::string &key_, bool value_) |
| Update a boolean flag with a given key/name and value. More... | |
| void | update (const std::string &key_, int value_) |
| Update an integer flag with a given key/name and value. More... | |
| void | update_integer (const std::string &key_, int value_) |
| Update an integer flag with a given key/name and value. More... | |
| void | update (const std::string &key_, double value_) |
| Update a real flag with a given key/name and value. More... | |
| void | update_real (const std::string &key_, double value_) |
| Update a real flag with a given key/name and value. More... | |
| void | update_real_with_explicit_unit (const std::string &key_, double value_) |
| Update a real flag with a given key/name and value. More... | |
| void | update_with_explicit_unit (const std::string &key_, double value_) |
| Update a real flag with a given key/name and value. More... | |
| void | update (const std::string &key_, const std::string &value_) |
| Update a string flag with a given key/name and value. More... | |
| void | update (const std::string &key_, const char *value_) |
| Update a C-string flag with a given key/name and value. More... | |
| void | update_string (const std::string &key_, const std::string &value) |
| Update a string flag with a given key/name and value. More... | |
| void | update (const std::string &key_, const data::vbool &values_) |
| Update the full contents of a boolean vector with a given key/name. More... | |
| void | update (const std::string &key_, const data::vint &values_) |
| Update the full contents of an integer vector with a given key/name. More... | |
| void | update (const std::string &key_, const data::vdouble &values_) |
| Update the full contents of a real vector with a given key/name. More... | |
| void | update (const std::string &key_, const data::vstring &values_) |
| Update the full contents of a string vector with a given key/name. More... | |
| bool | has_flag (const std::string &key_) const |
| Check if a boolean value with a given key/name exists with value 'true'. More... | |
| void | fetch (const std::string &key_, bool &value_, int index_=0) const |
| Fetch the boolean value stored with a given key/name and index. More... | |
| void | fetch (const std::string &key_, int &value_, int index_=0) const |
| Fetch the integer value stored with a given key/name and index. More... | |
| void | fetch (const std::string &key_, double &value_, int index_=0) const |
| Fetch the real value stored with a given key/name and index. More... | |
| void | fetch (const std::string &key_, std::string &value_, int index=0) const |
| Fetch the string value stored with a given key/name and index. More... | |
| void | fetch (const std::string &key_, data::vbool &values_) const |
| Fetch the boolean vector value stored with a given key/name. More... | |
| void | fetch (const std::string &key_, data::vint &values_) const |
| Fetch the integer vector value stored with a given key/name. More... | |
| void | fetch (const std::string &key_, data::vdouble &values_) const |
| Fetch the real vector value stored with a given key/name. More... | |
| void | fetch_dimensionless (const std::string &key_, data::vdouble &values_) const |
| Fetch the dimensionless real vector value stored with a given key/name. More... | |
| void | fetch (const std::string &key_, data::vstring &values_) const |
| Fetch the string vector value stored with a given key/name. More... | |
| void | fetch (const std::string &key_, std::set< std::string > &values_, bool allow_duplication_=false) const |
| Fetch a set of string values from the vector value stored with a given key/name. More... | |
| void | fetch_unique_ordered (const std::string &key_, std::vector< std::string > &values_) const |
| Fetch a list of unique string values from the vector value stored with a given key/name. More... | |
| void | fetch (const std::string &key_, std::set< int > &values, bool allow_duplication_=false) const |
| Fetch a set of integer values from the vector value stored with a given key/name. More... | |
| void | fetch_positive (const std::string &key_, std::set< unsigned int > &values_, bool allow_duplication_=false) const |
| Fetch a set of unsigned integer values from the vector value stored with a given key/name. More... | |
| bool | fetch_boolean (const std::string &, int index_=0) const |
| Fetch the boolean value stored with a given key/name and index. More... | |
| bool | fetch_boolean_scalar (const std::string &name_) const |
| Fetch the boolean scalar value stored with a given key/name. More... | |
| bool | fetch_boolean_vector (const std::string &name_, int index_) const |
| Fetch the boolean vector value stored with a given key/name and index. More... | |
| int | fetch_integer (const std::string &name_, int index_=0) const |
| Fetch the integer value stored with a given key/name and index. More... | |
| unsigned int | fetch_positive_integer (const std::string &name_, int index_=0) const |
| Fetch the positive integer value stored with a given key/name and index. More... | |
| unsigned int | fetch_strict_positive_integer (const std::string &name_, int index_=0) const |
| Fetch the strict positive integer value stored with a given key/name and index. More... | |
| int | fetch_range_integer (const std::string &name_, int min_, int max_, int index_=0) const |
| Fetch the ranged integer value stored with a given key/name and index. More... | |
| int | fetch_integer_scalar (const std::string &name_) const |
| Fetch the integer scalar value stored with a given key/name. More... | |
| int | fetch_integer_vector (const std::string &name_, int index_) const |
| Fetch the integer vector value stored with a given key/name and index. More... | |
| double | fetch_real (const std::string &name_, int index_=0) const |
| Fetch the real value stored with a given key/name and index. More... | |
| double | fetch_dimensionless_real (const std::string &name_, int index_=0) const |
| Fetch the dimensionless real value stored with a given key/name and index. More... | |
| double | fetch_real_with_explicit_unit (const std::string &name_, int index_=0) const |
| Fetch the physical quantity (with its explicit unit) value stored with a given key/name and index. More... | |
| double | fetch_real_with_explicit_dimension (const std::string &name_, const std::string &dimension_, int index_=0) const |
| Fetch the physical quantity (with its explicit dimension) value stored with a given key/name and index. More... | |
| double | fetch_real_scalar (const std::string &name_) const |
| Fetch the real scalar value stored with a given key/name. More... | |
| double | fetch_real_vector (const std::string &name_, int index_) const |
| Fetch the real vector value stored with a given key/name and index. More... | |
| std::string | fetch_string (const std::string &name_, int index_=0) const |
| Fetch the string value stored with a given key/name and index. More... | |
| char | fetch_one_character (const std::string &name_, int index_=0) const |
| Fetch a single character value stored with a given key/name and index. More... | |
| std::string | fetch_string_scalar (const std::string &name_) const |
| Fetch the string scalar value stored with a given key/name. More... | |
| std::string | fetch_string_vector (const std::string &name_, int index_) const |
| Fetch the string vector value stored with a given key/name and index. More... | |
| std::string | fetch_path (const std::string &name_, int index_=0) const |
| Fetch a file path from a string value stored with a given key/name and index. More... | |
| std::string | fetch_path_scalar (const std::string &name_) const |
| Fetch a file path from a string scalar value stored with a given key/name. More... | |
| std::string | fetch_path_vector (const std::string &name_, int index_) const |
| Fetch a file path from a string vector value stored with a given key/name and index. More... | |
| void | dump (std::ostream &out_=std::clog) const |
| Basic print. More... | |
| virtual void | tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const |
| void | print_tree (std::ostream &out_=std::clog, const boost::property_tree::ptree &options_=empty_options()) const override |
| Smart print. More... | |
| std::string | key_to_string (const std::string &key_) const |
| std::string | key_to_property_string (const std::string &key_) const |
| void | export_to_string_based_dictionary (std::map< std::string, std::string > &dict_, bool quoted_strings_=true) const |
| void | write_configuration (const std::string &filename_, uint32_t options_=config::SMART_MODULO|config::SKIP_PRIVATE) const |
| Store the properties' container object in an ASCII text file. More... | |
| void | read_configuration (const std::string &filename_, uint32_t options_=config::SMART_MODULO) |
Public Member Functions inherited from datatools::i_serializable | |
| i_serializable () | |
| Default constructor. More... | |
| virtual | ~i_serializable () |
| Destructor. More... | |
| virtual const std::string & | get_serial_tag () const =0 |
| Return the serialization string identifier of the class. More... | |
Public Member Functions inherited from datatools::i_tree_dumpable | |
| i_tree_dumpable () | |
| Constructor. More... | |
| virtual | ~i_tree_dumpable () |
| Destructor. More... | |
| void | print_tree_json (std::ostream &out_=std::clog, const std::string &json_options_="") const |
| Printing with jsonized options. More... | |
| void | print_tree_json (std::ostream &out_=std::clog, const char *json_options_=nullptr) const |
| Printing with jsonized options. More... | |
| void | tree_dump_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="", const bool inherit_=false) const |
| void | tree_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="") const |
| void | smart_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="") const |
Public Member Functions inherited from datatools::i_clear | |
| virtual | ~i_clear () |
| Destructor. More... | |
Public Member Functions inherited from datatools::i_cloneable | |
| virtual i_cloneable * | clone (void) const =0 |
| virtual | ~i_cloneable () |
| template<class CandidateType > | |
| bool | is_cloneable (const CandidateType &candidate_) |
Static Public Member Functions | |
| static const std::string & | private_property_prefix () |
| static std::string | make_private_key (const std::string &prop_key_) |
| Return a static key. More... | |
| static bool | key_is_private (const std::string &prop_key_) |
| Check if a string matches a private 'prop_key_'. More... | |
| static bool | key_is_public (const std::string &prop_key_) |
| Check if a string matches a public 'prop_key_'. More... | |
| static void | write_config (const std::string &filename_, const properties &props_, uint32_t options_=0) |
| Store the properties' container object in an ASCII text file. More... | |
| static void | read_config (const std::string &filename_, properties &props_, uint32_t options_=0) |
| static std::string | build_property_key (const std::string &prefix_, const std::string &subkey_) |
| Build a new property key from a prefix and a key. More... | |
Static Public Member Functions inherited from datatools::i_tree_dumpable | |
| static const boost::property_tree::ptree & | empty_options () |
| static boost::property_tree::ptree | make_base_print_options (const std::string &title_, const std::string &indent_="", const bool inherit_=false) |
| static std::ostream & | last_skip_tag (std::ostream &out_) |
| static std::ostream & | skip_tag (std::ostream &out_) |
| static std::ostream & | last_tag (std::ostream &out_) |
| static std::ostream & | tag (std::ostream &out_) |
Static Public Member Functions inherited from datatools::i_cloneable | |
| template<class Copyable > | |
| static Copyable * | clone_it (const Copyable &a_copyable) |
Protected Types | |
| typedef std::map< std::string, data > | pmap |
Static Protected Member Functions | |
| static default_key_validator & | global_default_key_validator () |
| Default global key validator (singleton) More... | |
Friends | |
| class | config |
A dictionary of arbitrary properties.
The properties class provides a serializable container that holds many different data of different types (bool, int, double, string) as well as sized arrays (std::vector) of these build-in types.
Additional features are available for some types of properties:
The properties class is provided with different I/O mechnisms:
Example:
| typedef std::vector<std::string> datatools::properties::keys_col_type |
|
protected |
| datatools::properties::properties | ( | ) |
Default constructor with embedded default key validator.
|
explicit |
Constructor with explicit description and embedded default key validator.
| datatools::properties::properties | ( | const std::string & | desc_, |
| const basic_key_validator & | |||
| ) |
Constructor with explicit description and explicit key validator.
|
explicit |
Constructor with explicit key validator.
| datatools::properties::properties | ( | const std::string & | desc_, |
| const basic_key_validator * | , | ||
| bool | deletion_on_destroy_ = true |
||
| ) |
Constructor with explicit description and explicit external key validator.
|
explicit |
Constructor with explicit external key validator.
|
virtual |
Destructor.
|
static |
Build a new property key from a prefix and a key.
| void datatools::properties::change | ( | const std::string & | key_, |
| bool | value_, | ||
| int | index_ = 0 |
||
| ) |
Change the value of an existing boolean property with a given key/name and index.
| void datatools::properties::change | ( | const std::string & | key_, |
| int | value_, | ||
| int | index_ = 0 |
||
| ) |
Change the value of an existing integer property with a given key/name and index.
| void datatools::properties::change | ( | const std::string & | key_, |
| double | value_, | ||
| int | index_ = 0 |
||
| ) |
Change the value of an existing real property with a given key/name and index.
| void datatools::properties::change | ( | const std::string & | key_, |
| const std::string & | value_, | ||
| int | index_ = 0 |
||
| ) |
Change the value of an existing string property with a given key/name and index.
| void datatools::properties::change | ( | const std::string & | key_, |
| const char * | value_, | ||
| int | index_ = 0 |
||
| ) |
Change the value of an existing string property (C style) with a given key/name and index.
| void datatools::properties::change | ( | const std::string & | key_, |
| const data::vbool & | values_ | ||
| ) |
Change the full contents of an existing boolean vector property with a given key/name.
| void datatools::properties::change | ( | const std::string & | key_, |
| const data::vint & | values_ | ||
| ) |
Change the full contents of an existing integer vector property with a given key/name.
| void datatools::properties::change | ( | const std::string & | key_, |
| const data::vdouble & | values_ | ||
| ) |
Change the full contents of an existing real vector property with a given key/name.
| void datatools::properties::change | ( | const std::string & | key_, |
| const data::vstring & | values_ | ||
| ) |
Change the full contents of an existing string vector property with a given key/name.
| void datatools::properties::change_boolean | ( | const std::string & | key_, |
| bool | value_, | ||
| int | index_ = 0 |
||
| ) |
Change the value of an existing boolean property with a given key/name and index.
| void datatools::properties::change_boolean_scalar | ( | const std::string & | key_, |
| bool | value_ | ||
| ) |
Change the value of an existing scalar boolean property with a given key/name.
| void datatools::properties::change_boolean_vector | ( | const std::string & | key_, |
| bool | value_, | ||
| int | index_ | ||
| ) |
Change the value of an existing vector boolean property with a given key/name and index.
| void datatools::properties::change_integer | ( | const std::string & | key_, |
| int | value_, | ||
| int | index_ = 0 |
||
| ) |
Change the value of an existing integer property with a given key/name and index.
| void datatools::properties::change_integer_scalar | ( | const std::string & | key_, |
| int | value_ | ||
| ) |
Change the value of an existing integer scalar property with a given key/name.
| void datatools::properties::change_integer_vector | ( | const std::string & | key_, |
| int | value_, | ||
| int | index_ | ||
| ) |
Change the value of an existing integer vector property with a given key/name and index.
| void datatools::properties::change_real | ( | const std::string & | key_, |
| double | value_, | ||
| int | index_ = 0 |
||
| ) |
Change the value of an existing real property with a given key/name and index.
| void datatools::properties::change_real_scalar | ( | const std::string & | key_, |
| double | value_ | ||
| ) |
Change the value of an existing real scalar property with a given key/name.
| void datatools::properties::change_real_vector | ( | const std::string & | key_, |
| double | value_, | ||
| int | index_ | ||
| ) |
Change the value of an existing real vector property with a given key/name and index.
| void datatools::properties::change_string | ( | const std::string & | key_, |
| const std::string & | value_, | ||
| int | index_ = 0 |
||
| ) |
Change the value of an existing string property with a given key/name and index.
| void datatools::properties::change_string_scalar | ( | const std::string & | key_, |
| const std::string & | value_ | ||
| ) |
Change the value of an existing string scalar property with a given key/name.
| void datatools::properties::change_string_vector | ( | const std::string & | key_, |
| const std::string & | value_, | ||
| int | index_ | ||
| ) |
Change the value of an existing string vector property with a given key/name and index.
| void datatools::properties::clean | ( | const std::string & | prop_key_ | ) |
Remove a property with a given key/name.
|
virtual |
Reset method (from the datatools::i_clear interface).
Implements datatools::i_clear.
| void datatools::properties::dump | ( | std::ostream & | out_ = std::clog | ) | const |
Basic print.
| bool datatools::properties::empty | ( | ) | const |
Check if the properties container is empty.
| void datatools::properties::erase | ( | const std::string & | key_ | ) |
Rename a property with a new name.
Erase property with a given key/name
| void datatools::properties::erase_all | ( | ) |
Erase all properties.
| void datatools::properties::erase_all_ending_with | ( | const std::string & | suffix_ | ) |
Erase all properties with key/name ending with a given suffix.
| void datatools::properties::erase_all_not_ending_with | ( | const std::string & | suffix_ | ) |
Erase all properties with key/name not ending with a given suffix.
| void datatools::properties::erase_all_not_starting_with | ( | const std::string & | prefix_ | ) |
Erase all properties with key/name not starting with prefix.
| void datatools::properties::erase_all_starting_with | ( | const std::string & | prefix_ | ) |
Erase all properties with key/name starting with prefix.
| void datatools::properties::export_all | ( | properties & | props_ | ) | const |
Export all properties into another properties container.
| void datatools::properties::export_all_adding_prefix | ( | properties & | props_, |
| const std::string & | prefix_ | ||
| ) | const |
Export all properties into another properties container adding a prefix.
| void datatools::properties::export_and_rename_starting_with | ( | properties & | props_, |
| const std::string & | prop_key_prefix_, | ||
| const std::string & | new_prefix_ | ||
| ) | const |
Export all properties with key/name starting with a given prefix to another properties container but renaming the prefix on the fly.
| void datatools::properties::export_ending_with | ( | properties & | props_, |
| const std::string & | suffix_ | ||
| ) | const |
Export all properties with key/name ending with a given suffix to another properties container.
| void datatools::properties::export_if | ( | properties & | props_, |
| const key_predicate & | predicate_ | ||
| ) | const |
Export all properties with key/name fulfilling a given predicate.
| void datatools::properties::export_not_ending_with | ( | properties & | props, |
| const std::string & | suffix_ | ||
| ) | const |
Export all properties with key/name not ending with a given suffix to another properties container.
| void datatools::properties::export_not_if | ( | properties & | props_, |
| const key_predicate & | predicate_ | ||
| ) | const |
Export all properties with key/name not fulfilling a given predicate.
| void datatools::properties::export_not_starting_with | ( | properties & | props_, |
| const std::string & | prop_key_prefix_ | ||
| ) | const |
Export all properties with key/name not starting with a given suffix to another properties container.
| void datatools::properties::export_starting_with | ( | properties & | props_, |
| const std::string & | prop_key_prefix_ | ||
| ) | const |
Export all properties with key/name starting with a given prefix to another properties container.
| void datatools::properties::export_to_string_based_dictionary | ( | std::map< std::string, std::string > & | dict_, |
| bool | quoted_strings_ = true |
||
| ) | const |
| void datatools::properties::fetch | ( | const std::string & | key_, |
| bool & | value_, | ||
| int | index_ = 0 |
||
| ) | const |
Fetch the boolean value stored with a given key/name and index.
| void datatools::properties::fetch | ( | const std::string & | key_, |
| int & | value_, | ||
| int | index_ = 0 |
||
| ) | const |
Fetch the integer value stored with a given key/name and index.
| void datatools::properties::fetch | ( | const std::string & | key_, |
| double & | value_, | ||
| int | index_ = 0 |
||
| ) | const |
Fetch the real value stored with a given key/name and index.
| void datatools::properties::fetch | ( | const std::string & | key_, |
| std::string & | value_, | ||
| int | index = 0 |
||
| ) | const |
Fetch the string value stored with a given key/name and index.
| void datatools::properties::fetch | ( | const std::string & | key_, |
| data::vbool & | values_ | ||
| ) | const |
Fetch the boolean vector value stored with a given key/name.
| void datatools::properties::fetch | ( | const std::string & | key_, |
| data::vint & | values_ | ||
| ) | const |
Fetch the integer vector value stored with a given key/name.
| void datatools::properties::fetch | ( | const std::string & | key_, |
| data::vdouble & | values_ | ||
| ) | const |
Fetch the real vector value stored with a given key/name.
| void datatools::properties::fetch | ( | const std::string & | key_, |
| data::vstring & | values_ | ||
| ) | const |
Fetch the string vector value stored with a given key/name.
| void datatools::properties::fetch | ( | const std::string & | key_, |
| std::set< std::string > & | values_, | ||
| bool | allow_duplication_ = false |
||
| ) | const |
Fetch a set of string values from the vector value stored with a given key/name.
| void datatools::properties::fetch | ( | const std::string & | key_, |
| std::set< int > & | values, | ||
| bool | allow_duplication_ = false |
||
| ) | const |
Fetch a set of integer values from the vector value stored with a given key/name.
| bool datatools::properties::fetch_auxiliary_descriptions | ( | std::vector< std::string > & | ) | const |
Fetch the auxiliary description strings associated to the container.
| bool datatools::properties::fetch_boolean | ( | const std::string & | , |
| int | index_ = 0 |
||
| ) | const |
Fetch the boolean value stored with a given key/name and index.
| bool datatools::properties::fetch_boolean_scalar | ( | const std::string & | name_ | ) | const |
Fetch the boolean scalar value stored with a given key/name.
| bool datatools::properties::fetch_boolean_vector | ( | const std::string & | name_, |
| int | index_ | ||
| ) | const |
Fetch the boolean vector value stored with a given key/name and index.
| void datatools::properties::fetch_dimensionless | ( | const std::string & | key_, |
| data::vdouble & | values_ | ||
| ) | const |
Fetch the dimensionless real vector value stored with a given key/name.
| double datatools::properties::fetch_dimensionless_real | ( | const std::string & | name_, |
| int | index_ = 0 |
||
| ) | const |
Fetch the dimensionless real value stored with a given key/name and index.
| int datatools::properties::fetch_integer | ( | const std::string & | name_, |
| int | index_ = 0 |
||
| ) | const |
Fetch the integer value stored with a given key/name and index.
| int datatools::properties::fetch_integer_scalar | ( | const std::string & | name_ | ) | const |
Fetch the integer scalar value stored with a given key/name.
| int datatools::properties::fetch_integer_vector | ( | const std::string & | name_, |
| int | index_ | ||
| ) | const |
Fetch the integer vector value stored with a given key/name and index.
| char datatools::properties::fetch_one_character | ( | const std::string & | name_, |
| int | index_ = 0 |
||
| ) | const |
Fetch a single character value stored with a given key/name and index.
| std::string datatools::properties::fetch_path | ( | const std::string & | name_, |
| int | index_ = 0 |
||
| ) | const |
Fetch a file path from a string value stored with a given key/name and index.
| std::string datatools::properties::fetch_path_scalar | ( | const std::string & | name_ | ) | const |
Fetch a file path from a string scalar value stored with a given key/name.
| std::string datatools::properties::fetch_path_vector | ( | const std::string & | name_, |
| int | index_ | ||
| ) | const |
Fetch a file path from a string vector value stored with a given key/name and index.
| void datatools::properties::fetch_positive | ( | const std::string & | key_, |
| std::set< unsigned int > & | values_, | ||
| bool | allow_duplication_ = false |
||
| ) | const |
Fetch a set of unsigned integer values from the vector value stored with a given key/name.
| unsigned int datatools::properties::fetch_positive_integer | ( | const std::string & | name_, |
| int | index_ = 0 |
||
| ) | const |
Fetch the positive integer value stored with a given key/name and index.
| int datatools::properties::fetch_range_integer | ( | const std::string & | name_, |
| int | min_, | ||
| int | max_, | ||
| int | index_ = 0 |
||
| ) | const |
Fetch the ranged integer value stored with a given key/name and index.
| double datatools::properties::fetch_real | ( | const std::string & | name_, |
| int | index_ = 0 |
||
| ) | const |
Fetch the real value stored with a given key/name and index.
| double datatools::properties::fetch_real_scalar | ( | const std::string & | name_ | ) | const |
Fetch the real scalar value stored with a given key/name.
| double datatools::properties::fetch_real_vector | ( | const std::string & | name_, |
| int | index_ | ||
| ) | const |
Fetch the real vector value stored with a given key/name and index.
| double datatools::properties::fetch_real_with_explicit_dimension | ( | const std::string & | name_, |
| const std::string & | dimension_, | ||
| int | index_ = 0 |
||
| ) | const |
Fetch the physical quantity (with its explicit dimension) value stored with a given key/name and index.
| double datatools::properties::fetch_real_with_explicit_unit | ( | const std::string & | name_, |
| int | index_ = 0 |
||
| ) | const |
Fetch the physical quantity (with its explicit unit) value stored with a given key/name and index.
| bool datatools::properties::fetch_short_description | ( | std::string & | ) | const |
Fetch the short description string associated to the container.
| unsigned int datatools::properties::fetch_strict_positive_integer | ( | const std::string & | name_, |
| int | index_ = 0 |
||
| ) | const |
Fetch the strict positive integer value stored with a given key/name and index.
| std::string datatools::properties::fetch_string | ( | const std::string & | name_, |
| int | index_ = 0 |
||
| ) | const |
Fetch the string value stored with a given key/name and index.
| std::string datatools::properties::fetch_string_scalar | ( | const std::string & | name_ | ) | const |
Fetch the string scalar value stored with a given key/name.
| std::string datatools::properties::fetch_string_vector | ( | const std::string & | name_, |
| int | index_ | ||
| ) | const |
Fetch the string vector value stored with a given key/name and index.
| void datatools::properties::fetch_unique_ordered | ( | const std::string & | key_, |
| std::vector< std::string > & | values_ | ||
| ) | const |
Fetch a list of unique string values from the vector value stored with a given key/name.
Access to a non-mutable reference to a property data object.
| const std::string& datatools::properties::get_description | ( | ) | const |
Returns the description string of the properties container.
| const std::string& datatools::properties::get_key_description | ( | const std::string & | prop_key_ | ) | const |
Get the description string associated to a property with given key/name.
| std::string datatools::properties::get_short_description | ( | ) | const |
Get the short description string associated to the container.
Return the unit symbol for a real property with a given key/name.
|
staticprotected |
Default global key validator (singleton)
| bool datatools::properties::has_auxiliary_descriptions | ( | ) | const |
Check if some auxiliary descriptions are set.
| bool datatools::properties::has_explicit_unit | ( | const std::string & | prop_key_ | ) | const |
Check flag for explicit unit for a real property with a given key/name.
| bool datatools::properties::has_flag | ( | const std::string & | key_ | ) | const |
Check if a boolean value with a given key/name exists with value 'true'.
| bool datatools::properties::has_key | ( | const std::string & | prop_key_ | ) | const |
Check if a property with given key/name exists.
| bool datatools::properties::has_short_description | ( | ) | const |
Check if a short description string is associated to the container.
| bool datatools::properties::has_unit_symbol | ( | const std::string & | prop_key_ | ) | const |
Check flag for unit symbol for a real property with a given key/name.
| bool datatools::properties::is_boolean | ( | const std::string & | prop_key_ | ) | const |
Check if data with name 'prop_key_' is boolean.
| bool datatools::properties::is_explicit_path | ( | const std::string & | prop_key_ | ) | const |
Check flag for explicit path for a string property with a given key/name.
| bool datatools::properties::is_integer | ( | const std::string & | prop_key_ | ) | const |
Check if data with name 'prop_key_' is integer.
| bool datatools::properties::is_locked | ( | const std::string & | prop_key_ | ) | const |
Check if the instance is locked.
| bool datatools::properties::is_private | ( | const std::string & | prop_key_ | ) | const |
Check if data with name 'prop_key_' is private.
| bool datatools::properties::is_public | ( | const std::string & | prop_key_ | ) | const |
Check if data with name 'prop_key_' is public.
| bool datatools::properties::is_real | ( | const std::string & | prop_key_ | ) | const |
Check if data with name 'prop_key_' is real.
| bool datatools::properties::is_scalar | ( | const std::string & | prop_key_ | ) | const |
Check if data with name 'prop_key_' is scalar.
| bool datatools::properties::is_string | ( | const std::string & | prop_key_ | ) | const |
Check if data with name 'prop_key_' is string.
| bool datatools::properties::is_vector | ( | const std::string & | prop_key_ | ) | const |
Check if data with name 'prop_key_' is vector.
| const std::string& datatools::properties::key | ( | int | ) | const |
Returns the ith key.
|
static |
Check if a string matches a private 'prop_key_'.
|
static |
Check if a string matches a public 'prop_key_'.
| void datatools::properties::key_lock | ( | const std::string & | prop_key_ | ) |
Lock a property with given key/name.
| int32_t datatools::properties::key_size | ( | const std::string & | prop_key_ | ) | const |
Returns the size of the data stored with a given key/name.
| std::string datatools::properties::key_to_property_string | ( | const std::string & | key_ | ) | const |
| std::string datatools::properties::key_to_string | ( | const std::string & | key_ | ) | const |
| void datatools::properties::key_unlock | ( | const std::string & | prop_key_ | ) |
Unlock a property with given key/name.
| std::vector<std::string> datatools::properties::keys | ( | ) | const |
Returns the list of keys stored in the map (read-only).
| void datatools::properties::keys | ( | std::vector< std::string > & | ) | const |
Set the list of keys.
| void datatools::properties::keys_ending_with | ( | std::vector< std::string > & | , |
| const std::string & | suffix_ | ||
| ) | const |
builds the list of keys (by reference) stored in the map that end with suffix.
| std::vector<std::string> datatools::properties::keys_ending_with | ( | const std::string & | suffix_ | ) | const |
returns the list of keys stored in the map that end with suffix.
| void datatools::properties::keys_not_ending_with | ( | std::vector< std::string > & | , |
| const std::string & | suffix_ | ||
| ) | const |
builds the list of keys (by reference) stored in the map that end with suffix.
| std::vector<std::string> datatools::properties::keys_not_ending_with | ( | const std::string & | suffix_ | ) | const |
returns the list of keys stored in the map that end with suffix.
| void datatools::properties::keys_not_starting_with | ( | std::vector< std::string > & | , |
| const std::string & | prefix_ | ||
| ) | const |
builds the list of keys (by reference) stored in the map that start with prefix.
| std::vector<std::string> datatools::properties::keys_not_starting_with | ( | const std::string & | prefix_ | ) | const |
returns the list of keys stored in the map that start with prefix.
| void datatools::properties::keys_starting_with | ( | std::vector< std::string > & | , |
| const std::string & | prefix_ | ||
| ) | const |
builds the list of keys (by reference) stored in the map that start with prefix.
| std::vector<std::string> datatools::properties::keys_starting_with | ( | const std::string & | prefix_ | ) | const |
returns the list of keys stored in the map that start with prefix.
| void datatools::properties::lock | ( | const std::string & | prop_key_ | ) |
Lock the properties dictionary.
|
static |
Return a static key.
|
overridevirtual |
Smart print.
Reimplemented from datatools::i_tree_dumpable.
|
static |
Prefix string used for the naming of private properties
A private property has a key starting with this prefix, namely '__' (double underscore).
|
static |
Load the properties' container object from an ASCII text file
| void datatools::properties::read_configuration | ( | const std::string & | filename_, |
| uint32_t | options_ = config::SMART_MODULO |
||
| ) |
Load the properties' container object from an ASCII text file
| void datatools::properties::reset | ( | ) |
Reset method.
| void datatools::properties::set_default_key_validator | ( | ) |
Use the default key validator.
| void datatools::properties::set_description | ( | const std::string & | ) |
Set the description string of the properties container
The description is a single line of text possibly splitted in subparts separated by the semicolon (';') character.
Examples:
The leading (optional) subpart corresponds to a short text which describes the container of properties. The other subparts are optional and possibly add some auxiliary informations about the container of properties.
Examples:
The leading (optional) subpart corresponds to a short text
Supported format in configuration file:
| void datatools::properties::set_explicit_path | ( | const std::string & | prop_key_, |
| bool | a_explicit_path = true |
||
| ) |
Set flag for explicit path for a string property with a given key/name.
| void datatools::properties::set_explicit_unit | ( | const std::string & | prop_key_, |
| bool | a_explicit_unit = true |
||
| ) |
Set flag for explicit unit for a real property with a given key/name.
| void datatools::properties::set_flag | ( | const std::string & | prop_key_ | ) |
Set a boolean 'true' flag with a given key/name.
| prop_key_ | The key of the boolean property |
| void datatools::properties::set_key_description | ( | const std::string & | prop_key_, |
| const std::string & | desc_ | ||
| ) |
Set the description string associated to a property with given key/name.
| void datatools::properties::set_key_validator | ( | const basic_key_validator & | ) |
Set the current key validator.
| void datatools::properties::set_key_validator | ( | const basic_key_validator * | , |
| bool | deletion_on_destroy_ = true |
||
| ) |
Set the current key validator with ownership.
| void datatools::properties::set_unit_symbol | ( | const std::string & | prop_key_, |
| const std::string & | unit_symbol = "" |
||
| ) |
Set the unit symbol for a real property with a given key/name.
| int32_t datatools::properties::size | ( | ) | const |
Returns the number of stored properties.
| int32_t datatools::properties::size | ( | const std::string & | prop_key_ | ) | const |
Store data item with supplied key.
| void datatools::properties::store | ( | const std::string & | prop_key_, |
| bool | value_, | ||
| const std::string & | desc_ = "", |
||
| bool | lock_ = false |
||
| ) |
Store a boolean property with a given key/name and value.
| void datatools::properties::store | ( | const std::string & | prop_key_, |
| int | value_, | ||
| const std::string & | desc_ = "", |
||
| bool | lock_ = false |
||
| ) |
Store an integer property with a given key/name and value.
| void datatools::properties::store | ( | const std::string & | prop_key_, |
| double | value_, | ||
| const std::string & | desc_ = "", |
||
| bool | lock_ = false |
||
| ) |
Store a real property with a given key/name and value.
| void datatools::properties::store | ( | const std::string & | prop_key_, |
| const std::string & | value_, | ||
| const std::string & | desc_ = "", |
||
| bool | lock_ = false |
||
| ) |
Store a string property with a given key/name and value.
| void datatools::properties::store | ( | const std::string & | prop_key_, |
| const char * | value_, | ||
| const std::string & | desc_ = "", |
||
| bool | lock_ = false |
||
| ) |
Store a string property with a given key/name and value (C style)
| void datatools::properties::store | ( | const std::string & | prop_key_, |
| const data::vbool & | value_, | ||
| const std::string & | desc_ = "", |
||
| bool | lock_ = false |
||
| ) |
Store a boolean vector property with a given key/name and value.
| void datatools::properties::store | ( | const std::string & | prop_key_, |
| const data::vint & | value_, | ||
| const std::string & | desc_ = "", |
||
| bool | lock_ = false |
||
| ) |
Store a integer vector property with a given key/name and value.
| void datatools::properties::store | ( | const std::string & | prop_key_, |
| const data::vdouble & | value_, | ||
| const std::string & | desc_ = "", |
||
| bool | lock_ = false |
||
| ) |
Store a real vector property with a given key/name and value.
| void datatools::properties::store | ( | const std::string & | prop_key_, |
| const data::vstring & | value_, | ||
| const std::string & | desc_ = "", |
||
| bool | lock_ = false |
||
| ) |
Store a string vector property with a given key/name and value.
| void datatools::properties::store_boolean | ( | const std::string & | prop_key_, |
| bool | value_, | ||
| const std::string & | desc_ = "", |
||
| bool | lock_ = false |
||
| ) |
Store a boolean property with a given key/name and value.
| void datatools::properties::store_flag | ( | const std::string & | prop_key_, |
| const std::string & | desc_ = "", |
||
| bool | lock_ = false |
||
| ) |
Set a boolean 'true' flag with a given key/name, a description string and a lock request.
| void datatools::properties::store_integer | ( | const std::string & | prop_key_, |
| int | value_, | ||
| const std::string & | desc_ = "", |
||
| bool | lock_ = false |
||
| ) |
Store an integer property with a given key/name and value.
| void datatools::properties::store_path | ( | const std::string & | prop_key_, |
| const std::string & | path_value_, | ||
| const std::string & | desc_ = "", |
||
| bool | lock_ = false |
||
| ) |
Store a path property with a given key/name and value.
| void datatools::properties::store_paths | ( | const std::string & | prop_key_, |
| const data::vstring & | path_value_, | ||
| const std::string & | desc_ = "", |
||
| bool | lock_ = false |
||
| ) |
Store a path string vector property with a given key/name and value.
| void datatools::properties::store_real | ( | const std::string & | prop_key_, |
| double | value_, | ||
| const std::string & | desc_ = "", |
||
| bool | lock_ = false |
||
| ) |
Store a real property with a given key/name and value.
| void datatools::properties::store_real_with_explicit_unit | ( | const std::string & | prop_key_, |
| double | value_, | ||
| const std::string & | desc = "", |
||
| bool | lock_ = false |
||
| ) |
Store a real property with a given key/name and value with the explicit unit flag.
| void datatools::properties::store_string | ( | const std::string & | prop_key_, |
| const std::string & | value_, | ||
| const std::string & | desc_ = "", |
||
| bool | lock_ = false |
||
| ) |
Store a string property with a given key/name and value.
| void datatools::properties::store_with_explicit_unit | ( | const std::string & | prop_key_, |
| double | value_, | ||
| const std::string & | desc = "", |
||
| bool | lock_ = false |
||
| ) |
Store a real property with a given key/name and value with the explicit unit flag
|
virtual |
Reimplemented from datatools::i_tree_dumpable.
| void datatools::properties::unlock | ( | const std::string & | prop_key_ | ) |
Unlock the properties dictionary.
| void datatools::properties::unset_flag | ( | const std::string & | prop_key_ | ) |
Remove a boolean flag with a given key/name.
| prop_key_ | The key of the boolean property |
| void datatools::properties::unset_key_validator | ( | ) |
Unset the current key validator.
| void datatools::properties::update | ( | const std::string & | key_, |
| bool | value_ | ||
| ) |
Update a boolean flag with a given key/name and value.
| void datatools::properties::update | ( | const std::string & | key_, |
| int | value_ | ||
| ) |
Update an integer flag with a given key/name and value.
| void datatools::properties::update | ( | const std::string & | key_, |
| double | value_ | ||
| ) |
Update a real flag with a given key/name and value.
Update a string flag with a given key/name and value.
Update a C-string flag with a given key/name and value.
| void datatools::properties::update | ( | const std::string & | key_, |
| const data::vbool & | values_ | ||
| ) |
Update the full contents of a boolean vector with a given key/name.
| void datatools::properties::update | ( | const std::string & | key_, |
| const data::vint & | values_ | ||
| ) |
Update the full contents of an integer vector with a given key/name.
| void datatools::properties::update | ( | const std::string & | key_, |
| const data::vdouble & | values_ | ||
| ) |
Update the full contents of a real vector with a given key/name.
| void datatools::properties::update | ( | const std::string & | key_, |
| const data::vstring & | values_ | ||
| ) |
Update the full contents of a string vector with a given key/name.
| void datatools::properties::update_boolean | ( | const std::string & | key_, |
| bool | value_ | ||
| ) |
Update a boolean flag with a given key/name and value.
| void datatools::properties::update_flag | ( | const std::string & | key_ | ) |
Update a boolean flag to true with a given key/name.
| void datatools::properties::update_integer | ( | const std::string & | key_, |
| int | value_ | ||
| ) |
Update an integer flag with a given key/name and value.
| void datatools::properties::update_real | ( | const std::string & | key_, |
| double | value_ | ||
| ) |
Update a real flag with a given key/name and value.
| void datatools::properties::update_real_with_explicit_unit | ( | const std::string & | key_, |
| double | value_ | ||
| ) |
Update a real flag with a given key/name and value.
Update a string flag with a given key/name and value.
| void datatools::properties::update_with_explicit_unit | ( | const std::string & | key_, |
| double | value_ | ||
| ) |
Update a real flag with a given key/name and value.
|
static |
Store the properties' container object in an ASCII text file.
| void datatools::properties::write_configuration | ( | const std::string & | filename_, |
| uint32_t | options_ = config::SMART_MODULO|config::SKIP_PRIVATE |
||
| ) | const |
Store the properties' container object in an ASCII text file.
|
friend |
1.8.15