aGrUM 3.3.2
a C++ library for (probabilistic) graphical models
configuration.h File Reference

Typed, documented, sectioned configuration singleton read from an .ini content. More...

#include <array>
#include <atomic>
#include <cstdint>
#include <functional>
#include <mutex>
#include <string>
#include <utility>
#include <variant>
#include <vector>
#include <agrum/agrum.h>
#include <initializer_list>
#include <shared_mutex>
#include <string_view>
#include <unordered_map>
#include <agrum/base/core/configuration/configuration_tpl.h>
#include <agrum/base/core/configuration/configuration_inl.h>
Include dependency graph for configuration.h:

Go to the source code of this file.

Classes

class  gum::Configuration
 Sectioned key/value configuration with typed and documented keys. More...
struct  gum::Configuration::Meta
 metadata attached to a key by a ### line More...
struct  gum::Configuration::Meta::Domain
 domain of validity of an int or float key, written after the type in the ### line: float]0,1[, int[1,], int[0,100]. A bracket turned toward the bound includes it, turned away excludes it ; an omitted bound is unbounded. More...
struct  gum::Configuration::SchemaEntry
 one line of the schema (see schema()) More...
struct  gum::Configuration::Notice
 a message that cannot be an exception (the operation went on), see takeNotices() More...
struct  gum::Configuration::DefaultsSource
 a text of defaults, with the name designating it in error messages More...
struct  gum::Configuration::Item

Namespaces

namespace  gum
 gum is the global namespace for all aGrUM entities

Functions

Configuration & gum::config ()
 A short name for Configuration::instance() : gum::config().epsilonStandard(). It is not inline so that it is exported by the library (shared build on Windows).

Detailed Description

Typed, documented, sectioned configuration singleton read from an .ini content.

The structure of the configuration (sections, keys, default values, types and one-line documentation) is given by a "defaults" ini text. Each key is documented by a metadata line placed immediately above it:

### type :: one-line documentation
key = value

where type is one of int, float, bool, str, an enumeration v1|v2|... or a deprecation deprecated -> section.key. Lines starting with # (but not ###) or ; are free comments.

Author
Pierre-Henri WUILLEMIN(_at_LIP6)

Definition in file configuration.h.