0031313: Foundation Classes - Dump improvement for classes
[occt.git] / src / NCollection / NCollection_Buffer.hxx
index b51e514..c98182d 100644 (file)
@@ -17,6 +17,7 @@
 #define _NCollection_Buffer_HeaderFile
 
 #include <NCollection_BaseAllocator.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_Transient.hxx>
 
 //! Low-level buffer object.
@@ -122,6 +123,15 @@ public:
     mySize = 0;
   }
 
+  //! Dumps the content of me into the stream
+  virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const
+  {
+    (void)theDepth;
+    OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myData)
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySize)
+    OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myAllocator.get())
+  }
+
 protected:
 
   Standard_Byte*                    myData;      //!< data pointer