mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Core: Set/GetUserData in Xmlize
git-svn-id: svn://ultimatepp.org/upp/trunk@2981 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
7f195dce4d
commit
3b60c537c0
1 changed files with 5 additions and 1 deletions
|
|
@ -15,6 +15,7 @@ String XmlAttrStore(const T& var)
|
|||
class XmlIO {
|
||||
XmlNode& node;
|
||||
bool loading;
|
||||
Value userdata;
|
||||
|
||||
public:
|
||||
bool IsLoading() const { return loading; }
|
||||
|
|
@ -54,9 +55,12 @@ public:
|
|||
XmlIO Add() { XmlIO m(node.Add(), IsLoading()); return m; }
|
||||
XmlIO Add(const char *id) { XmlIO m(node.Add(id), IsLoading()); return m; }
|
||||
XmlIO GetAdd(const char *id) { XmlIO m(node.GetAdd(id), IsLoading()); return m; }
|
||||
|
||||
void SetUserData(const Value& v) { userdata = v; }
|
||||
Value GetUserData() const { return userdata; }
|
||||
|
||||
XmlIO(XmlNode& xml, bool loading) : node(xml), loading(loading) {}
|
||||
XmlIO(XmlIO xml, const char *tag) : node(xml.node.GetAdd(tag)), loading(xml.loading) {}
|
||||
XmlIO(XmlIO xml, const char *tag) : node(xml.node.GetAdd(tag)), loading(xml.loading), userdata(userdata) {}
|
||||
};
|
||||
|
||||
template <class T>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue