12 #include <vapor/MyBase.h>
13 #include <vapor/XmlNode.h>
36 bool Test()
const {
return(_status);}
37 void Set() {_status =
true;}
55 const string &tag,
const map<string, string> &attrs,
56 size_t numChildrenHint = 0
61 size_t numChildrenHint = 0
72 const string &tag,
const map<string, string> &attrs,
73 size_t numChildrenHint = 0
74 ) {
return(
new ParamNode(tag, attrs, numChildrenHint)); }
113 void SetAllFlags(
bool dirty);
127 int SetElementDouble(
128 const string &tag,
double value
142 int SetElementDouble(
143 const string &tag,
const vector<double> &values
157 int SetElementDouble(
158 const vector<string> &tagpath,
const vector<double> &values
173 virtual const vector<double> &GetElementDouble(
const vector<string> &tagpath,
const vector<double>& defaultVal =
XmlNode::_emptyDoubleVec );
187 virtual const vector<double> &GetElementDouble(
const string &tag,
const vector<double>& defaultVal =
XmlNode::_emptyDoubleVec);
190 const string &tag,
const vector<long> &values
205 const string &tag,
long value
220 const vector<string> &tagpath,
const vector<long> &values
235 virtual const vector<long> &GetElementLong(
const vector<string> &tagpath,
const vector<long>& defaultVal =
XmlNode::_emptyLongVec);
248 virtual const vector<long> &GetElementLong(
const string &tag,
const vector<long>& defaultVal=
XmlNode::_emptyLongVec);
263 int SetElementString(
264 const string &tag,
const string &value
278 int SetElementString(
279 const vector<string> &tagpath,
const string &value
294 int SetElementStringVec(
const string &tag,
const vector<string> &values);
311 int SetElementStringVec(
const string &tag,
const vector<string> &values,
const string blankSub);
325 int SetElementStringVec(
const vector<string> &tagpath,
const vector<string> &values);
345 virtual const string &GetElementString(
const string &tag,
const string& defaultVal =
XmlNode::_emptyString);
359 virtual const string &GetElementString(
const vector<string> &tagpath,
const string& defaultVal =
XmlNode::_emptyString );
373 virtual void GetElementStringVec(
const vector<string> &tagpath, vector <string> &vec,
const vector<string>& defaultVal = _emptyStringVec) ;
386 virtual void GetElementStringVec(
const string &tag, vector <string> &vec,
const vector<string>& defaultVal = _emptyStringVec);
400 virtual void GetElementStringVec(
const string &tag, vector <string> &vec,
const string blankSub);
413 int SetFlagDirty(
const vector<string> &tagpath);
422 int SetFlagDirty(
const string &tag);
436 int AddNode(
const string& tag,
ParamNode* child);
453 int AddNode(
const vector<string>& tagpath,
ParamNode* child);
488 int AddRegisteredNode(
const vector<string>& tagPath,
ParamNode* child,
ParamsBase* associate);
511 ParamNode *GetNode(
const vector<string> &tagpath);
529 int ReplaceNode(
const vector<string> &tagpath,
ParamNode* newNode);
538 int ReplaceNode(
const string &tag,
ParamNode* newNode);
545 int DeleteNode(
const string &tag);
553 int DeleteNode(
const vector<string> &tagpath);
607 int UnRegisterDirtyFlag(
624 int UnRegisterDirtyFlag(
666 #endif // _ParamNode_h_
static const string _paramsBaseAttr
static const string _typeAttr
Nodes with state in Xml tree representation.
static vector< long > _emptyLongVec
ParamsBase * GetParamsBase()
ParamNode * GetNode(const string &tag) const
static string _emptyString
map< string, vector< DirtyFlag * > > _dirtyFlags
void SetParamsBase(ParamsBase *pBase)
virtual XmlNode * GetChild(size_t index) const
virtual ParamNode * Construct(const string &tag, const map< string, string > &attrs, size_t numChildrenHint=0)
static const string _paramNodeAttr
static vector< double > _emptyDoubleVec
vector< double > doublevec
ParamNode * GetChild(size_t index) const