Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
The Bayeux/datatools library top-level namespace. More...
Namespaces | |
configuration | |
Nested namespace of the Bayeux/datatools module library. | |
detail | |
Nested namespace of the Bayeux/datatools module library (detail) | |
introspection | |
Nested namespace of the Bayeux/datatools module library. | |
qt | |
ui | |
units | |
Utilities for units based on the CLHEP library's implementation. | |
Classes | |
class | _system_factory_registrator |
Utility template class to enable auto-(un)registration of a derived class in a system factory register of a base class. More... | |
class | array_input_buffer |
Input stream buffer associated to a plain array of characters (char *) More... | |
class | bad_things_cast |
An exception for invalid cast operation within the things class. More... | |
class | base_factory_register |
The base class for all specialized template factory registration classes. More... | |
class | base_service |
The base service class. More... | |
struct | bit_mask |
Some useful constants to manipulate bits typically within an unsigned integer of 32 bits. More... | |
struct | caster |
Templatized concrete caster class for casting pointers from a covariant class hierarchy to some other type. More... | |
class | command |
Generic command utilities. More... | |
struct | computing_time |
A class that compute time statistics. More... | |
class | configuration_property_description |
An object that describes the way an objet of a given class can be configured from properties. More... | |
class | data_reader |
A generic data reader based on Boost/Serialization. More... | |
class | data_writer |
A generic data writer based on Boost/Serialization. More... | |
class | dependency_graph |
Dependency graph. More... | |
struct | dependency_info_type |
Record that stores informations about the dependency between services : More... | |
class | enriched_base |
A base class with useful attributes usable in many contexts. More... | |
class | event_id |
A simple event identifier based on a run number and an event number Run and event numbers are represented by 32 bits signed integrals. The event_id class is serializable through the Boost.Serialization library. Utilities for standard I/O streams is also provided. More... | |
class | event_id_equal_predicate |
Predicate to check if an event_id equals another one. More... | |
class | factory_register |
Template factory registration class. More... | |
class | handle |
Templatized handle class that wraps a Boost shared pointer and behaves like a reference. More... | |
class | handle_pool |
A pool of handles on a given class. More... | |
struct | handle_predicate |
Forward declaration : More... | |
struct | i_caster |
Templatized abstract interface class with a cast method using covariant return types . More... | |
class | i_clear |
A pure abstract class (interface) for inherited clearable classes. More... | |
class | i_cloneable |
A pure abstract class (interface) for inherited cloneable classes. More... | |
class | i_named |
A pure abstract class (interface) for named objects, possibly with dynamic name. Example: a class with fixed name. More... | |
class | i_predicate |
A template predicate abstract class. More... | |
class | i_serializable |
Base abstract class of all serializable (and possibly introspectable) classes. More... | |
class | i_tree_dumpable |
An interface with utilities for printable objects. More... | |
class | iarraystream |
std::istream interface for a plain array of characters (char *) More... | |
class | integer_range |
A class representing an interval of integer values. More... | |
struct | io |
I/O utilities. More... | |
class | io_factory |
A generic base reader/writer class based on Boost/Serialization. More... | |
class | io_reader |
A generic reader class inherited from the io_factory class. More... | |
class | io_writer |
A generic writer class inherited from the io_factory class. More... | |
class | ivectorstream |
std::istream interface for a std::vector of characters (std::vector<char>) More... | |
class | kernel |
The datatools kernel singleton with embedded resources and components. More... | |
class | library_info |
Host a register of static and/or dynamic informations about libraries or software components. More... | |
class | library_loader |
A DLL loader class. More... | |
class | library_query_service |
Library information query service. More... | |
struct | logger |
Organise logging functionality under one roof. More... | |
class | mother_to_daughter_predicate |
A template mother-to-daughter caster predicate class. More... | |
class | multi_properties |
A container of mapped properties objects. More... | |
class | object_configuration_description |
An object that describes the way an object of a given class can be configured through properties. More... | |
class | ocd_driver |
The OCD manual application. More... | |
struct | ocd_driver_params |
Parameters of the OCD manual object. More... | |
class | ostream_manipulator |
ostream_manipulator class More... | |
class | ostream_manipulator_ref |
ostream_manipulator_ref class More... | |
class | ovectorstream |
std::ostream interface for a std::vector of characters (std::vector<char>) More... | |
class | properties |
A dictionary of arbitrary properties. More... | |
struct | range_tools |
Utility that hosts constants relative to range and interval objects. More... | |
class | real_range |
A class representing an interval of real (double precision) values with support of embedded units. More... | |
class | safe_serial |
Template container wrapper class for safe storage of object with regards to Boost/Serilization memory tracking feature. More... | |
class | service_entry |
Internal entry for service objects stored in the service manager class. More... | |
class | service_manager |
Service management class. More... | |
class | smart_filename |
A class that builds an arbitrary list of filenames on user request. Supported modes are: More... | |
class | smart_ref |
A template class that stores a reference to an object and additional associated meta-data. More... | |
class | temp_file |
A class for the management of temporary unique file stored in a given directory. More... | |
class | things |
A generic serializable and noncopyable container for arbitrary serializable objects. More... | |
class | tracer |
A tracer object stores some arbitrary output in a trace file. More... | |
class | urn |
A class representing a simplified URN conforming parts of the RFC2141. More... | |
class | urn_db_service |
A service with a dictionary of URN informations. More... | |
class | urn_info |
A class documenting an object addressed by its unique URN and linked to other objects (also addressed by URNs).. More... | |
class | urn_query_service |
A service which allows queries about URNs thanks to embedded specialized dictionaries of URN informations and URN/path resolver tables. More... | |
class | urn_to_path |
A class representing the association of an URN to some paths. A path maybe a filesystem path, an URL, a hostname/port identifier or any other location address that can be represented as a character string. The list if registered paths is ordered to reflect some possible priority policy, depending on the way paths have been inserted in the register. More... | |
class | urn_to_path_resolver_service |
URN to file path resolver service. More... | |
class | vector_input_buffer |
Input stream buffer associated to a std::vector of characters (std::vector<char>) More... | |
class | vector_output_buffer |
Output stream buffer associated to a std::vector of characters (std::vector<char>) More... | |
struct | version |
Describe the datatools API version and features. More... | |
class | version_id |
A class representing a version ID : More... | |
Typedefs | |
typedef datatools::handle< base_service > | service_handle_type |
typedef std::map< std::string, int > | dependency_level_dict_type |
typedef std::map< std::string, dependency_info_type > | service_dependency_dict_type |
typedef std::shared_ptr< service_entry > | service_entry_ptr |
Type alias for a shared pointer on a service entry instance. More... | |
typedef std::map< std::string, service_entry_ptr > | service_dict_type |
Type alias for a flat dictionary of service entries. More... | |
Enumerations | |
enum | datatools_init_flags { init_no_help = datatools::bit_mask::bit00, init_no_splash = datatools::bit_mask::bit01, init_no_locale_category = datatools::bit_mask::bit02, init_no_logging = datatools::bit_mask::bit03, init_no_inhibit_libquery = datatools::bit_mask::bit04, init_no_libquery_logging = datatools::bit_mask::bit05, init_no_inhibit_libinfo = datatools::bit_mask::bit04, init_no_libinfo_logging = datatools::bit_mask::bit05, init_no_resource_path = datatools::bit_mask::bit06, init_no_inhibit_variant = datatools::bit_mask::bit07, init_no_variant = datatools::bit_mask::bit08, init_no_inhibit_qt_gui = datatools::bit_mask::bit09, init_no_inhibit_urnquery = datatools::bit_mask::bit10, init_reserved_11 = datatools::bit_mask::bit11, init_reserved_12 = datatools::bit_mask::bit12, init_reserved_13 = datatools::bit_mask::bit13, init_reserved_14 = datatools::bit_mask::bit14, init_kernel_inhibit = datatools::bit_mask::bit15 } |
datatools initialization flags More... | |
enum | range_bound_info_type { range_bound_undefined = -1, range_bound_unbounded = 0, range_bound_included = 1, range_bound_excluded = 2 } |
enum | dependency_level_type { DEPENDENCY_UNKNOWN = -1, DEPENDENCY_NONE = 0, DEPENDENCY_OPTIONAL = 1, DEPENDENCY_WEAK = 2, DEPENDENCY_STRICT = 3 } |
Constants to measure the level of dependance between services. More... | |
enum | basic_type { TYPE_NONE = 0x0, TYPE_BOOLEAN = 0x1, TYPE_INTEGER = 0x2, TYPE_REAL = 0x3, TYPE_STRING = 0x4, TYPE_ANY = 0xFFFFFFFF } |
Basic type identifier. More... | |
enum | data_type { DATA_NONE = 0x0, DATA_SCALAR = 0x1, DATA_ARRAY = 0x2, DATA_ANY = DATA_SCALAR | DATA_ARRAY } |
Data type. More... | |
enum | return_code_type { SUCCESS = EXIT_SUCCESS, ERROR = EXIT_FAILURE, FAILURE = EXIT_FAILURE } |
Return codes. More... | |
enum | compare_result_type { COMPARE_UNDEFINED = -2, COMPARE_LESS = -1, COMPARE_EQUAL = 0, COMPARE_GREATER = 1 } |
Comparison result code for comparable objects. More... | |
enum | name_validation_flags { NV_NO_COLON = bit_mask::bit00, NV_NO_DOT = bit_mask::bit01, NV_NO_HYPHEN = bit_mask::bit02, NV_NO_UNDERSCORE = bit_mask::bit03, NV_LEADING_DIGIT = bit_mask::bit04, NV_DEFAULT = NV_NO_HYPHEN, NV_INSTANCE = NV_NO_HYPHEN | NV_NO_COLON, NV_MODEL = NV_NO_HYPHEN } |
Functions | |
template<class Base , class Derived > | |
bool | is_covariant (const Base &b_) |
void | initialize (int argc_=0, char *argv_[]=0, uint32_t flags_=0) |
Initialize the datatools library and kernel. More... | |
void | terminate () |
Terminate the datatools library and kernel. More... | |
template<typename ConfigurableType > | |
bool | load_ocd (::datatools::object_configuration_description &, typename boost::disable_if< has_load< ::datatools::detail::ocd::loader< ConfigurableType > > >::type *=0) |
template<typename ConfigurableType > | |
bool | load_ocd (::datatools::object_configuration_description &ocd_, typename boost::enable_if< has_load< ::datatools::detail::ocd::loader< ConfigurableType > > >::type *dummy=0) |
template<typename T , typename... Args> | |
handle< T > | make_handle (Args &&... args) |
Constructs an object of type T and wraps it in a datatools::handle. More... | |
template<class T > | |
const std::string & | serial_tag () |
template<class T > | |
const std::string & | backward_serial_tag (int i=0) |
template<typename T > | |
bool | check_serial_tag (const std::string stag_, const std::string alt_tag_="", typename boost::disable_if< has_bsts< T > >::type *dummy_=0) |
template<typename T > | |
bool | check_serial_tag (const std::string stag_, const std::string alt_tag_="", typename boost::enable_if< has_bsts< T > >::type *dummy_=0) |
void | print_multi_lines (std::ostream &out_, const std::string &text_, const std::string &indent_="") |
const properties & | empty_config () |
Return a non mutable reference to a singleton empty configuration container (can be used as default empty set of configuration parameters) More... | |
for (pmap::const_iterator iter=_props_.begin();iter !=_props_.end();++iter) | |
for (keys_col_type::const_iterator i=ks.begin();i !=ks.end();++i) | |
std::string | get_resource_dir (bool overriden_env_=false) |
std::string | get_resource (const std::string &rname_, bool overriden_env_=false) |
template<class T > | |
bool | has (const service_dict_type &services_, const std::string &service_name_) |
template<class T > | |
T & | grab (service_dict_type &services_, const std::string &service_name_) |
template<class T > | |
const T & | get (const service_dict_type &services_, const std::string &service_name_) |
bool | service_exists (const service_dict_type &services_, const std::string &service_name_) |
Check if a service with given name exists. More... | |
bool | service_of_type_exists (const service_dict_type &services_, const std::string &service_type_id_, const std::string &service_name_) |
Check if a service with given name and registered service type identifier exists. More... | |
void | merge_services (service_dict_type &services_, service_dict_type &merged_, bool duplicate_throw_=false) |
Merge a service dictionary. More... | |
bool | find_service_name_with_id (const service_dict_type &services_, const std::string &service_type_id_, std::string &service_name_) |
Find the service name with given registered service type identifier from a dictionary of services. More... | |
bool | find_service_names_with_id (const service_dict_type &services_, const std::string &service_type_id_, std::vector< std::string > &service_names_) |
Find all service names with given registered service type identifier from a dictionary of services. More... | |
base_service & | grab_service (service_dict_type &services_, const std::string &service_name_) |
Return the mutable reference to a service given its name. More... | |
const base_service & | get_service (const service_dict_type &services_, const std::string &service_name_) |
Return the const reference to a service given its name. More... | |
const std::string | get_label_from_type (int type_) |
Return the label associated to a data type. More... | |
int | get_type_from_label (const std::string &label_) |
Return the data type associated to a label. More... | |
const std::string & | empty_string () |
const std::string & | none_label () |
const std::string & | yes_label () |
const std::string & | no_label () |
void | invalidate (float &value_) |
float | invalid_real_single () |
Return invalid single precision float (set at NaN): More... | |
bool | is_valid (float value_) |
bool | is_infinity (float value_) |
bool | is_plus_infinity (float value_) |
bool | is_minus_infinity (float value_) |
void | plus_infinity (float &value_) |
void | minus_infinity (float &value_) |
void | infinity (float &value_) |
void | invalidate (double &value_) |
double | invalid_real_double () |
Return invalid double precision real (set at NaN): More... | |
double | invalid_real () |
Return invalid double precision real (set at NaN): More... | |
bool | is_valid (double value_) |
bool | is_infinity (double value_) |
bool | is_plus_infinity (double value_) |
bool | is_minus_infinity (double value_) |
bool | is_normal (double value_) |
void | plus_infinity (double &value_) |
void | minus_infinity (double &value_) |
void | infinity (double &value_) |
compare_result_type | compare_real (double x1_, double x2_, double abs_eps_=0.0, double rel_eps_=0.0) |
bool | name_validation (const std::string &name_, uint32_t flags_=NV_DEFAULT) |
Check if a name (object identifier) is valid using simple criteria. More... | |
bool | is_quoted (const std::string &text_, char q_='"') |
void | add_quotes (const std::string &from_, std::string &to_, char q_='"') |
Add quotes to a string. More... | |
void | add_quotes (std::string &text_, char q_='"') |
Add quotes to a string. More... | |
void | remove_quotes (const std::string &from_, std::string &to_, char q_='"') |
Remove quotes from a string. More... | |
void | remove_quotes (std::string &text_, char q_='"') |
Remove quotes from a string. More... | |
void | remove_all_quotes (std::string &text_) |
Remove all quotes from a string. More... | |
bool | resolve_library_info_path_keys (const std::string &library_topic_, std::string &install_path_key_, std::string &environ_path_key_) |
Extract the keys used by library information registration mechanism. More... | |
std::string | fetch_path (const std::string &path_str_) |
bool | fetch_path (std::string &word_, std::string &errmsg_) |
Extract the expanded path computed from the 'word' string. More... | |
bool | fetch_path_with_env (std::string &word_) |
bool | fetch_path_with_env (std::string &word_, std::string &errmsg_) |
Extract the expanded path computed from the 'word' string. More... | |
bool | fetch_path_without_env (std::string &word_) |
bool | fetch_path_with_env_p (std::string &word_, const std::string &parent_path_) |
bool | fetch_path_with_env_g (std::string &word_) |
bool | fetch_path_with_env_pg (std::string &word_, const std::string &parent_path_) |
bool | has_global_path () |
void | reset_global_path () |
void | set_global_path (const std::string &gpath_) |
const std::string & | get_global_path () |
std::string | expand_path (const std::string &path_str_) |
void | split_string (const std::string &word_, const std::string &separators_, std::list< std::string > &words_) |
template<typename Integral > | |
void | set_bit (Integral &number_, int pos_) |
template<typename Integral > | |
void | unset_bit (Integral &number_, int pos_) |
template<typename Integral > | |
void | toggle_bit (Integral &number_, int pos_) |
template<typename Integral > | |
bool | check_bit (Integral &number_, int pos_) |
bool | validate_version (const std::string &label_, const version_id &vid_, const std::string &version_rules_) |
Variables | |
keys_col_type | ks |
return | |
The Bayeux/datatools library top-level namespace.
Standard library:
Template support for configurable type.
Top-level namespace of the Bayeux/datatools module library.
datatools::safe_serial is a template class useful to record a list of instances of some type in a safe way for serialization. We can access one instance at a time (the current instance) but previous instances are accumulated in some internal container, being never erased. This behaviour is fundamental when using the memory tracking features of the Boost/serialization library.
Standard BOOST I/O file format for SuperNEMO data is :
Metadata: medadata as 'datatools::properties'
typedef std::map<std::string, int> datatools::dependency_level_dict_type |
typedef std::map<std::string, dependency_info_type> datatools::service_dependency_dict_type |
typedef std::map<std::string, service_entry_ptr> datatools::service_dict_type |
Type alias for a flat dictionary of service entries.
typedef std::shared_ptr<service_entry> datatools::service_entry_ptr |
Type alias for a shared pointer on a service entry instance.
enum datatools::data_type |
datatools initialization flags
Constants to measure the level of dependance between services.
void datatools::add_quotes | ( | const std::string & | from_, |
std::string & | to_, | ||
char | q_ = '"' |
||
) |
Add quotes to a string.
void datatools::add_quotes | ( | std::string & | text_, |
char | q_ = '"' |
||
) |
Add quotes to a string.
const std::string& datatools::backward_serial_tag | ( | int | i = 0 | ) |
bool datatools::check_bit | ( | Integral & | number_, |
int | pos_ | ||
) |
Check the bit at a given position in an integral number
bool datatools::check_serial_tag | ( | const std::string | stag_, |
const std::string | alt_tag_ = "" , |
||
typename boost::disable_if< has_bsts< T > >::type * | dummy_ = 0 |
||
) |
bool datatools::check_serial_tag | ( | const std::string | stag_, |
const std::string | alt_tag_ = "" , |
||
typename boost::enable_if< has_bsts< T > >::type * | dummy_ = 0 |
||
) |
compare_result_type datatools::compare_real | ( | double | x1_, |
double | x2_, | ||
double | abs_eps_ = 0.0 , |
||
double | rel_eps_ = 0.0 |
||
) |
Compare two real numbers given explicit absolute and/or relative tolerances
const properties& datatools::empty_config | ( | ) |
Return a non mutable reference to a singleton empty configuration container (can be used as default empty set of configuration parameters)
const std::string& datatools::empty_string | ( | ) |
std::string datatools::expand_path | ( | const std::string & | path_str_ | ) |
Extract the expanded path computed from a string. Internally uses the system's shell.
This method is not very elegant. It uses brute force, asking a shell to interpret the string via a 'system' call and using a temporary file to save the result. Urrkkk! That enables the expansion of environment variables embeded in the 'path_str' string:
Example: '$HOME/foo.dat' is expanded to '/home/>login</foo.dat'
std::string datatools::fetch_path | ( | const std::string & | path_str_ | ) |
Fetch the expanded path computed from a string.
bool datatools::fetch_path | ( | std::string & | word_, |
std::string & | errmsg_ | ||
) |
Extract the expanded path computed from the 'word' string.
bool datatools::fetch_path_with_env | ( | std::string & | word_ | ) |
Extract the expanded path computed from the 'word' string. Internally uses the getenv function and the datatools::library_info register.
Plain path:
"/tmp/foo/bar/baz.txt" "./foo/bar/baz.txt"
Path with special tokens and/or environment variables::
"~/foo/bar/baz.txt" "~foo/bar/baz.txt" "${HOME}/foo/bar/baz.txt" "${ENV1}/foo/bar/baz.txt" "${ENV1}/foo/${ENV2}/baz.txt"
Path from registered/mount point:
"@foo:bar/baz.txt" "@foo.resources:config/simulation/1.0/manager.conf" "@foo.data:dataset/march2017/run_1.data"
plain URN:
"urn:snemo:analysis:setup:1.0"
URN with explicit category:
"urn:snemo:analysis:setup:1.0@configuration" "urn:snemo:analysis:logo:small@image" "urn:snemo:analysis:run:1234@data"
bool datatools::fetch_path_with_env | ( | std::string & | word_, |
std::string & | errmsg_ | ||
) |
Extract the expanded path computed from the 'word' string.
bool datatools::fetch_path_with_env_g | ( | std::string & | word_ | ) |
Extract the expanded path computed from a string. Internally uses the getenv function and the datatools::library_info register.
bool datatools::fetch_path_with_env_p | ( | std::string & | word_, |
const std::string & | parent_path_ | ||
) |
Extract the expanded path computed from a string. Internally uses the getenv function and the datatools::library_info register.
bool datatools::fetch_path_with_env_pg | ( | std::string & | word_, |
const std::string & | parent_path_ | ||
) |
Extract the expanded path computed from a string. Internally uses the getenv function and the datatools::library_info register.
bool datatools::fetch_path_without_env | ( | std::string & | word_ | ) |
Extract the expanded path computed from a string. Internally uses the datatools::library_info register.
bool datatools::find_service_name_with_id | ( | const service_dict_type & | services_, |
const std::string & | service_type_id_, | ||
std::string & | service_name_ | ||
) |
Find the service name with given registered service type identifier from a dictionary of services.
bool datatools::find_service_names_with_id | ( | const service_dict_type & | services_, |
const std::string & | service_type_id_, | ||
std::vector< std::string > & | service_names_ | ||
) |
Find all service names with given registered service type identifier from a dictionary of services.
datatools::for | ( | pmap::const_iterator | iter = _props_.begin(); iter != _props_.end(); ++iter | ) |
datatools::for | ( | keys_col_type::const_iterator | i = ks.begin(); i != ks.end(); ++i | ) |
const T& datatools::get | ( | const service_dict_type & | services_, |
const std::string & | service_name_ | ||
) |
Return a non mutable reference to a typed service object with given name from a dictionary of services
services_ | The dictionary of service entries |
service_name_ | The name of the service to be checked |
const std::string& datatools::get_global_path | ( | ) |
Get the datatools global path
const std::string datatools::get_label_from_type | ( | int | type_ | ) |
Return the label associated to a data type.
std::string datatools::get_resource | ( | const std::string & | rname_, |
bool | overriden_env_ = false |
||
) |
Return URL, i.e. a path, to named resource By default the encoded resource root, determined at compile time is used to search for the resource. This can be overriden by setting the DATATOOLS_RESOURCE_DIR environment variable to a path holding custom resources.
rname_ | name of resource, given as a path relative to resource root. |
overriden_env_ | flag to allow path overriding by the DATATOOLS_RESOURCE_DIR environment variable. |
std::string datatools::get_resource_dir | ( | bool | overriden_env_ = false | ) |
Return URL, i.e. a path, to the base directory where resource files are installed
overriden_env_ | If set this flag trigger the search for the environment variable DATATOOLS_RESOURCE_DIR as a directory path on the filesystem as an alternative base directory for resources in place of the standard installation path |
const base_service& datatools::get_service | ( | const service_dict_type & | services_, |
const std::string & | service_name_ | ||
) |
Return the const reference to a service given its name.
int datatools::get_type_from_label | ( | const std::string & | label_ | ) |
Return the data type associated to a label.
T& datatools::grab | ( | service_dict_type & | services_, |
const std::string & | service_name_ | ||
) |
Return a mutable reference to a typed service object with given name from a dictionary of services
services_ | The dictionary of service entries |
service_name_ | The name of the service to be checked |
base_service& datatools::grab_service | ( | service_dict_type & | services_, |
const std::string & | service_name_ | ||
) |
Return the mutable reference to a service given its name.
bool datatools::has | ( | const service_dict_type & | services_, |
const std::string & | service_name_ | ||
) |
Check if a typed service object with given name exist in a dictionary of services
services_ | The dictionary of service entries |
service_name_ | The name of the service to be checked |
bool datatools::has_global_path | ( | ) |
Check if datatools has its global path activated
void datatools::infinity | ( | float & | value_ | ) |
Set a float to +infinity:
void datatools::infinity | ( | double & | value_ | ) |
Set a double to +infinity:
void datatools::initialize | ( | int | argc_ = 0 , |
char * | argv_[] = 0 , |
||
uint32_t | flags_ = 0 |
||
) |
Initialize the datatools library and kernel.
double datatools::invalid_real | ( | ) |
Return invalid double precision real (set at NaN):
double datatools::invalid_real_double | ( | ) |
Return invalid double precision real (set at NaN):
float datatools::invalid_real_single | ( | ) |
Return invalid single precision float (set at NaN):
void datatools::invalidate | ( | float & | value_ | ) |
Invalidate a float (set at NaN):
void datatools::invalidate | ( | double & | value_ | ) |
Invalidate a double (set at NaN):
bool datatools::is_covariant | ( | const Base & | b_ | ) |
bool datatools::is_infinity | ( | float | value_ | ) |
Check if a float is infinity (+/-inf):
bool datatools::is_infinity | ( | double | value_ | ) |
Check if a double is infinity (+/-inf):
bool datatools::is_minus_infinity | ( | float | value_ | ) |
Check if a float is minus infinity (-inf):
bool datatools::is_minus_infinity | ( | double | value_ | ) |
Check if a double is minus infinity (-inf):
bool datatools::is_normal | ( | double | value_ | ) |
Check if a double is normal (not a NaN and not inf):
bool datatools::is_plus_infinity | ( | float | value_ | ) |
Check if a float is plus infinity (+inf):
bool datatools::is_plus_infinity | ( | double | value_ | ) |
Check if a double is plus infinity (+inf):
bool datatools::is_quoted | ( | const std::string & | text_, |
char | q_ = '"' |
||
) |
Check if a string is quoted
bool datatools::is_valid | ( | float | value_ | ) |
Check if a float is valid (not a NaN):
bool datatools::is_valid | ( | double | value_ | ) |
Check if a double is valid (not a NaN):
bool datatools::load_ocd | ( | ::datatools::object_configuration_description & | , |
typename boost::disable_if< has_load< ::datatools::detail::ocd::loader< ConfigurableType > > >::type * | = 0 |
||
) |
bool datatools::load_ocd | ( | ::datatools::object_configuration_description & | ocd_, |
typename boost::enable_if< has_load< ::datatools::detail::ocd::loader< ConfigurableType > > >::type * | dummy = 0 |
||
) |
handle<T> datatools::make_handle | ( | Args &&... | args | ) |
Constructs an object of type T and wraps it in a datatools::handle.
This function behaves in the same way as std::make_shared or std::make_unique. It is functionally equivalent to:
T | the type to construct and wrap in the handle |
args | list of arguments with which the instance of T will be constructed |
Example:
Output:
void datatools::merge_services | ( | service_dict_type & | services_, |
service_dict_type & | merged_, | ||
bool | duplicate_throw_ = false |
||
) |
Merge a service dictionary.
void datatools::minus_infinity | ( | float & | value_ | ) |
Set a float to -infinity:
void datatools::minus_infinity | ( | double & | value_ | ) |
Set a double to -infinity:
bool datatools::name_validation | ( | const std::string & | name_, |
uint32_t | flags_ = NV_DEFAULT |
||
) |
Check if a name (object identifier) is valid using simple criteria.
const std::string& datatools::no_label | ( | ) |
const std::string& datatools::none_label | ( | ) |
void datatools::plus_infinity | ( | float & | value_ | ) |
Set a float to +infinity:
void datatools::plus_infinity | ( | double & | value_ | ) |
Set a double to +infinity:
void datatools::print_multi_lines | ( | std::ostream & | out_, |
const std::string & | text_, | ||
const std::string & | indent_ = "" |
||
) |
void datatools::remove_all_quotes | ( | std::string & | text_ | ) |
Remove all quotes from a string.
void datatools::remove_quotes | ( | const std::string & | from_, |
std::string & | to_, | ||
char | q_ = '"' |
||
) |
Remove quotes from a string.
void datatools::remove_quotes | ( | std::string & | text_, |
char | q_ = '"' |
||
) |
Remove quotes from a string.
void datatools::reset_global_path | ( | ) |
Reset the datatools global path
bool datatools::resolve_library_info_path_keys | ( | const std::string & | library_topic_, |
std::string & | install_path_key_, | ||
std::string & | environ_path_key_ | ||
) |
Extract the keys used by library information registration mechanism.
const std::string& datatools::serial_tag | ( | ) |
bool datatools::service_exists | ( | const service_dict_type & | services_, |
const std::string & | service_name_ | ||
) |
Check if a service with given name exists.
bool datatools::service_of_type_exists | ( | const service_dict_type & | services_, |
const std::string & | service_type_id_, | ||
const std::string & | service_name_ | ||
) |
Check if a service with given name and registered service type identifier exists.
void datatools::set_bit | ( | Integral & | number_, |
int | pos_ | ||
) |
Set the bit at a given position in an integral number
void datatools::set_global_path | ( | const std::string & | gpath_ | ) |
Set/activate the datatools global path
void datatools::split_string | ( | const std::string & | word_, |
const std::string & | separators_, | ||
std::list< std::string > & | words_ | ||
) |
The function splits a string using separators and provides a list of tokens.
The Boost library provides some powerful alternative through the tokenizer class and split string algorithms.
void datatools::terminate | ( | ) |
Terminate the datatools library and kernel.
void datatools::toggle_bit | ( | Integral & | number_, |
int | pos_ | ||
) |
Toggle the bit at a given position in an integral number
void datatools::unset_bit | ( | Integral & | number_, |
int | pos_ | ||
) |
Unset the bit at a given position in an integral number
bool datatools::validate_version | ( | const std::string & | label_, |
const version_id & | vid_, | ||
const std::string & | version_rules_ | ||
) |
const std::string& datatools::yes_label | ( | ) |
keys_col_type datatools::ks |
datatools::return |