ADTF Display Toolbox
Loading...
Searching...
No Matches
cRuntimeConfigFile

Class is a adtf::base::configuration that allows the storing and loading of all contained properties to/from a xml file. More...

#include <runtimeconfig.h>

Inheritance diagram for cRuntimeConfigFile:
[legend]

Public Member Functions

 cRuntimeConfigFile (const adtf::util::cFilename &strConfigFile)
 Constructor.
 
tResult Load ()
 Loads all properties from the configured xml file and stores it to this instance.
 
tResult Save ()
 Saves all properties of this instance to the configured xml file.
 
tResult ClearAllProperties ()
 Clears all properties currently stored in cRuntimeConfigFile.
 
tVoid SetConfigFile (const adtf::util::cFilename &strFilename)
 Setter for xml config file to load and store runtime configuration.
 
adtf::util::cFilename GetConfigFile ()
 Setter for xml config file to load and store runtime configuration.
 

Protected Attributes

adtf::util::cFilename m_strConfigFile
 path to the xml file
 

Private Member Functions

tResult StoreProperty (adtf::util::cString strPrefix, adtf::util::cDOMElement *pConfig)
 Stores all properties of this instance in DOM pConfig.
 

Detailed Description

Class is a adtf::base::configuration that allows the storing and loading of all contained properties to/from a xml file.

Definition at line 87 of file runtimeconfig.h.

Constructor & Destructor Documentation

◆ cRuntimeConfigFile()

cRuntimeConfigFile ( const adtf::util::cFilename & strConfigFile)
inline

Constructor.

Parameters
[in]strConfigFilexml file to load and store runtime configuration

Definition at line 99 of file runtimeconfig.h.

References m_strConfigFile.

◆ ~cRuntimeConfigFile()

virtual ~cRuntimeConfigFile ( )
inlinevirtual

Definition at line 103 of file runtimeconfig.h.

Member Function Documentation

◆ ClearAllProperties()

tResult ClearAllProperties ( )
inline

Clears all properties currently stored in cRuntimeConfigFile.

Returns
Standard result.

Definition at line 153 of file runtimeconfig.h.

◆ GetConfigFile()

adtf::util::cFilename GetConfigFile ( )
inline

Setter for xml config file to load and store runtime configuration.

Returns
Path to config file

Definition at line 178 of file runtimeconfig.h.

References m_strConfigFile.

◆ Load()

tResult Load ( )
inline

Loads all properties from the configured xml file and stores it to this instance.

Returns
Standard result.

Definition at line 112 of file runtimeconfig.h.

References m_strConfigFile.

◆ Save()

tResult Save ( )
inline

Saves all properties of this instance to the configured xml file.

Returns
Standard result.

Definition at line 139 of file runtimeconfig.h.

References m_strConfigFile, and StoreProperty().

◆ SetConfigFile()

tVoid SetConfigFile ( const adtf::util::cFilename & strFilename)
inline

Setter for xml config file to load and store runtime configuration.

Returns
Standard result.
Parameters
[in]strFilenamevalue to set

Definition at line 168 of file runtimeconfig.h.

References m_strConfigFile.

◆ StoreProperty()

tResult StoreProperty ( adtf::util::cString strPrefix,
adtf::util::cDOMElement * pConfig )
inlineprivate

Stores all properties of this instance in DOM pConfig.

Parameters
[in]strPrefixPrefix under which the properties are stored in DOM.
[in]pConfigDOM to store data to.
Returns
Standard result.

Definition at line 192 of file runtimeconfig.h.

Referenced by Save().

Member Data Documentation

◆ m_strConfigFile

adtf::util::cFilename m_strConfigFile
protected

path to the xml file

Definition at line 91 of file runtimeconfig.h.

Referenced by cRuntimeConfigFile(), GetConfigFile(), Load(), Save(), and SetConfigFile().