ADTF Display Toolbox
Loading...
Searching...
No Matches
cRuntimeConfiguration< T >abstract

Template class enables the loading and storing of runtime configuration data. More...

#include <runtimeconfig.h>

Inheritance diagram for cRuntimeConfiguration< T >:
[legend]

Public Member Functions

tResult SaveRuntimeConfigFile ()
 Saves all properties to the file configured with adtf-property runtime_config_file_path.
 
tResult LoadRuntimeConfigFile ()
 Loads all properties from the file configured with adtf-property runtime_config_file_path.
 

Protected Member Functions

virtual tResult SaveConfiguration (adtf::base::IConfiguration *pRuntimeConfig)=0
 Callback to be implemented by user of runtime_configuration.
 
virtual tResult LoadConfiguration (adtf::base::IConfiguration *pRuntimeConfig)=0
 Callback to be implemented by user of runtime_configuration.
 

Protected Attributes

adtf::base::property_variable< adtf::util::cFilename > m_strConfigFile
 CE property_variable storing path of runtime configuration file.
 
cRuntimeConfigFile m_oRuntimeConfig
 actual runtime configuration
 

Private Member Functions

adtf::util::cString GetConfigFile ()
 Getter for path of configuration file.
 

Detailed Description

template<typename T>
class cRuntimeConfiguration< T >

Template class enables the loading and storing of runtime configuration data.

Typlically a service or filter would inherit from runtime_configuration<T>. The filter/service will then inherit a property 'runtime_config_file_path'. This property can be used to configure the path of the runtime configuration file by the CE.

A call to SaveRuntimeConfigFile() will store all properties to the runtime configuration file A call to LoadRuntimeConfigFile() will load all properties from the runtime configuration file

Template Parameters
Tenables a runtime_configuration to inherit from some other class

Definition at line 242 of file runtimeconfig.h.

Constructor & Destructor Documentation

◆ cRuntimeConfiguration()

template<typename T>
cRuntimeConfiguration ( )

Definition at line 299 of file runtimeconfig.h.

◆ ~cRuntimeConfiguration()

template<typename T>
~cRuntimeConfiguration ( )

Definition at line 309 of file runtimeconfig.h.

Member Function Documentation

◆ GetConfigFile()

template<typename T>
adtf::util::cString GetConfigFile ( )
private

Getter for path of configuration file.

Returns
Path of configuration file

Definition at line 314 of file runtimeconfig.h.

References m_strConfigFile.

Referenced by LoadRuntimeConfigFile(), and SaveRuntimeConfigFile().

◆ LoadConfiguration()

template<typename T>
virtual tResult LoadConfiguration ( adtf::base::IConfiguration * pRuntimeConfig)
protectedpure virtual

Callback to be implemented by user of runtime_configuration.

Implementation has to get all properties from pRuntimeConfig (contains all loaded properties from runtime configuration file)

Parameters
[in]pRuntimeConfigIConfiguration to read properties from
Returns
Standard result.

Implements IRuntimeConfigurationLoadSave.

Referenced by LoadRuntimeConfigFile().

◆ LoadRuntimeConfigFile()

template<typename T>
tResult LoadRuntimeConfigFile ( )

Loads all properties from the file configured with adtf-property runtime_config_file_path.

Returns
Standard result.

Definition at line 342 of file runtimeconfig.h.

References GetConfigFile(), LoadConfiguration(), m_oRuntimeConfig, and m_strConfigFile.

◆ SaveConfiguration()

template<typename T>
virtual tResult SaveConfiguration ( adtf::base::IConfiguration * pRuntimeConfig)
protectedpure virtual

Callback to be implemented by user of runtime_configuration.

Implementation has to add all properties to be written to runtime configuration file to pRuntimeConfig

Parameters
[out]pRuntimeConfigIConfiguration to store properties to
Returns
Standard result.

Implements IRuntimeConfigurationLoadSave.

Referenced by SaveRuntimeConfigFile().

◆ SaveRuntimeConfigFile()

template<typename T>
tResult SaveRuntimeConfigFile ( )

Saves all properties to the file configured with adtf-property runtime_config_file_path.

Returns
Standard result.

Definition at line 320 of file runtimeconfig.h.

References GetConfigFile(), m_oRuntimeConfig, and SaveConfiguration().

Member Data Documentation

◆ m_oRuntimeConfig

template<typename T>
cRuntimeConfigFile m_oRuntimeConfig
protected

actual runtime configuration

Definition at line 248 of file runtimeconfig.h.

Referenced by LoadRuntimeConfigFile(), and SaveRuntimeConfigFile().

◆ m_strConfigFile

template<typename T>
adtf::base::property_variable<adtf::util::cFilename> m_strConfigFile
protected

CE property_variable storing path of runtime configuration file.

Definition at line 246 of file runtimeconfig.h.

Referenced by GetConfigFile(), and LoadRuntimeConfigFile().