charon-core  0.3.1
DataManagers::DataManagerParameterFile< T > Class Template Reference

parameter file based implementation of a data manager More...

#include <charon-core/DataManagerParameterFile.hxx>

Inheritance diagram for DataManagers::DataManagerParameterFile< T >:

Public Member Functions

 DataManagerParameterFile (const Slot &slot, const std::string &config="")
 create manager More...
 
virtual std::string getConfig () const
 get configuration string
 
virtual T getData ()
 read data
 
virtual void setData (const T &data)
 write data
 

Private Attributes

const std::string _filename
 paraneter file name
 
std::string _paramName
 parameter name in the file
 
ParameterFile _pf
 parameter file to store parameter
 

Detailed Description

template<typename T>
class DataManagers::DataManagerParameterFile< T >

This secialized data manager is able to handle all types that may be represented as a std::string which is written to a parameter file. For data retrieval, this string is transformed back to the original data type.

Currently, this data manager is registered to the Slot::DataManagerFactory for the following types:

  • int
  • float
  • double
  • std::string

The parameter file for data exchange is saved as lastRunParameterCache.wrp in the current working dir. The config string is the used parameter name within that file.

The config string here is currently kind of redundant because directly infered from the output slot (which is passed to the constructor):

[ObjectName].[SlotName]
Warning
If there are e.g. nested workflows with objects with the same name and output slots, the naming scheme may cause conflicts. Perhaps in a future version this may be fixed by adding an increasing number to the config string (used as parameter name) if an entry with the same name already exists.

Definition at line 62 of file DataManagerParameterFile.hxx.

Constructor & Destructor Documentation


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