Преглед на файлове

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.
Reinhard Klambauer преди 12 години
родител
ревизия
3bc3d4e24c
променени са 1 файла, в които са добавени 8 реда и са изтрити 0 реда
  1. 8 0
      tinyxml2.h

+ 8 - 0
tinyxml2.h

@@ -1966,6 +1966,14 @@ public:
     int CStrSize() const {
     int CStrSize() const {
         return _buffer.Size();
         return _buffer.Size();
     }
     }
+    /**
+    	If in print to memory mode, reset the buffer to the
+    	beginning.
+    */
+    void ResetBuffer() {
+        _buffer.Reset();
+        _buffer.Push(0);
+    }
 
 
 protected:
 protected:
     void SealElement();
     void SealElement();