31#define PARAMS_IMPL_TAG(class, tag) const std::string class::tag = #tag;
138 void BeginGroup(
const string &description) { _ssave->BeginGroup(description); }
144 virtual vector<long>
GetValueLongVec(
const string tag,
const vector<long> &defaultVal)
const;
150 virtual vector<double>
GetValueDoubleVec(
const string tag,
const vector<double> &defaultVal)
const;
156 virtual vector<string>
GetValueStringVec(
const string tag,
const vector<string> &defaultVal)
const;
160 virtual void SetValueLongVec(
const string &tag,
string description,
const vector<long> &values);
162 virtual void SetValueLong(
const string &tag,
string description,
long value);
164 virtual void SetValueDoubleVec(
const string &tag,
string description,
const vector<double> &values);
166 virtual void SetValueDouble(
const string &tag,
string description,
double value);
168 virtual void SetValueStringVec(
const string &tag,
string description,
const vector<string> &values);
170 virtual void SetValueString(
const string &tag,
string description,
const string &value);
178 return (_node->Tag());
249 m_factoryFunctionRegistry[name] = classFactoryFunction;
261 ParamsFactory &operator=(
const ParamsFactory &) {
return *
this; }
285 return new T(ssave, node);
364 size_t Size()
const {
return (_elements.size()); }
372 map<string, ParamsBase *> _elements;
virtual void IntermediateChange()
virtual bool GetEnabled() const
virtual void Reinit(const XmlNode *rootNode)
virtual void BeginGroup(string description)
virtual void SetEnabled(bool onOff)
virtual void Save(const XmlNode *node, string description)
Nodes with state in Xml tree representation.
virtual vector< double > GetValueDoubleVec(const string tag, const vector< double > &defaultVal) const
XmlNode * GetNode() const
virtual vector< string > GetValueStringVec(const string tag, const vector< string > &defaultVal) const
void IntermediateChange()
ParamsBase & operator=(const ParamsBase &rhs)
void SetParent(ParamsBase *parent)
virtual void SetValueString(const string &tag, string description, const string &value)
virtual vector< long > GetValueLongVec(const string tag, const vector< long > &defaultVal) const
ParamsBase(ParamsBase &&)=delete
ParamsBase(const ParamsBase &rhs)
Copy constructor.
virtual void SetValueDoubleVec(const string &tag, string description, const vector< double > &values)
virtual void SetValueLongVec(const string &tag, string description, const vector< long > &values)
ParamsBase(StateSave *ssave)
ParamsBase(StateSave *ssave, XmlNode *node)
const map< string, string > & GetAttributes()
ParamsBase(StateSave *ssave, const string &classname)
virtual double GetValueDouble(const string tag, double defaultVal) const
virtual string GetValueString(const string tag, string defaultVal) const
virtual vector< string > GetValueStringVec(const string tag) const
void BeginGroup(const string &description)
ParamsBase & operator=(ParamsBase &)=delete
virtual void SetValueLong(const string &tag, string description, long value)
void Remove(const string &name)
virtual vector< double > GetValueDoubleVec(const string tag) const
virtual void SetValueDouble(const string &tag, string description, double value)
virtual vector< long > GetValueLongVec(const string tag) const
virtual long GetValueLong(const string tag, long defaultVal) const
bool operator!=(const ParamsBase &rhs) const
virtual void SetValueStringVec(const string &tag, string description, const vector< string > &values)
bool operator==(const ParamsBase &rhs) const
Equivalence operator.
ParamsContainer & operator=(const ParamsContainer &rhs)
ParamsContainer(ParamsBase::StateSave *ssave, XmlNode *node)
ParamsContainer(ParamsBase::StateSave *ssave, const string &myname)
virtual ~ParamsContainer()
ParamsBase * GetParams(string name) const
ParamsBase * Insert(ParamsBase *pb, string name)
ParamsContainer(const ParamsContainer &rhs)
Copy constructor.
XmlNode * GetNode() const
vector< string > GetNames() const
ParamsBase * Create(string classType, string name)
string GetParamsName(const ParamsBase *pb) const
void SetParent(ParamsBase *parent)
void Remove(const ParamsBase *pb)
vector< string > GetFactoryNames() const
static ParamsFactory * Instance()
ParamsBase * CreateInstance(string classType, ParamsBase::StateSave *, XmlNode *))
void RegisterFactoryFunction(string name, function< ParamsBase *(ParamsBase::StateSave *, XmlNode *)> classFactoryFunction)
ParamsRegistrar(string classType)
ParamsSeparator(StateSave *ssave, XmlNode *node)
ParamsSeparator(ParamsSeparator *parent, const string &name)
bool HasChild(const string &name)
virtual ~ParamsSeparator()
ParamsSeparator(StateSave *ssave, const string &name)
virtual XmlNode * GetNode(std::vector< string > path, bool absolute) const