tfel
Loading...
Searching...
No Matches
tfel::check::ConfigurationManager Struct Reference

configurations are organized as a tree. More...

#include </home/runner/work/tfel/tfel/tfel-check/include/TFEL/Check/ConfigurationManager.hxx>

Public Member Functions

 ConfigurationManager ()
 default constructor
 ConfigurationManager (const Configuration &)
 constructor from a configuration.
 ConfigurationManager (ConfigurationManager &&) noexcept
 move constructor
 ConfigurationManager (const ConfigurationManager &)
 copy constructor
ConfigurationManager & operator= (ConfigurationManager &&) noexcept
 move assignement
ConfigurationManager & operator= (const ConfigurationManager &)
 standard assignement
ConfigurationManager & getConfigurationManager (const std::string &)
const Configuration & getConfiguration (const std::string &) const
const Configuration & getConfiguration () const
void addSubstitution (const std::string &, const std::string &, const bool=true)
 add a new substitution
void addEnvironmentVariable (const std::string &, const std::string &, const bool=true)
 add a new environment variable
void addComponent (const std::string &)
 add a new component
void setDiscardCommandsFailure (const bool)
 set discard commands failure
void setCleanUp (const bool)
 set if the the generated files and directories listed by the @CleanFiles and @CleanDirectories keywords must be removed
void discardCleanUpOnFailure (const bool)
 set if the the generated files and directories listed by the @CleanFiles and @CleanDirectories keywords must not be removed in case of failure.

Detailed Description

configurations are organized as a tree.

All modifications to the configuration of the root of the tree are made to the subtrees, called here the subordinates.

The ConfigurationManaoger is build in such a way that each change to the root configuration is propagated to all the subordinates.

Constructor & Destructor Documentation

◆ ConfigurationManager()

tfel::check::ConfigurationManager::ConfigurationManager ( const Configuration & )
explicit

constructor from a configuration.

Parameters
[in]srcconfiguration

Member Function Documentation

◆ addComponent()

void tfel::check::ConfigurationManager::addComponent ( const std::string & )

add a new component

Parameters
[in]ccomponent

◆ addEnvironmentVariable()

void tfel::check::ConfigurationManager::addEnvironmentVariable ( const std::string & ,
const std::string & ,
const bool = true )

add a new environment variable

Parameters
[in]s1name of the environment variable
[in]s2value of the environment variable
[in]bif true, throws if the environment variable already exists. Otherwise, nothing is done.

◆ addSubstitution()

void tfel::check::ConfigurationManager::addSubstitution ( const std::string & ,
const std::string & ,
const bool = true )

add a new substitution

Parameters
[in]s1string to be substituted
[in]s2substitution string
[in]bif true, throws if the substitution already exists. Otherwise, nothing is done.

◆ discardCleanUpOnFailure()

void tfel::check::ConfigurationManager::discardCleanUpOnFailure ( const bool )

set if the the generated files and directories listed by the @CleanFiles and @CleanDirectories keywords must not be removed in case of failure.

Parameters
[in]bboolean

◆ getConfiguration() [1/2]

const Configuration & tfel::check::ConfigurationManager::getConfiguration ( ) const
nodiscard
Returns
the configuration associated at the root of the tree

◆ getConfiguration() [2/2]

const Configuration & tfel::check::ConfigurationManager::getConfiguration ( const std::string & ) const
nodiscard
Returns
the configuration associated at the specified location.
Parameters
[in]drelative directory

◆ getConfigurationManager()

ConfigurationManager & tfel::check::ConfigurationManager::getConfigurationManager ( const std::string & )
nodiscard
Returns
the configuration manager assocatied with the given directory.
Parameters
[in]ndirectory name

◆ setCleanUp()

void tfel::check::ConfigurationManager::setCleanUp ( const bool )

set if the the generated files and directories listed by the @CleanFiles and @CleanDirectories keywords must be removed

Parameters
[in]bboolean

◆ setDiscardCommandsFailure()

void tfel::check::ConfigurationManager::setDiscardCommandsFailure ( const bool )

set discard commands failure

Parameters
[in]bboolean

The documentation for this struct was generated from the following file: