commit | 3bc3d4e24c35a4c5431be9c8d7610a1e5230bdd0 | [log] [tgz] |
---|---|---|
author | Reinhard Klambauer <reinhard.klambauer@tugraz.at> | Fri Nov 22 14:05:21 2013 +0100 |
committer | Reinhard Klambauer <reinhard.klambauer@tugraz.at> | Fri Nov 22 14:05:21 2013 +0100 |
tree | 3d46f9f700fcb21ca77fbc85bebab7c427a73231 | |
parent | 4e74b13e7a8f75be30e1fde54f041b5cd7640aab [diff] [blame] |
Added a method to reset the memory buffer to the XMLPrinter class. This enables to reset the printer memory to start again from the beginning.
diff --git a/tinyxml2.h b/tinyxml2.h index 26179f9..edfae82 100755 --- a/tinyxml2.h +++ b/tinyxml2.h
@@ -1966,6 +1966,14 @@ int CStrSize() const { return _buffer.Size(); } + /** + If in print to memory mode, reset the buffer to the + beginning. + */ + void ResetBuffer() { + _buffer.Reset(); + _buffer.Push(0); + } protected: void SealElement();