charon-core
0.3.1
|
parameter file based implementation of a data manager More...
#include <charon-core/DataManagerParameterFile.hxx>
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 | |
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):
Definition at line 62 of file DataManagerParameterFile.hxx.
DataManagers::DataManagerParameterFile< T >::DataManagerParameterFile | ( | const Slot & | slot, |
const std::string & | config = "" |
||
) |
slot | slot to generate manager for |
config | config string |
Definition at line 85 of file DataManagerParameterFile.hxx.
References DataManagers::DataManagerParameterFile< T >::_filename, DataManagers::DataManagerParameterFile< T >::_paramName, DataManagers::DataManagerParameterFile< T >::_pf, FileTool::exists(), Slot::getName(), ParameteredObject::getName(), Slot::getParent(), and ParameterFile::save().