support user data

This commit is contained in:
Lee Thomason
2016-07-17 22:35:52 -07:00
parent 536a4cde37
commit af9bce1762
3 changed files with 19 additions and 0 deletions

View File

@@ -857,6 +857,20 @@ public:
*/
virtual bool Accept( XMLVisitor* visitor ) const = 0;
/**
Set user data into the XMLNode. TinyXML-2 in
no way processes or interprets user data.
It is initially 0.
*/
void SetUserData(void* userData) { _userData = userData; }
/**
Get user data set into the XMLNode. TinyXML-2 in
no way processes or interprets user data.
It is initially 0.
*/
void* GetUserData() const { return _userData; }
protected:
XMLNode( XMLDocument* );
virtual ~XMLNode();
@@ -873,6 +887,8 @@ protected:
XMLNode* _prev;
XMLNode* _next;
void* _userData;
private:
MemPool* _memPool;
void Unlink( XMLNode* child );