Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
BasicSetup Class Reference

#include "common/basic-setup.hpp"

Description

Represents the elementary self-configuration of a running Lumiera application instance.

This basic setup is tied to the location of the Lumiera executable; from there the initial configuration locates a setup.ini to read in the fundamental settings. This is even prerequisite for loading any extension modules or reading any extended application configuration; usually this bootstrap process happens at or before the start of the main() function. Any failure leads to immediate termination of the application.

WIP 2011 – preliminary configuration solution
The full-blown Configuration subsystem is just drafted and way from being usable. Thus we'll use this basic configuration as a replacement for the time being.
See also
configfacade.hpp
AppState

Definition at line 88 of file basic-setup.hpp.

Public Member Functions

 BasicSetup (string bootstrapIni)
 Creating the BasicSetup object performs the initial self-configuration of the Lumiera Application.
 
string operator[] (lib::Literal key) const
 
opt::variable_value const & get (lib::Literal key) const
 

Private Member Functions

void __ensure_hasKey (string const &key) const
 
- Private Member Functions inherited from NonCopyable
 ~NonCopyable ()=default
 
 NonCopyable ()=default
 
 NonCopyable (NonCopyable const &)=delete
 
NonCopyableoperator= (NonCopyable const &)=delete
 

Private Attributes

opt::options_description syntax
 
opt::variables_map settings
 

Constructor & Destructor Documentation

◆ BasicSetup()

BasicSetup ( string  bootstrapIni)

Creating the BasicSetup object performs the initial self-configuration of the Lumiera Application.

For this, the setup.ini file is located relative to the current application executable, read in and parsed into a map of setup variables.

Definition at line 72 of file basic-setup.cpp.

References BasicSetup::settings, and BasicSetup::syntax.

Member Function Documentation

◆ operator[]()

string operator[] ( lib::Literal  key) const
inline

Definition at line 98 of file basic-setup.hpp.

References BasicSetup::get().

+ Here is the call graph for this function:

◆ get()

opt::variable_value const & get ( lib::Literal  key) const
inline

Definition at line 104 of file basic-setup.hpp.

References BasicSetup::__ensure_hasKey(), and BasicSetup::settings.

Referenced by AppState::fetchSetupValue(), WrappedStandardExeBuilder::invokeOriginalBuilder(), and BasicSetup::operator[]().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __ensure_hasKey()

void __ensure_hasKey ( string const &  key) const
inlineprivate

Definition at line 114 of file basic-setup.hpp.

References util::contains(), and BasicSetup::settings.

Referenced by BasicSetup::get().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ syntax

opt::options_description syntax
private

Definition at line 91 of file basic-setup.hpp.

Referenced by BasicSetup::BasicSetup().

◆ settings

opt::variables_map settings
private
+ Inheritance diagram for BasicSetup:
+ Collaboration diagram for BasicSetup:

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