ifw-fcf  5.0.0-pre2
Public Member Functions | List of all members
fcf::devmgr::common::Config Class Reference

#include <config.hpp>

Inheritance diagram for fcf::devmgr::common::Config:

Public Member Functions

 Config ()
 
virtual ~Config ()
 
void LoadConfig (const std::string &filename="", bool reset=false)
 
const int GetNumDevices () const
 GetNumDevices. More...
 
const std::string GetDeviceName (const int &device_index) const
 GetDeviceName. More...
 
const std::string GetDeviceFile (const int &device_index) const
 GetDeviceFile. More...
 
const std::string GetDeviceType (const int &device_index) const
 GetDeviceType. More...
 
const std::string GetDeviceInterface (const int &device_index) const
 GetDeviceInterface. More...
 
virtual void GetConfigList (utils::bat::DbVector &cfg_list) override
 Get configuration list. More...
 

Detailed Description

This class provide access to the command line options and the configuration parameters stored in the configuration file.

Constructor & Destructor Documentation

◆ Config()

fcf::devmgr::common::Config::Config ( )

Default constructor.

Initialize application configuration attributes by

  • first use the default constant values defined in the header
  • override the constant values with environment variables (if defined)

◆ ~Config()

fcf::devmgr::common::Config::~Config ( )
virtual

Default destructor.

Member Function Documentation

◆ GetConfigList()

void fcf::devmgr::common::Config::GetConfigList ( utils::bat::DbVector &  cfg_list)
overridevirtual

Get configuration list.

Parameters
cfg_listList of all configuration parameters.

This method returs the complete of configuration parameters handled by this class. This method is used to dump the list into the DB.

◆ GetDeviceFile()

const std::string fcf::devmgr::common::Config::GetDeviceFile ( const int &  device_index) const

GetDeviceFile.

Parameters
device_index
Returns

◆ GetDeviceInterface()

const std::string fcf::devmgr::common::Config::GetDeviceInterface ( const int &  device_index) const

GetDeviceInterface.

Parameters
device_index
Returns

◆ GetDeviceName()

const std::string fcf::devmgr::common::Config::GetDeviceName ( const int &  device_index) const

GetDeviceName.

Parameters
device_index
Returns

◆ GetDeviceType()

const std::string fcf::devmgr::common::Config::GetDeviceType ( const int &  device_index) const

GetDeviceType.

Parameters
device_index
Returns

◆ GetNumDevices()

const int fcf::devmgr::common::Config::GetNumDevices ( ) const

GetNumDevices.

Returns

◆ LoadConfig()

void fcf::devmgr::common::Config::LoadConfig ( const std::string &  filename = "",
bool  reset = false 
)

This method load from a configuration file the application configuration overriding the initialization done in the constructor and the command line options.

Parameters
[in]filenameApplication configuration filename.

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