22 #ifndef DATAMANAGERPARAMETERFILE_HXX
23 #define DATAMANAGERPARAMETERFILE_HXX
28 namespace DataManagers {
77 const Slot& slot,
const std::string& config =
"");
78 virtual void setData(
const T& data);
80 virtual std::string getConfig()
const;
86 const Slot& slot,
const std::string& config) :
87 _filename(
"lastRunParameterCache.wrp")
102 _pf.load (_filename);
103 _pf.set<T>(_paramName, data);
104 _pf.save (_filename);
111 T val = _pf.get<T>(_paramName);
125 const Slot& slot,
const std::string& config) {
131 const Slot& slot,
const std::string& config) {
137 const Slot& slot,
const std::string& config) {
143 const Slot& slot,
const std::string& config) {
148 #endif // DATAMANAGERPARAMETERFILE_HXX
static DataManager< T > * getManager(const Slot &slot, const std::string &config="")
get data manager from configuration string
std::string _paramName
parameter name in the file
This class serves to store parameters used within the Charon Project.
DataManagerParameterFile(const Slot &slot, const std::string &config="")
create manager
interface of data management classes
#define charon_core_LOCAL
Preprocessor macro to define this class/function as hidden, i.e.
ParameteredObject & getParent()
get parent object
virtual T getData()
read data
virtual std::string getConfig() const
get configuration string
virtual std::string getName() const
Get slot name.
virtual void setData(const T &data)
write data
const std::string _filename
paraneter file name
parameter file based implementation of a data manager
Implementation of the abstract class Slot and template classes InputSlot and OutputSlot.
Commom properties of slot objects.
bool save(std::string fileName) const
Save parameters and values to a plain text file.
const std::string & getName() const
instance name
ParameterFile _pf
parameter file to store parameter