ifw-ccf  1.0.0
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
ccf::common::SetupBase Class Reference

Global setup class for CCF applications. More...

#include <setupBase.hpp>

Inheritance diagram for ccf::common::SetupBase:
ccf::common::Base

Public Member Functions

 ~SetupBase ()
 
ctd::param::ParameterSet & GetStagingSetup ()
 
ctd::param::ParameterSet & GetSetup ()
 
void GetPar (const std::string &name, ctd::param::Parameter &par) const
 
bool HasPar (const std::string &name, ctd::param::Parameter &par) const
 Check if the given parameter is defined in 1) The Staging Setup, 2) the Installed Setup. Return true if yes, and set the members. More...
 
template<class TYPE >
bool HasPar (const std::string &name, TYPE &value) const
 
template<class TYPE >
bool HasStagingPar (const std::string &name, TYPE &value) const
 
bool HasStagingPar (const std::string &name, ctd::param::Parameter &par) const
 Check if a given Staging Parameter is defined. If yes, return true + set members of the provided parameter object. More...
 
template<class TYPE >
TYPE GetValue (const std::string &name) const
 Get a parameter value from the configuration. More...
 
void Load (const std::string &filename)
 Load a Setup File into the Staging Setup object (New Setup). More...
 
void AcceptSetup ()
 Merge the parameters in the Staging Setup (object) into the Installed Setup. More...
 
- Public Member Functions inherited from ccf::common::Base
 Base ()
 
 ~Base ()
 
const std::string & GetClassName () const
 Return the allocated name of the class. More...
 

Static Public Member Functions

static SetupBaseInstance ()
 Return reference to unique instance of the application class. More...
 
- Static Public Member Functions inherited from ccf::common::Base
static ccf::mptk::ManagerMptk ()
 Return reference to internal MPTK instance (singleton). More...
 
static void SetLogLevel (const ccf::common::LogLevel log_level)
 Set the log level. More...
 
static ccf::common::LogLevel GetLogLevel ()
 Return the current CCF log level. More...
 

Static Public Attributes

static SetupBases_instance = NULL
 Singleton instance. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ccf::common::Base
void SetClassName (const std::string &class_name)
 Set the name of the class in question. More...
 

Detailed Description

Global setup class for CCF applications.

Constructor & Destructor Documentation

◆ ~SetupBase()

ccf::common::SetupBase::~SetupBase ( )

Member Function Documentation

◆ AcceptSetup()

void ccf::common::SetupBase::AcceptSetup ( )

Merge the parameters in the Staging Setup (object) into the Installed Setup.

◆ GetPar()

void ccf::common::SetupBase::GetPar ( const std::string &  name,
ctd::param::Parameter &  par 
) const

Get the parameter of the given name. The parameter is first checked for in the Staging Setup, afterwards inthe Installed Setup Object.

◆ GetSetup()

ctd::param::ParameterSet & ccf::common::SetupBase::GetSetup ( )

Return the reference to the Installed Setup object. See also "GetStagingSetup()".

◆ GetStagingSetup()

ctd::param::ParameterSet & ccf::common::SetupBase::GetStagingSetup ( )

Return the reference to the Staging Setup object. When a Setup Request is received, the parameters in the request are stored in the Staging Setup object while being processed. Once processed the keys in the Staging Setup object shall be merged into the Setup object, containing the current, installed setup. See also "SetSetup()".

◆ GetValue()

template<class TYPE >
TYPE ccf::common::SetupBase::GetValue ( const std::string &  name) const
inline

Get a parameter value from the configuration.

◆ HasPar() [1/2]

bool ccf::common::SetupBase::HasPar ( const std::string &  name,
ctd::param::Parameter &  par 
) const

Check if the given parameter is defined in 1) The Staging Setup, 2) the Installed Setup. Return true if yes, and set the members.

◆ HasPar() [2/2]

template<class TYPE >
bool ccf::common::SetupBase::HasPar ( const std::string &  name,
TYPE &  value 
) const
inline

Probe if a given parameter is defined in the set. Return true if yes and set the value to the value of the parameter.

◆ HasStagingPar() [1/2]

bool ccf::common::SetupBase::HasStagingPar ( const std::string &  name,
ctd::param::Parameter &  par 
) const

Check if a given Staging Parameter is defined. If yes, return true + set members of the provided parameter object.

◆ HasStagingPar() [2/2]

template<class TYPE >
bool ccf::common::SetupBase::HasStagingPar ( const std::string &  name,
TYPE &  value 
) const
inline

Probe if a given parameter is defineda among the Setup Staging Parameters. Return true if yes and set the value to the value of the parameter.

◆ Instance()

SetupBase & ccf::common::SetupBase::Instance ( )
static

Return reference to unique instance of the application class.

◆ Load()

void ccf::common::SetupBase::Load ( const std::string &  filename)

Load a Setup File into the Staging Setup object (New Setup).

Member Data Documentation

◆ s_instance

SetupBase * ccf::common::SetupBase::s_instance = NULL
static

Singleton instance.


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