0030997: Foundation Classes - name correction of dump macros
authornds <nds@opencascade.com>
Wed, 25 Sep 2019 06:12:41 +0000 (09:12 +0300)
committerbugmaster <bugmaster@opencascade.com>
Wed, 25 Sep 2019 14:35:15 +0000 (17:35 +0300)
40 files changed:
dox/dev_guides/debug/debug.md
src/AIS/AIS_InteractiveObject.cxx
src/BVH/BVH_Box.hxx
src/BVH/BVH_Tree.hxx
src/Bnd/Bnd_Box.cxx
src/Bnd/Bnd_OBB.cxx
src/Bnd/Bnd_Range.cxx
src/Graphic3d/Graphic3d_Aspects.cxx
src/Graphic3d/Graphic3d_Group.cxx
src/Graphic3d/Graphic3d_PolygonOffset.cxx
src/OpenGl/OpenGl_Aspects.cxx
src/OpenGl/OpenGl_Group.cxx
src/Prs3d/Prs3d_ArrowAspect.cxx
src/Prs3d/Prs3d_DatumAspect.cxx
src/Prs3d/Prs3d_DimensionAspect.cxx
src/Prs3d/Prs3d_Drawer.cxx
src/Prs3d/Prs3d_LineAspect.cxx
src/Prs3d/Prs3d_PlaneAspect.cxx
src/Prs3d/Prs3d_PointAspect.cxx
src/Prs3d/Prs3d_ShadingAspect.cxx
src/Prs3d/Prs3d_TextAspect.cxx
src/PrsMgr/PrsMgr_PresentableObject.cxx
src/Quantity/Quantity_Color.cxx
src/Quantity/Quantity_ColorRGBA.cxx
src/SelectMgr/SelectMgr_BaseFrustum.cxx
src/SelectMgr/SelectMgr_EntityOwner.cxx
src/SelectMgr/SelectMgr_SelectableObject.cxx
src/SelectMgr/SelectMgr_ViewClipRange.cxx
src/SelectMgr/SelectMgr_ViewerSelector.cxx
src/Standard/Standard_Dump.cxx
src/Standard/Standard_Dump.hxx
src/TopLoc/TopLoc_Datum3D.cxx
src/TopLoc/TopLoc_ItemLocation.cxx
src/TopLoc/TopLoc_Location.cxx
src/TopoDS/TopoDS_Shape.cxx
src/TopoDS/TopoDS_TShape.cxx
src/XCAFPrs/XCAFPrs_Style.cxx
src/gp/gp_Mat.cxx
src/gp/gp_Trsf.cxx
src/gp/gp_XYZ.cxx

index 5a5c9f1..ba6e576 100644 (file)
@@ -147,10 +147,10 @@ The object defines What parameters should be presented in the Dump. The usual wa
 
 Steps to prepare dump of the object into json:
 
-1. Create method <b>DumpJson</b>. The method should accept the output steam and the depth for the fields dump.
+1. Create method <b>DumpJson</b>. The method should accept the output stream and the depth for the fields dump.
 Depth, equal to zero means that only fields of this class should be dumped. Default value -1 means that whole tree of dump will be built recursively calling dump of all fields.
 
-2. Put into the first row of the method <b>DUMP_CLASS_BEGIN</b>. This macro creates a local variable, that will open Json structure on start, and close on exit from this method.
+2. Put into the first row of the method <b>OCCT_DUMP_CLASS_BEGIN</b>. This macro creates a local variable, that will open Json structure on start, and close on exit from this method.
 
 3. Add several macro to store field values.
 
@@ -158,13 +158,13 @@ The following macro are defined to cover the object parameters into json format:
 
 | Name                        | Result in json |
 | :-------------------------- | :--------|
-| DUMP_FIELD_VALUE_NUMERICAL  | "field": value |
-| DUMP_FIELD_VALUE_STRING     | "field": "value" |
-| DUMP_FIELD_VALUE_POINTER    | "field": "pointer address" |
-| DUMP_FIELD_VALUES_DUMPED    | "field": { fesult of field->DumpJson(...) } |
-| DUMP_FIELD_VALUES_NUMERICAL | "field": [value_1, ..., value_n]
-| DUMP_FIELD_VALUES_STRING    | "field": ["value_1", ..., "value_n"]
-| DUMP_FIELD_VALUES_BY_KIND   | "kind": { result of kind::DumpJson(...) } |
+| OCCT_DUMP_FIELD_VALUE_NUMERICAL  | "field": value |
+| OCCT_DUMP_FIELD_VALUE_STRING     | "field": "value" |
+| OCCT_DUMP_FIELD_VALUE_POINTER    | "field": "pointer address" |
+| OCCT_DUMP_FIELD_VALUES_DUMPED    | "field": { result of field->DumpJson(...) } |
+| OCCT_DUMP_FIELD_VALUES_NUMERICAL | "field": [value_1, ..., value_n]
+| OCCT_DUMP_FIELD_VALUES_STRING    | "field": ["value_1", ..., "value_n"]
+| OCCT_DUMP_BASE_CLASS   | "kind": { result of kind::DumpJson(...) } |
 
 @subsection occt_debug_dump_json_draw Using in DRAW
 
index 892bab3..2fcd2bd 100644 (file)
@@ -150,9 +150,9 @@ void AIS_InteractiveObject::SetAspect(const Handle(Prs3d_BasicAspect)& theAspect
 //=======================================================================
 void AIS_InteractiveObject::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
-  DUMP_CLASS_BEGIN (theOStream, AIS_InteractiveObject);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, AIS_InteractiveObject);
 
-  DUMP_FIELD_VALUES_BY_KIND (theOStream, theDepth, SelectMgr_SelectableObject);
-  DUMP_FIELD_VALUE_POINTER (theOStream, myCTXPtr);
-  DUMP_FIELD_VALUE_POINTER (theOStream, myOwner);
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, SelectMgr_SelectableObject);
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myCTXPtr);
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myOwner);
 }
index 0f0ad86..a538823 100644 (file)
@@ -113,8 +113,8 @@ public:
   void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const
   {
     (void)theDepth;
-    DUMP_CLASS_BEGIN (theOStream, BVH_Box);
-    DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsValid());
+    OCCT_DUMP_CLASS_BEGIN (theOStream, BVH_Box);
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsValid());
   }
 
 public:
index ec27b6f..0f500c7 100644 (file)
@@ -188,9 +188,9 @@ public: //! @name methods for accessing serialized tree data
   //! Dumps the content of me into the stream
   virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE
   {
-    DUMP_CLASS_BEGIN (theOStream, BVH_TreeBase);
-    DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDepth);
-    DUMP_FIELD_VALUE_NUMERICAL (theOStream, Length());
+    OCCT_DUMP_CLASS_BEGIN (theOStream, BVH_TreeBase);
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDepth);
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Length());
 
     for (Standard_Integer aNodeIdx = 0; aNodeIdx < Length(); ++aNodeIdx)
     {
@@ -201,18 +201,18 @@ public: //! @name methods for accessing serialized tree data
   //! Dumps the content of node into the stream
   virtual void DumpNode (const int theNodeIndex, Standard_OStream& theOStream, const Standard_Integer theDepth) const Standard_OVERRIDE
   {
-    DUMP_CLASS_BEGIN (theOStream, BVH_TreeNode);
+    OCCT_DUMP_CLASS_BEGIN (theOStream, BVH_TreeNode);
 
-    DUMP_FIELD_VALUE_NUMERICAL (theOStream, theNodeIndex);
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, theNodeIndex);
 
     Bnd_Box aBndBox = BVH::ToBndBox (MinPoint (theNodeIndex), MaxPoint (theNodeIndex));
     Bnd_Box* aPointer = &aBndBox;
-    DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aPointer);
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aPointer);
 
-    DUMP_FIELD_VALUE_NUMERICAL (theOStream, BegPrimitive (theNodeIndex));
-    DUMP_FIELD_VALUE_NUMERICAL (theOStream, EndPrimitive (theNodeIndex));
-    DUMP_FIELD_VALUE_NUMERICAL (theOStream, Level (theNodeIndex));
-    DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsOuter (theNodeIndex));
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, BegPrimitive (theNodeIndex));
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, EndPrimitive (theNodeIndex));
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Level (theNodeIndex));
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsOuter (theNodeIndex));
   }
 
 public: //! @name protected fields
index ce7a6af..2942963 100644 (file)
@@ -977,11 +977,11 @@ void Bnd_Box::Dump () const
 //=======================================================================
 void Bnd_Box::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
 {
-  DUMP_CLASS_BEGIN (theOStream, Bnd_Box);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Bnd_Box);
 
-  DUMP_FIELD_VALUES_NUMERICAL (theOStream, "CornerMin", 3, Xmin, Ymin, Zmin)
-  DUMP_FIELD_VALUES_NUMERICAL (theOStream, "CornerMax", 3, Xmax, Ymax, Zmax)
+  OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "CornerMin", 3, Xmin, Ymin, Zmin)
+  OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "CornerMax", 3, Xmax, Ymax, Zmax)
 
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, Gap);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, Flags);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Gap);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Flags);
 }
index b237bee..b3b9ebb 100644 (file)
@@ -1029,15 +1029,15 @@ void Bnd_OBB::Add(const Bnd_OBB& theOther)
 //=======================================================================
 void Bnd_OBB::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
-  DUMP_CLASS_BEGIN (theOStream, Bnd_OBB);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Bnd_OBB);
 
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCenter);
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myAxes[0]);
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myAxes[1]);
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myAxes[2]);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCenter);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myAxes[0]);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myAxes[1]);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myAxes[2]);
 
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHDims[0]);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHDims[1]);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHDims[2]);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsAABox);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHDims[0]);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHDims[1]);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHDims[2]);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsAABox);
 }
index 2fb63e8..ba8f5de 100644 (file)
@@ -183,8 +183,8 @@ void Bnd_Range::Split(const Standard_Real theVal,
 // =======================================================================
 void Bnd_Range::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
 {
-  DUMP_CLASS_BEGIN (theOStream, Bnd_Range);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Bnd_Range);
 
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFirst);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLast);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFirst);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLast);
 }
index c36a5ad..667b773 100644 (file)
@@ -68,18 +68,18 @@ void Graphic3d_Aspects::SetTextureMap (const Handle(Graphic3d_TextureMap)& theTe
 //=======================================================================
 void Graphic3d_Aspects::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
-  DUMP_CLASS_BEGIN (theOStream, Graphic3d_Aspects);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_Aspects);
 
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myInteriorColor);
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBackInteriorColor);
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myEdgeColor);
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPolygonOffset);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myInteriorColor);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBackInteriorColor);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myEdgeColor);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPolygonOffset);
 
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToSkipFirstEdge);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToDistinguishMaterials);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToDrawEdges);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToDrawSilhouette);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToSuppressBackFaces);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToMapTexture);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsTextZoomable);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToSkipFirstEdge);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToDistinguishMaterials);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToDrawEdges);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToDrawSilhouette);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToSuppressBackFaces);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToMapTexture);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsTextZoomable);
 }
index 98de527..27e4f9a 100644 (file)
@@ -454,8 +454,8 @@ void Graphic3d_Group::AddText (const Handle(Graphic3d_Text)& theTextParams,
 // =======================================================================
 void Graphic3d_Group::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
 {
-  DUMP_CLASS_BEGIN (theOStream, Graphic3d_Group);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_Group);
 
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsClosed);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myContainsFacet);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsClosed);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myContainsFacet);
 }
index b7148fc..f4cfe91 100644 (file)
@@ -21,9 +21,9 @@
 //=======================================================================
 void Graphic3d_PolygonOffset::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
 {
-  DUMP_CLASS_BEGIN (theOStream, Graphic3d_PolygonOffset);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_PolygonOffset);
 
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, Mode);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, Factor);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, Units);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Mode);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Factor);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Units);
 }
index 2d962da..b1c6833 100644 (file)
@@ -117,8 +117,8 @@ void OpenGl_Aspects::Release (OpenGl_Context* theContext)
 // =======================================================================
 void OpenGl_Aspects::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
-  DUMP_CLASS_BEGIN (theOStream, OpenGl_Aspects);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, OpenGl_Aspects);
 
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAspect.get());
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myShadingModel);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAspect.get());
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myShadingModel);
 }
index 56cbf2e..76af681 100644 (file)
@@ -345,9 +345,9 @@ void OpenGl_Group::Release (const Handle(OpenGl_Context)& theGlCtx)
 // =======================================================================
 void OpenGl_Group::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
-  DUMP_CLASS_BEGIN (theOStream, OpenGl_Group);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, OpenGl_Group);
 
-  DUMP_FIELD_VALUES_BY_KIND (theOStream, theDepth, Graphic3d_Group);
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAspects);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsRaytracable);
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Graphic3d_Group);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAspects);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsRaytracable);
 }
index 7b86782..f799aeb 100644 (file)
@@ -73,9 +73,9 @@ void Prs3d_ArrowAspect::SetAngle (const Standard_Real theAngle)
 // =======================================================================
 void Prs3d_ArrowAspect::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
-  DUMP_CLASS_BEGIN (theOStream, Prs3d_ArrowAspect);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Prs3d_ArrowAspect);
 
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myArrowAspect.get());
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAngle);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLength);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myArrowAspect.get());
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAngle);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLength);
 }
index 4ce08e3..1552124 100644 (file)
@@ -176,14 +176,14 @@ Prs3d_DatumParts Prs3d_DatumAspect::ArrowPartForAxis (Prs3d_DatumParts thePart)
 // =======================================================================
 void Prs3d_DatumAspect::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
-  DUMP_CLASS_BEGIN (theOStream, Prs3d_DatumAspect);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Prs3d_DatumAspect);
 
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTextAspect.get());
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPointAspect.get());
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myArrowAspect.get());
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTextAspect.get());
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPointAspect.get());
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myArrowAspect.get());
 
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAxes);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToDrawLabels);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToDrawArrows);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAxes);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToDrawLabels);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToDrawArrows);
 }
 
index 066d7c0..46aaa31 100755 (executable)
@@ -67,21 +67,21 @@ void Prs3d_DimensionAspect::SetCommonColor (const Quantity_Color& theColor)
 // =======================================================================
 void Prs3d_DimensionAspect::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
-  DUMP_CLASS_BEGIN (theOStream, Prs3d_DimensionAspect);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Prs3d_DimensionAspect);
 
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myLineAspect.get());
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTextAspect.get());
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myArrowAspect.get());
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myLineAspect.get());
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTextAspect.get());
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myArrowAspect.get());
 
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myValueStringFormat);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myExtensionSize);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myArrowTailSize);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myArrowOrientation);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTextHPosition);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTextVPosition);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToDisplayUnits);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsText3d);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsTextShaded);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsArrows3d);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myValueStringFormat);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myExtensionSize);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myArrowTailSize);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myArrowOrientation);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTextHPosition);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTextVPosition);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToDisplayUnits);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsText3d);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsTextShaded);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsArrows3d);
 }
 
index a2599fc..92858a2 100644 (file)
@@ -1417,6 +1417,6 @@ bool Prs3d_Drawer::SetShadingModel (Graphic3d_TypeOfShadingModel theModel,
 // =======================================================================
 void Prs3d_Drawer::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
-  DUMP_CLASS_BEGIN (theOStream, Prs3d_Drawer);
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myShadingAspect.get());
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Prs3d_Drawer);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myShadingAspect.get());
 }
index b2ecce5..adbe48f 100644 (file)
@@ -36,7 +36,7 @@ Prs3d_LineAspect::Prs3d_LineAspect (const Quantity_Color& theColor,
 // =======================================================================
 void Prs3d_LineAspect::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
-  DUMP_CLASS_BEGIN (theOStream, Prs3d_LineAspect);
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAspect.get());
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Prs3d_LineAspect);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAspect.get());
 }
 
index 34c720c..4f6b8eb 100644 (file)
@@ -46,21 +46,21 @@ Prs3d_PlaneAspect::Prs3d_PlaneAspect()
 // =======================================================================
 void Prs3d_PlaneAspect::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
-  DUMP_CLASS_BEGIN (theOStream, Prs3d_PlaneAspect);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Prs3d_PlaneAspect);
 
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myEdgesAspect.get());
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myIsoAspect.get());
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myArrowAspect.get());
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myEdgesAspect.get());
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myIsoAspect.get());
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myArrowAspect.get());
 
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myArrowsLength);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myArrowsSize);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myArrowsAngle);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPlaneXLength);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPlaneYLength);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsoDistance);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDrawCenterArrow);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDrawEdgesArrows);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDrawEdges);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDrawIso);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myArrowsLength);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myArrowsSize);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myArrowsAngle);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPlaneXLength);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPlaneYLength);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsoDistance);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDrawCenterArrow);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDrawEdgesArrows);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDrawEdges);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDrawIso);
 }
 
index e87564e..e3587a5 100644 (file)
@@ -49,7 +49,7 @@ Prs3d_PointAspect::Prs3d_PointAspect (const Quantity_Color& theColor,
 // =======================================================================
 void Prs3d_PointAspect::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
-  DUMP_CLASS_BEGIN (theOStream, Prs3d_PointAspect);
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAspect.get());
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Prs3d_PointAspect);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAspect.get());
 }
 
index 90bde95..b108492 100644 (file)
@@ -176,7 +176,7 @@ Standard_Real Prs3d_ShadingAspect::Transparency (const Aspect_TypeOfFacingModel
 // =======================================================================
 void Prs3d_ShadingAspect::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
-  DUMP_CLASS_BEGIN (theOStream, Prs3d_ShadingAspect);
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAspect.get());
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Prs3d_ShadingAspect);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAspect.get());
 }
 
index d56c469..3614473 100644 (file)
@@ -55,13 +55,13 @@ Prs3d_TextAspect::Prs3d_TextAspect (const Handle(Graphic3d_AspectText3d)& theAsp
 // =======================================================================
 void Prs3d_TextAspect::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
-  DUMP_CLASS_BEGIN (theOStream, Prs3d_TextAspect);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Prs3d_TextAspect);
 
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTextAspect.get());
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTextAspect.get());
 
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHeight);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHorizontalJustification);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myVerticalJustification);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myOrientation);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHeight);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHorizontalJustification);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myVerticalJustification);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myOrientation);
 }
 
index 145261c..1322d5c 100644 (file)
@@ -844,15 +844,15 @@ void PrsMgr_PresentableObject::PolygonOffsets (Standard_Integer&   theMode,
 // =======================================================================
 void PrsMgr_PresentableObject::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
 {
-  DUMP_CLASS_BEGIN (theOStream, PrsMgr_PresentableObject);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, PrsMgr_PresentableObject);
 
-  DUMP_FIELD_VALUE_POINTER (theOStream, myParent);
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myParent);
 
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myOwnWidth);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, hasOwnColor);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, hasOwnMaterial);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myOwnWidth);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, hasOwnColor);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, hasOwnMaterial);
 
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myInfiniteState);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsMutable);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnPresentations);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myInfiniteState);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsMutable);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnPresentations);
 }
index 9b0d81b..69e94fd 100644 (file)
@@ -3932,6 +3932,6 @@ void call_rgbhls (float r, float g, float b, float& h, float& l, float& s)
 //=======================================================================
 void Quantity_Color::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
 {
-  DUMP_CLASS_BEGIN (theOStream, Quantity_Color);
-  DUMP_FIELD_VALUES_NUMERICAL (theOStream, "RGB", 3, MyRed, MyGreen, MyBlue)
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Quantity_Color);
+  OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "RGB", 3, MyRed, MyGreen, MyBlue)
 }
index 54cab09..3db480f 100644 (file)
@@ -206,8 +206,8 @@ bool Quantity_ColorRGBA::ColorFromHex (const char* const   theHexColorString,
 //=======================================================================
 void Quantity_ColorRGBA::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
-  DUMP_CLASS_BEGIN (theOStream, Quantity_ColorRGBA);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Quantity_ColorRGBA);
 
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myRgb);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAlpha);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myRgb);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAlpha);
 }
index b9e843a..3a1c364 100644 (file)
@@ -256,10 +256,10 @@ gp_Pnt SelectMgr_BaseFrustum::DetectedPoint (const Standard_Real /*theDepth*/) c
 //=======================================================================
 void SelectMgr_BaseFrustum::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
 {
-  DUMP_CLASS_BEGIN (theOStream, SelectMgr_BaseFrustum);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, SelectMgr_BaseFrustum);
 
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPixelTolerance);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsOrthographic);
-  DUMP_FIELD_VALUE_POINTER (theOStream, myBuilder);
-  DUMP_FIELD_VALUE_POINTER (theOStream, myCamera);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPixelTolerance);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsOrthographic);
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myBuilder);
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myCamera);
 }
index 1448da7..ed1cedb 100644 (file)
@@ -89,10 +89,10 @@ void SelectMgr_EntityOwner::HilightWithColor (const Handle(PrsMgr_PresentationMa
 // =======================================================================
 void SelectMgr_EntityOwner::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
 {
-  DUMP_CLASS_BEGIN (theOStream, SelectMgr_EntityOwner);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, SelectMgr_EntityOwner);
 
-  DUMP_FIELD_VALUE_POINTER (theOStream, mySelectable);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, mypriority);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsSelected);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFromDecomposition);
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, mySelectable);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mypriority);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsSelected);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFromDecomposition);
 }
index dc73924..cedd1c0 100644 (file)
@@ -555,9 +555,9 @@ const Handle(SelectMgr_EntityOwner)& SelectMgr_SelectableObject::GetAssemblyOwne
 // =======================================================================
 void SelectMgr_SelectableObject::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
-  DUMP_CLASS_BEGIN (theOStream, SelectMgr_SelectableObject);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, SelectMgr_SelectableObject);
 
-  DUMP_FIELD_VALUES_BY_KIND (theOStream, theDepth, PrsMgr_PresentableObject);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myGlobalSelMode);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAutoHilight);
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, PrsMgr_PresentableObject);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myGlobalSelMode);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAutoHilight);
 }
index 1c2f418..57fd768 100644 (file)
@@ -109,11 +109,11 @@ void SelectMgr_ViewClipRange::AddClippingPlanes (const Graphic3d_SequenceOfHClip
 // =======================================================================
 void SelectMgr_ViewClipRange::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
-  DUMP_CLASS_BEGIN (theOStream, SelectMgr_ViewClipRange);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, SelectMgr_ViewClipRange);
 
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myUnclipRange);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myUnclipRange);
   for (size_t aRangeIter = 0; aRangeIter < myClipRanges.size(); ++aRangeIter)
   {
-    DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myClipRanges[aRangeIter]);
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myClipRanges[aRangeIter]);
   }
 }
index e85c0d8..97471d5 100644 (file)
@@ -1053,19 +1053,19 @@ void SelectMgr_ViewerSelector::AllowOverlapDetection (const Standard_Boolean the
 //=======================================================================
 void SelectMgr_ViewerSelector::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const 
 {
-  DUMP_CLASS_BEGIN (theOStream, SelectMgr_ViewerSelector);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, SelectMgr_ViewerSelector);
 
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, preferclosest);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToUpdateTolerance);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, mystored.Extent());
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, preferclosest);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToUpdateTolerance);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mystored.Extent());
 
   Standard_Integer aNbOfSelected = 0;
   for (SelectMgr_SelectableObjectSet::Iterator aSelectableIt (mySelectableObjects); aSelectableIt.More(); aSelectableIt.Next())
   {
     aNbOfSelected++;
   }
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, aNbOfSelected);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerances.Tolerance());
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerances.CustomTolerance());
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myZLayerOrderMap.Size());
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aNbOfSelected);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerances.Tolerance());
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerances.CustomTolerance());
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myZLayerOrderMap.Size());
 }
index 97072fb..c440561 100644 (file)
@@ -35,16 +35,16 @@ Standard_DumpSentry::~Standard_DumpSentry()
 }
 
 // =======================================================================
-// function : EndsWith
+// function : AddValuesSeparator
 // purpose :
 // =======================================================================
-Standard_Boolean Standard_Dump::EndsWith (const Standard_OStream& theOStream,
-                                          const TCollection_AsciiString& theEndString)
+void Standard_Dump::AddValuesSeparator (Standard_OStream& theOStream)
 {
   Standard_SStream aStream;
   aStream << theOStream.rdbuf();
   TCollection_AsciiString aStreamStr = Standard_Dump::Text (aStream);
-  return aStreamStr.EndsWith (theEndString);
+  if (!aStreamStr.EndsWith ("{"))
+    theOStream << ", ";
 }
 
 //=======================================================================
@@ -55,8 +55,7 @@ void Standard_Dump::DumpKeyToClass (Standard_OStream& theOStream,
                                     const char* theKey,
                                     const TCollection_AsciiString& theField)
 {
-  if (!Standard_Dump::EndsWith (theOStream, "{"))
-    theOStream << ", ";
+  AddValuesSeparator (theOStream);
   theOStream << "\"" << theKey << "\": {" << theField << "}";
 }
 
@@ -134,18 +133,19 @@ TCollection_AsciiString Standard_Dump::GetPointerInfo (const void* thePointer, c
 // =======================================================================
 // DumpFieldToName
 // =======================================================================
-void Standard_Dump::DumpFieldToName (const char* theField, const char*& theName)
+const char* Standard_Dump::DumpFieldToName (const char* theField)
 {
-  theName = theField;
+  const char* aName = theField;
 
-  if (theName[0] == '&')
+  if (aName[0] == '&')
   {
-    theName = theName + 1;
+    aName = aName + 1;
   }
-  if (::LowerCase (theName[0]) == 'm' && theName[1] == 'y')
+  if (::LowerCase (aName[0]) == 'm' && aName[1] == 'y')
   {
-    theName = theName + 2;
+    aName = aName + 2;
   }
+  return aName;
 }
 
 // =======================================================================
index 6cb7dd7..ba5d4ae 100644 (file)
 class Standard_DumpSentry;
 
 //! The file contains interface to prepare dump output for OCCT objects. Format of the dump is JSON.
-//! To prepare this output, implement method Dump in the object and use macro functions from this file.
+//! To prepare this output, implement method DumpJson in the object and use macro functions from this file.
 //! Macros have one parameter for both, key and the value. It is a field of the current class. Macro has internal analyzer that
 //! uses the variable name to generate key. If the parameter has prefix symbols "&", "*" and "my", it is cut.
 //!
-//! - DUMP_FIELD_VALUE_NUMERICAL. Use it for fields of numerical C++ types, like int, float, double. It creates a pair "key", "value",
-//! - DUMP_FIELD_VALUE_STRING. Use it for char* type. It creates a pair "key", "value",
-//! - DUMP_FIELD_VALUE_POINTER. Use it for pointer fields. It creates a pair "key", "value", where the value is the pointer address,
-//! - DUMP_FIELD_VALUES_DUMPED. Use it for fields that has own Dump implementation. It expects the pointer to the class instance.
+//! - OCCT_DUMP_FIELD_VALUE_NUMERICAL. Use it for fields of numerical C++ types, like int, float, double. It creates a pair "key", "value",
+//! - OCCT_DUMP_FIELD_VALUE_STRING. Use it for char* type. It creates a pair "key", "value",
+//! - OCCT_DUMP_FIELD_VALUE_POINTER. Use it for pointer fields. It creates a pair "key", "value", where the value is the pointer address,
+//! - OCCT_DUMP_FIELD_VALUES_DUMPED. Use it for fields that has own Dump implementation. It expects the pointer to the class instance.
 //!     It creates "key": { result of dump of the field }
-//! - DUMP_FIELD_VALUES_NUMERICAL. Use it for unlimited list of fields of C++ double type.
+//! - OCCT_DUMP_FIELD_VALUES_NUMERICAL. Use it for unlimited list of fields of C++ double type.
 //!     It creates massive of values [value_1, value_2, ...]
-//! - DUMP_FIELD_VALUES_STRING. Use it for unlimited list of fields of TCollection_AsciiString types.
+//! - OCCT_DUMP_FIELD_VALUES_STRING. Use it for unlimited list of fields of TCollection_AsciiString types.
 //!     It creates massive of values ["value_1", "value_2", ...]
-//! - DUMP_FIELD_VALUES_BY_KIND. Use if Dump implementation of the class is virtual, to perform ClassName::Dump() of the parent class,
+//! - OCCT_DUMP_BASE_CLASS. Use if Dump implementation of the class is virtual, to perform ClassName::Dump() of the parent class,
 //!     expected parameter is the parent class name.
 //!     It creates "key": { result of dump of the field }
-//! - DUMP_VECTOR_CLASS. Use it as a single row in some object dump to have one row in output.
-//!     It's possible to use it without necessity of DUMP_CLASS_BEGIN call.
+//! - OCCT_DUMP_VECTOR_CLASS. Use it as a single row in some object dump to have one row in output.
+//!     It's possible to use it without necessity of OCCT_DUMP_CLASS_BEGIN call.
 //!     It creates massive of values [value_1, value_2, ...]
 //!
 //! The Dump result prepared by these macros is an output stream, it is not arranged with spaces and line feed.
 //! To have output in a more readable way, use ConvertToAlignedString method for obtained stream.
 
 //! Converts the class type into a string value
-#define CLASS_NAME(theClass) #theClass
+#define OCCT_CLASS_NAME(theClass) #theClass
 
-//! @def DUMP_CLASS_BEGIN
+//! @def OCCT_DUMP_CLASS_BEGIN
 //! Creates an instance of Sentry to cover the current Dump implementation with keys of start and end.
 //! This row should be inserted before other macros. The end key will be added by the sentry remove,
 //! (exit of the method).
-#define DUMP_CLASS_BEGIN(theOStream, theName) \
-  Standard_DumpSentry aSentry (theOStream, CLASS_NAME(theName)); \
+#define OCCT_DUMP_CLASS_BEGIN(theOStream, theName) \
+  Standard_DumpSentry aSentry (theOStream, OCCT_CLASS_NAME(theName));
 
-//! @def DUMP_FIELD_VALUE_NUMERICAL
+//! @def OCCT_DUMP_FIELD_VALUE_NUMERICAL
 //! Append into output value: "Name": Field
-#define DUMP_FIELD_VALUE_NUMERICAL(theOStream, theField) \
+#define OCCT_DUMP_FIELD_VALUE_NUMERICAL(theOStream, theField) \
 { \
-  const char* aName = NULL; \
-  Standard_Dump::DumpFieldToName (#theField, aName); \
-  if (!Standard_Dump::EndsWith (theOStream, "{")) \
-    theOStream << ", "; \
+  const char* aName = Standard_Dump::DumpFieldToName (#theField); \
+  Standard_Dump::AddValuesSeparator (theOStream); \
   theOStream << "\"" << aName << "\": " << theField; \
 }
 
-//! @def DUMP_FIELD_VALUE_STRING
+//! @def OCCT_DUMP_FIELD_VALUE_STRING
 //! Append into output value: "Name": "Field"
-#define DUMP_FIELD_VALUE_STRING(theOStream, theField) \
+#define OCCT_DUMP_FIELD_VALUE_STRING(theOStream, theField) \
 { \
-  const char* aName = NULL; \
-  Standard_Dump::DumpFieldToName (#theField, aName); \
-  if (!Standard_Dump::EndsWith (theOStream, "{")) \
-    theOStream << ", "; \
+  const char* aName = Standard_Dump::DumpFieldToName (#theField); \
+  Standard_Dump::AddValuesSeparator (theOStream); \
   theOStream << "\"" << aName << "\": \"" << theField << "\""; \
 }
 
-//! @def DUMP_FIELD_VALUE_POINTER
+//! @def OCCT_DUMP_FIELD_VALUE_POINTER
 //! Append into output value: "Name": "address of the pointer"
-#define DUMP_FIELD_VALUE_POINTER(theOStream, theField) \
+#define OCCT_DUMP_FIELD_VALUE_POINTER(theOStream, theField) \
 { \
-  const char* aName = NULL; \
-  Standard_Dump::DumpFieldToName (#theField, aName); \
-  if (!Standard_Dump::EndsWith (theOStream, "{")) \
-    theOStream << ", "; \
+  const char* aName = Standard_Dump::DumpFieldToName (#theField); \
+  Standard_Dump::AddValuesSeparator (theOStream); \
   theOStream << "\"" << aName << "\": \"" << Standard_Dump::GetPointerInfo (theField) << "\""; \
 }
 
-//! @def DUMP_FIELD_VALUES_DUMPED
+//! @def OCCT_DUMP_FIELD_VALUES_DUMPED
 //! Append into output value: "Name": { field dumped values }
 //! It computes Dump of the fields. The expected field is a pointer.
 //! Use this macro for fields of the dumped class which has own Dump implementation.
 //! The macros is recursive. Recursion is stopped when the depth value becomes equal to zero.
 //! Depth = -1 is the default value, dump here is unlimited.
-#define DUMP_FIELD_VALUES_DUMPED(theOStream, theDepth, theField) \
+#define OCCT_DUMP_FIELD_VALUES_DUMPED(theOStream, theDepth, theField) \
 { \
   if (theDepth != 0) \
   { \
     Standard_SStream aFieldStream; \
     if ((theField) != NULL) \
       (theField)->DumpJson (aFieldStream, theDepth - 1); \
-    const char* aName = NULL; \
-    Standard_Dump::DumpFieldToName (#theField, aName); \
+    const char* aName = Standard_Dump::DumpFieldToName (#theField); \
     Standard_Dump::DumpKeyToClass (theOStream, aName, Standard_Dump::Text (aFieldStream)); \
   } \
 }
 
-//! @def DUMP_FIELD_VALUES_NUMERICAL
+//! @def OCCT_DUMP_FIELD_VALUES_NUMERICAL
 //! Append real values into output values in an order: [value_1, value_2, ...]
 //! It computes Dump of the parent. The expected field is a parent class name to call ClassName::Dump.
-#define DUMP_FIELD_VALUES_NUMERICAL(theOStream, theName, theCount, ...) \
+#define OCCT_DUMP_FIELD_VALUES_NUMERICAL(theOStream, theName, theCount, ...) \
 { \
-  if (!Standard_Dump::EndsWith (theOStream, "{")) \
-    theOStream << ", "; \
+  Standard_Dump::AddValuesSeparator (theOStream); \
   theOStream << "\"" << theName << "\": ["; \
   Standard_Dump::DumpRealValues (theOStream, theCount, __VA_ARGS__);\
   theOStream << "]"; \
 }
 
-//! @def DUMP_FIELD_VALUES_STRING
+//! @def OCCT_DUMP_FIELD_VALUES_STRING
 //! Append real values into output values in an order: ["value_1", "value_2", ...]
 //! It computes Dump of the parent. The expected field is a parent class name to call ClassName::Dump.
-#define DUMP_FIELD_VALUES_STRING(theOStream, theName, theCount, ...) \
+#define OCCT_DUMP_FIELD_VALUES_STRING(theOStream, theName, theCount, ...) \
 { \
-  if (!Standard_Dump::EndsWith (theOStream, "{")) \
-    theOStream << ", "; \
+  Standard_Dump::AddValuesSeparator (theOStream); \
   theOStream << "\"" << theName << "\": ["; \
   Standard_Dump::DumpCharacterValues (theOStream, theCount, __VA_ARGS__);\
   theOStream << "]"; \
 }
 
-//! @def DUMP_FIELD_VALUES_BY_KIND
+//! @def OCCT_DUMP_BASE_CLASS
 //! Append into output value: "Name": { field dumped values }
 //! It computes Dump of the parent. The expected field is a parent class name to call ClassName::Dump.
 //! Use this macro for parent of the current class.
 //! The macros is recursive. Recursive is stoped when the depth value becomes equal to zero.
 //! Depth = -1 is the default value, dump here is unlimited.
-#define DUMP_FIELD_VALUES_BY_KIND(theOStream, theDepth, theField) \
+#define OCCT_DUMP_BASE_CLASS(theOStream, theDepth, theField) \
 { \
   if (theDepth != 0) \
   { \
     Standard_SStream aFieldStream; \
     theField::DumpJson (aFieldStream, theDepth - 1); \
-    const char* aName = NULL; \
-    Standard_Dump::DumpFieldToName (#theField, aName); \
+    const char* aName = Standard_Dump::DumpFieldToName (#theField); \
     Standard_Dump::DumpKeyToClass (theOStream, aName, Standard_Dump::Text (aFieldStream)); \
   } \
 }
 
-//! @def DUMP_VECTOR_CLASS
+//! @def OCCT_DUMP_VECTOR_CLASS
 //! Append vector values into output value: "Name": [value_1, value_2, ...]
 //! This macro is intended to have only one row for dumped object in Json.
-//! It's possible to use it without necessity of DUMP_CLASS_BEGIN call, but pay attention that it should be only one row in the object dump.
-#define DUMP_VECTOR_CLASS(theOStream, theName, theCount, ...) \
+//! It's possible to use it without necessity of OCCT_DUMP_CLASS_BEGIN call, but pay attention that it should be only one row in the object dump.
+#define OCCT_DUMP_VECTOR_CLASS(theOStream, theName, theCount, ...) \
 { \
-  theOStream << "\"" << CLASS_NAME(theName) << "\": ["; \
+  theOStream << "\"" << OCCT_CLASS_NAME(theName) << "\": ["; \
   Standard_Dump::DumpRealValues (theOStream, theCount, __VA_ARGS__);\
   theOStream << "]"; \
 }
@@ -193,12 +183,9 @@ public:
   //! @return text presentation
   Standard_EXPORT static TCollection_AsciiString FormatJson (const Standard_SStream& theStream, const Standard_Integer theIndent = 3);
 
-  //! Determines whether the end of this stream matches the specified string.
+  //! Add Json values separator if the stream last symbol is not an open brace.
   //! @param theStream source value
-  //! @param theEndString text value to find
-  //! @return true if matches
-  static Standard_EXPORT Standard_Boolean EndsWith (const Standard_OStream& theOStream,
-                                                    const TCollection_AsciiString& theEndString);
+  static Standard_EXPORT void AddValuesSeparator (Standard_OStream& theOStream);
 
   //! Returns default prefix added for each pointer info string if short presentation of pointer used
   Standard_EXPORT static TCollection_AsciiString GetPointerPrefix() { return "0x"; }
@@ -239,7 +226,7 @@ public:
   //! An example, for field myValue, theName is Value, for &myCLass, the name is Class
   //! @param theField a source value 
   //! @param theName [out] an updated name 
-  Standard_EXPORT static void DumpFieldToName (const char* theField, const char*& theName);
+  Standard_EXPORT static const char* DumpFieldToName (const char* theField);
 };
 
 #endif // _Standard_Dump_HeaderFile
index b6ac226..eff550a 100644 (file)
@@ -48,8 +48,8 @@ TopLoc_Datum3D::TopLoc_Datum3D (const gp_Trsf& T) :
 //=======================================================================
 void TopLoc_Datum3D::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
-  DUMP_CLASS_BEGIN (theOStream, TopLoc_Datum3D);
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myTrsf);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, TopLoc_Datum3D);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myTrsf);
 }
 
 //=======================================================================
index b9699a3..a3530dd 100644 (file)
@@ -40,10 +40,10 @@ TopLoc_ItemLocation::TopLoc_ItemLocation
 //=======================================================================
 void TopLoc_ItemLocation::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
-  DUMP_CLASS_BEGIN (theOStream, TopLoc_ItemLocation);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, TopLoc_ItemLocation);
 
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myTrsf);
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myDatum.get());
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myTrsf);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myDatum.get());
 
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPower);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPower);
 }
index 0ba8e7f..337077b 100644 (file)
@@ -238,10 +238,10 @@ Standard_Boolean TopLoc_Location::IsDifferent
 //=======================================================================
 void TopLoc_Location::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
-  DUMP_CLASS_BEGIN (theOStream, TopLoc_Location);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, TopLoc_Location);
 
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &Transformation());
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsIdentity());
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &Transformation());
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsIdentity());
 }
 
 //=======================================================================
index a280b5d..aa50672 100644 (file)
@@ -41,10 +41,10 @@ Standard_Integer TopoDS_Shape::HashCode (const Standard_Integer theUpperBound) c
 //=======================================================================
 void TopoDS_Shape::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
-  DUMP_CLASS_BEGIN (theOStream, TopoDS_Shape);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, TopoDS_Shape);
 
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTShape.get());
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLocation);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTShape.get());
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLocation);
 
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myOrient);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myOrient);
 }
index 36b3101..3ae9e1f 100644 (file)
@@ -27,6 +27,6 @@ IMPLEMENT_STANDARD_RTTIEXT(TopoDS_TShape,Standard_Transient)
 //=======================================================================
 void TopoDS_TShape::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
 {
-  DUMP_CLASS_BEGIN (theOStream, TopoDS_TShape);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFlags);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, TopoDS_TShape);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFlags);
 }
index 3dda9fb..434cccf 100644 (file)
@@ -76,12 +76,12 @@ void XCAFPrs_Style::UnSetColorCurv()
 //=======================================================================
 void XCAFPrs_Style::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
-  DUMP_CLASS_BEGIN (theOStream, XCAFPrs_Style);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, XCAFPrs_Style);
 
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myColorSurf);
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myColorCurv);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myColorSurf);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myColorCurv);
 
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasColorSurf);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasColorCurv);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsVisible);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasColorSurf);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasColorCurv);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsVisible);
 }
index a490822..014797b 100644 (file)
@@ -275,5 +275,5 @@ void gp_Mat::Power (const Standard_Integer N)
 //=======================================================================
 void gp_Mat::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
 {
-  DUMP_VECTOR_CLASS (theOStream, gp_Mat, 9, Mat00, Mat01, Mat02, Mat10, Mat11, Mat12, Mat20, Mat21, Mat22);
+  OCCT_DUMP_VECTOR_CLASS (theOStream, gp_Mat, 9, Mat00, Mat01, Mat02, Mat10, Mat11, Mat12, Mat20, Mat21, Mat22);
 }
index 857aaec..7c4a4c9 100644 (file)
@@ -857,11 +857,11 @@ void gp_Trsf::Orthogonalize()
 //=======================================================================
 void gp_Trsf::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
-  DUMP_CLASS_BEGIN (theOStream, gp_Trsf);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, gp_Trsf);
 
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &loc);
-  DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &matrix);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &loc);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &matrix);
 
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, shape);
-  DUMP_FIELD_VALUE_NUMERICAL (theOStream, scale);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, shape);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, scale);
 }
index f588dfd..a02fbed 100644 (file)
@@ -40,5 +40,5 @@ Standard_Boolean gp_XYZ::IsEqual (const gp_XYZ& Other,
 //=======================================================================
 void gp_XYZ::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
 {
-  DUMP_VECTOR_CLASS (theOStream, gp_XYZ, 3, x, y, z)
+  OCCT_DUMP_VECTOR_CLASS (theOStream, gp_XYZ, 3, x, y, z)
 }