]> OCCT Git - occt-copy.git/commitdiff
0031313: Foundation Classes - Dump improvement for classes
authornds <nds@opencascade.com>
Tue, 28 Jan 2020 09:03:38 +0000 (12:03 +0300)
committernds <nds@opencascade.com>
Thu, 19 Nov 2020 11:04:05 +0000 (14:04 +0300)
- Provide DumpJson for geometrical, ocaf and visualization classes;
- Change depth parameter of DumpJson (constant is not obligate here)
- Introduce a new macro for transient objects to be called as the first row in DumpJson: OCCT_DUMP_TRANSIENT_CLASS_BEGIN. We need not put the class name in the macro, using get_type_name of Standard_Transient for it.
- change implementation of OCCT_DUMP_CLASS_BEGIN and OCCT_DUMP_TRANSIENT_CLASS_BEGIN. It is not an sentry more and it does not create a new hierarchy level. It appends a new row into the output stream: "className": <className>
- OCCT_DUMP_* does not require semicolon
- class header is included first in source files of TDataStd, TDocStd, TCAFDoc

(cherry picked from commit bc73b00672a218a1301520a3562ece96f72a679c)

# Conflicts:
# src/AIS/AIS_Trihedron.cxx
# src/Geom/Geom_Conic.cxx
# src/Geom/Geom_Conic.hxx
# src/Geom/Geom_ElementarySurface.cxx
# src/Geom/Geom_ElementarySurface.hxx
# src/Geom2d/Geom2d_Conic.hxx
# src/Graphic3d/Graphic3d_BSDF.cxx
# src/Graphic3d/Graphic3d_MaterialAspect.hxx
# src/Graphic3d/Graphic3d_PBRMaterial.cxx
# src/Graphic3d/Graphic3d_PBRMaterial.hxx
# src/OpenGl/OpenGl_GraduatedTrihedron.hxx
# src/OpenGl/OpenGl_StencilTest.hxx
# src/Poly/Poly_Polygon2D.cxx
# src/Poly/Poly_Polygon2D.hxx
# src/Poly/Poly_Polygon3D.cxx
# src/Poly/Poly_PolygonOnTriangulation.cxx
# src/Quantity/Quantity_Color.cxx
# src/TDataStd/TDataStd_NamedData.hxx
# src/V3d/V3d_Viewer.hxx
# src/XCAFDoc/XCAFDoc_AssemblyItemId.cxx
# src/XCAFDoc/XCAFDoc_NoteBinData.cxx
# src/XCAFDoc/XCAFDoc_NoteComment.cxx
# src/XCAFDoc/XCAFDoc_NotesTool.cxx
# src/XCAFDoc/XCAFDoc_NotesTool.hxx
# src/XCAFDoc/XCAFDoc_VisMaterial.cxx
# src/XCAFDoc/XCAFDoc_VisMaterial.hxx
# src/XCAFDoc/XCAFDoc_VisMaterialCommon.hxx
# src/XCAFDoc/XCAFDoc_VisMaterialPBR.hxx

526 files changed:
dox/dev_guides/debug/debug.md
src/AIS/AIS_InteractiveContext.hxx
src/AIS/AIS_InteractiveContext_3.cxx
src/AIS/AIS_InteractiveObject.cxx
src/AIS/AIS_InteractiveObject.hxx
src/AIS/AIS_Shape.cxx
src/AIS/AIS_Shape.hxx
src/AIS/AIS_Trihedron.cxx
src/AIS/AIS_Trihedron.hxx
src/AppStd/AppStd_Application.cxx
src/AppStd/AppStd_Application.hxx
src/AppStdL/AppStdL_Application.cxx
src/AppStdL/AppStdL_Application.hxx
src/BRep/BRep_Curve3D.cxx
src/BRep/BRep_Curve3D.hxx
src/BRep/BRep_CurveOn2Surfaces.cxx
src/BRep/BRep_CurveOn2Surfaces.hxx
src/BRep/BRep_CurveOnClosedSurface.cxx
src/BRep/BRep_CurveOnClosedSurface.hxx
src/BRep/BRep_CurveOnSurface.cxx
src/BRep/BRep_CurveOnSurface.hxx
src/BRep/BRep_CurveRepresentation.cxx
src/BRep/BRep_CurveRepresentation.hxx
src/BRep/BRep_GCurve.cxx
src/BRep/BRep_GCurve.hxx
src/BRep/BRep_PointOnCurve.cxx
src/BRep/BRep_PointOnCurve.hxx
src/BRep/BRep_PointOnCurveOnSurface.cxx
src/BRep/BRep_PointOnCurveOnSurface.hxx
src/BRep/BRep_PointRepresentation.cxx
src/BRep/BRep_PointRepresentation.hxx
src/BRep/BRep_PointsOnSurface.cxx
src/BRep/BRep_PointsOnSurface.hxx
src/BRep/BRep_Polygon3D.cxx
src/BRep/BRep_Polygon3D.hxx
src/BRep/BRep_PolygonOnClosedSurface.cxx
src/BRep/BRep_PolygonOnClosedSurface.hxx
src/BRep/BRep_PolygonOnClosedTriangulation.cxx
src/BRep/BRep_PolygonOnClosedTriangulation.hxx
src/BRep/BRep_PolygonOnSurface.cxx
src/BRep/BRep_PolygonOnSurface.hxx
src/BRep/BRep_PolygonOnTriangulation.cxx
src/BRep/BRep_PolygonOnTriangulation.hxx
src/BRep/BRep_TEdge.cxx
src/BRep/BRep_TEdge.hxx
src/BRep/BRep_TFace.cxx
src/BRep/BRep_TFace.hxx
src/BRep/BRep_TVertex.cxx
src/BRep/BRep_TVertex.hxx
src/BVH/BVH_Box.hxx
src/BVH/BVH_Tree.hxx
src/Bnd/Bnd_Box.cxx
src/Bnd/Bnd_Box.hxx
src/Bnd/Bnd_OBB.cxx
src/Bnd/Bnd_OBB.hxx
src/Bnd/Bnd_Range.cxx
src/Bnd/Bnd_Range.hxx
src/CDM/CDM_Application.cxx
src/CDM/CDM_Application.hxx
src/CDM/CDM_Document.cxx
src/CDM/CDM_Document.hxx
src/CDM/CDM_MetaData.cxx
src/CDM/CDM_MetaData.hxx
src/CDM/CDM_Reference.cxx
src/CDM/CDM_Reference.hxx
src/Font/Font_Rect.hxx
src/Geom/Geom_BSplineCurve.cxx
src/Geom/Geom_BSplineCurve.hxx
src/Geom/Geom_BSplineSurface.cxx
src/Geom/Geom_BSplineSurface.hxx
src/Geom/Geom_BezierCurve.cxx
src/Geom/Geom_BezierCurve.hxx
src/Geom/Geom_BezierSurface.cxx
src/Geom/Geom_BezierSurface.hxx
src/Geom/Geom_BoundedCurve.cxx
src/Geom/Geom_BoundedCurve.hxx
src/Geom/Geom_Circle.cxx
src/Geom/Geom_Circle.hxx
src/Geom/Geom_Conic.cxx
src/Geom/Geom_Conic.hxx
src/Geom/Geom_ConicalSurface.cxx
src/Geom/Geom_ConicalSurface.hxx
src/Geom/Geom_Curve.cxx
src/Geom/Geom_Curve.hxx
src/Geom/Geom_CylindricalSurface.cxx
src/Geom/Geom_CylindricalSurface.hxx
src/Geom/Geom_ElementarySurface.cxx
src/Geom/Geom_ElementarySurface.hxx
src/Geom/Geom_Ellipse.cxx
src/Geom/Geom_Ellipse.hxx
src/Geom/Geom_Geometry.cxx
src/Geom/Geom_Geometry.hxx
src/Geom/Geom_Hyperbola.cxx
src/Geom/Geom_Hyperbola.hxx
src/Geom/Geom_Line.cxx
src/Geom/Geom_Line.hxx
src/Geom/Geom_OffsetCurve.cxx
src/Geom/Geom_OffsetCurve.hxx
src/Geom/Geom_OffsetSurface.cxx
src/Geom/Geom_OffsetSurface.hxx
src/Geom/Geom_OsculatingSurface.cxx
src/Geom/Geom_OsculatingSurface.hxx
src/Geom/Geom_Parabola.cxx
src/Geom/Geom_Parabola.hxx
src/Geom/Geom_Plane.cxx
src/Geom/Geom_Plane.hxx
src/Geom/Geom_RectangularTrimmedSurface.cxx
src/Geom/Geom_RectangularTrimmedSurface.hxx
src/Geom/Geom_SphericalSurface.cxx
src/Geom/Geom_SphericalSurface.hxx
src/Geom/Geom_Surface.cxx
src/Geom/Geom_Surface.hxx
src/Geom/Geom_SurfaceOfLinearExtrusion.cxx
src/Geom/Geom_SurfaceOfLinearExtrusion.hxx
src/Geom/Geom_SurfaceOfRevolution.cxx
src/Geom/Geom_SurfaceOfRevolution.hxx
src/Geom/Geom_SweptSurface.cxx
src/Geom/Geom_SweptSurface.hxx
src/Geom/Geom_ToroidalSurface.cxx
src/Geom/Geom_ToroidalSurface.hxx
src/Geom/Geom_Transformation.cxx
src/Geom/Geom_Transformation.hxx
src/Geom/Geom_TrimmedCurve.cxx
src/Geom/Geom_TrimmedCurve.hxx
src/Geom2d/Geom2d_BSplineCurve.cxx
src/Geom2d/Geom2d_BSplineCurve.hxx
src/Geom2d/Geom2d_BezierCurve.cxx
src/Geom2d/Geom2d_BezierCurve.hxx
src/Geom2d/Geom2d_BoundedCurve.cxx
src/Geom2d/Geom2d_BoundedCurve.hxx
src/Geom2d/Geom2d_CartesianPoint.cxx
src/Geom2d/Geom2d_CartesianPoint.hxx
src/Geom2d/Geom2d_Circle.cxx
src/Geom2d/Geom2d_Circle.hxx
src/Geom2d/Geom2d_Conic.cxx
src/Geom2d/Geom2d_Conic.hxx
src/Geom2d/Geom2d_Curve.cxx
src/Geom2d/Geom2d_Curve.hxx
src/Geom2d/Geom2d_Ellipse.cxx
src/Geom2d/Geom2d_Ellipse.hxx
src/Geom2d/Geom2d_Geometry.cxx
src/Geom2d/Geom2d_Geometry.hxx
src/Geom2d/Geom2d_Hyperbola.cxx
src/Geom2d/Geom2d_Hyperbola.hxx
src/Geom2d/Geom2d_Line.cxx
src/Geom2d/Geom2d_Line.hxx
src/Geom2d/Geom2d_OffsetCurve.cxx
src/Geom2d/Geom2d_OffsetCurve.hxx
src/Geom2d/Geom2d_Parabola.cxx
src/Geom2d/Geom2d_Parabola.hxx
src/Geom2d/Geom2d_Point.cxx
src/Geom2d/Geom2d_Point.hxx
src/Geom2d/Geom2d_TrimmedCurve.cxx
src/Geom2d/Geom2d_TrimmedCurve.hxx
src/Graphic3d/Graphic3d_Aspects.cxx
src/Graphic3d/Graphic3d_Aspects.hxx
src/Graphic3d/Graphic3d_BSDF.cxx
src/Graphic3d/Graphic3d_BSDF.hxx
src/Graphic3d/Graphic3d_BoundBuffer.hxx
src/Graphic3d/Graphic3d_Buffer.cxx
src/Graphic3d/Graphic3d_Buffer.hxx
src/Graphic3d/Graphic3d_CStructure.cxx
src/Graphic3d/Graphic3d_CStructure.hxx
src/Graphic3d/Graphic3d_Camera.cxx
src/Graphic3d/Graphic3d_Camera.hxx
src/Graphic3d/Graphic3d_ClipPlane.cxx
src/Graphic3d/Graphic3d_ClipPlane.hxx
src/Graphic3d/Graphic3d_Group.cxx
src/Graphic3d/Graphic3d_Group.hxx
src/Graphic3d/Graphic3d_HatchStyle.cxx
src/Graphic3d/Graphic3d_HatchStyle.hxx
src/Graphic3d/Graphic3d_IndexBuffer.hxx
src/Graphic3d/Graphic3d_Layer.cxx
src/Graphic3d/Graphic3d_Layer.hxx
src/Graphic3d/Graphic3d_MaterialAspect.cxx
src/Graphic3d/Graphic3d_MaterialAspect.hxx
src/Graphic3d/Graphic3d_PolygonOffset.cxx
src/Graphic3d/Graphic3d_PolygonOffset.hxx
src/Graphic3d/Graphic3d_PresentationAttributes.cxx
src/Graphic3d/Graphic3d_PresentationAttributes.hxx
src/Graphic3d/Graphic3d_SequenceOfHClipPlane.cxx
src/Graphic3d/Graphic3d_SequenceOfHClipPlane.hxx
src/Graphic3d/Graphic3d_Structure.cxx
src/Graphic3d/Graphic3d_Structure.hxx
src/Graphic3d/Graphic3d_TransformPers.cxx
src/Graphic3d/Graphic3d_TransformPers.hxx
src/Graphic3d/Graphic3d_ViewAffinity.cxx
src/Graphic3d/Graphic3d_ViewAffinity.hxx
src/Graphic3d/Graphic3d_ZLayerSettings.hxx
src/Image/Image_Texture.cxx
src/Image/Image_Texture.hxx
src/NCollection/NCollection_Buffer.hxx
src/NCollection/NCollection_Mat4.hxx
src/NCollection/NCollection_Vec3.hxx
src/NCollection/NCollection_Vec4.hxx
src/OpenGl/OpenGl_Aspects.cxx
src/OpenGl/OpenGl_Aspects.hxx
src/OpenGl/OpenGl_Context.cxx
src/OpenGl/OpenGl_Context.hxx
src/OpenGl/OpenGl_Element.cxx
src/OpenGl/OpenGl_Element.hxx
src/OpenGl/OpenGl_Flipper.cxx
src/OpenGl/OpenGl_Flipper.hxx
src/OpenGl/OpenGl_FrameStatsPrs.cxx
src/OpenGl/OpenGl_FrameStatsPrs.hxx
src/OpenGl/OpenGl_GraduatedTrihedron.cxx
src/OpenGl/OpenGl_GraduatedTrihedron.hxx
src/OpenGl/OpenGl_Group.cxx
src/OpenGl/OpenGl_Group.hxx
src/OpenGl/OpenGl_IndexBuffer.cxx
src/OpenGl/OpenGl_IndexBuffer.hxx
src/OpenGl/OpenGl_LayerList.cxx
src/OpenGl/OpenGl_LayerList.hxx
src/OpenGl/OpenGl_MatrixState.hxx
src/OpenGl/OpenGl_PrimitiveArray.cxx
src/OpenGl/OpenGl_PrimitiveArray.hxx
src/OpenGl/OpenGl_Resource.hxx
src/OpenGl/OpenGl_StencilTest.cxx
src/OpenGl/OpenGl_StencilTest.hxx
src/OpenGl/OpenGl_Structure.cxx
src/OpenGl/OpenGl_Structure.hxx
src/OpenGl/OpenGl_Text.cxx
src/OpenGl/OpenGl_Text.hxx
src/OpenGl/OpenGl_VertexBuffer.cxx
src/OpenGl/OpenGl_VertexBuffer.hxx
src/OpenGl/OpenGl_Workspace.cxx
src/OpenGl/OpenGl_Workspace.hxx
src/Poly/Poly_Polygon2D.cxx
src/Poly/Poly_Polygon2D.hxx
src/Poly/Poly_Polygon3D.cxx
src/Poly/Poly_Polygon3D.hxx
src/Poly/Poly_PolygonOnTriangulation.cxx
src/Poly/Poly_PolygonOnTriangulation.hxx
src/Poly/Poly_Triangulation.cxx
src/Poly/Poly_Triangulation.hxx
src/Prs3d/Prs3d_ArrowAspect.cxx
src/Prs3d/Prs3d_ArrowAspect.hxx
src/Prs3d/Prs3d_BasicAspect.hxx
src/Prs3d/Prs3d_DatumAspect.cxx
src/Prs3d/Prs3d_DatumAspect.hxx
src/Prs3d/Prs3d_DimensionAspect.cxx
src/Prs3d/Prs3d_DimensionAspect.hxx
src/Prs3d/Prs3d_Drawer.cxx
src/Prs3d/Prs3d_Drawer.hxx
src/Prs3d/Prs3d_LineAspect.cxx
src/Prs3d/Prs3d_LineAspect.hxx
src/Prs3d/Prs3d_PlaneAspect.cxx
src/Prs3d/Prs3d_PlaneAspect.hxx
src/Prs3d/Prs3d_PointAspect.cxx
src/Prs3d/Prs3d_PointAspect.hxx
src/Prs3d/Prs3d_PresentationShadow.cxx
src/Prs3d/Prs3d_PresentationShadow.hxx
src/Prs3d/Prs3d_ShadingAspect.cxx
src/Prs3d/Prs3d_ShadingAspect.hxx
src/Prs3d/Prs3d_TextAspect.cxx
src/Prs3d/Prs3d_TextAspect.hxx
src/PrsMgr/PrsMgr_PresentableObject.cxx
src/PrsMgr/PrsMgr_PresentableObject.hxx
src/PrsMgr/PrsMgr_Presentation.cxx
src/PrsMgr/PrsMgr_Presentation.hxx
src/QABugs/QABugs_19.cxx
src/Quantity/Quantity_Color.cxx
src/Quantity/Quantity_Color.hxx
src/Quantity/Quantity_ColorRGBA.cxx
src/Quantity/Quantity_ColorRGBA.hxx
src/Select3D/Select3D_InteriorSensitivePointSet.cxx
src/Select3D/Select3D_InteriorSensitivePointSet.hxx
src/Select3D/Select3D_SensitiveBox.cxx
src/Select3D/Select3D_SensitiveBox.hxx
src/Select3D/Select3D_SensitiveEntity.cxx
src/Select3D/Select3D_SensitiveEntity.hxx
src/Select3D/Select3D_SensitiveFace.cxx
src/Select3D/Select3D_SensitiveFace.hxx
src/Select3D/Select3D_SensitiveGroup.cxx
src/Select3D/Select3D_SensitiveGroup.hxx
src/Select3D/Select3D_SensitivePoint.cxx
src/Select3D/Select3D_SensitivePoint.hxx
src/Select3D/Select3D_SensitivePoly.cxx
src/Select3D/Select3D_SensitivePoly.hxx
src/Select3D/Select3D_SensitivePrimitiveArray.cxx
src/Select3D/Select3D_SensitivePrimitiveArray.hxx
src/Select3D/Select3D_SensitiveSegment.cxx
src/Select3D/Select3D_SensitiveSegment.hxx
src/Select3D/Select3D_SensitiveSet.cxx
src/Select3D/Select3D_SensitiveSet.hxx
src/Select3D/Select3D_SensitiveTriangle.cxx
src/Select3D/Select3D_SensitiveTriangle.hxx
src/Select3D/Select3D_SensitiveTriangulation.cxx
src/Select3D/Select3D_SensitiveTriangulation.hxx
src/Select3D/Select3D_SensitiveWire.cxx
src/Select3D/Select3D_SensitiveWire.hxx
src/SelectBasics/SelectBasics_SelectingVolumeManager.hxx
src/SelectMgr/SelectMgr_BaseFrustum.cxx
src/SelectMgr/SelectMgr_BaseFrustum.hxx
src/SelectMgr/SelectMgr_EntityOwner.cxx
src/SelectMgr/SelectMgr_EntityOwner.hxx
src/SelectMgr/SelectMgr_SelectableObject.cxx
src/SelectMgr/SelectMgr_SelectableObject.hxx
src/SelectMgr/SelectMgr_SelectableObjectSet.cxx
src/SelectMgr/SelectMgr_SelectableObjectSet.hxx
src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx
src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx
src/SelectMgr/SelectMgr_Selection.cxx
src/SelectMgr/SelectMgr_Selection.hxx
src/SelectMgr/SelectMgr_SensitiveEntity.cxx
src/SelectMgr/SelectMgr_SensitiveEntity.hxx
src/SelectMgr/SelectMgr_ViewClipRange.cxx
src/SelectMgr/SelectMgr_ViewClipRange.hxx
src/SelectMgr/SelectMgr_ViewerSelector.cxx
src/SelectMgr/SelectMgr_ViewerSelector.hxx
src/Standard/Standard_Dump.cxx
src/Standard/Standard_Dump.hxx
src/StdSelect/StdSelect_BRepOwner.cxx
src/StdSelect/StdSelect_BRepOwner.hxx
src/StdSelect/StdSelect_Shape.cxx
src/StdSelect/StdSelect_Shape.hxx
src/StdSelect/StdSelect_ViewerSelector3d.cxx
src/StdSelect/StdSelect_ViewerSelector3d.hxx
src/TDF/TDF_Attribute.cxx
src/TDF/TDF_Attribute.hxx
src/TDF/TDF_AttributeDelta.cxx
src/TDF/TDF_AttributeDelta.hxx
src/TDF/TDF_Data.cxx
src/TDF/TDF_Data.hxx
src/TDF/TDF_Delta.cxx
src/TDF/TDF_Delta.hxx
src/TDF/TDF_DeltaOnResume.cxx
src/TDF/TDF_DeltaOnResume.hxx
src/TDF/TDF_Reference.cxx
src/TDF/TDF_Reference.hxx
src/TDF/TDF_TagSource.cxx
src/TDF/TDF_TagSource.hxx
src/TDF/TDF_Transaction.cxx
src/TDF/TDF_Transaction.hxx
src/TDataStd/TDataStd.cxx
src/TDataStd/TDataStd_AsciiString.cxx
src/TDataStd/TDataStd_AsciiString.hxx
src/TDataStd/TDataStd_BooleanArray.cxx
src/TDataStd/TDataStd_BooleanArray.hxx
src/TDataStd/TDataStd_BooleanList.cxx
src/TDataStd/TDataStd_BooleanList.hxx
src/TDataStd/TDataStd_ByteArray.cxx
src/TDataStd/TDataStd_ByteArray.hxx
src/TDataStd/TDataStd_ChildNodeIterator.cxx
src/TDataStd/TDataStd_Comment.cxx
src/TDataStd/TDataStd_Comment.hxx
src/TDataStd/TDataStd_Current.cxx
src/TDataStd/TDataStd_Current.hxx
src/TDataStd/TDataStd_DeltaOnModificationOfByteArray.cxx
src/TDataStd/TDataStd_DeltaOnModificationOfExtStringArray.cxx
src/TDataStd/TDataStd_DeltaOnModificationOfIntArray.cxx
src/TDataStd/TDataStd_DeltaOnModificationOfIntPackedMap.cxx
src/TDataStd/TDataStd_DeltaOnModificationOfRealArray.cxx
src/TDataStd/TDataStd_Directory.cxx
src/TDataStd/TDataStd_Directory.hxx
src/TDataStd/TDataStd_Expression.cxx
src/TDataStd/TDataStd_Expression.hxx
src/TDataStd/TDataStd_ExtStringArray.cxx
src/TDataStd/TDataStd_ExtStringArray.hxx
src/TDataStd/TDataStd_ExtStringList.cxx
src/TDataStd/TDataStd_ExtStringList.hxx
src/TDataStd/TDataStd_HDataMapOfStringByte.cxx
src/TDataStd/TDataStd_HDataMapOfStringHArray1OfInteger.cxx
src/TDataStd/TDataStd_HDataMapOfStringHArray1OfReal.cxx
src/TDataStd/TDataStd_HDataMapOfStringInteger.cxx
src/TDataStd/TDataStd_HDataMapOfStringReal.cxx
src/TDataStd/TDataStd_HDataMapOfStringString.cxx
src/TDataStd/TDataStd_IntPackedMap.cxx
src/TDataStd/TDataStd_IntPackedMap.hxx
src/TDataStd/TDataStd_Integer.cxx
src/TDataStd/TDataStd_Integer.hxx
src/TDataStd/TDataStd_IntegerArray.cxx
src/TDataStd/TDataStd_IntegerArray.hxx
src/TDataStd/TDataStd_IntegerList.cxx
src/TDataStd/TDataStd_IntegerList.hxx
src/TDataStd/TDataStd_Name.cxx
src/TDataStd/TDataStd_Name.hxx
src/TDataStd/TDataStd_NamedData.cxx
src/TDataStd/TDataStd_NamedData.hxx
src/TDataStd/TDataStd_NoteBook.cxx
src/TDataStd/TDataStd_NoteBook.hxx
src/TDataStd/TDataStd_Real.cxx
src/TDataStd/TDataStd_Real.hxx
src/TDataStd/TDataStd_RealArray.cxx
src/TDataStd/TDataStd_RealArray.hxx
src/TDataStd/TDataStd_RealList.cxx
src/TDataStd/TDataStd_RealList.hxx
src/TDataStd/TDataStd_ReferenceArray.cxx
src/TDataStd/TDataStd_ReferenceArray.hxx
src/TDataStd/TDataStd_ReferenceList.cxx
src/TDataStd/TDataStd_ReferenceList.hxx
src/TDataStd/TDataStd_Relation.cxx
src/TDataStd/TDataStd_Relation.hxx
src/TDataStd/TDataStd_Tick.cxx
src/TDataStd/TDataStd_Tick.hxx
src/TDataStd/TDataStd_TreeNode.cxx
src/TDataStd/TDataStd_TreeNode.hxx
src/TDataStd/TDataStd_UAttribute.cxx
src/TDataStd/TDataStd_UAttribute.hxx
src/TDataStd/TDataStd_Variable.cxx
src/TDataStd/TDataStd_Variable.hxx
src/TDocStd/TDocStd.cxx
src/TDocStd/TDocStd_Application.cxx
src/TDocStd/TDocStd_Application.hxx
src/TDocStd/TDocStd_ApplicationDelta.cxx
src/TDocStd/TDocStd_CompoundDelta.cxx
src/TDocStd/TDocStd_Document.cxx
src/TDocStd/TDocStd_Document.hxx
src/TDocStd/TDocStd_Modified.cxx
src/TDocStd/TDocStd_MultiTransactionManager.cxx
src/TDocStd/TDocStd_Owner.cxx
src/TDocStd/TDocStd_Owner.hxx
src/TDocStd/TDocStd_PathParser.cxx
src/TDocStd/TDocStd_XLink.cxx
src/TDocStd/TDocStd_XLinkIterator.cxx
src/TDocStd/TDocStd_XLinkRoot.cxx
src/TDocStd/TDocStd_XLinkTool.cxx
src/TNaming/TNaming_Name.cxx
src/TNaming/TNaming_Name.hxx
src/TNaming/TNaming_NamedShape.cxx
src/TNaming/TNaming_NamedShape.hxx
src/TNaming/TNaming_Naming.cxx
src/TNaming/TNaming_Naming.hxx
src/TNaming/TNaming_RefShape.hxx
src/TNaming/TNaming_UsedShapes.cxx
src/TNaming/TNaming_UsedShapes.hxx
src/TObj/TObj_Application.cxx
src/TObj/TObj_Application.hxx
src/TopLoc/TopLoc_Datum3D.cxx
src/TopLoc/TopLoc_Datum3D.hxx
src/TopLoc/TopLoc_ItemLocation.cxx
src/TopLoc/TopLoc_ItemLocation.hxx
src/TopLoc/TopLoc_Location.cxx
src/TopLoc/TopLoc_Location.hxx
src/TopoDS/TopoDS_Shape.cxx
src/TopoDS/TopoDS_Shape.hxx
src/TopoDS/TopoDS_TShape.cxx
src/TopoDS/TopoDS_TShape.hxx
src/V3d/V3d_Viewer.cxx
src/V3d/V3d_Viewer.hxx
src/XCAFApp/XCAFApp_Application.cxx
src/XCAFApp/XCAFApp_Application.hxx
src/XCAFDoc/XCAFDoc_Area.cxx
src/XCAFDoc/XCAFDoc_Area.hxx
src/XCAFDoc/XCAFDoc_AssemblyItemId.cxx
src/XCAFDoc/XCAFDoc_AssemblyItemId.hxx
src/XCAFDoc/XCAFDoc_AssemblyItemRef.cxx
src/XCAFDoc/XCAFDoc_AssemblyItemRef.hxx
src/XCAFDoc/XCAFDoc_Centroid.cxx
src/XCAFDoc/XCAFDoc_Centroid.hxx
src/XCAFDoc/XCAFDoc_ClippingPlaneTool.cxx
src/XCAFDoc/XCAFDoc_ClippingPlaneTool.hxx
src/XCAFDoc/XCAFDoc_Color.cxx
src/XCAFDoc/XCAFDoc_Color.hxx
src/XCAFDoc/XCAFDoc_ColorTool.cxx
src/XCAFDoc/XCAFDoc_ColorTool.hxx
src/XCAFDoc/XCAFDoc_Datum.cxx
src/XCAFDoc/XCAFDoc_Datum.hxx
src/XCAFDoc/XCAFDoc_DimTol.cxx
src/XCAFDoc/XCAFDoc_DimTol.hxx
src/XCAFDoc/XCAFDoc_DimTolTool.cxx
src/XCAFDoc/XCAFDoc_DimTolTool.hxx
src/XCAFDoc/XCAFDoc_Dimension.cxx
src/XCAFDoc/XCAFDoc_Dimension.hxx
src/XCAFDoc/XCAFDoc_DocumentTool.cxx
src/XCAFDoc/XCAFDoc_DocumentTool.hxx
src/XCAFDoc/XCAFDoc_GeomTolerance.cxx
src/XCAFDoc/XCAFDoc_GeomTolerance.hxx
src/XCAFDoc/XCAFDoc_GraphNode.cxx
src/XCAFDoc/XCAFDoc_GraphNode.hxx
src/XCAFDoc/XCAFDoc_LayerTool.cxx
src/XCAFDoc/XCAFDoc_LayerTool.hxx
src/XCAFDoc/XCAFDoc_Location.cxx
src/XCAFDoc/XCAFDoc_Location.hxx
src/XCAFDoc/XCAFDoc_Material.cxx
src/XCAFDoc/XCAFDoc_Material.hxx
src/XCAFDoc/XCAFDoc_MaterialTool.cxx
src/XCAFDoc/XCAFDoc_MaterialTool.hxx
src/XCAFDoc/XCAFDoc_Note.cxx
src/XCAFDoc/XCAFDoc_Note.hxx
src/XCAFDoc/XCAFDoc_NoteBalloon.cxx
src/XCAFDoc/XCAFDoc_NoteBinData.cxx
src/XCAFDoc/XCAFDoc_NoteComment.cxx
src/XCAFDoc/XCAFDoc_NotesTool.cxx
src/XCAFDoc/XCAFDoc_NotesTool.hxx
src/XCAFDoc/XCAFDoc_ShapeMapTool.cxx
src/XCAFDoc/XCAFDoc_ShapeMapTool.hxx
src/XCAFDoc/XCAFDoc_ShapeTool.cxx
src/XCAFDoc/XCAFDoc_ShapeTool.hxx
src/XCAFDoc/XCAFDoc_View.cxx
src/XCAFDoc/XCAFDoc_View.hxx
src/XCAFDoc/XCAFDoc_ViewTool.cxx
src/XCAFDoc/XCAFDoc_ViewTool.hxx
src/XCAFDoc/XCAFDoc_Volume.cxx
src/XCAFDoc/XCAFDoc_Volume.hxx
src/XCAFPrs/XCAFPrs_Style.cxx
src/XCAFPrs/XCAFPrs_Style.hxx
src/gp/gp_Ax1.cxx
src/gp/gp_Ax1.hxx
src/gp/gp_Ax2.cxx
src/gp/gp_Ax2.hxx
src/gp/gp_Ax22d.cxx
src/gp/gp_Ax22d.hxx
src/gp/gp_Ax2d.cxx
src/gp/gp_Ax2d.hxx
src/gp/gp_Ax3.cxx
src/gp/gp_Ax3.hxx
src/gp/gp_Dir.cxx
src/gp/gp_Dir.hxx
src/gp/gp_Dir2d.cxx
src/gp/gp_Dir2d.hxx
src/gp/gp_GTrsf.cxx
src/gp/gp_GTrsf.hxx
src/gp/gp_Mat.cxx
src/gp/gp_Mat.hxx
src/gp/gp_Pln.cxx
src/gp/gp_Pln.hxx
src/gp/gp_Pnt.cxx
src/gp/gp_Pnt.hxx
src/gp/gp_Pnt2d.cxx
src/gp/gp_Pnt2d.hxx
src/gp/gp_Trsf.cxx
src/gp/gp_Trsf.hxx
src/gp/gp_XYZ.cxx
src/gp/gp_XYZ.hxx
tests/bugs/vis/bug30949

index ba6e57676a40bff029a852b05c0f43f76382d287..df87619498ade3e7b0d7f32f6461f3f47d6cb5ae 100644 (file)
@@ -150,7 +150,8 @@ Steps to prepare dump of the object into json:
 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>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.
+2. Put into the first row of the method <b>OCCT_DUMP_CLASS_BEGIN</b> or <b>OCCT_DUMP_TRANSIENT_CLASS_BEGIN</b> (for Standard_Transient objects).
+This macro appends class name into output stream.
 
 3. Add several macro to store field values.
 
index d45772c49778f3ee8b7144395f91240cc96a8963..f5c137bb6b0befd67323f671bfdcc458dcda9aa9 100644 (file)
@@ -1254,6 +1254,9 @@ public: //! @name sub-intensity management (deprecated)
   //! @param theSelection an instance of the selection
   void SetSelection (const Handle(AIS_Selection)& theSelection) { mySelection = theSelection; }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 protected: //! @name internal methods
 
   Standard_EXPORT void GetDefModes (const Handle(AIS_InteractiveObject)& anIobj, Standard_Integer& Dmode, Standard_Integer& HiMod, Standard_Integer& SelMode) const;
index 91357cdf2878bcb815e2b667b4acc11fc25e948d..14678c1c86e32acab885ccfc0e3ea97ac36cd50a 100644 (file)
@@ -86,3 +86,42 @@ void AIS_InteractiveContext::PolygonOffsets(
     anObj->PolygonOffsets( aMode, aFactor, aUnits );
 }
 // OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets 
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void AIS_InteractiveContext::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myObjects.Size())
+
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, mgrSelector.get())
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myMainPM.get())
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myMainVwr.get())
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myMainSel.get())
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myLastActiveView)
+
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myLastPicked.get())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToHilightSelected)
+
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, mySelection.get())
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myFilters.get())
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myDefaultDrawer.get())
+
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_Selected])
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_Dynamic])
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_LocalSelected])
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_LocalDynamic])
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_SubIntensity])
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDetectedSeq.Size())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCurDetected)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCurHighlighted)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPickingStrategy)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAutoHilight)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsAutoActivateSelMode)
+}
index 70c87a9b1a6acaca4ebd992c1823a57fba4af176..784194acd03287f6099fff776787ab0aac1b0a37 100644 (file)
@@ -160,11 +160,11 @@ void AIS_InteractiveObject::SetAspect(const Handle(Prs3d_BasicAspect)& theAspect
 //function : DumpJson
 //purpose  : 
 //=======================================================================
-void AIS_InteractiveObject::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+void AIS_InteractiveObject::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, AIS_InteractiveObject);
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
 
-  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, SelectMgr_SelectableObject);
-  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myCTXPtr);
-  OCCT_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 e7e9de69b18a3a796508428c335c54bd80e1e13f..e461140b0a909a4cb2f26a1f45ba6a3ef6a2e137 100644 (file)
@@ -124,7 +124,7 @@ public:
   Standard_EXPORT void SetAspect (const Handle(Prs3d_BasicAspect)& anAspect);
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 protected:
 
   //! The TypeOfPresention3d means that the interactive object
index b6ff1c0c4bfe079c0ad18d5671e734bcb6dfc86c..8dbdde0195026917660d2c35811ce229f1e2bd7b 100644 (file)
@@ -987,3 +987,19 @@ Standard_Boolean AIS_Shape::OwnHLRDeviationAngle ( Standard_Real &  anAngle,
   aPreviousAngle = myDrawer->PreviousHLRDeviationAngle (); 
   return myDrawer->HasOwnHLRDeviationAngle();
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void AIS_Shape::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, AIS_InteractiveObject)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myshape)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBB)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myInitAng)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCompBB)
+}
index f648228c3c59ddf1e19858de38e701faecfdc8c8..1b2ce0fcd51c53bae25b945fc54a0b6b9fa3bb5f 100644 (file)
@@ -325,6 +325,9 @@ public:
                                                       const TopoDS_Shape& theShape,
                                                       const Handle(Prs3d_Drawer)& theDrawer);
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 protected:
 
   TopoDS_Shape     myshape;    //!< shape to display
index 7a2936dc3053aa9c32a25676a4fcda1370ec2d20..cb88191dd40b8d47b3af5ff9a0dd38c53aabd17c 100644 (file)
@@ -995,3 +995,20 @@ Handle(Prs3d_PointAspect) AIS_Trihedron::getHighlightPointAspect()
 
   return myHighlightPointAspect;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void AIS_Trihedron::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, AIS_InteractiveObject)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnSize)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnTextColor)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnArrowColor)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDatumAspect)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTrihDispMode)
+}
index e50a34b5da7a5913af6da200f309b20e3dbb9c46..4c7fea9c117953e58845e6de1272fa5a6eb14124 100644 (file)
@@ -222,6 +222,9 @@ protected:
   Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection,
                                                  const Standard_Integer theMode) Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 protected:
 
   //! Creates a sensitive entity for the datum part that will be used in selection owner creation.
index 039a50dcd1745d55221ed8e8a2ed17291030141b..61da27c4916d361562af56e734b7242ff7efbd49 100644 (file)
@@ -16,6 +16,7 @@
 //AGV 15/10/01 : Add XmlOcaf support; add MessageDriver support
 
 #include <AppStd_Application.hxx>
+#include <Standard_Dump.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(AppStd_Application,TDocStd_Application)
 
@@ -29,3 +30,13 @@ Standard_CString AppStd_Application::ResourcesName() {
   return aRes;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void AppStd_Application::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDocStd_Application)
+}
index bf9b64aa09eaa71e47ac22fb5f27bdc2294149da..b4e17d85ebefa81b5f6f1a8b1761b13f6f5ec2ad 100644 (file)
@@ -35,6 +35,9 @@ public:
   //! resources
   Standard_EXPORT Standard_CString ResourcesName() Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
   DEFINE_STANDARD_RTTIEXT(AppStd_Application,TDocStd_Application)
 };
 
index 9cead1f5d119bf420187683db5f366c5ad41e09a..22f9f13c1f4da2ea4f92e77a320e241af1dc8c87 100644 (file)
@@ -16,6 +16,7 @@
 //AGV 15/10/01 : Add XmlOcaf support; add MessageDriver support
 
 #include <AppStdL_Application.hxx>
+#include <Standard_Dump.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(AppStdL_Application,TDocStd_Application)
 
@@ -30,3 +31,13 @@ Standard_CString AppStdL_Application::ResourcesName()
   return aRes;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void AppStdL_Application::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDocStd_Application)
+}
index a7f7aeb00505e3a1c242c6723a482b9d31e10308..d9b2e898f3855d5c20d03019b49a2d4cab8b7188 100644 (file)
@@ -34,6 +34,9 @@ public:
   //! resources
   Standard_EXPORT Standard_CString ResourcesName() Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
   DEFINE_STANDARD_RTTIEXT(AppStdL_Application,TDocStd_Application)
 };
 
index 86a06deab875e947c3b9007b6e1323d2e8c17465..b462b8ae5100632de5e348e82930660bd3d4c7ab 100644 (file)
@@ -92,3 +92,16 @@ Handle(BRep_CurveRepresentation) BRep_Curve3D::Copy() const
   C->SetRange(First(), Last());
   return C;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void BRep_Curve3D::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_GCurve)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myCurve.get())
+}
index e459d1ddffb406c027bcfc2038cbea1b4df5e453..39183cec3fdcfb4124c6f0b420154cde54d7f05e 100644 (file)
@@ -54,6 +54,9 @@ public:
   //! Return a copy of this representation.
   Standard_EXPORT Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 1ce978e4668d41683bb676b38f12bbd57e814e9f..a39a309182fba2a06f03a6eda009cc797c6cb846 100644 (file)
@@ -147,3 +147,20 @@ Handle(BRep_CurveRepresentation) BRep_CurveOn2Surfaces::Copy() const
                          myContinuity);
   return C;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void BRep_CurveOn2Surfaces::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveRepresentation)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface2.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLocation2)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myContinuity)
+}
index 867423ff2494f181eb45afe1194683553559f619..37356a92d22d5b420d40b317349bdc2e3ae43eae 100644 (file)
@@ -66,6 +66,9 @@ public:
   //! Return a copy of this representation.
   Standard_EXPORT Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 5f0b0289316fc103ddd60e78449475953a056e6d..e1c6c5783848e36434e6b7a9dc300570e102e284 100644 (file)
@@ -180,4 +180,20 @@ void  BRep_CurveOnClosedSurface::Update()
   BRep_CurveOnSurface::Update();
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void BRep_CurveOnClosedSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveOnSurface)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPCurve2.get())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myContinuity)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myUV21)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myUV22)
+}
 
index 5bed28216b61f89f2a5772307f6668d50ed7f837..e418f2fab4c0e02ac5e3ec00c97bf41255bf5791 100644 (file)
@@ -78,6 +78,9 @@ public:
   //! This is called when the range is modified.
   Standard_EXPORT virtual void Update() Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index f5f6cd377bcd2c1d7c0e19efeb69ac8d1e1c2091..7ff94396d6ffafdd7d99422056330caf3e6fdb04 100644 (file)
@@ -146,4 +146,20 @@ void  BRep_CurveOnSurface::Update()
   }
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void BRep_CurveOnSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_GCurve)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myUV1)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myUV2)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPCurve.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface.get())
+}
 
index baece2ff34fa45d8cee9568c8a357ed4549996e7..6f6c49026ed5bfbdb30a9fdc816c7d6e0a302054 100644 (file)
@@ -71,6 +71,9 @@ public:
   //! This is called when the range is modified.
   Standard_EXPORT virtual void Update() Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 63ed95bf1154fe7ed004b5e1f7c88d43777dd6bd..a8d05237e5e495c0df2f0d2b5a5380613b9bf924 100644 (file)
@@ -426,3 +426,13 @@ void BRep_CurveRepresentation::Polygon2(const Handle(Poly_Polygon2D)&)
   throw Standard_DomainError("BRep_CurveRepresentation");
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void BRep_CurveRepresentation::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLocation)
+}
index 354eaa395fa0691c052f44482de86190f6b45b79..f1dcf6226cd671534c2fa0ca4037325b8efdc19e 100644 (file)
@@ -144,6 +144,9 @@ public:
   //! Return a copy of this representation.
   Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const = 0;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 
 
 
index 22c36ccfe47a1466a0136870790afbec336bc1ca..c5851057de0cee62fab87947aa6cbc74891312df 100644 (file)
@@ -46,3 +46,16 @@ void BRep_GCurve::Update()
   
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void BRep_GCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveRepresentation)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFirst)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLast)
+}
index 1d2c4d5433566b2eaa8af38ac5c666371da38a0a..6e7eb7ab9f63ed2e48a07f2a69212a65f1985153 100644 (file)
@@ -57,6 +57,9 @@ public:
   //! This is called when the range is modified.
   Standard_EXPORT virtual void Update();
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 737c7c1f2b3014dd2214f24d953a4a7390ae9fe6..f88baae812c3a65ed53c61a02140c351f720ab14 100644 (file)
@@ -80,4 +80,16 @@ void  BRep_PointOnCurve::Curve(const Handle(Geom_Curve)& C)
   myCurve = C;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void BRep_PointOnCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_PointRepresentation)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCurve.get())
+}
 
index 3e22ee967c06d2f62a73e8e6d879b9cd2c31d0cb..c8a483abc32f834ed4636cd552279a49b8af5178 100644 (file)
@@ -48,6 +48,9 @@ public:
   
   Standard_EXPORT virtual void Curve (const Handle(Geom_Curve)& C) Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index d82010bd17854a902a27d975dd0bb76719e54e1f..3514d93c719c32daedcb5fbfc8030d7cc70504a4 100644 (file)
@@ -84,4 +84,16 @@ void  BRep_PointOnCurveOnSurface::PCurve(const Handle(Geom2d_Curve)& C)
   myPCurve = C;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void BRep_PointOnCurveOnSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_PointRepresentation)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPCurve.get())
+}
 
index 73eeec83611cd4b29f59d992ef37a2965a8c108e..53f976114abd7be743acc8413e4ac51def9f0be8 100644 (file)
@@ -50,6 +50,9 @@ public:
   
   Standard_EXPORT virtual void PCurve (const Handle(Geom2d_Curve)& C) Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 397320651ab657fb18b19e52f732823df8864d4f..45dac877cf00ab10d856d7d9b7a970f821f20af7 100644 (file)
@@ -197,4 +197,15 @@ void  BRep_PointRepresentation::Surface(const Handle(Geom_Surface)& )
   throw Standard_DomainError("BRep_PointRepresentation");
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void BRep_PointRepresentation::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLocation)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myParameter)
+}
 
index 22c24b0d637eaa1a602dc0f6438cbf4ece829874..ed8ba9983d736dbde1df3b3dead7f5f724e39397 100644 (file)
@@ -84,6 +84,9 @@ public:
   
   Standard_EXPORT virtual void Surface (const Handle(Geom_Surface)& S);
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 
 
 
index 740a09abc633866192fb047848b5a1202dcc80bf..76ce4c306baeffd9f57fa69d28a3dab485c61b93 100644 (file)
@@ -56,4 +56,17 @@ void  BRep_PointsOnSurface::Surface(const Handle(Geom_Surface)& S)
   mySurface = S;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void BRep_PointsOnSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_PointRepresentation)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface.get())
+}
+
 
index 83f23f64edcaabbbcf328b2fa0da26ed303e4393..4dff6c0df2d16c80fd94b406a076a604d7dceb47 100644 (file)
@@ -40,6 +40,9 @@ public:
   
   Standard_EXPORT virtual void Surface (const Handle(Geom_Surface)& S) Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 921a4ed1f9ec39bdc9d3fd5b5dc6f42985b6c0d7..28d4015519ee273bd42b7a1df630b2abf49a46f5 100644 (file)
@@ -76,3 +76,15 @@ Handle(BRep_CurveRepresentation) BRep_Polygon3D::Copy() const
   return P;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void BRep_Polygon3D::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveRepresentation)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPolygon3D.get())
+}
index ff5e6d8d95e5d16f2312cf1a7621a74e554973fa..4a4abfc9328e6bf24367ebc05cc4d1f0027847eb 100644 (file)
@@ -50,6 +50,9 @@ public:
   //! Return a copy of this representation.
   Standard_EXPORT Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 8696bb816427dda634e2c00c48c283daaba4699b..76ff9419b473753461aba17a736a3b3fee005276 100644 (file)
@@ -79,3 +79,16 @@ Handle(BRep_CurveRepresentation) BRep_PolygonOnClosedSurface::Copy() const
   return P;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void BRep_PolygonOnClosedSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_PolygonOnSurface)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPolygon2.get())
+}
+
index 79ee1ec63364655442c1c7d9b06e444cc6c7a753..fb2954bc4fac25e08a6c16972c89d18470456c38 100644 (file)
@@ -51,6 +51,9 @@ public:
   //! Return a copy of this representation.
   Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 83bcc2bac59ee5868da96907342a5576b5fd2667..01533c0fba050f30d2d5b0669641e9cfe02de9cc 100644 (file)
@@ -84,3 +84,15 @@ Handle(BRep_CurveRepresentation) BRep_PolygonOnClosedTriangulation::Copy() const
   return P;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void BRep_PolygonOnClosedTriangulation::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_PolygonOnTriangulation)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPolygon2.get())
+}
index bc9eba85a5ef189b367dc7ecaa33cfa098fa0fc1..332cd5270b248b25553f0ca66451b0af0ddb2843 100644 (file)
@@ -51,6 +51,9 @@ public:
   //! Return a copy of this representation.
   Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 197b5b8fa4b1f4747d38d6fb0842a43a15b10bb4..63e56b057e5a20311ef3be163eff5c752b6b1252 100644 (file)
@@ -102,3 +102,16 @@ Handle(BRep_CurveRepresentation) BRep_PolygonOnSurface::Copy() const
   return P;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void BRep_PolygonOnSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveRepresentation)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPolygon2D.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface.get())
+}
index b0c165798e97e770a4d9b70db4aef416b66ce0e8..38e8d7ec0a5c9dc8897664af036d2b1a79203b4f 100644 (file)
@@ -59,6 +59,9 @@ public:
   //! Return a copy of this representation.
   Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 24beb3dc9a21b5933203bafd3801082e9f1eec5e..21eb0dddcbb6361513914b8f05aec38043ce991d 100644 (file)
@@ -104,3 +104,17 @@ Handle(BRep_CurveRepresentation) BRep_PolygonOnTriangulation::Copy() const
   
   return P;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void BRep_PolygonOnTriangulation::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveRepresentation)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPolygon.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTriangulation.get())
+}
index b400ea9d74c61f2cee74dc15f34a83727d7c69c4..cf64767457273379029c9b2e448544edc64bbda1 100644 (file)
@@ -58,6 +58,9 @@ public:
   //! Return a copy of this representation.
   Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index e8d3be2ed76a6aaf446cbe308410865caf806803..484cf800a407826204477d292ff20b724633b409 100644 (file)
@@ -141,3 +141,22 @@ Handle(TopoDS_TShape) BRep_TEdge::EmptyCopy() const
   return TE;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void BRep_TEdge::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TopoDS_TEdge)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerance)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFlags)
+
+  for (BRep_ListIteratorOfListOfCurveRepresentation itr(myCurves); itr.More(); itr.Next())
+  {
+    const Handle(BRep_CurveRepresentation)& aCurveRepresentation = itr.Value();
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aCurveRepresentation.get())
+  }
+}
index 2bd0642fb83b00a71ca736996ac3232203476346..65be265785ba4342521dd8f1b7c9a5d175a3282f 100644 (file)
@@ -81,6 +81,9 @@ public:
   //! Returns a copy  of the  TShape  with no sub-shapes.
   Standard_EXPORT Handle(TopoDS_TShape) EmptyCopy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 30c2b3c952b14f075e09f8d182f185fb16e88d8c..8e9c88e49f16b52a0aaa0d3779d8ab0b062dbb45 100644 (file)
@@ -50,3 +50,21 @@ Handle(TopoDS_TShape) BRep_TFace::EmptyCopy() const
   TF->Tolerance(myTolerance);
   return TF;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void BRep_TFace::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TopoDS_TFace)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTriangulation.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLocation)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerance)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNaturalRestriction)
+}
index c24337de47a4b6e264566505aed12be2a5749088..d77c472d1127b201a183dea53b791f6cd2ade574 100644 (file)
@@ -88,6 +88,9 @@ public:
   //! The new Face has no triangulation.
   Standard_EXPORT virtual Handle(TopoDS_TShape) EmptyCopy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 86145ced1ac11d3103e52f37e6350f9a2854e4aa..7190a4937564801d5fbefe814c659194091cb04f 100644 (file)
@@ -47,3 +47,21 @@ Handle(TopoDS_TShape) BRep_TVertex::EmptyCopy() const
   return TV;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void BRep_TVertex::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TopoDS_TVertex)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPnt)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerance)
+  for (BRep_ListIteratorOfListOfPointRepresentation itr(myPoints); itr.More(); itr.Next())
+  {
+    const Handle(BRep_PointRepresentation)& aPointRepresentation = itr.Value();
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aPointRepresentation.get())
+  }
+}
index 9729fb52f6e7a50c494751a91fc30a1d0d978c00..edd9c1036226e5ef86392e22d548e03b525b0704 100644 (file)
@@ -62,6 +62,9 @@ public:
   //! Returns a copy  of the  TShape  with no sub-shapes.
   Standard_EXPORT Handle(TopoDS_TShape) EmptyCopy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index a5388232a11a1c52c69cd3cf0b22483081563aea..06dca01743eff95434137f7011cd99f6d87a9f2d 100644 (file)
@@ -18,8 +18,9 @@
 
 #include <BVH_Constants.hxx>
 #include <BVH_Types.hxx>
-#include <Standard_ShortReal.hxx>
+#include <Standard_Macro.hxx>
 #include <Standard_Dump.hxx>
+#include <Standard_ShortReal.hxx>
 
 #include <limits>
 
@@ -110,11 +111,27 @@ public:
   T Center (const Standard_Integer theAxis) const;
 
   //! Dumps the content of me into the stream
-  void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const
+  void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const
   {
     (void)theDepth;
-    OCCT_DUMP_CLASS_BEGIN (theOStream, BVH_Box);
-    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsValid());
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsInited)
+
+    int n = Min (N, 3);
+    if (n == 1)
+    {
+      OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMinPoint[0])
+      OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMinPoint[0])
+    }
+    if (n == 2)
+    {
+      OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "MinPoint", n, myMinPoint[0], myMinPoint[1])
+      OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "MaxPoint", n, myMaxPoint[0], myMaxPoint[1])
+    }
+    if (n == 3)
+    {
+      OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "MinPoint", n, myMinPoint[0], myMinPoint[1], myMinPoint[2])
+      OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "MaxPoint", n, myMaxPoint[0], myMaxPoint[1], myMaxPoint[2])
+    }
   }
 
 public:
index 0f500c728664c9fa4b4ee5c6b3884f364c403e31..b56dfc220b799b6e78cfd715a0439a0ef83f9807 100644 (file)
@@ -29,10 +29,10 @@ protected:
   BVH_TreeBaseTransient() {}
 
   //! Dumps the content of me into the stream
-  virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const { (void)theOStream; (void)theDepth; }
+  virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const { (void)theOStream; (void)theDepth; }
 
   //! Dumps the content of me into the stream
-  virtual void DumpNode (const int theNodeIndex, Standard_OStream& theOStream, const Standard_Integer theDepth) const
+  virtual void DumpNode (const int theNodeIndex, Standard_OStream& theOStream, Standard_Integer theDepth) const
   { (void)theNodeIndex; (void)theOStream; (void)theDepth; }
 };
 
@@ -186,11 +186,11 @@ 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
+  virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE
   {
-    OCCT_DUMP_CLASS_BEGIN (theOStream, BVH_TreeBase);
-    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDepth);
-    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Length());
+    OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDepth)
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Length())
 
     for (Standard_Integer aNodeIdx = 0; aNodeIdx < Length(); ++aNodeIdx)
     {
@@ -199,20 +199,20 @@ 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
+  virtual void DumpNode (const int theNodeIndex, Standard_OStream& theOStream, Standard_Integer theDepth) const Standard_OVERRIDE
   {
-    OCCT_DUMP_CLASS_BEGIN (theOStream, BVH_TreeNode);
+    OCCT_DUMP_CLASS_BEGIN (theOStream, BVH_TreeNode)
 
-    OCCT_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;
-    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aPointer);
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aPointer)
 
-    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));
+    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 2942963a731080b53e6d99a484f261756a7b8f33..cb4fbedad97f770a8fae69aa2c904d7a3b3183dd 100644 (file)
@@ -975,13 +975,11 @@ void Bnd_Box::Dump () const
 //function : DumpJson
 //purpose  : 
 //=======================================================================
-void Bnd_Box::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
+void Bnd_Box::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, Bnd_Box);
-
   OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "CornerMin", 3, Xmin, Ymin, Zmin)
   OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "CornerMax", 3, Xmax, Ymax, Zmax)
 
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Gap);
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Flags);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Gap)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Flags)
 }
index 4d220df02a78718983d5ee4d0d25263063574c7b..c3ff8a32bb93d0f0aa152f60e3210f0a217291d3 100644 (file)
@@ -303,7 +303,7 @@ public:
   }
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
 protected:
 
index 4846ace7838c97208fc2ce45a89394e29e6aaa52..08bf74d90d20177b03f6832b1d0c14d09f2f0f73 100644 (file)
@@ -997,17 +997,17 @@ void Bnd_OBB::Add(const Bnd_OBB& theOther)
 //function : DumpJson
 //purpose  : 
 //=======================================================================
-void Bnd_OBB::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+void Bnd_OBB::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, Bnd_OBB);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Bnd_OBB)
 
-  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]);
+  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])
 
-  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);
+  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 7844eaecfd21a735b940205d1712b5ff8514aede..54b65f87eed18db1e6bf903e1716078f74736e7c 100644 (file)
@@ -283,7 +283,7 @@ public:
   Standard_EXPORT void Add(const gp_Pnt& theP);
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
 protected:
 
index ba8f5de6ab0de3e9465fe4632c0d73ac6b7b1cb2..4337287a96f185369816625d43774d904bb52136 100644 (file)
@@ -181,10 +181,10 @@ void Bnd_Range::Split(const Standard_Real theVal,
 // function : DumpJson
 // purpose  :
 // =======================================================================
-void Bnd_Range::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
+void Bnd_Range::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, Bnd_Range);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Bnd_Range)
 
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFirst);
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLast);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFirst)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLast)
 }
index 74767ec08eb34d413488667f04f65bf964ca54ce..660fbe5ee07a9c2bdb300a06b6d38175fd7fe902 100644 (file)
@@ -257,7 +257,7 @@ public:
   }
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
 private:
 
index 627960aa821d1dec038255279104a39e72336505..c9f9984eca1f0ae1060b006543486019403581b4 100644 (file)
@@ -20,6 +20,7 @@
 #include <CDM_MetaData.hxx>
 #include <CDM_Reference.hxx>
 #include <Resource_Manager.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_Type.hxx>
 #include <TCollection_ExtendedString.hxx>
 #include <Message.hxx>
@@ -126,3 +127,12 @@ TCollection_AsciiString CDM_Application::Version() const
   // Default: empty
   return TCollection_AsciiString();
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void CDM_Application::DumpJson (Standard_OStream& theOStream, Standard_Integer /*theDepth*/) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+}
index 05269990a40e452d76ef20311d63ad6999a71b97..f23f0cbdf8ce67221e3dbb6f4a46de166e53412e 100644 (file)
@@ -66,6 +66,9 @@ public:
 
   //! Returns the application version.
   Standard_EXPORT virtual TCollection_AsciiString Version() const;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
 friend class CDM_Reference;
 friend class CDM_MetaData;
index 0b5eb1d927609481f9f0c1f4d41358d9314f24a2..0ec0acc66dc2497e8b2273743c744c73c17acbd9 100644 (file)
@@ -28,6 +28,7 @@
 #include <CDM_ReferenceIterator.hxx>
 #include <Resource_Manager.hxx>
 #include <Standard_DomainError.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_Failure.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_NoSuchObject.hxx>
@@ -1284,3 +1285,54 @@ void CDM_Document::ChangeStorageFormatVersion(const Standard_Integer theVersion)
 {
   myStorageFormatVersion = theVersion;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void CDM_Document::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  for (TColStd_SequenceOfExtendedString::Iterator aCommentIt (myComments); aCommentIt.More(); aCommentIt.Next())
+  {
+    const TCollection_ExtendedString& aComment = aCommentIt.Value();
+    OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aComment)
+  }
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myPresentation)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myValidPresentation)
+
+  for (CDM_ListOfReferences::Iterator aFromReferenceIt (myFromReferences); aFromReferenceIt.More(); aFromReferenceIt.Next())
+  {
+    const Handle(CDM_Reference)& aFromReference = aFromReferenceIt.Value().get();
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aFromReference.get())
+  }
+
+  for (CDM_ListOfReferences::Iterator aToReferenceIt (myToReferences); aToReferenceIt.More(); aToReferenceIt.Next())
+  {
+    const Handle(CDM_Reference)& aToReference = aToReferenceIt.Value().get();
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aToReference.get())
+  }
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myVersion)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myActualReferenceIdentifier)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myStorageVersion)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myMetaData.get())
+
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myRequestedComment)
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myRequestedFolder)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myRequestedFolderIsDefined)
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myRequestedName)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myRequestedNameIsDefined)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myRequestedPreviousVersionIsDefined)
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myRequestedPreviousVersion)
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myFileExtension)
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myDescription)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFileExtensionWasFound)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDescriptionWasFound)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myApplication.get())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myStorageFormatVersion)
+}
index 895c70329f1a2ff34f321ab7e05b4ad5563ae65b..e65496978f2fa5eb8eae37d634ff83902cee7266 100644 (file)
@@ -349,6 +349,9 @@ Standard_OStream& operator << (Standard_OStream& anOStream);
   //! Sets <theVersion> of the format to be used to store the document
   Standard_EXPORT void ChangeStorageFormatVersion(const Standard_Integer theVersion);
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 friend class CDM_Reference;
 friend class CDM_ReferenceIterator;
 friend class CDM_Application;
index 090b6d28b9471b5fc06724c1f080d89d77be8722..160c2cdc88904ce5e05cd9328c32dcf7ab109caa 100644 (file)
@@ -20,6 +20,7 @@
 #include <CDM_MetaData.hxx>
 #include <CDM_MetaDataLookUpTable.hxx>
 #include <CDM_Reference.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_NoSuchObject.hxx>
 #include <Standard_Type.hxx>
 #include <TCollection_ExtendedString.hxx>
@@ -144,3 +145,24 @@ void CDM_MetaData::SetIsReadOnly() {
 void CDM_MetaData::UnsetIsReadOnly() {
   myIsReadOnly=Standard_False;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void CDM_MetaData::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsRetrieved)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myDocument)
+  
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myFolder)
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myName)
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myVersion)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasVersion)
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myFileName)
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myPath)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDocumentVersion)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsReadOnly)
+}
index 5b76e637fae986a816506ec0bf24caabbe1cb21a..76c783494eb4895d42e4fee9feaa4fa89d3f8f27 100644 (file)
@@ -84,6 +84,9 @@ Standard_OStream& operator << (Standard_OStream& anOStream);
   Standard_EXPORT void SetIsReadOnly();
   
   Standard_EXPORT void UnsetIsReadOnly();
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
 
 friend class CDM_Reference;
index f9234a75387d7a57b2ebb8339c9a9831c041690d..cddfbafde3e6e5ea2d4da37fe27f647f718e931c 100644 (file)
@@ -19,6 +19,7 @@
 #include <CDM_Document.hxx>
 #include <CDM_MetaData.hxx>
 #include <CDM_Reference.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_Type.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(CDM_Reference,Standard_Transient)
@@ -120,3 +121,23 @@ Standard_Boolean CDM_Reference::IsInSession() const {
 Standard_Boolean CDM_Reference::IsStored() const {
   return !myMetaData.IsNull();
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void CDM_Reference::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myToDocument.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myFromDocument)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myReferenceIdentifier)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myApplication.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myMetaData.get())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDocumentVersion)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myUseStorageConfiguration)
+}
index c8746fd3d77b48f937bfbf90e52044a6d67cb300..3a9c00f2edc29dc27328d6e00a76ee8843868ad9 100644 (file)
@@ -48,6 +48,9 @@ public:
   Standard_EXPORT Standard_Integer DocumentVersion() const;
   
   Standard_EXPORT Standard_Boolean IsReadOnly() const;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
 
 friend class CDM_Document;
index 50c598a8ddab62eb7d6bed435093cacbec5912e7..59ba16845a187a7e444209ce1c0863f685249c93 100644 (file)
@@ -16,6 +16,7 @@
 #define _Font_Rect_H__
 
 #include <NCollection_Vec2.hxx>
+#include <Standard_Dump.hxx>
 
 //! Auxiliary POD structure - 2D rectangle definition.
 struct Font_Rect
@@ -76,6 +77,16 @@ struct Font_Rect
     return Top - Bottom;
   }
 
+  //! Dumps the content of me into the stream
+  void DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+  {
+    OCCT_DUMP_CLASS_BEGIN (theOStream, Font_Rect)
+
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Left)
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Right)
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Top)
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Bottom)
+  }
 };
 
 #endif // _Font_Rect_H__
index 87e6c9fe5f5604ab4889f9dd8be5fca41430586f..7b4b7d5bad4f7ee00b001d632889f659b2988b17 100644 (file)
@@ -1120,3 +1120,33 @@ void Geom_BSplineCurve::PeriodicNormalization(Standard_Real&  Parameter) const
   }
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_BSplineCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_BoundedCurve)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, rational)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, periodic)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, knotSet)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, smooth)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, deg)
+  if (!poles.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, poles->Size())
+
+  if (!weights.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, weights->Size())
+  if (!flatknots.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, flatknots->Size())
+  if (!knots.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, knots->Size())
+  if (!mults.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mults->Size())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, maxderivinv)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, maxderivinvok)
+}
index ae036654eaf8cd4be579576a3ad92f837c2e37b3..865cefca79eff310a7afd041116fbf0351e87366 100644 (file)
@@ -786,6 +786,9 @@ public:
   //! Comapare two Bspline curve on identity;
   Standard_EXPORT Standard_Boolean IsEqual (const Handle(Geom_BSplineCurve)& theOther, const Standard_Real thePreci) const;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index f4dbe4f15077aab48e2ff5860633972d444af42d..262b3d7ecdbf74e48c7993c795c68f0169d66f2e 100644 (file)
@@ -1272,3 +1272,46 @@ void Geom_BSplineSurface::SetWeightRow
   Rational(Weights, urational, vrational);
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_BSplineSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_BoundedSurface)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, urational)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vrational)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, uperiodic)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vperiodic)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, uknotSet)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vknotSet)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Usmooth)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Vsmooth)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, udeg)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vdeg)
+
+  if (!poles.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, poles->Size())
+  if (!weights.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, weights->Size())
+  if (!ufknots.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, ufknots->Size())
+  if (!vfknots.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vfknots->Size())
+
+  if (!uknots.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, uknots->Size())
+  if (!vknots.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vknots->Size())
+  if (!umults.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, umults->Size())
+  if (!vmults.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vmults->Size())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, umaxderivinv)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vmaxderivinv)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, maxderivinvok)
+}
index 40decdef994aeca57947b582083d8dffc0cbbba7..ed7ae3832160ecd5b152d469ed88c42186cbcac9 100644 (file)
@@ -1189,6 +1189,9 @@ public:
   //! Creates a new object which is a copy of this BSpline surface.
   Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index e25133dcadcf1849aa2f85e8a073a26653c7ec79..dcc5881a4658333e0f941213ef0880069b0ba934 100644 (file)
@@ -812,3 +812,24 @@ void Geom_BezierCurve::Init
     weights.Nullify();
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_BezierCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_BoundedCurve)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, rational)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, closed)
+  if (!poles.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, poles->Size())
+  if (!weights.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, weights->Size())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, maxderivinv)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, maxderivinvok)
+}
+
index 38cf01356641a744915f487dfc775395e72eac4e..6d2c8c197ead98926e506c94049e7ea53412592a 100644 (file)
@@ -333,6 +333,9 @@ public:
   //! Creates a new object which is a copy of this Bezier curve.
   Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index c6ede954d4f4b6389a7c7b738b32c53df2cf9662..9e14f232a3ae973e60aabf11b4b5f59b406790b4 100644 (file)
@@ -1937,3 +1937,23 @@ void Geom_BezierSurface::Init
     weights.Nullify();
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_BezierSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_BoundedSurface)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, urational)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vrational)
+  if (!poles.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, poles->Size())
+  if (!weights.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, weights->Size())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, umaxderivinv)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vmaxderivinv)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, maxderivinvok)
+}
index 0519edf9bcfbfde188d4775ec02d4aebef9b122c..ac78de5c5a8a14bd911dc1e61826c607c6687daa 100644 (file)
@@ -583,6 +583,9 @@ public:
   //! Creates a new object which is a copy of this Bezier surface.
   Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 8dffe7a043e06d0963508c7a07a86ce122dff65d..d09f08e35790f2ffc16e92af1e943a37fe21a016 100644 (file)
 #include <gp_Pnt.hxx>
 #include <Standard_Type.hxx>
 
-IMPLEMENT_STANDARD_RTTIEXT(Geom_BoundedCurve,Geom_Curve)
\ No newline at end of file
+IMPLEMENT_STANDARD_RTTIEXT(Geom_BoundedCurve,Geom_Curve)
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_BoundedCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Curve)
+}
index 7af31bd6d2ba72aae02fc1c0b9367b52175ab889..b472752d51594aaf21b982e220ef718f0b21da8b 100644 (file)
@@ -54,6 +54,9 @@ public:
   //! Returns the start point of the curve.
   Standard_EXPORT virtual gp_Pnt StartPoint() const = 0;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 2ed3d420c9c9677b052314a6d92705125d5c3e48..5227186ccc2d034d8527f68f2a140d657d21a544 100644 (file)
@@ -234,3 +234,16 @@ void Geom_Circle::Transform (const Trsf& T) {
    radius = radius * Abs(T.ScaleFactor());
    pos.Transform (T);
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_Circle::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Conic)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, radius)
+}
index 4b75cb1f3591bae4637b1102774028ffa09a75d3..b7736dd39d41fe78c3b6ba44d5d9fe6d39ef4abd 100644 (file)
@@ -158,6 +158,9 @@ public:
   //! Creates a new object which is a copy of this circle.
   Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index c5a12b6cada97b1c17b206e6702486e03ca7d581..3c4689deacb3dd88880eec27147ce7aa19d057da 100644 (file)
@@ -61,3 +61,14 @@ Ax1 Geom_Conic::YAxis () const {return Ax1(pos.Location(), pos.YDirection());}
 
 Standard_Boolean Geom_Conic::IsCN (const Standard_Integer ) const { return Standard_True; }
 
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_Conic::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Curve)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &pos)
+}
index 7dad5062b842350ce663f6749c645a552fe3144a..6102587af62da00d47826c150077bc014c174d50 100644 (file)
@@ -136,8 +136,8 @@ public:
   //! Raised if N < 0.
   Standard_EXPORT Standard_Boolean IsCN (const Standard_Integer N) const Standard_OVERRIDE;
 
-
-
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
   DEFINE_STANDARD_RTTIEXT(Geom_Conic,Geom_Curve)
 
index 5dd0e7029b393ebd8c683ec526cb9baa66367735..e52e4cc8fdf461b48a4deb76bba3e4b3366fe137 100644 (file)
@@ -433,3 +433,16 @@ const
   return T2;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_ConicalSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_ElementarySurface)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, radius)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, semiAngle)
+}
index 5db22203b8138d2ae7c0c00f8b04046cc11c1a13..f8ee543ed418de8376f38c02f7bebcf2d9086a3f 100644 (file)
@@ -283,6 +283,9 @@ public:
   //! Creates a new object which is a copy of this cone.
   Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 6f0ba329a54f03220f4de6cc3e671c9b05075c97..b70753015e8491354781df19fc6a9dcaa29b3526 100644 (file)
@@ -88,4 +88,14 @@ Standard_Real Geom_Curve::ParametricTransformation(const gp_Trsf& ) const
   return 1.;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_Curve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Geometry)
+}
 
index 4ec6137d2c9a0c6c658e6e86f6070b2243e97a93..d707f075cbd84752de2b718271341c525d0c9a95 100644 (file)
@@ -225,6 +225,9 @@ public:
   //! derivative on the basis curve and the offset direction are parallel.
   Standard_EXPORT gp_Pnt Value (const Standard_Real U) const;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index dd500cb31986c8f117b830ed97045b9474dabf09..9e0cb6c8c01053fab4bb149cda530199fb9dd85f 100644 (file)
@@ -374,3 +374,16 @@ const
   T2.SetAffinity(Axis, Abs(T.ScaleFactor()));
   return T2;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_CylindricalSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_ElementarySurface)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, radius)
+}
index 8f4ae4dabc9dae6a61d1e91b21496cc1db4f5dc5..f26af99379499f86be256c9e5fdac7e037d874f2 100644 (file)
@@ -212,6 +212,9 @@ public:
   //! Creates a new object which is a copy of this cylinder.
   Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index a111852617febf4d7452bddb9c79378db04a519f..288886b5ce296346265be1993c397fa7881e4226 100644 (file)
@@ -145,4 +145,15 @@ void Geom_ElementarySurface::VReverse () {
   pos.ZReverse();
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_ElementarySurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Surface)
 
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &pos)
+}
\ No newline at end of file
index ef82db27a80e7127d8224ee60ee862e50df6b780..f569c0fd61ea213f95f9826d95d923ffee619ab8 100644 (file)
@@ -139,8 +139,8 @@ public:
   //! Returns True.
   Standard_EXPORT Standard_Boolean IsCNv (const Standard_Integer N) const Standard_OVERRIDE;
 
-
-
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
   DEFINE_STANDARD_RTTIEXT(Geom_ElementarySurface,Geom_Surface)
 
index f272490102f692146d26ae687f81f93a0e44a7a4..8e4c7cccbd704fbc9dfc208ccc7c14283c0617c9 100644 (file)
@@ -343,3 +343,17 @@ void Geom_Ellipse::Transform (const Trsf& T) {
   minorRadius = minorRadius * Abs(T.ScaleFactor());
   pos.Transform(T);
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_Ellipse::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Conic)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, majorRadius)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, minorRadius)
+}
index 845c1a76b68af25092b8ea89edc4cd9708268659..6a946331c980dec1c97700f97906a9bb94302c29 100644 (file)
@@ -220,6 +220,9 @@ public:
   //! Creates a new object which is a copy of this ellipse.
   Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 955bd5942db7c096eb4952b2a5e4956f781f2db3..61bb8403d80f4685e1ce0a928fe18a4e20aa3c62 100644 (file)
@@ -165,3 +165,7 @@ Handle(Geom_Geometry) Geom_Geometry::Translated (const gp_Pnt& P1, const gp_Pnt&
 }
 
 
+void Geom_Geometry::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+}
index 4b6799a5506882c617cbf75911367439c2355645..206d4f19e32b5f828dcf70d3defd12f4929c827c 100644 (file)
@@ -118,6 +118,9 @@ public:
   //! Creates a new object which is a copy of this geometric object.
   Standard_EXPORT virtual Handle(Geom_Geometry) Copy() const = 0;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 
 
 
index 9c06858b5bfe36b9aaa08f8ae97b0ddd6cbbef15..81bae595978a5bc22b99d9615418038724d4a243 100644 (file)
@@ -388,3 +388,17 @@ void Geom_Hyperbola::Transform (const Trsf& T) {
   minorRadius = minorRadius * Abs(T.ScaleFactor());
   pos.Transform(T);
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_Hyperbola::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Conic)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, majorRadius)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, minorRadius)
+}
index 19023092b074d06f256fa4baa1e64f4b7e6fa0da..3d055be408a6789d172e6805961480990e5be6e6 100644 (file)
@@ -276,6 +276,9 @@ public:
   //! Creates a new object which is a copy of this hyperbola.
   Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index de103abf451b7e22a34591ce10208ca83c4bcbf0..047e6d7ba168f8a92836f4141a0b611bba1a01d3 100644 (file)
@@ -251,4 +251,15 @@ Standard_Real Geom_Line::ParametricTransformation(const gp_Trsf& T) const
   return Abs(T.ScaleFactor());
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_Line::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Curve)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &pos)
+}
 
index 77355dbec8908c75d83ddb57bf60ffd7c05690f2..ab0b638a39c68353ddd5abda570457c33bf67b5e 100644 (file)
@@ -179,6 +179,9 @@ public:
   //! Creates a new object which is a copy of this line.
   Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 5bdffddbf0d0b99584ed2516cf8f553f0649b27e..7ec994565cd05fd89bd34e83597168c9b378e890 100644 (file)
@@ -444,3 +444,20 @@ GeomAbs_Shape Geom_OffsetCurve::GetBasisCurveContinuity() const
 {
   return myBasisCurveContinuity;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_OffsetCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Curve)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, basisCurve.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &direction)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, offsetValue)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myBasisCurveContinuity)
+}
index a195a85e92ad4c305f482b76e8018e4086b2885a..8eb0219de9fd685a0b15725bb2922d8fc787c5a2 100644 (file)
@@ -281,6 +281,9 @@ public:
   //! Returns continuity of the basis curve.
   Standard_EXPORT GeomAbs_Shape GetBasisCurveContinuity() const;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 207deca32d79d88a142f2b5bde825fb0fb60a435..114f953510e22d4e828e2ad01eac9cf0ca3574a1 100644 (file)
@@ -966,3 +966,21 @@ Standard_Boolean Geom_OffsetSurface::VOsculatingSurface(const Standard_Real U, c
 {
   return !myOscSurf.IsNull() && myOscSurf->VOscSurf(U, V, t, L);
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_OffsetSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Surface)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, basisSurf.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, equivSurf.get())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, offsetValue)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myOscSurf.get())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myBasisSurfContinuity)
+}
index c568f3abac5440cd19ab42b7fda374e88617fa21..fcaa7362fffa4b9b38d2e827ddaba225f0b0dddf 100644 (file)
@@ -357,6 +357,9 @@ public:
   inline GeomAbs_Shape GetBasisSurfContinuity() const
   { return myBasisSurfContinuity; }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
   DEFINE_STANDARD_RTTIEXT(Geom_OffsetSurface,Geom_Surface)
 
 private:
index da2a54df775fc98f0f9f46feb7967e26284cfa14..d4b5067b3b878a4e033fa5a40ea06b2c80459363 100644 (file)
@@ -799,5 +799,23 @@ void Geom_OsculatingSurface::ClearOsculFlags()
 
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_OsculatingSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myBasisSurf.get())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTol)
 
+  if (!myOsculSurf1.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myOsculSurf1->Size())
+  if (!myOsculSurf2.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myOsculSurf2->Size())
+  if (!myKdeg.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myKdeg->Size())
 
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAlong.Size())
+}
index b96fcd2f2ca4da0d06bd65c0edc9449fc14ef489..ab15e84581b3ff71eb46b68db84e940111e2aac8 100644 (file)
@@ -65,6 +65,9 @@ public:
   //! along V at the point U,V.
   Standard_EXPORT Standard_Boolean VOscSurf (const Standard_Real U, const Standard_Real V, Standard_Boolean& t, Handle(Geom_BSplineSurface)& L) const;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 
   DEFINE_STANDARD_RTTIEXT(Geom_OsculatingSurface,Standard_Transient)
 
index 4115c294b3ad70e565b655958c648f3713a9a5a5..11676914302c2d1178af2311cd0c2397f9604611 100644 (file)
@@ -306,4 +306,15 @@ Standard_Real Geom_Parabola::ParametricTransformation(const gp_Trsf& T) const
   return Abs(T.ScaleFactor());
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_Parabola::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Conic)
 
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, focalLength)
+}
index 8757c5594b8530184e4d4777be6ad90b61a0d579..78defeea20909ce00fc6e9a72041e5d99943c006 100644 (file)
@@ -223,6 +223,9 @@ public:
   //! Creates a new object which is a copy of this parabola.
   Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 65188e4f4ce5a9a6d4ae398b487f9d4094274bae..f151e682ff5fe4b3c21016bd445dba3001833a04 100644 (file)
@@ -381,3 +381,14 @@ gp_GTrsf2d Geom_Plane::ParametricTransformation(const gp_Trsf& T) const
   T2.SetScale(gp::Origin2d(), Abs(T.ScaleFactor()));
   return gp_GTrsf2d(T2);
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_Plane::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_ElementarySurface)
+}
index 07caac24454a85ee76573aa9cfe22a33fa74151c..690ebf497ff16d9f76fa9b5e156732b7f5697a6f 100644 (file)
@@ -218,6 +218,9 @@ public:
   //! Creates a new object which is a copy of this plane.
   Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index eec0b8aeca012cca7d903d16b8861f8ceda2a682..e7ff92fe8f98fb4ae9ebd45beddaed8b29f1c21e 100644 (file)
@@ -653,3 +653,22 @@ gp_GTrsf2d Geom_RectangularTrimmedSurface::ParametricTransformation
   return basisSurf->ParametricTransformation(T);
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_RectangularTrimmedSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_BoundedSurface)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, basisSurf.get())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, utrim1)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vtrim1)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, utrim2)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vtrim2)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, isutrimmed)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, isvtrimmed)
+}
index 857797370bc2081f27819ab1495e4ed4ee779054..1d4bc3c3e8e6c86ec8d3fcdd6ef27b59eca67a08 100644 (file)
@@ -305,6 +305,9 @@ public:
   //! Creates a new object which is a copy of this patch.
   Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index a373e59b7a57b387ceec00d89397325326887012..5cca0aab91433ca678a1f49cf84f63f3a826bc6a 100644 (file)
@@ -360,3 +360,16 @@ void Geom_SphericalSurface::Transform (const Trsf& T) {
    radius = radius * Abs(T.ScaleFactor());
    pos.Transform (T);
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_SphericalSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_ElementarySurface)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, radius)
+}
index 827a4686738b8edf38bb904ee617614235d7bea7..9baab5a7316bbb0b484c9c7ff53f488007e11524 100644 (file)
@@ -221,6 +221,9 @@ public:
   //! Creates a new object which is a copy of this sphere.
   Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index d01f1a9979c81d59491a44deb2d03dd1d40cd540..a29226a6b1ce4613310757ebd379a7f63d6a44f9 100644 (file)
@@ -122,3 +122,14 @@ gp_Pnt  Geom_Surface::Value(const Standard_Real U,
   D0(U,V,P);
   return P;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_Surface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Geometry)
+}
index a9faaf62996f904926e52e05380b261e0b040e90..b19670bdf29c2556ad4fbe56464b01606099613b 100644 (file)
@@ -276,6 +276,9 @@ public:
   //! compute the current point.
   Standard_EXPORT gp_Pnt Value (const Standard_Real U, const Standard_Real V) const;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 62d816d99490609959bb35c1a6e16e47425c8f0d..b4b8f40a475e0b0b1244fa6c5155e57f05f4d20f 100644 (file)
@@ -391,3 +391,14 @@ gp_GTrsf2d Geom_SurfaceOfLinearExtrusion::ParametricTransformation
  
   return TU * TV;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_SurfaceOfLinearExtrusion::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_SweptSurface)
+}
index e0fb9d2f2f2c46921f1daacb0f1a5eab503c275e..f95db4bd7421997f8dae9151fe31c5d05b808f80 100644 (file)
@@ -249,6 +249,9 @@ public:
   //! Creates a new object which is a copy of this surface of linear extrusion.
   Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index d1b86e43e9c3492a9e65fb849762aad935c630e0..8a6431608a7dc1c17099170cd8f1edb1be8c2a40 100644 (file)
@@ -457,3 +457,14 @@ gp_GTrsf2d Geom_SurfaceOfRevolution::ParametricTransformation
   return T2;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_SurfaceOfRevolution::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_SweptSurface)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &loc)
+}
index e83528e7329a7b6674334968cec7984d394e727e..b0370e6ebc930506ccd3b79800a7593d6c24df2f 100644 (file)
@@ -303,6 +303,9 @@ public:
   //! Creates a new object which is a copy of this surface of revolution.
   Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
   DEFINE_STANDARD_RTTIEXT(Geom_SurfaceOfRevolution,Geom_SweptSurface)
 
index d3c921f13af64e837cfd90f078f31025860151a3..6d80ca5bed7cb89f183097163c28f994d6cd8225 100644 (file)
@@ -44,3 +44,18 @@ Handle(Geom_Curve) Geom_SweptSurface::BasisCurve () const
 { 
   return basisCurve;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_SweptSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Surface)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, basisCurve.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &direction)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, smooth)
+}
index f7be27b3d1ac748a9cf893b1a509b17d51ae6089..2a06e9810ddc6ff1cd3709c1968b954c48780a8f 100644 (file)
@@ -65,6 +65,9 @@ public:
   //! for a surface of linear extrusion it is the extruded curve.
   Standard_EXPORT Handle(Geom_Curve) BasisCurve() const;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 2cba526d8d6514d15af85d061a380c470a6a0fa3..fd37691c4572f5735dbac2c4d78e2303d302ada0 100644 (file)
@@ -397,3 +397,17 @@ void Geom_ToroidalSurface::Transform (const Trsf& T) {
    minorRadius = minorRadius * Abs(T.ScaleFactor());
    pos.Transform (T);
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_ToroidalSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_ElementarySurface)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, majorRadius)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, minorRadius)
+}
index 6c22fcafdb646adaf86d79079ebd6217b36db7c2..f199d57034f702a137043f87ccaa9448a8196f9c 100644 (file)
@@ -245,6 +245,9 @@ public:
   //! Creates a new object which is a copy of this torus.
   Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 480717b5b0120143df227a7ae5da29f82746fabb..f03f521d40caf0704df5cb5e75fbb9371194f29e 100644 (file)
@@ -16,6 +16,8 @@
 
 #include <Geom_Transformation.hxx>
 
+#include <Standard_Dump.hxx>
+
 IMPLEMENT_STANDARD_RTTIEXT(Geom_Transformation, Standard_Transient)
 
 Geom_Transformation::Geom_Transformation () { }
@@ -56,3 +58,8 @@ void Geom_Transformation::PreMultiply (const Handle(Geom_Transformation)& Other)
 
    gpTrsf.PreMultiply (Other->Trsf());
 }
+
+void Geom_Transformation::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &gpTrsf)
+}
index 69c261a3ab8b501f8b558a64490271a70c623333..53f8770e102f5ec3cde13b519ac55623803d326c 100644 (file)
@@ -192,6 +192,9 @@ public:
   //! Creates a new object which is a copy of this transformation.
   Standard_EXPORT Handle(Geom_Transformation) Copy() const;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 private:
 
   gp_Trsf gpTrsf;
index 7fc934707b00883620d6e5cf92f04177e28d6478..b77b2f3b7869283dbb3b4669ec224d6538d9be88 100644 (file)
@@ -368,3 +368,18 @@ const
   return basisCurve->ParametricTransformation(T);
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom_TrimmedCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_BoundedCurve)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, basisCurve.get())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, uTrim1)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, uTrim2)
+}
index 76569080707c9e507e2c00439a48d1bcaf8d08e2..55cc621eb06d2b7821d94f2016c11e521b38ea1f 100644 (file)
@@ -252,6 +252,9 @@ public:
   //! Creates a new object which is a copy of this trimmed curve.
   Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 1cca78c900cb7d66747d7bdc22bbc2a50221f6f1..7dca8a3f69c7ce3fdb9fd0c5658321e16ae31d78 100644 (file)
@@ -1238,3 +1238,33 @@ void Geom2d_BSplineCurve::PeriodicNormalization(Standard_Real&  Parameter) const
   }
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom2d_BSplineCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom2d_BoundedCurve)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, rational)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, periodic)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, knotSet)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, smooth)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, deg)
+  if (!poles.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, poles->Size())
+
+  if (!weights.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, weights->Size())
+  if (!flatknots.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, flatknots->Size())
+  if (!knots.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, knots->Size())
+  if (!mults.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mults->Size())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, maxderivinv)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, maxderivinvok)
+}
index 822ded7de1edd6dcc6a764ea02dc3f02e2a906ef..91504a89a43f77ffadca55475a8f16430b4f8efc 100644 (file)
@@ -817,6 +817,9 @@ public:
   //! Creates a new object which is a copy of this BSpline curve.
   Standard_EXPORT Handle(Geom2d_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 38250afe4474a81109e12bdfe6de7d448aa90475..968d46df98745500a1bb0bb6a61771efd967cac7 100644 (file)
@@ -822,3 +822,23 @@ void Geom2d_BezierCurve::Init
     weights.Nullify();
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom2d_BezierCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom2d_BoundedCurve)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, rational)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, closed)
+  if (!poles.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, poles->Size())
+  if (!weights.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, weights->Size())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, maxderivinv)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, maxderivinvok)
+}
index 0d61dc4b45881f9daca8e9559b8348dd6f94da3f..97f830c81d9e86c545341aac3a588e1ea7c6a8d1 100644 (file)
@@ -320,6 +320,9 @@ public:
   //! Creates a new object which is a copy of this Bezier curve.
   Standard_EXPORT Handle(Geom2d_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index eebd15e9a2462cf3eed4d3faa1e0a5f94cc4c700..9adce8f7015f3ab6c3a5fd9a7b63b50efa99b423 100644 (file)
 #include <gp_Pnt2d.hxx>
 #include <Standard_Type.hxx>
 
-IMPLEMENT_STANDARD_RTTIEXT(Geom2d_BoundedCurve,Geom2d_Curve)
\ No newline at end of file
+IMPLEMENT_STANDARD_RTTIEXT(Geom2d_BoundedCurve,Geom2d_Curve)
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom2d_BoundedCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom2d_Curve)
+}
index fae7b0ea01f7235d3be5fe284cb270d35617e9f7..0d29a3683e8830853dc03acc424e4b989a6364b7 100644 (file)
@@ -61,6 +61,9 @@ public:
   //! "FirstParameter" of the curve.
   Standard_EXPORT virtual gp_Pnt2d StartPoint() const = 0;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index f643c7f2ff240d7621c507414631bed4cacdef2b..a9da3fc6805d4da879c017d7e636dc6259b73528 100644 (file)
@@ -72,3 +72,11 @@ void Geom2d_CartesianPoint::Transform (const Trsf2d& T) {
 
   gpPnt2d.Transform (T);
 }
+
+void Geom2d_CartesianPoint::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom2d_Point)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &gpPnt2d)
+}
index c4929f6103963728e06e77c4f07991d67319c913..e06e880ee8d936114d9c046dc2900bdcc7b2fc1e 100644 (file)
@@ -76,6 +76,9 @@ public:
   
   Standard_EXPORT Handle(Geom2d_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 3bac3eb3ec9ebb43b8f7ade51a90993af71c8bf8..6df90ce549462688be92c3c89298854087b3a100 100644 (file)
@@ -263,3 +263,15 @@ void Geom2d_Circle::Transform (const Trsf2d& T)
    radius = radius * Abs(T.ScaleFactor());
    pos.Transform (T);
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom2d_Circle::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom2d_Conic)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, radius)
+}
index 76e55766e4d752a0deb44407dc782840e4c89195..b5f4ba165c08e30a9037e42757e4d10659d9a326 100644 (file)
@@ -155,6 +155,9 @@ public:
   //! Creates a new object which is a copy of this circle.
   Standard_EXPORT Handle(Geom2d_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 51eeea6c3800abbc03648609ecb01c06e0c8df47..b244e950a3179d83d5b7486fdd0c6e91ad441dcb 100644 (file)
@@ -145,3 +145,16 @@ Standard_Boolean Geom2d_Conic::IsCN (const Standard_Integer ) const
 {
   return Standard_True; 
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom2d_Conic::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom2d_Curve)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &pos)
+}
index d37eb9a84149a02ba454226412c50dcb26887a1c..c4b16c2c62e78b8e04acf1d8515d8d4e8742826c 100644 (file)
@@ -124,8 +124,8 @@ public:
   //! Returns True, the order of continuity of a conic is infinite.
   Standard_EXPORT Standard_Boolean IsCN (const Standard_Integer N) const Standard_OVERRIDE;
 
-
-
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
   DEFINE_STANDARD_RTTIEXT(Geom2d_Conic,Geom2d_Curve)
 
index 59ed0848ebcca04d753791d018c3457b9c2221ea..d39e731ec95ad2dcab1c92fb6a59b2aef6a6ca66 100644 (file)
@@ -88,3 +88,14 @@ gp_Pnt2d  Geom2d_Curve::Value(const Standard_Real U)const
   D0(U,P);
   return P;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom2d_Curve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom2d_Geometry)
+}
index f12036a6592e0032eb4ddf66911bc1f884da1853..d298d23f3323bb8f74b812678eefa4b290cb2b2e 100644 (file)
@@ -224,6 +224,9 @@ public:
   //! are parallel.
   Standard_EXPORT gp_Pnt2d Value (const Standard_Real U) const;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index e9dbbbc6fb12c68eaeee290ae8e0d093b1005920..feb26e001151714e38bba898b0e0fbdae5636f97 100644 (file)
@@ -383,3 +383,17 @@ void Geom2d_Ellipse::Transform (const Trsf2d& T)
   minorRadius = minorRadius * Abs(T.ScaleFactor());
   pos.Transform(T);
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom2d_Ellipse::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom2d_Conic)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, majorRadius)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, minorRadius)
+}
index 78ff674e61d353aaf8d4776f414a15f0cb8be3f2..3216bf88d677a97fb1da9d243af66b3fbcc8eb53 100644 (file)
@@ -241,6 +241,9 @@ public:
   //! Creates a new object which is a copy of this ellipse.
   Standard_EXPORT Handle(Geom2d_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 8d83dc26990190b74f66a6751db56578820b2033..c2515d923e3107a884b85016dec702f7194eaf1c 100644 (file)
@@ -133,3 +133,8 @@ Handle(Geom2d_Geometry) Geom2d_Geometry::Translated (const gp_Pnt2d& P1, const g
   G->Translate (P1, P2);
   return G;
 }
+
+void Geom2d_Geometry::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+}
index b28d45359d15a339de0789ce2694670c20bc060c..e9408a8c82dcb233d1b27b5eac3ff27ee87c0438 100644 (file)
@@ -110,6 +110,9 @@ public:
   
   Standard_EXPORT virtual Handle(Geom2d_Geometry) Copy() const = 0;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 
 
 
index ef357a88c108d746b3fcf82b888f521cd410117a..6256918abd5e3f7db64b37ee73d6ef1327ed28f5 100644 (file)
@@ -436,3 +436,17 @@ void Geom2d_Hyperbola::Transform (const Trsf2d& T)
   minorRadius = minorRadius * Abs (T.ScaleFactor());
   pos.Transform(T);
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom2d_Hyperbola::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom2d_Conic)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, majorRadius)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, minorRadius)
+}
index 02e341d9a78f77f44544400c4dcc654676589c8d..9eff8581aeb2bcd70bc1fd675ea09f1e2230c0a7 100644 (file)
@@ -294,6 +294,9 @@ public:
   //! Creates a new object which is a copy of this hyperbola.
   Standard_EXPORT Handle(Geom2d_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 6ac9b7b77438527c0df4bc1c72827eeec894b067..dc2a7b17daf96de383436de1d4607e61cfe719d7 100644 (file)
@@ -293,3 +293,14 @@ Standard_Real Geom2d_Line::Distance (const gp_Pnt2d& P) const {
   return L.Distance (P);
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom2d_Line::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom2d_Curve)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &pos)
+}
index ed74a2052286efedfe0c0699961291b3cb6666be..75346f57bf99fa0fb573450861ec33e8c7cd9a1b 100644 (file)
@@ -181,6 +181,9 @@ public:
   //! Creates a new object, which is a copy of this line.
   Standard_EXPORT Handle(Geom2d_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 2c4ea9536c2695af6bd1844995c79979f73f4e25..e8e7328489cc6dcef5e37bee035517e7e8a79307 100644 (file)
@@ -388,3 +388,19 @@ GeomAbs_Shape Geom2d_OffsetCurve::GetBasisCurveContinuity() const
 {
   return myBasisCurveContinuity;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom2d_OffsetCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom2d_Curve)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, basisCurve.get())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, offsetValue)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myBasisCurveContinuity)
+}
index 0886f46baafc6d5528167963780bb6d66dab99ad..3cc51d2af59f71da53e921fa12db3fcb519dac36 100644 (file)
@@ -285,6 +285,9 @@ public:
   //! Returns continuity of the basis curve.
   Standard_EXPORT GeomAbs_Shape GetBasisCurveContinuity() const;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index f7bfd21d64faea7323be25b75c18162d67479947..513ec2726657136e90cea82a536b967cf5c33922 100644 (file)
@@ -335,4 +335,15 @@ Standard_Real Geom2d_Parabola::ParametricTransformation(const gp_Trsf2d& T) cons
   return Abs(T.ScaleFactor());
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom2d_Parabola::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom2d_Conic)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, focalLength)
+}
 
index fa5f2a76c6eee920006b2f87f404099328bd3c6e..4d05db7212917c8b9adb0004b1165c683c3c6d26 100644 (file)
@@ -205,6 +205,9 @@ public:
   //! Creates a new object, which is a copy of this parabola.
   Standard_EXPORT Handle(Geom2d_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index e3dacd91a3c1d94b0fc69acfd97143fa9a8b4057..9de485e7077c4b2d1fe7c5d8966ef9f3b0d078d5 100644 (file)
@@ -37,3 +37,14 @@ Standard_Real Geom2d_Point::SquareDistance (const Handle(Geom2d_Point)& Other) c
   gp_Pnt2d P2 = Other->Pnt2d ();
   return P1.SquareDistance (P2);
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom2d_Point::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom2d_Geometry)
+}
index ea3e9d1a565c14c7e8e97bf15dfcf7cfc6c64bb5..d4b5c4808109f0172387bd7d95894727199d5768 100644 (file)
@@ -56,6 +56,9 @@ public:
   //! computes the square distance between <me> and <Other>.
   Standard_EXPORT Standard_Real SquareDistance (const Handle(Geom2d_Point)& Other) const;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 9cbfa698585994e817a80ec1a98b22a6885bde3b..b4ddf930215affe33023fbe532fa0e787d1ca377 100644 (file)
@@ -345,3 +345,17 @@ Standard_Real Geom2d_TrimmedCurve::ParametricTransformation(const gp_Trsf2d& T)
   return basisCurve->ParametricTransformation(T);
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Geom2d_TrimmedCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom2d_BoundedCurve)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, basisCurve.get())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, uTrim1)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, uTrim2)
+}
index 57e905fb25f72cbd93efa943c914461dac85de18..096c615bf80a34f8f0fb42f39bdb2990673ae377 100644 (file)
@@ -256,6 +256,9 @@ public:
   //! Creates a new object, which is a copy of this trimmed curve.
   Standard_EXPORT Handle(Geom2d_Geometry) Copy() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 667b7732e0c54847884ff8cca5cb345316399844..cc27cac8885f8a590774b6ac64cfde7dceae1804 100644 (file)
@@ -66,20 +66,33 @@ void Graphic3d_Aspects::SetTextureMap (const Handle(Graphic3d_TextureMap)& theTe
 //function : DumpJson
 //purpose  : 
 //=======================================================================
-void Graphic3d_Aspects::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+void Graphic3d_Aspects::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_Aspects);
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
 
-  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);
+  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)
 
-  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);
+  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)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAlphaMode)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAlphaCutoff)
+
+  if (!myTextFont.IsNull())
+  {
+    OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myTextFont->String())
+  }
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTextStyle)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTextDisplayType)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTextFontAspect)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTextAngle)
 }
index adf5ea396c8e450302ecf18eb240d4d88dc15aeb..453a07123d59b3f5d638faf8c08ba59d90c0282a 100644 (file)
@@ -478,7 +478,8 @@ public:
   }
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 
 protected:
 
index 4421e9c2d52a6a6a1a782cad3d36bdae134e3a8a..72cd815f8272219608c618ca63a4aa5ee6cd3b2b 100644 (file)
@@ -58,6 +58,18 @@ Graphic3d_Fresnel Graphic3d_Fresnel::CreateConductor (const Graphic3d_Vec3& theR
   return Graphic3d_Fresnel (Graphic3d_FM_SCHLICK, aFresnel);
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Graphic3d_Fresnel::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_Fresnel)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFresnelType)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myFresnelData)
+}
+
 // =======================================================================
 // function : Graphic3d_BSDF
 // purpose  :
@@ -189,4 +201,23 @@ Graphic3d_BSDF Graphic3d_BSDF::CreateGlass (const Graphic3d_Vec3& theWeight,
                                      theAbsorptionCoeff);
 
   return aBSDF;
-}
\ No newline at end of file
+}
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Graphic3d_BSDF::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_BSDF)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &Kc)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &Kd)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &Ks)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &Kt)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &Le)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &Absorption)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &FresnelCoat)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &FresnelBase)
+}
index 7919089dd971c50641ea8d1360efd4b235a42019..1a5bb7212601d65ecf461e3aa74f03cc0c66a1ce 100644 (file)
@@ -87,6 +87,9 @@ public:
     return myFresnelType;
   }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 protected:
 
   //! Creates new Fresnel reflectance factor.
@@ -180,6 +183,9 @@ public:
   //! Performs comparison of two BSDFs.
   Standard_EXPORT bool operator== (const Graphic3d_BSDF& theOther) const;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 };
 
 #endif // _Graphic3d_BSDF_HeaderFile
index 5aafd1cf146222cf847231a1153d1e0434ccdb9e..b941f032acf111e3d533a63deaa0104704b99955 100644 (file)
@@ -61,6 +61,19 @@ public:
     return true;
   }
 
+  //! Dumps the content of me into the stream
+  virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE
+  {
+    OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+    OCCT_DUMP_BASE_CLASS (theOStream, theDepth, NCollection_Buffer)
+
+    OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, Colors)
+    OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, Bounds)
+
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, NbBounds)
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, NbMaxBounds)
+  }
+
 public:
 
   Graphic3d_Vec4*   Colors;      //!< pointer to facet color values
index 2d46aef4f4f1793eb711ea8e53ba3f0839cd3bf6..47a0114e0244c98faafa8af08309ec1253a3061a 100644 (file)
@@ -19,3 +19,17 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Buffer,      NCollection_Buffer)
 IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_IndexBuffer, Graphic3d_Buffer)
 IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_BoundBuffer, NCollection_Buffer)
 IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_MutableIndexBuffer, Graphic3d_IndexBuffer)
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void Graphic3d_Buffer::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, NCollection_Buffer)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Stride)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, NbElements)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, NbAttributes)
+}
index 103d185298a985a760709f3e5c5a82ae5664639c..02f16313ba977ca4dbb1d5e8bba10a18f4f046a4 100644 (file)
@@ -315,6 +315,9 @@ public:
   //! Invalidate entire buffer.
   virtual void Invalidate() {}
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 public:
 
   Standard_Integer Stride;       //!< the distance to the attributes of the next vertex within interleaved array
index 2cd2928db46cc9ac69a630ca99354affea6ce722..7da948ff3eeeda517741d37ab641d03b447108f1 100644 (file)
@@ -18,6 +18,7 @@
 #include <Graphic3d_StructureManager.hxx>
 #include <Graphic3d_TransModeFlags.hxx>
 #include <Graphic3d_GraphicDriver.hxx>
+#include <Standard_Dump.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_CStructure,Standard_Transient)
 
@@ -44,3 +45,44 @@ Graphic3d_CStructure::Graphic3d_CStructure (const Handle(Graphic3d_StructureMana
 {
   Id = myGraphicDriver->NewIdentification();
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Graphic3d_CStructure::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  for (Graphic3d_SequenceOfGroup::Iterator anIterator (myGroups); anIterator.More(); anIterator.Next())
+  {
+    const Handle(Graphic3d_Group)& aGroup = anIterator.Value();
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aGroup.get())
+  }
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Id)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myZLayer)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Priority)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, PreviousPriority)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, ContainsFacet)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsInfinite)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, stick)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, highlight)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, visible)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, HLRValidation)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsForHighlight)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsMutable)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Is2dText)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBndBox)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTrsf.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTrsfPers.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myClipPlanes.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myHighlightStyle.get())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsCulled)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myBndBoxClipCheck)
+}
index d7c9f7caa0758e06f46c714f7fb48f01303c8f97..053b3ba364dc7d91fca149ff6cf8f4e24e6f842e 100644 (file)
@@ -194,6 +194,9 @@ public:
   //! Update render transformation matrix.
   virtual void updateLayerTransformation() {}
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 public:
 
   int                      Id;
index 916d08048b84565d2f309f5192f0b3f87576406e..a251811e3398d05e0e415f93b729a0147cad166e 100644 (file)
@@ -1546,3 +1546,18 @@ void Graphic3d_Camera::FrustumPoints (NCollection_Array1<Graphic3d_Vec3d>& thePo
   aTmpPnt = anInvWorldView * aLeftBottomFar;
   thePoints.SetValue (FrustumVert_LeftBottomFar,   aTmpPnt.xyz() / aTmpPnt.w());
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Graphic3d_Camera::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myUp)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myDirection)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myEye)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDistance)
+}
index 62fc9f77d8d8aa46593702f38b3eb5ce59c788b2..e2f3fbef0e5e3c1586cd4a1a1a49c70df4368d2f 100644 (file)
@@ -552,6 +552,9 @@ public:
   //! The matrix will be updated on request.
   Standard_EXPORT void InvalidateOrientation();
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 //! @name Managing projection and orientation cache
 private:
 
index f52ffe82bf92e4db3f5da94d3d842d23f15e01eb..a8709a55340d3759cfe37706b1a8aad2a82bd5e3 100755 (executable)
@@ -261,3 +261,32 @@ void Graphic3d_ClipPlane::SetChainNextPlane (const Handle(Graphic3d_ClipPlane)&
   }
   updateChainLen();
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void Graphic3d_ClipPlane::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, this)
+
+  //OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAspect.get())
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myNextInChain.get())
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myPrevInChain)
+
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myEntityUID)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPlane)
+
+  OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "Equation", 4, myEquation.x(), myEquation.y(), myEquation.z(), myEquation.w())
+  OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "EquationRev", 4, myEquationRev.x(), myEquationRev.y(), myEquationRev.z(), myEquationRev.w())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myChainLenFwd)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFlags)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myEquationMod)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAspectMod)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsOn)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsCapping)
+}
index 0da056e325ce6a5765e4e3ef4dd53f8223cc4729..a4aded322d6d762887deade58d1048a0e767d00a 100755 (executable)
@@ -313,6 +313,9 @@ public:
     return !IsPointOutHalfspace (aMinPnt);
   }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 public: // @name modification counters
 
   //! @return modification counter for equation.
index 27e4f9acffd699da8a75bb46b4732a9ac560d13d..53207a5af072445a2ec9d31b6c58371581d51971 100644 (file)
@@ -452,10 +452,11 @@ void Graphic3d_Group::AddText (const Handle(Graphic3d_Text)& theTextParams,
 // function : DumpJson
 // purpose  :
 // =======================================================================
-void Graphic3d_Group::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
+void Graphic3d_Group::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_Group);
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
 
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsClosed);
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myContainsFacet);
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, this)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsClosed)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myContainsFacet)
 }
index 591960ff40a95a46eba71e6342a7f845b2a9b61c..022656245db54a1004ca7a07c9221715e1e590d5 100644 (file)
@@ -281,7 +281,7 @@ public:
 
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
 protected:
 
index ebf108cfe2f37bbd4cf316604998c08a091ac388..6cb6476084013a99931ed6d76dbc86fd99e405e8 100644 (file)
@@ -516,3 +516,15 @@ const Standard_Byte* Graphic3d_HatchStyle::Pattern() const
       ? (const Standard_Byte*)myPredefinedPatterns[myHatchType]
       : NULL);
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Graphic3d_HatchStyle::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPattern.get())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHatchType)
+}
index c29a3ab03d817fa0f898cdb4b6e1d75f5eb0a245..9c083f05c56506afe74b89d0a699b3025e66c71c 100644 (file)
@@ -49,6 +49,9 @@ public:
     return myHatchType;
   }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 private:
 
   Handle(NCollection_Buffer) myPattern;   //!< Image bitmap with custom hatch pattern
index 7e0c5a1556ccf4f8e17e12e1de02abb2741e9058..3e8cf19eb41c814c44457d68abe96729a52911ea 100644 (file)
@@ -77,6 +77,12 @@ public:
     }
   }
 
+  //! Dumps the content of me into the stream
+  virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE
+  {
+    OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+    OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Graphic3d_Buffer)
+  }
 
 };
 
index 70a4eaf439e70396d266eb5a4379bf8ee4d0411e..a94e38a17c40a770863a61144ff70a62486dcdfd 100644 (file)
@@ -626,3 +626,38 @@ void Graphic3d_Layer::SetLayerSettings (const Graphic3d_ZLayerSettings& theSetti
     }
   }
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void Graphic3d_Layer::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, this)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLayerId)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNbStructures)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNbStructuresNotCulled)
+
+  const Standard_Integer aNbPriorities = myArray.Length();
+  for (Standard_Integer aPriorityIter = 0; aPriorityIter < aNbPriorities; ++aPriorityIter)
+  {
+    const Graphic3d_IndexedMapOfStructure& aStructures = myArray (aPriorityIter);
+    for (Graphic3d_IndexedMapOfStructure::Iterator aStructIter (aStructures); aStructIter.More(); aStructIter.Next())
+    {
+      const Graphic3d_CStructure* aStructure = aStructIter.Value();
+      OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, aStructure)
+    }
+  }
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLayerSettings)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myBVHIsLeftChildQueuedFirst)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsBVHPrimitivesNeedsReset)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsBoundingBoxNeedsReset[0])
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsBoundingBoxNeedsReset[1])
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBoundingBox[0])
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBoundingBox[1])
+}
index 820113e13fd0ac78e935364836e8ba6a7a42d07b..bd5c3dca8ad30d35cc552f0285de8d2b7782f49d 100644 (file)
@@ -144,6 +144,9 @@ public:
   //! Returns indexed map of always rendered structures.
   const NCollection_IndexedMap<const Graphic3d_CStructure*>& NonCullableStructures() const { return myAlwaysRenderedMap; }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 protected:
 
   //! Updates BVH trees if their state has been invalidated.
index 8888c83a649853a0933fed384d08956af0ba25c9..28c5e7c7767348d9cfa085587a55ee29f13afd39 100644 (file)
@@ -840,3 +840,29 @@ Graphic3d_TypeOfMaterial Graphic3d_MaterialAspect::MaterialType (const Standard_
   const RawMaterial& aMat = THE_MATERIALS[theRank - 1];
   return aMat.MaterialType;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Graphic3d_MaterialAspect::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_MaterialAspect)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBSDF)
+  //OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPBRMaterial)
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myStringName)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myColors[Graphic3d_TOR_AMBIENT])
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myColors[Graphic3d_TOR_DIFFUSE])
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myColors[Graphic3d_TOR_SPECULAR])
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myColors[Graphic3d_TOR_EMISSION])
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTransparencyCoef)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myRefractionIndex)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myShininess)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMaterialType)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMaterialName)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myRequestedMaterialName)
+}
index 9d4ee83e5221237d6bfaf11234050a3284042d3c..fe15e8a9e81fc0b94fd125392a679c4aeab2e55d 100644 (file)
@@ -244,6 +244,9 @@ public:
   //! Returns TRUE if this material is identical to specified one.
   Standard_Boolean operator== (const Graphic3d_MaterialAspect& theOther) const { return IsEqual (theOther); }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 private:
 
   //! Initialize the standard material.
index f4cfe9158fb7d0fb4f001bffd105f275aae808fc..3c224b572635c601c576211bba2567151a99eab8 100644 (file)
 //function : DumpJson
 //purpose  : 
 //=======================================================================
-void Graphic3d_PolygonOffset::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
+void Graphic3d_PolygonOffset::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_PolygonOffset);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_PolygonOffset)
 
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Mode);
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Factor);
-  OCCT_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 0926e2ce6919ecd4f59429fcbfcab10f2e1f34ea..2b3c97b651e10b9c1c04dc704f40f6bb5fc6bc3f 100644 (file)
@@ -36,7 +36,7 @@ struct Graphic3d_PolygonOffset
   }
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
 };
 
index 69ce5ae07ed192443e0732acd0e06b0e8081801c..25f40c4bdf854879d19833b39ae3c917e8c32e77 100644 (file)
 
 #include <Graphic3d_PresentationAttributes.hxx>
 
+#include <Standard_Dump.hxx>
+
 IMPLEMENT_STANDARD_RTTIEXT (Graphic3d_PresentationAttributes, Standard_Transient)
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void Graphic3d_PresentationAttributes::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myBasicFillAreaAspect.get())
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBasicColor)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHiMethod)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myZLayer)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDispMode)
+}
index 0e7a76913c7e1ccf577d568b8cdaec6e0b7fe600..a0890eb52eae4ef3a6c4df6485f9a706ac87e5c2 100644 (file)
@@ -90,6 +90,9 @@ public:
   //! Sets basic presentation fill area aspect.
   virtual void SetBasicFillAreaAspect (const Handle(Graphic3d_AspectFillArea3d)& theAspect) { myBasicFillAreaAspect = theAspect; }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 protected:
 
   Handle(Graphic3d_AspectFillArea3d) myBasicFillAreaAspect; //!< presentation fill area aspect
index e8cb10c32df8af0d7846029419843a399e694036..9879d332fbe7a99c3f2ee69c00ec3709411d9120 100644 (file)
@@ -58,3 +58,18 @@ bool Graphic3d_SequenceOfHClipPlane::Remove (const Handle(Graphic3d_ClipPlane)&
   }
   return false;
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void Graphic3d_SequenceOfHClipPlane::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToOverrideGlobal)
+
+  for (NCollection_Sequence<Handle(Graphic3d_ClipPlane)>::Iterator anIterator (myItems); anIterator.More(); anIterator.Next())
+  {
+    const Handle(Graphic3d_ClipPlane)& aClipPlane = anIterator.Value();
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aClipPlane.get())
+  }
+}
index 014aaebc71c0dea53259f18445ec68244026b5cf..16bab8d1fd78c6db1ea3898e6e0573aaf289cb5b 100755 (executable)
@@ -94,6 +94,9 @@ public:
   //! Return the first item in sequence.
   const Handle(Graphic3d_ClipPlane)& First() const { return myItems.First(); }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 protected:
 
   NCollection_Sequence<Handle(Graphic3d_ClipPlane)> myItems;
index e8a48295f3f89d34afd59b09453eb08a5f5de5d3..202c0c57298c10f88b219fabd14d49ae4672f315 100644 (file)
@@ -30,6 +30,8 @@
 
 #include "Graphic3d_Structure.pxx"
 
+#include <Standard_Dump.hxx>
+
 #include <stdio.h>
 
 IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Structure,Standard_Transient)
@@ -1027,3 +1029,17 @@ void Graphic3d_Structure::SetZLayer (const Graphic3d_ZLayerId theLayerId)
   myStructureManager->ChangeZLayer (this, theLayerId);
   myCStructure->SetZLayer (theLayerId);
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Graphic3d_Structure::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myCStructure.get())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myVisual)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myComputeVisual)
+}
index 3854a4389ab8fb41c3067af43dbfdf60479c3380..5c0bf76b389343dea8dd7b1fe5f4f60217c07385 100644 (file)
@@ -432,6 +432,9 @@ public:
   //! Returns the low-level structure
   const Handle(Graphic3d_CStructure)& CStructure() const { return myCStructure; }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 protected:
 
   //! Transforms boundaries with <theTrsf> transformation.
index d171a7d89023dfb63bda605b0caa288be80a981c..1a73a5d9887f5a09d47a4171a541d2c169150523 100644 (file)
@@ -51,3 +51,38 @@ Handle(Graphic3d_TransformPers) Graphic3d_TransformPers::FromDeprecatedParams (G
   }
   return aTrsfPers;
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void Graphic3d_TransformPers::PersParams3d::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  gp_Pnt anAttachPoint (PntX, PntY, PntZ);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &anAttachPoint)
+}
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void Graphic3d_TransformPers::PersParams2d::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, OffsetX)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, OffsetY)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Corner)
+}
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void Graphic3d_TransformPers::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMode)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myParams.Params3d)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myParams.Params2d)
+}
index cdc832a7f4ec59561dca6254fb9a8126e16257c9..5fd2ffc67bd5e145a302dceb95f8c700fe36f76f 100644 (file)
@@ -283,6 +283,9 @@ public:
               const Standard_Integer theViewportWidth,
               const Standard_Integer theViewportHeight) const;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 private:
 
   //! 3D anchor point for zoom/rotate transformation persistence.
@@ -291,6 +294,9 @@ private:
     Standard_Real PntX;
     Standard_Real PntY;
     Standard_Real PntZ;
+
+    //! Dumps the content of me into the stream
+    Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
   };
 
   //! 2d/trihedron transformation persistence parameters.
@@ -299,6 +305,9 @@ private:
     Standard_Integer OffsetX;
     Standard_Integer OffsetY;
     Aspect_TypeOfTriedronPosition Corner;
+
+    //! Dumps the content of me into the stream
+    Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
   };
 
 private:
index 10e4206971e5b5191a021c648bc97b8aa6f3d5d2..a1b8fd215b603bc927229a2e839fac9df36f34e8 100644 (file)
 
 #include <Graphic3d_ViewAffinity.hxx>
 
+#include <Standard_Dump.hxx>
 
+IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_ViewAffinity,Standard_Transient)
 
-IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_ViewAffinity,Standard_Transient)
\ No newline at end of file
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void Graphic3d_ViewAffinity::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMask)
+}
\ No newline at end of file
index 41bd9503c808f0cc0d6d10da34e17dae21d985d6..f5164b4c88fb999565816bb902babd7a25049531 100644 (file)
@@ -59,6 +59,9 @@ public:
     }
   }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 private:
 
   unsigned int myMask; //!< affinity mask
index b61c0a3070ea4f977b30e79b1f33364ee9512bab..1b161f0d864537576ae718ecc13f8f07ca379ffc 100644 (file)
@@ -19,6 +19,7 @@
 #include <Graphic3d_LightSet.hxx>
 #include <Graphic3d_PolygonOffset.hxx>
 #include <Precision.hxx>
+#include <Standard_Dump.hxx>
 #include <TCollection_AsciiString.hxx>
 
 enum Graphic3d_ZLayerSetting
@@ -208,6 +209,29 @@ struct Graphic3d_ZLayerSettings
     myPolygonOffset.Units  =-1.0f;
   }
 
+  //! Dumps the content of me into the stream
+  void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const
+  {
+    OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_ZLayerSettings)
+
+    OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myName)
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myOriginTrsf.get())
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myOrigin)
+
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCullingDistance)
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCullingSize)
+
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPolygonOffset)
+
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsImmediate)
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToRaytrace)
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myUseEnvironmentTexture)
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToEnableDepthTest)
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToEnableDepthWrite)
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToClearDepth)
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToRenderInDepthPrepass)
+  }
+
 protected:
 
   TCollection_AsciiString     myName;                  //!< user-provided name
index 6e9e752147a3579953e084763d8abf2ca3ead36e..d40ca8d0cdb2037b8811cfa3f9888267cb4fb615 100644 (file)
@@ -302,3 +302,20 @@ Standard_Boolean Image_Texture::WriteImage (const TCollection_AsciiString& theFi
   }
   return Standard_True;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Image_Texture::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myTextureId)
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myImagePath)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myBuffer.get())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myOffset)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLength)
+}
index f55458bcf594ea2bcfff27f6836d1c086455a179..688f0e11e2cf41cf83949615121447b22e370f2c 100644 (file)
@@ -87,6 +87,9 @@ public: //! @name hasher interface
     }
     return theTex1->myTextureId.IsEqual (theTex2->myTextureId);
   }
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
 protected:
 
index b51e514a4ee4b0cedca5514cbfdb087ccd8c85d1..c98182dda4cda4f217039b76fe74cdaaa7437990 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
index c0ea4fefdd737d332b755daf4f20d3e6b390c49c..ed308f41644cb851c0e163427f36b1e9324514b9 100755 (executable)
@@ -17,6 +17,8 @@
 #define _NCollection_Mat4_HeaderFile
 
 #include <NCollection_Vec4.hxx>
+#include <Standard_Dump.hxx>
+#include <Standard_OStream.hxx>
 
 //! Generic matrix of 4 x 4 elements.
 //! To be used in conjunction with NCollection_Vec4 entities.
@@ -461,6 +463,16 @@ public:
     return *reinterpret_cast<const NCollection_Mat4<Element_t>*> (theData);
   }
 
+  //! Dumps the content of me into the stream
+  void DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+  {
+    OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "NCollection_Mat4", 16,
+      GetValue (0, 0),  GetValue (0, 1), GetValue (0, 2),  GetValue (0, 3),
+      GetValue (1, 0),  GetValue (1, 1), GetValue (1, 2),  GetValue (1, 3),
+      GetValue (2, 0),  GetValue (2, 1), GetValue (2, 2),  GetValue (2, 3),
+      GetValue (3, 0),  GetValue (3, 1), GetValue (3, 2),  GetValue (3, 3))
+  }
+
 private:
 
   Element_t myMat[16];
index fc2b48155b0d68b92f78e8ac37778a97de813c02..7e25b74e6da7e7e4d9d8ec8f660c4781a5687eab 100644 (file)
@@ -18,6 +18,7 @@
 #include <cstring>
 #include <cmath>
 #include <NCollection_Vec2.hxx>
+#include <Standard_Dump.hxx>
 
 //! Auxiliary macros to define couple of similar access components as vector methods
 #define NCOLLECTION_VEC_COMPONENTS_3D(theX, theY, theZ) \
@@ -403,6 +404,13 @@ public:
     return NCollection_Vec3 (Element_t(0), Element_t(0), Element_t(1));
   }
 
+  //! Dumps the content of me into the stream
+  void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const
+  {
+    (void)theDepth;
+    OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "Vec3", 3, v[0], v[1], v[2])
+  }
+
 private:
 
   Element_t v[3]; //!< define the vector as array to avoid structure alignment issues
index b3c84aea9a38256fe8684c8f79506657cc82cd4e..52960a82a2a8b53e0438c7ba75b5d9203244c899 100644 (file)
@@ -16,6 +16,7 @@
 #define _NCollection_Vec4_H__
 
 #include <NCollection_Vec3.hxx>
+#include <Standard_Dump.hxx>
 
 //! Generic 4-components vector.
 //! To be used as RGBA color vector or XYZW 3D-point with special W-component
@@ -375,6 +376,13 @@ public:
     return aResult /= theRight;
   }
 
+  //! Dumps the content of me into the stream
+  void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const
+  {
+    (void)theDepth;
+    OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "Vec4", 4, v[0], v[1], v[2], v[3])
+  }
+
 private:
 
   Element_t v[4]; //!< define the vector as array to avoid structure alignment issues
index 23adae9c0234804ca90190a4a8d2014c80da5276..8e425264593e484b8a5029039041da072b067bd2 100644 (file)
@@ -119,10 +119,11 @@ void OpenGl_Aspects::Release (OpenGl_Context* theContext)
 // function : DumpJson
 // purpose  :
 // =======================================================================
-void OpenGl_Aspects::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+void OpenGl_Aspects::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, OpenGl_Aspects);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, OpenGl_Aspects)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, OpenGl_Element)
 
-  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAspect.get());
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myShadingModel);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAspect.get())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myShadingModel)
 }
index d7670386890ce0a63160a1d8f466fca7f1c895a7..f32f63edeb69742af90c8c7c4bd512452000c1cc 100644 (file)
@@ -90,7 +90,7 @@ public:
   virtual void SynchronizeAspects() Standard_OVERRIDE { SetAspect (myAspect); }
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 protected:
 
index 6a3f73d9cfc88208e0ed78e2b91593919dfce660..e3d7e6af4cb5e788bea7704be0b3be6e105d22bd 100644 (file)
@@ -4036,3 +4036,84 @@ bool OpenGl_Context::SetSampleAlphaToCoverage (bool theToEnable)
   myAlphaToCoverage = toEnable;
   return anOldValue;
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void OpenGl_Context::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAnisoMax)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTexClamp)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMaxTexDim)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMaxTexCombined)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMaxDumpSizeX)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMaxDumpSizeY)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMaxClipPlanes)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMaxMsaaSamples)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMaxDrawBuffers)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMaxColorAttachments)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myGlVerMajor)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myGlVerMinor)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsInitialized)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsStereoBuffers)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsGlNormalizeEnabled)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasRayTracing)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasRayTracingTextures)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasRayTracingAdaptiveSampling)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasRayTracingAdaptiveSamplingAtomic)
+
+  for (int i = 0; i < 4; i++)
+  {
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myViewport[i])
+  }
+
+  for (int i = 0; i < 4; i++)
+  {
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myViewportVirt[i])
+  }
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPointSpriteOrig)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myRenderMode)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPolygonMode)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPolygonOffset)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToCullBackFaces)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myReadBuffer)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDefaultVao)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myColorMask)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAllowAlphaToCov)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAlphaToCoverage)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsGlDebugCtx)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myResolution)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myResolutionRatio)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLineWidthScale)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLineFeather)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myRenderScale)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myRenderScaleInv)
+  
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &ModelWorldState)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &WorldViewState)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &ProjectionState)
+}
+
+// =======================================================================
+// function : DumpJsonOpenGlState
+// purpose  :
+// =======================================================================
+void OpenGl_Context::DumpJsonOpenGlState (Standard_OStream& theOStream, Standard_Integer)
+{
+  GLboolean isEnableBlend = glIsEnabled (GL_BLEND);
+  GLboolean isEnableCullFace = glIsEnabled (GL_CULL_FACE);
+  GLboolean isEnableDepthTest = glIsEnabled (GL_DEPTH_TEST);
+  
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, isEnableBlend)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, isEnableCullFace)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, isEnableDepthTest)
+}
+
index 29373461cc8487bd7a335aa2074d622222c85e33..3e9426dabce8a76a410157ec43b48d0edd204fa4 100644 (file)
@@ -200,6 +200,13 @@ DEFINE_STANDARD_HANDLE(OpenGl_Context, Standard_Transient)
 //!
 //! Notice that some systems provide mechanisms to simultaneously incorporate with GL contexts with different capabilities.
 //! For this reason OpenGl_Context should be initialized and used for each GL context independently.
+//!
+//! Matrices of OpenGl transformations:
+//! model -> world -> view -> projection
+//! These matrices might be changed for local transformation, transform persistent using direct access to
+//! current matrix of ModelWorldState, WorldViewState and ProjectionState
+//! After, these matrices should be applyed using ApplyModelWorldMatrix, ApplyWorldViewMatrix,
+//! ApplyModelViewMatrix or ApplyProjectionMatrix.
 class OpenGl_Context : public Standard_Transient
 {
   DEFINE_STANDARD_RTTIEXT(OpenGl_Context, Standard_Transient)
@@ -589,16 +596,25 @@ public:
   //! Returns currently applied polygon offset parameters.
   const Graphic3d_PolygonOffset& PolygonOffset() const { return myPolygonOffset; }
 
-  //! Applies matrix stored in ModelWorldState to OpenGl.
+  //! Applies matrix into shader manager stored in ModelWorldState to OpenGl.
+  //! In "model -> world -> view -> projection" it performs:
+  //!     model -> world
   Standard_EXPORT void ApplyModelWorldMatrix();
 
   //! Applies matrix stored in WorldViewState to OpenGl.
+  //! In "model -> world -> view -> projection" it performs:
+  //!     model -> world -> view,
+  //! where model -> world is identical matrix
   Standard_EXPORT void ApplyWorldViewMatrix();
 
   //! Applies combination of matrices stored in ModelWorldState and WorldViewState to OpenGl.
+  //! In "model -> world -> view -> projection" it performs:
+  //!     model -> world -> view
   Standard_EXPORT void ApplyModelViewMatrix();
 
   //! Applies matrix stored in ProjectionState to OpenGl.
+  //! In "model -> world -> view -> projection" it performs:
+  //!                       view -> projection
   Standard_EXPORT void ApplyProjectionMatrix();
 
 public:
@@ -846,6 +862,12 @@ public: //! @name methods to alter or retrieve current state
   //! Return Graphics Driver's vendor.
   const TCollection_AsciiString& Vendor() const { return myVendor; }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+    
+  //! Dumps the content of openGL state into the stream
+  Standard_EXPORT static void DumpJsonOpenGlState (Standard_OStream& theOStream, Standard_Integer theDepth = -1);
+
 private:
 
   //! Wrapper to system function to retrieve GL function pointer by name.
index 0d5c53f5d5b868386a95753c9fbf7fa9d35b2660..6f8d87210e3da8b7000b0ed1ecea16a7232b7416 100755 (executable)
@@ -15,6 +15,8 @@
 
 #include <OpenGl_Element.hxx>
 
+#include <Standard_Dump.hxx>
+
 // =======================================================================
 // function : OpenGl_Element
 // purpose  :
@@ -32,3 +34,13 @@ OpenGl_Element::~OpenGl_Element()
 {
   //
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void OpenGl_Element::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+  OCCT_DUMP_CLASS_BEGIN (theOStream, OpenGl_Element)
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, this)
+}
index 8a14275a1ab8811341fcd781e2c38729cbe7a964..ab53b6146ec1245801a938fe883acc84e8ae57d6 100644 (file)
@@ -63,6 +63,9 @@ public:
   //! Update parameters of the drawable elements.
   virtual void SynchronizeAspects() {}
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 protected:
 
   Standard_EXPORT virtual ~OpenGl_Element();
index 3a5a0673b152c465aa382a126830f9bfe01d2d07..b3322df22dc4fe9294fa7a705b02bc21f01b81e2 100755 (executable)
@@ -135,3 +135,14 @@ void OpenGl_Flipper::Render (const Handle(OpenGl_Workspace)& theWorkspace) const
   aContext->WorldViewState.SetCurrent (aMatrixMV);
   aContext->ApplyWorldViewMatrix();
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void OpenGl_Flipper::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_CLASS_BEGIN (theOStream, OpenGl_Flipper)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, OpenGl_Element)
+}
index 7f159c5db97e9230b3f96f00fcff1b2911247c90..17de26e7c405357ca2b5865619f18a853ff89799 100755 (executable)
@@ -39,8 +39,11 @@ public:
   //! matrix modification should be set up or restored back.
   void SetOptions (const Standard_Boolean theIsEnabled) { myIsEnabled = theIsEnabled; }
 
-  Standard_EXPORT virtual void Render (const Handle(OpenGl_Workspace)& theWorkspace) const;
-  Standard_EXPORT virtual void Release (OpenGl_Context* theCtx);
+  Standard_EXPORT virtual void Render (const Handle(OpenGl_Workspace)& theWorkspace) const Standard_OVERRIDE;
+  Standard_EXPORT virtual void Release (OpenGl_Context* theCtx) Standard_OVERRIDE;
+
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 public:
 
index 86949791c7a745306e4a5eb80f47e459db6fcc58..066d0f1f592e1de6dd1d94dc0de379afdff766eb 100644 (file)
@@ -454,3 +454,14 @@ void OpenGl_FrameStatsPrs::Render (const Handle(OpenGl_Workspace)& theWorkspace)
     glDepthMask (wasEnabledDepth ? GL_TRUE : GL_FALSE);
   }
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void OpenGl_FrameStatsPrs::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_CLASS_BEGIN (theOStream, OpenGl_FrameStatsPrs)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, OpenGl_Element)
+}
index 1366879bab75d162d26e69a61f2e7708f8858d85..67bcacfa696e8d7d85adbb7190d977b691b3c8f5 100644 (file)
@@ -45,6 +45,9 @@ public:
   //! Assign text aspect.
   void SetTextAspect (const Handle(Graphic3d_AspectText3d)& theAspect) { myTextAspect.SetAspect (theAspect); }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 protected:
 
   //! Update chart presentation.
index c2d5b3dc5436ed197b656b20af2467d355830baf..b270c6ae03f3abbc1979b4b6c484ca7a98bd8d2b 100755 (executable)
@@ -838,3 +838,14 @@ void OpenGl_GraduatedTrihedron::Axis::Release (OpenGl_Context* theCtx)
   Line    .Release (theCtx);
   Arrow   .Release (theCtx);
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void OpenGl_GraduatedTrihedron::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_CLASS_BEGIN (theOStream, OpenGl_GraduatedTrihedron)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, OpenGl_Element)
+}
index b047728f84720c7ab97a57e11e184f8df09e4319..e25c944001e3ee7cc93e76de3d21f2024b83c393 100755 (executable)
@@ -61,6 +61,9 @@ public:
   void SetMinMax (const OpenGl_Vec3& theMin,
                   const OpenGl_Vec3& theMax);
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 private:
 
   //! Axis of trihedron. It incapsulates geometry and style.
index 95f0b3c3c4aacfe7153e5abf21d8a835c73645aa..f8c8cb8691ae7e31d00d87c8d2ef522350fb79a2 100644 (file)
@@ -358,11 +358,17 @@ void OpenGl_Group::Release (const Handle(OpenGl_Context)& theGlCtx)
 // function : DumpJson
 // purpose  :
 // =======================================================================
-void OpenGl_Group::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+void OpenGl_Group::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, OpenGl_Group);
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
 
-  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Graphic3d_Group);
-  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAspects);
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsRaytracable);
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Graphic3d_Group)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAspects)
+  for (OpenGl_ElementNode* aNode = myFirst; aNode != NULL; aNode = aNode->next)
+  {
+    OpenGl_Element* anElement = aNode->elem;
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, anElement)
+  }
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsRaytracable)
 }
index 966062a5aadbbf9ee79e7c41718de93d81259a0d..0cea85cd5023983525a87c4b8c3a059b4a90b7bb 100644 (file)
@@ -109,7 +109,7 @@ public:
   }
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
   //! Returns OpenGL capping filling aspect.
   const OpenGl_CappingPlaneResource* AspectFillCapping() const { return myAspectFillCapping; }
index 30cf5f468799557a4dea912e0700ea4ec8eff83c..1fa4af997dc70a29e83fe5a0dee6022192a85612 100644 (file)
@@ -35,3 +35,13 @@ GLenum OpenGl_IndexBuffer::GetTarget() const
 {
   return GL_ELEMENT_ARRAY_BUFFER;
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void OpenGl_IndexBuffer::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, OpenGl_VertexBuffer)
+}
index 8189677c33e4c998d42e818900ea0f63aef3e582..87470474269730891e68ef69cbd3b30b50c85592 100644 (file)
@@ -25,6 +25,9 @@ public:
   Standard_EXPORT OpenGl_IndexBuffer();
   Standard_EXPORT virtual GLenum GetTarget() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 public:
 
   DEFINE_STANDARD_RTTIEXT(OpenGl_IndexBuffer,OpenGl_VertexBuffer) // Type definition
index 0e46b233e1d64b5e44494a6741f01f43f9b71db1..74133b9ce5c698bdfa4b74d39efe112104fef9b1 100644 (file)
@@ -970,3 +970,23 @@ void OpenGl_LayerList::renderTransparent (const Handle(OpenGl_Workspace)&   theW
   aCtx->core11fwd->glDepthMask (theGlobalSettings.DepthMask);
   aCtx->core11fwd->glDepthFunc (theGlobalSettings.DepthFunc);
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void OpenGl_LayerList::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_CLASS_BEGIN (theOStream, OpenGl_LayerList)
+
+  for (NCollection_List<Handle(Graphic3d_Layer)>::Iterator aLayersIt (myLayers); aLayersIt.More(); aLayersIt.Next())
+  {
+    const Handle(Graphic3d_Layer)& aLayerId = aLayersIt.Value();
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aLayerId.get())
+  }
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNbPriorities)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNbStructures)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myImmediateNbStructures)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myModifStateOfRaytraceable)
+}
index d85d87174550a491bd57766da91686fab3dc44cb..31ed0d8626523c86301c7763dda9b80030360122 100644 (file)
@@ -25,6 +25,7 @@
 #include <NCollection_Sequence.hxx>
 #include <NCollection_DataMap.hxx>
 
+class OpenGl_FrameBuffer;
 class OpenGl_Structure;
 class OpenGl_Workspace;
 struct OpenGl_GlobalLayerSettings;
@@ -125,6 +126,9 @@ public:
   //! Assigns BVH tree builder for frustom culling.
   void SetFrustumCullingBVHBuilder (const Handle(Select3D_BVHBuilder3d)& theBuilder);
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 protected:
 
   //! Stack of references to existing layers of predefined maximum size.
index 00f16d0d09f45e7746fb7c880f38d337902697ef..ef56e6ceb448cc9445659fb6d751304d35aab055 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <OpenGl_Vec.hxx>
 #include <NCollection_Vector.hxx>
+#include <Standard_Dump.hxx>
 
 //! Software implementation for OpenGL matrix stack.
 template<class T>
@@ -84,6 +85,20 @@ public:
     myCurrent = typename OpenGl::MatrixType<T>::Mat4();
   }
 
+  //! Dumps the content of me into the stream
+  void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const
+  {
+    (void)theDepth;
+    OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "myCurrent", 16,
+      myCurrent.GetValue (0, 0),  myCurrent.GetValue (0, 1), myCurrent.GetValue (0, 2),  myCurrent.GetValue (0, 3),
+      myCurrent.GetValue (1, 0),  myCurrent.GetValue (1, 1), myCurrent.GetValue (1, 2),  myCurrent.GetValue (1, 3),
+      myCurrent.GetValue (2, 0),  myCurrent.GetValue (2, 1), myCurrent.GetValue (2, 2),  myCurrent.GetValue (2, 3),
+      myCurrent.GetValue (3, 0),  myCurrent.GetValue (3, 1), myCurrent.GetValue (3, 2),  myCurrent.GetValue (3, 3))
+
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myStack.Size())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myStackHead)
+  }
+
 private:
 
   NCollection_Vector<typename OpenGl::MatrixType<T>::Mat4> myStack;     //!< Collection used to maintenance matrix stack
index cec64bbe38a3d112fb08aed9810240657db9b3c0..3fc4c0191c214b3793ceab4bb30119374567db1a 100644 (file)
@@ -1115,3 +1115,26 @@ void OpenGl_PrimitiveArray::InitBuffers (const Handle(OpenGl_Context)&        th
 
   setDrawMode (theType);
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void OpenGl_PrimitiveArray::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_CLASS_BEGIN (theOStream, OpenGl_PrimitiveArray)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, OpenGl_Element)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myVboIndices.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myVboAttribs.get())
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myIndices.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAttribs.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myBounds.get())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDrawMode)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsFillType)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsVboInit)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myUID)
+}
index dc4a066010425e31e4865d5001cc41f90561ea8f..7d0c178f03b12c33e7b4cb72418b6b32ff9b13e9 100644 (file)
@@ -99,6 +99,9 @@ public:
   //! Returns attributes VBO.
   const Handle(OpenGl_VertexBuffer)& AttributesVbo() const { return myVboAttribs; }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 protected:
 
   //! VBO initialization procedures
index 452e0182f40efa28e6dcd1a10cf9b5bd7c4154cf..cb664f5d872e7f64e03a9a53aa9db82883b3c184 100644 (file)
@@ -48,6 +48,10 @@ public:
   //! Returns estimated GPU memory usage for holding data without considering overheads and allocation alignment rules.
   virtual Standard_Size EstimatedDataSize() const = 0;
 
+  //! Dumps the content of me into the stream
+  virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const 
+  { (void)theOStream; (void)theDepth; };
+
 private:
 
   //! Copy should be performed only within Handles!
index ba5dab14a40d15d240914f5a7429562f9704f828..12af1e30a4e5b26dfee29fa079ebc6eb33faed90 100755 (executable)
@@ -15,6 +15,7 @@
 
 #include <OpenGl_GlCore11.hxx>
 #include <OpenGl_StencilTest.hxx>
+#include <Standard_Dump.hxx>
 
 OpenGl_StencilTest::OpenGl_StencilTest()
 {
@@ -64,3 +65,15 @@ OpenGl_StencilTest::~OpenGl_StencilTest()
 {
   //
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void OpenGl_StencilTest::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_CLASS_BEGIN (theOStream, OpenGl_StencilTest)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, OpenGl_Element)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsEnabled)
+}
index f540c199e9007f109c824f909cdef97b5a12d2d6..f50a64cb453383baea586cdc899f0210ac8ded34 100755 (executable)
@@ -32,6 +32,9 @@ public:
 
   void SetOptions (const Standard_Boolean theIsEnabled);
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 protected:
 
   //! Destructor
index 927a4a0eacd665779c43fcc1172d5a6f42ffce20..dcec6c0f38ab15254f4db506aa356b17e6cb55ac 100644 (file)
@@ -639,3 +639,20 @@ Handle(Graphic3d_CStructure) OpenGl_Structure::ShadowLink (const Handle(Graphic3
 {
   return new OpenGl_StructureShadow (theManager, this);
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void OpenGl_Structure::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Graphic3d_CStructure)
+
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myInstancedStructure)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsRaytracable)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myModificationState)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsMirrored)
+}
index 58c3a0e29f7a4f6955a53e2196367b3c89849279..fca0298670c522a763eb15a18baef3533cb0b889 100644 (file)
@@ -128,6 +128,9 @@ public:
   //! Update render transformation matrix.
   Standard_EXPORT virtual void updateLayerTransformation() Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 protected:
 
   Standard_EXPORT virtual ~OpenGl_Structure();
index 198294d7939c993fa928707194362638758c2d4c..114ffaa7aba5286b2fd16952cb55887b90136635 100644 (file)
@@ -837,3 +837,23 @@ void OpenGl_Text::render (const Handle(OpenGl_Context)& theCtx,
   theCtx->WorldViewState.Pop();
   theCtx->ApplyModelViewMatrix();
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void OpenGl_Text::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_CLASS_BEGIN (theOStream, OpenGl_Text)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, OpenGl_Element)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTextures.Size())
+
+  for (NCollection_Vector<Handle(OpenGl_VertexBuffer)>::Iterator aCrdsIt (myTCrdsVbo); aCrdsIt.More(); aCrdsIt.Next())
+  {
+    const Handle(OpenGl_VertexBuffer)& aVertexBuffer = aCrdsIt.Value();
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aVertexBuffer.get())
+  }
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBndBox)
+}
index 47b12d11ec052fad26f31f43a1b54ee3c1ed5d4a..01eab0033640ec66a3bfb9d1e07aa8ca573cd38f 100755 (executable)
@@ -65,8 +65,8 @@ public:
   Standard_EXPORT void SetFontSize (const Handle(OpenGl_Context)& theContext,
                                     const Standard_Integer        theFontSize);
 
-  Standard_EXPORT virtual void Render  (const Handle(OpenGl_Workspace)& theWorkspace) const;
-  Standard_EXPORT virtual void Release (OpenGl_Context* theContext);
+  Standard_EXPORT virtual void Render  (const Handle(OpenGl_Workspace)& theWorkspace) const Standard_OVERRIDE;
+  Standard_EXPORT virtual void Release (OpenGl_Context* theContext) Standard_OVERRIDE;
 
 public: //! @name methods for compatibility with layers
 
@@ -100,6 +100,9 @@ public: //! @name methods for compatibility with layers
                                const OpenGl_Aspects& theTextAspect,
                                unsigned int theResolution = Graphic3d_RenderingParams::THE_DEFAULT_RESOLUTION) const;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 //! @name obsolete methods
 public:
 
index 560ccebd6647c963ca7f14bccd4a6064f873f1e8..172781775371df98a6e490752f6ec7169a5fabf7 100644 (file)
@@ -250,3 +250,21 @@ void OpenGl_VertexBuffer::unbindFixedColor (const Handle(OpenGl_Context)& theCtx
   theCtx->ShaderManager()->UpdateMaterialState();
 }
 #endif
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void OpenGl_VertexBuffer::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, OpenGl_Resource)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, GetTarget())
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myOffset)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myBufferId)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myComponentsNb)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myElemsNb)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDataType)
+}
index 5f259ef7c0175ecf3f78ac7278d2c960f6bbb0a5..72f72327b15800ace95edb46b71a14e735acb4e3 100644 (file)
@@ -336,6 +336,9 @@ public: //! @name methods for interleaved attributes array
   //! Unbind all vertex attributes. Default implementation does nothing.
   Standard_EXPORT virtual void UnbindAllAttributes (const Handle(OpenGl_Context)& theGlCtx) const;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 protected:
 
   GLubyte* myOffset;       //!< offset to data
index adfc4902da40f0e58f79e3d5d79c8467b7bce669..73900489d23d6f9c15b9dde6892bbc355d7499c7 100644 (file)
@@ -447,3 +447,30 @@ bool OpenGl_Workspace::ShouldRender (const OpenGl_Element* theElement)
   }
   return true;
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void OpenGl_Workspace::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myUseZBuffer)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myUseDepthWrite)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myNoneCulling)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myFrontCulling)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNbSkippedTranspElems)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myRenderFilter)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myDefaultAspects)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAspectsSet)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAspectsApplied.get())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToAllowFaceCulling)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myAspectFaceHl)
+}
index 3a6974e1158512f6bc97e06df9dd37fcdada4a00..df9ec3c6d4132e7a5453bc6c669697e2efe789e9 100644 (file)
@@ -194,6 +194,9 @@ public:
   //! Returns environment texture.
   const Handle(OpenGl_TextureSet)& EnvironmentTexture() const { return myEnvironmentTexture; }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+  
 protected: //! @name protected fields
 
   OpenGl_View*           myView;
index 4e6fc6213ed4108565ecc7c2191b888dac1f8617..7206b99a78d6858a190135c27e289f012510c014 100644 (file)
@@ -65,4 +65,15 @@ const TColgp_Array1OfPnt2d& Poly_Polygon2D::Nodes() const
   return myNodes;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Poly_Polygon2D::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDeflection)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNodes.Size())
+}
 
index 6e7d3dc93cb350fcdd466730110789324bfc44d7..91544c81000e81a88f364cc8d51c827a3a3d96ec 100644 (file)
@@ -80,6 +80,9 @@ public:
 
 
 
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
   DEFINE_STANDARD_RTTIEXT(Poly_Polygon2D,Standard_Transient)
 
index a4f2881a9d178037fece774c6101d40b202ede18..4d9e9c26e192ba21f4b908978cbd455ad29280a8 100644 (file)
@@ -133,4 +133,17 @@ TColStd_Array1OfReal& Poly_Polygon3D::ChangeParameters() const
   return myParameters->ChangeArray1();
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Poly_Polygon3D::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDeflection)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNodes.Size())
+  if (!myParameters.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myParameters->Size())
+}
 
index da57e3999474dfd35dcd8bea427df8ace19ae36d..da5a9a30c4685ea552199d6717ee9bfdf1783dc2 100644 (file)
@@ -94,6 +94,9 @@ public:
 
 
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
   DEFINE_STANDARD_RTTIEXT(Poly_Polygon3D,Standard_Transient)
 
 protected:
index 989c3c16fde6f345d5efe95a99bf7b57c7f8e35a..99c2ec3813ddae6b1a91b4a9cc3f433ab842724f 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <Poly_PolygonOnTriangulation.hxx>
 #include <Standard_NullObject.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_Type.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(Poly_PolygonOnTriangulation,Standard_Transient)
@@ -116,3 +117,16 @@ Handle(TColStd_HArray1OfReal) Poly_PolygonOnTriangulation::Parameters() const
   return myParameters;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Poly_PolygonOnTriangulation::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDeflection)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNodes.Size())
+  if (!myParameters.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myParameters->Size())
+}
index d12424a47c113c08fa67c9da011f4045b20f1204..9cdf8a5d5b61444c0ea0669536f0e58048c8c3e9 100644 (file)
@@ -104,6 +104,9 @@ public:
 
 
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
   DEFINE_STANDARD_RTTIEXT(Poly_PolygonOnTriangulation,Standard_Transient)
 
 protected:
index 3a361d076ab60ba818aeeefc0a9dd0676e957061..b367b5a37d22ba43a520b223db6b76de41a93bf0 100644 (file)
@@ -19,6 +19,7 @@
 #include <gp_Pnt.hxx>
 #include <Poly_Triangle.hxx>
 #include <Standard_DomainError.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_NullObject.hxx>
 #include <Standard_Type.hxx>
 
@@ -309,3 +310,21 @@ gp_Dir Poly_Triangulation::Normal (const Standard_Integer theIndex) const
 
   return N;
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void Poly_Triangulation::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDeflection)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNodes.Size())
+  if (!myUVNodes.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myUVNodes->Size())
+  if (!myNormals.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNormals->Size())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTriangles.Size())
+}
index a92e85ddca992e92eec09cb7dbc0eb7357f9eaee..0465962bbafe33144361df3797f38f5b42699c73 100644 (file)
@@ -196,6 +196,9 @@ public:
   Standard_EXPORT void SetNormal (const Standard_Integer theIndex,
                                   const gp_Dir&          theNormal);
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 protected:
 
   Standard_Real                      myDeflection;
index f799aeb34acce44847b17fffd2cd1a6c2f3eadc9..130d868900a712d4966f70dbfa1ce61e13e3a7b8 100644 (file)
@@ -71,11 +71,11 @@ void Prs3d_ArrowAspect::SetAngle (const Standard_Real theAngle)
 // function : DumpJson
 // purpose  :
 // =======================================================================
-void Prs3d_ArrowAspect::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+void Prs3d_ArrowAspect::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, Prs3d_ArrowAspect);
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
 
-  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myArrowAspect.get());
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAngle);
-  OCCT_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 7aeb351a51865ca0fe1e5c01a9a923e62d5c9dbe..f63e59a41790194aa0c1300817ab320a3965d4b9 100644 (file)
@@ -58,7 +58,7 @@ public:
   void SetAspect (const Handle(Graphic3d_AspectLine3d)& theAspect) { myArrowAspect = theAspect; }
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 protected:
 
index 604b53dacfb8630d82844f53c38a5f22e8ca3e25..c93f9db3286018a2a58accf49c2f277fb09b67f0 100644 (file)
@@ -28,7 +28,7 @@ class Prs3d_BasicAspect : public Standard_Transient
   DEFINE_STANDARD_RTTIEXT(Prs3d_BasicAspect, Standard_Transient)
 
   //! Dumps the content of me into the stream
-  virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const = 0;
+  virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const = 0;
 
 };
 
index 1552124c2e22d4c0d284e622e8f60d477586fb60..db7b7e1569b6cf0f86ffb74270626d787adc28c3 100644 (file)
@@ -174,16 +174,15 @@ Prs3d_DatumParts Prs3d_DatumAspect::ArrowPartForAxis (Prs3d_DatumParts thePart)
 // function : DumpJson
 // purpose  :
 // =======================================================================
-void Prs3d_DatumAspect::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+void Prs3d_DatumAspect::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, Prs3d_DatumAspect);
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
 
-  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());
+  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())
 
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAxes);
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToDrawLabels);
-  OCCT_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 3bb247c2a2669ee3b24f359d2639d9bb0dbdbb0d..d739c79f0b272578cf00ada68ff9d8c88462c5e2 100644 (file)
@@ -154,7 +154,7 @@ public:
   Standard_EXPORT Prs3d_DatumParts ArrowPartForAxis (Prs3d_DatumParts thePart) const;
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 private:
   Prs3d_DatumAxes myAxes;
index 46aaa318c659ab9bf87ed16a2c03d24730e09b4d..5610ea7542640f43dd4d348ab6a9d3e4ff9779dc 100755 (executable)
@@ -65,23 +65,22 @@ void Prs3d_DimensionAspect::SetCommonColor (const Quantity_Color& theColor)
 // function : DumpJson
 // purpose  :
 // =======================================================================
-void Prs3d_DimensionAspect::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+void Prs3d_DimensionAspect::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, Prs3d_DimensionAspect);
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
 
-  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());
+  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())
 
-  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);
+  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 9f90573eb4277fa6938061981ddbce810d72b19d..2bb8e1849328b0e6c31e139f7a93b78730583d22 100644 (file)
@@ -116,7 +116,7 @@ public:
   const TCollection_AsciiString& ValueStringFormat() const { return myValueStringFormat; }
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 protected:
 
index a03fa3d36f5fef4536d946886a0b0bfc5b025bd8..5b2781fbb37fe57520929cc9b880496577a6842b 100644 (file)
@@ -1439,8 +1439,91 @@ bool Prs3d_Drawer::SetShadingModel (Graphic3d_TypeOfShadingModel theModel,
 // function : DumpJson
 // purpose  :
 // =======================================================================
-void Prs3d_Drawer::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+void Prs3d_Drawer::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, Prs3d_Drawer);
-  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myShadingAspect.get());
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myLink.get())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnNbPoints)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMaximalParameterValue)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnMaximalParameterValue)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myChordialDeviation)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnChordialDeviation)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTypeOfDeflection)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnTypeOfDeflection)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTypeOfHLR)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDeviationCoefficient)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPreviousDeviationCoefficient)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDeviationCoefficient)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHLRDeviationCoefficient)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnHLRDeviationCoefficient)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPreviousHLRDeviationCoefficient)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDeviationAngle)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDeviationAngle)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPreviousDeviationAngle)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHLRAngle)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnHLRDeviationAngle)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPreviousHLRDeviationAngle)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsoOnPlane)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnIsoOnPlane)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsoOnTriangulation)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnIsoOnTriangulation)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsAutoTriangulated)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnIsAutoTriangulated)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnUIsoAspect)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnVIsoAspect)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnWireAspect)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myWireDraw)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnWireDraw)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnPointAspect)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnLineAspect)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTextAspect.get())
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myShadingAspect.get())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnShadingAspect)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnPlaneAspect)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnSeenLineAspect)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnArrowAspect)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLineArrowDraw)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnLineArrowDraw)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnHiddenLineAspect)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDrawHiddenLine)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDrawHiddenLine)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnVectorAspect)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myVertexDrawMode)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDatumAspect)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnSectionAspect)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnFreeBoundaryAspect)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFreeBoundaryDraw)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnFreeBoundaryDraw)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnUnFreeBoundaryAspect)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myUnFreeBoundaryDraw)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnUnFreeBoundaryDraw)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFaceBoundaryUpperContinuity)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnFaceBoundaryAspect)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFaceBoundaryDraw)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnFaceBoundaryDraw)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDimensionAspect)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDimLengthModelUnits)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDimAngleModelUnits)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDimLengthDisplayUnits)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDimAngleDisplayUnits)
 }
index 50a74ffe37ff9c8becad93e78de568d141f7791e..9706ac402d775a4fa65476c3f336938fbe416f64 100644 (file)
@@ -903,7 +903,7 @@ public:
                                         bool theToOverrideDefaults = false);
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 protected:
 
index adbe48fd5969b4bfe50b245e0b80ab4cc511c181..90d052327a0d69dec76630beff7ea4910ecfed22 100644 (file)
@@ -34,9 +34,8 @@ Prs3d_LineAspect::Prs3d_LineAspect (const Quantity_Color& theColor,
 // function : DumpJson
 // purpose  :
 // =======================================================================
-void Prs3d_LineAspect::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+void Prs3d_LineAspect::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, Prs3d_LineAspect);
-  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAspect.get());
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAspect.get())
 }
-
index e6e61d76268ededfe0df6a1bc4ef36fa8ea14da5..99c2b2cb7e13809eecaab440df72307aff7e0fa2 100644 (file)
@@ -64,7 +64,7 @@ public:
   void SetAspect (const Handle(Graphic3d_AspectLine3d)& theAspect) { myAspect = theAspect; }
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 protected:
 
index 4f6b8eb98b0ee21acb712b82a4ad4b4eac48b8a4..5b3e158b30b4f1e983abe8d0a8abc6cacefd0083 100644 (file)
@@ -44,23 +44,22 @@ Prs3d_PlaneAspect::Prs3d_PlaneAspect()
 // function : DumpJson
 // purpose  :
 // =======================================================================
-void Prs3d_PlaneAspect::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+void Prs3d_PlaneAspect::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, Prs3d_PlaneAspect);
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
 
-  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());
+  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())
 
-  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);
+  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 35e3f6d056eaeaf2528e495034789aca8b618ab3..0e0ecff2f66b6a5f38d8b610e7416387f49c1673 100644 (file)
@@ -97,7 +97,7 @@ public:
   Standard_Real IsoDistance() const { return myIsoDistance; }
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 protected:
 
index e3587a5fcd2416ae179829b01ce619caf94a4059..f176305ac64f0f1fb07acf6f453f3c8e19981cfd 100644 (file)
@@ -47,9 +47,8 @@ Prs3d_PointAspect::Prs3d_PointAspect (const Quantity_Color& theColor,
 // function : DumpJson
 // purpose  :
 // =======================================================================
-void Prs3d_PointAspect::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+void Prs3d_PointAspect::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, Prs3d_PointAspect);
-  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAspect.get());
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAspect.get())
 }
-
index 0c0150b1a1a078f629618a6a870ea23035ae22c0..d3074e94e8c1e806f9a841008135c7c7a7983b25 100644 (file)
@@ -62,7 +62,7 @@ public:
   const Handle(Graphic3d_MarkerImage)& GetTexture() const { return myAspect->GetMarkerImage(); }
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 protected:
 
index ab7d417b2212fb351fb613bf6d301846170c127d..ebd5b3afbb832a332cb4c9bbd011ca04063c04cd 100644 (file)
@@ -38,3 +38,17 @@ void Prs3d_PresentationShadow::CalculateBoundBox()
 {
   //
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void Prs3d_PresentationShadow::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Graphic3d_Structure)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myParentAffinity.get())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myParentStructId)
+}
index bf68cdcb0cc936f9f9bfa0e83e8348e72879acab..124d041faef1a95ad1edb361d89981df4b2746cb 100644 (file)
@@ -37,6 +37,9 @@ public:
   //! Do nothing - axis-aligned bounding box should be initialized from parent structure.
   Standard_EXPORT virtual void CalculateBoundBox() Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 private:
 
   Handle(Graphic3d_ViewAffinity) myParentAffinity;
index a0b464ee42c8f7f4e39fade56896ef4bacd70551..cd4bdc38c145747ff9d86c5b34b0cb3b8a81fb33 100644 (file)
@@ -170,9 +170,9 @@ Standard_Real Prs3d_ShadingAspect::Transparency (const Aspect_TypeOfFacingModel
 // function : DumpJson
 // purpose  :
 // =======================================================================
-void Prs3d_ShadingAspect::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+void Prs3d_ShadingAspect::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, Prs3d_ShadingAspect);
-  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAspect.get());
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAspect.get())
 }
 
index 202a4b740fd9bb8793c7e78d0cf982b218dcfa4d..b51c29b4c5306acb20d793363d7d488eeea9fe4f 100644 (file)
@@ -63,7 +63,7 @@ public:
   void SetAspect (const Handle(Graphic3d_AspectFillArea3d)& theAspect) { myAspect = theAspect; }
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 protected:
 
index 3614473b3183f1a625ab8b7cd884669cdc114009..3ff268d0bf95b309bcb18bae75b0ee06d5a232ea 100644 (file)
@@ -53,15 +53,14 @@ Prs3d_TextAspect::Prs3d_TextAspect (const Handle(Graphic3d_AspectText3d)& theAsp
 // function : DumpJson
 // purpose  :
 // =======================================================================
-void Prs3d_TextAspect::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+void Prs3d_TextAspect::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, Prs3d_TextAspect);
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
 
-  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTextAspect.get());
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTextAspect.get())
 
-  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);
+  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 185a37f21fa8caef510bcb1e83626f1e3fc153f5..2fc811112b6fc7812d267dbec2ba10eeb5e01819 100644 (file)
@@ -98,7 +98,7 @@ public:
   void SetAspect (const Handle(Graphic3d_AspectText3d)& theAspect) { myTextAspect = theAspect; }
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 protected:
 
index 1322d5c8b47611aba2bc26079bf5cabefc78682e..64d689a0e3812a5c9269ef5a8cd39f978fdec89f 100644 (file)
@@ -842,17 +842,48 @@ void PrsMgr_PresentableObject::PolygonOffsets (Standard_Integer&   theMode,
 // function : DumpJson
 // purpose  :
 // =======================================================================
-void PrsMgr_PresentableObject::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
+void PrsMgr_PresentableObject::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, PrsMgr_PresentableObject);
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
 
-  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myParent);
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myParent)
 
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myOwnWidth);
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, hasOwnColor);
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, hasOwnMaterial);
+  for (PrsMgr_Presentations::Iterator anIterator (myPresentations); anIterator.More(); anIterator.Next())
+  {
+    const Handle(PrsMgr_Presentation)& aPresentation = anIterator.Value();
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aPresentation.get())
+  }
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myClipPlanes.get())
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myDrawer.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myHilightDrawer.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myDynHilightDrawer.get())
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTransformPersistence.get())
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myLocalTransformation.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTransformation.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myCombinedParentTransform.get())
+
+  for (PrsMgr_ListOfPresentableObjects::Iterator anIterator (myChildren); anIterator.More(); anIterator.Next())
+  {
+    const Handle(PrsMgr_PresentableObject)& aChildObject = anIterator.Value();
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aChildObject.get())
+  }
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myInvTransformation)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTypeOfPresentation3d)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCurrentFacingModel)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myOwnWidth)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, hasOwnColor)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, hasOwnMaterial)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myInfiniteState)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsMutable)
+  OCCT_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);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToPropagateVisualState)
 }
index 5d657189ee00ea1be594ac14606fa4eae249940a..6fda97c95428c8756cb656f5c76ae3a7a6aa7009 100644 (file)
@@ -480,7 +480,7 @@ public: //! @name simplified presentation properties API
   Standard_EXPORT virtual void UnsetAttributes();
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
 public: //! @name deprecated methods
 
index 190fc3b7e396fd36729afa1d6b265ad30b431bd1..fe14f583e0d79d444ab293f75c813aab5486d96d 100644 (file)
@@ -263,3 +263,19 @@ PrsMgr_Presentation::~PrsMgr_Presentation()
 {
   Erase();
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void PrsMgr_Presentation::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Graphic3d_Structure)
+
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myPresentableObject)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myBeforeHighlightState)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMode)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMustBeUpdated)
+}
index b91c2802c5d9bdb9d9bc7dfbb84bb78fde0440b2..85763463b4621aa87587bf4a22577dc863e0edbc 100644 (file)
@@ -80,6 +80,9 @@ public:
   //! Compute structure using presentation manager.
   Standard_EXPORT virtual void Compute() Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 protected:
 
   //! Main constructor.
index dfce9c34fe33f95f2789e14595915fc072ea9cc2..058fbf98dedf040cf8bb9b92fd76d450f75b4a7d 100644 (file)
@@ -2206,6 +2206,13 @@ public:
     return new XmlDrivers_DocumentStorageDriver ("Test");
   }
   virtual Standard_CString ResourcesName() Standard_OVERRIDE { return ""; }
+
+  //! Dumps the content of me into the stream
+  void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+  {
+    OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+    OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDocStd_Application)
+  }
 };
 
 //=======================================================================
index 69e94fdf28b49b2864e3b319d776577df23b6182..da131b8d21f7bc225baca5788c634a438598daa0 100644 (file)
@@ -3930,8 +3930,7 @@ void call_rgbhls (float r, float g, float b, float& h, float& l, float& s)
 //function : DumpJson
 //purpose  : 
 //=======================================================================
-void Quantity_Color::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
+void Quantity_Color::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, Quantity_Color);
   OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "RGB", 3, MyRed, MyGreen, MyBlue)
 }
index 914ef8b8e9b8f22977c075ff2a21b7f93d52987f..307ade37e988de12be29d1a1172d6f90576e4244 100644 (file)
@@ -265,7 +265,7 @@ Standard_Boolean operator == (const Quantity_Color& Other) const
   Standard_EXPORT static void Test();
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
 private:
 
index 3db480fa39ac768b77d2ba9ae08f170ab98a4304..422794053089c4ff4ee45fe47d4ee42ccf0056d3 100644 (file)
@@ -204,10 +204,7 @@ bool Quantity_ColorRGBA::ColorFromHex (const char* const   theHexColorString,
 //function : DumpJson
 //purpose  : 
 //=======================================================================
-void Quantity_ColorRGBA::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+void Quantity_ColorRGBA::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, Quantity_ColorRGBA);
-
-  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myRgb);
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAlpha);
+  OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "RGBA", 4, myRgb.Red(), myRgb.Green(), myRgb.Blue(), myAlpha)
 }
index a1e070962683571e8717580d13c22203f580d6cb..34b4584f335a220c56bc7f406bed8dde5b5f578b 100644 (file)
@@ -122,7 +122,7 @@ public:
                                             const bool          theAlphaComponentIsOff = false);
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
 private:
 
index bc7d0a9edf7ff7cb8799e03f8aad9a7221703e15..da64b3f32f9ba2f35cdf49e088380b128995aad1 100644 (file)
@@ -323,3 +323,15 @@ Standard_Integer Select3D_InteriorSensitivePointSet::NbSubElements()
 {
   return myPlanarPolygons.Length();
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void Select3D_InteriorSensitivePointSet::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveSet)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBndBox)
+}
index b9c7d658f2e03f742629e7b03f7dd820aee5bc6b..50dc0dfa7548d0c1bb654875ab03bb045662ee5c 100644 (file)
@@ -70,6 +70,9 @@ public:
   //! Returns the amount of points in set
   Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
   DEFINE_STANDARD_RTTIEXT(Select3D_InteriorSensitivePointSet,Select3D_SensitiveSet)
 
 protected:
index d5f169599bfd7acf2dd893f0f146f722c8dce970..9e8871374c36b547238626a20c19963f0ec32e8e 100644 (file)
@@ -120,3 +120,15 @@ Select3D_BndBox3d Select3D_SensitiveBox::BoundingBox()
 {
   return myBox;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  :
+//=======================================================================
+void Select3D_SensitiveBox::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveEntity)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBox)
+}
index 06f91d02c67f86e96687c8ee08abdf1542652939..dd5a9042f59db1c6ebf18b8ac38fbce26569b580 100644 (file)
@@ -70,6 +70,9 @@ public:
   //! transformation is set, it will be applied
   Standard_EXPORT virtual Select3D_BndBox3d BoundingBox() Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 private:
 
   Select3D_BndBox3d myBox;     //!< 3d coordinates of box corners
index c9550a6b245bd7ac888802fe54de7d483b061bee..9f88f5a559d357ef15e2396f806461fe7c7b04ff 100644 (file)
@@ -30,3 +30,26 @@ Select3D_SensitiveEntity::Select3D_SensitiveEntity (const Handle(SelectMgr_Entit
 {
   //
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  :
+//=======================================================================
+void Select3D_SensitiveEntity::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myOwnerId.get())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySFactor)
+
+  //OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, NbSubElements());
+
+  gp_Pnt aCenterOfGeometry = CenterOfGeometry();
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aCenterOfGeometry)
+
+  Standard_Boolean aHasInitLocation = HasInitLocation();
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aHasInitLocation)
+
+  gp_GTrsf anInvInitLocation = InvInitLocation();
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &anInvInitLocation)
+}
index 506acd516690ac56866e26f80488f9922302548b..6f34170e3c025c61d46c2f968b72446d09ef7e17 100644 (file)
@@ -91,6 +91,9 @@ public:
   //! Otherwise, returns identity matrix.
   virtual gp_GTrsf InvInitLocation() const { return gp_GTrsf(); }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 protected:
 
   Standard_EXPORT Select3D_SensitiveEntity (const Handle(SelectMgr_EntityOwner)& theOwnerId);
index 0ae25aed5b640e8794748c5cdd5363b4c93901ad..2371fe9fc6105ab2929bd89820bb5df45dde1d08 100644 (file)
@@ -143,3 +143,16 @@ Standard_Integer Select3D_SensitiveFace::NbSubElements()
 {
   return myFacePoints->NbSubElements();
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  :
+//=======================================================================
+void Select3D_SensitiveFace::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveEntity)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySensType)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myFacePoints.get())
+}
index 5567c9f07a2815522d3e71a1240a86855ad57366..4c01207dca100e793a1f97cd24cdb7ff234acba3 100644 (file)
@@ -73,6 +73,9 @@ public:
   //! Returns the amount of sub-entities (points or planar convex polygons)
   Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 private:
 
   Select3D_TypeOfSensitivity    mySensType;       //!< Type of sensitivity: interior or boundary
index d01499d6c3f29ab2c3eb4799e187bc739ad4c6e6..7b724891933b957b31b7a39454bdc0abb0725b02 100644 (file)
@@ -361,3 +361,24 @@ Standard_Real Select3D_SensitiveGroup::distanceToCOG (SelectBasics_SelectingVolu
 {
   return theMgr.DistToGeometryCenter (CenterOfGeometry());
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void Select3D_SensitiveGroup::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveSet)
+
+  for (Select3D_IndexedMapOfEntity::Iterator anIterator (myEntities); anIterator.More(); anIterator.Next())
+  {
+    const Handle(Select3D_SensitiveEntity)& anEntity = anIterator.Value();
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, anEntity.get())
+  }
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMustMatchAll)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToCheckOverlapAll)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBndBox)
+}
index 37efcf6cb0727041a3aa87cd302cbeac872b438b..47b55125ad38a6a949cc6cb42c52b2575610f4b7 100644 (file)
@@ -143,6 +143,9 @@ public:
   //! Returns the length of vector of sensitive entities
   Standard_EXPORT virtual Standard_Integer Size() const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 protected:
 
   //! Checks whether the entity with index theIdx overlaps the current selecting volume
index 39bca11760e908d2148e66007e106ec2168d2a6c..d0dd469f04cd3587a87a51d20360351dd953d0a0 100644 (file)
@@ -85,3 +85,13 @@ Standard_Integer Select3D_SensitivePoint::NbSubElements()
 {
   return 1;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  :
+//=======================================================================
+void Select3D_SensitivePoint::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveEntity)
+}
index a8c6e8c249d6d97904699b5fb5f927b74494c6df..ae0318bafa5461b3296d0b34283deaac92408654 100644 (file)
@@ -50,6 +50,9 @@ public:
   //! transformation is set, it will be applied
   Standard_EXPORT virtual Select3D_BndBox3d BoundingBox() Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 private:
 
   gp_Pnt myPoint;      //!< 3d coordinates of the point
index 61a02bf94bed4a1ecb0f1e02a0d94ab641b090a1..c8003c1c1d8f0c5c2e75d6260a01ed4461965549 100644 (file)
@@ -310,3 +310,16 @@ gp_Pnt Select3D_SensitivePoly::CenterOfGeometry() const
 
   return myCOG;
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void Select3D_SensitivePoly::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveSet)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBndBox)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsComputed)
+}
index e530093d114d9f9b2fa6a86a12214d751353017c..4184d30142503d3f0e29a8a3fdb2b72a1d5f325e 100644 (file)
@@ -92,6 +92,9 @@ public:
   Standard_EXPORT virtual void Swap (const Standard_Integer theIdx1,
                                      const Standard_Integer theIdx2) Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 protected:
 
   //! Checks whether the segment with index theIdx overlaps the current selecting volume
index 0671d58690636d369d79f021b89d1d88747b6de2..96e9922087689ef5f0df89763015f8f71772fa3d 100644 (file)
@@ -1218,3 +1218,35 @@ Standard_Boolean Select3D_SensitivePrimitiveArray::elementIsInside (SelectBasics
     }
   }
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void Select3D_SensitivePrimitiveArray::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveSet)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPosStride)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPrimType)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIndexLower)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIndexUpper)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPatchSizeMax)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPatchDistance)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIs3d)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myInitLocation)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBndBox)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMinDepthElem)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMinDepthNode)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMinDepthEdge)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDetectedElem)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDetectedNode)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDetectedEdgeNode1)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDetectedEdgeNode2)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToDetectElem)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToDetectNode)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToDetectEdge)
+}
index f579d7dc7a51320baa10d4cedd39586c928f13e6..9298dad375da70cbef70108ea4347371e97a6627 100644 (file)
@@ -197,6 +197,9 @@ public:
   //! Return the second node of last topmost detected edge or -1 if undefined (axis picking).
   Standard_Integer LastDetectedEdgeNode2() const { return myDetectedEdgeNode2; }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 public:
 
   //! Checks whether the sensitive entity is overlapped by current selecting volume.
index 8d51376315a9d9bd7da7523c246c8761f62fd7de..ea94ed00f181f09c4251d642404806f66f046a13 100644 (file)
@@ -102,3 +102,19 @@ Standard_Integer Select3D_SensitiveSegment::NbSubElements()
 {
   return 2;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  :
+//=======================================================================
+void Select3D_SensitiveSegment::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveEntity)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myStart)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myEnd)
+
+  Select3D_BndBox3d aBoundingBox = ((Select3D_SensitiveSegment*)this)->BoundingBox();
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aBoundingBox)
+}
index 3aefcca48fa254aa9e300bb12a2affdc283dfc77..7a8f33e98da69eac84980c7e15220db612739165 100644 (file)
@@ -70,6 +70,9 @@ public:
   //! changes the end point of the segment
   void EndPoint (const gp_Pnt& thePnt) { myEnd = thePnt; }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 private:
 
   gp_Pnt myStart;      //!< Start point
index 9ef3557b925ed59648bb66d8be3ce3c94bd061d1..3c2b460b1fb564272778608d744ec2d2e5f3fe29 100644 (file)
@@ -274,3 +274,20 @@ void Select3D_SensitiveSet::Clear()
 {
   //
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  :
+//=======================================================================
+void Select3D_SensitiveSet::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveEntity)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myContent)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDetectedIdx)
+
+  Select3D_BndBox3d aBoundingBox = ((Select3D_SensitiveSet*)this)->BoundingBox();
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aBoundingBox)
+}
index 76687d9c8c1049ada012cbb13e5d3de77ce40f0d..d211bf663684d2c12ae4cf95d56a75217bbcdddf 100644 (file)
@@ -96,6 +96,9 @@ public:
   //! Returns a number of nodes in 1 BVH leaf
   Standard_Integer GetLeafNodeSize() const { return myContent.Builder()->LeafNodeSize(); }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 protected:
 
   //! Checks whether one or more entities of the set overlap current selecting volume.
@@ -189,6 +192,10 @@ protected:
     //! Returns the tree built for set of sensitives
     const opencascade::handle<BVH_Tree<Standard_Real, 3> >& GetBVH() { return BVH(); }
 
+    //! Dumps the content of me into the stream
+    void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const
+    { (void)theOStream; (void)theDepth; }
+
   protected:
     Select3D_SensitiveSet* mySensitiveSet; //!< Set of sensitive entities
   };
index e5828bc9bc5377af2a54d8382cba4a3542a58941..2b14690632edb6b7f15d652385584e8cb798632f 100644 (file)
@@ -93,3 +93,22 @@ Select3D_BndBox3d Select3D_SensitiveTriangle::BoundingBox()
                                                  Max (myPoints[0].Z(), Max (myPoints[1].Z(), myPoints[2].Z())));
   return Select3D_BndBox3d (aMinPnt, aMaxPnt);
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  :
+//=======================================================================
+void Select3D_SensitiveTriangle::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveEntity)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySensType)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPoints[0])
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPoints[1])
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPoints[2])
+
+  Select3D_BndBox3d aBoundingBox = ((Select3D_SensitiveTriangle*)this)->BoundingBox();
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aBoundingBox)
+}
index a9e04da0302ba2719a33efc8eb4f21b54fdc09d5..a1a08e188b85becd642ceed555a643621aa52574 100644 (file)
@@ -67,6 +67,9 @@ public:
 
   virtual gp_Pnt CenterOfGeometry() const Standard_OVERRIDE { return myCentroid; }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
   DEFINE_STANDARD_RTTIEXT(Select3D_SensitiveTriangle,Select3D_SensitiveEntity)
 
 private:
index 859019a73935d0c4f872818db6947bd02b611955..8bdb48282d85573257bba676961b1cc5610f6efb 100644 (file)
@@ -443,3 +443,19 @@ gp_GTrsf Select3D_SensitiveTriangulation::InvInitLocation() const
 {
   return myInvInitLocation;
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void Select3D_SensitiveTriangulation::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveSet)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTriangul.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myInitLocation)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySensType)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPrimitivesNb)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBndBox)
+}
index 2d384f344d5c39e8ac524eab29c68a114e9e1b70..d25500f2fbff492c78083b5e0b3a01aa437ccf5c 100644 (file)
@@ -93,6 +93,9 @@ public:
 
   const TopLoc_Location& GetInitLocation() const { return myInitLocation; }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 protected:
 
   //! Inner function for transformation application to bounding
index 6f0128b3e5434b880a6d080e94cbe01f6944e166..d979d58f4277579f03a2442c0dc1951b5914d505 100644 (file)
@@ -226,3 +226,20 @@ gp_Pnt Select3D_SensitiveWire::CenterOfGeometry() const
 {
   return myCenter;
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void Select3D_SensitiveWire::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveSet)
+
+  for (NCollection_Vector<Handle(Select3D_SensitiveEntity)>::Iterator anIterator (myEntities); anIterator.More(); anIterator.Next())
+  {
+    const Handle(Select3D_SensitiveEntity)& anEntity = anIterator.Value();
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, anEntity.get())
+  }
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBndBox)
+}
index 3b4f76e95a4cc3e03689a31180f5407de54e2700..6751d801d0986226b8193324bf8dfe3642196d17 100644 (file)
@@ -68,6 +68,9 @@ public:
   Standard_EXPORT virtual void Swap (const Standard_Integer theIdx1,
                                      const Standard_Integer theIdx2) Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
   DEFINE_STANDARD_RTTIEXT(Select3D_SensitiveWire,Select3D_SensitiveSet)
 
 protected:
index eb93e1c8998ecac1c812db179a9013cb9fa95391..7fe6dd7ca5edb177bfd3118a03afbafd8ee86533 100644 (file)
@@ -20,6 +20,7 @@
 #include <gp_Pnt.hxx>
 #include <TColgp_HArray1OfPnt.hxx>
 #include <SelectBasics_PickResult.hxx>
+#include <Standard_Dump.hxx>
 
 class Bnd_Box;
 class gp_Pnt;
@@ -116,6 +117,10 @@ public:
   //! Ax + By + Cz + D = 0) to the given vector
   virtual void GetPlanes (NCollection_Vector<NCollection_Vec4<Standard_Real> >& thePlaneEquations) const = 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_NUMERICAL (theOStream, myActiveSelectionType) }
+
 protected:
   SelectionType myActiveSelectionType;      //!< Active selection type: point, box or polyline
 };
index 3a1c3643b669422039e14d316b416791f80640c1..ffc984f77ad56f8bae9217a743265f834dc66ac4 100644 (file)
@@ -254,12 +254,12 @@ gp_Pnt SelectMgr_BaseFrustum::DetectedPoint (const Standard_Real /*theDepth*/) c
 //function : DumpJson
 //purpose  : 
 //=======================================================================
-void SelectMgr_BaseFrustum::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
+void SelectMgr_BaseFrustum::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, SelectMgr_BaseFrustum);
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
 
-  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);
+  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 9295db486ddc3fc817b29681447153366de307d7..05e82ebad94611e0f8f511dea19ab72a49ce5c5b 100644 (file)
@@ -174,7 +174,7 @@ public:
   }
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
   DEFINE_STANDARD_RTTIEXT(SelectMgr_BaseFrustum,Standard_Transient)
 
index ed1cedb3c50fe86cfb7a66b9491918592a33b8eb..357684c0c81e41e6acbe7551cbafbd3436ebe066 100644 (file)
@@ -87,12 +87,14 @@ void SelectMgr_EntityOwner::HilightWithColor (const Handle(PrsMgr_PresentationMa
 // function : DumpJson
 // purpose  :
 // =======================================================================
-void SelectMgr_EntityOwner::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
+void SelectMgr_EntityOwner::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, SelectMgr_EntityOwner);
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
 
-  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);
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, this)
+
+  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 8e59aa12cfb23601277b2cbe9cc4400b6a37e870..dfe1bbb7f883aad41ccf7bfc80f12a06f505165d 100644 (file)
@@ -188,7 +188,7 @@ public:
   void SetComesFromDecomposition (const Standard_Boolean theIsFromDecomposition) { myFromDecomposition = theIsFromDecomposition; }
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
 public:
 
index cedd1c00d3c6f056ed42f1722b9a96104a4efdb5..b5806de0bfab3f0b7e2b8a1759bd7cfd941b4a9d 100644 (file)
@@ -553,11 +553,21 @@ const Handle(SelectMgr_EntityOwner)& SelectMgr_SelectableObject::GetAssemblyOwne
 // function : DumpJson
 // purpose  :
 // =======================================================================
-void SelectMgr_SelectableObject::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+void SelectMgr_SelectableObject::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, SelectMgr_SelectableObject);
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
 
-  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, PrsMgr_PresentableObject);
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myGlobalSelMode);
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAutoHilight);
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, PrsMgr_PresentableObject)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySelectionPrs.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myHilightPrs.get())
+
+  for (SelectMgr_SequenceOfSelection::Iterator anIterator (myselections); anIterator.More(); anIterator.Next())
+  {
+    const Handle(SelectMgr_Selection)& aSelection = anIterator.Value();
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aSelection.get())
+  }
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myGlobalSelMode)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAutoHilight)
 }
index 73885090a2d4d6b0916698f8cc4010e32ddd8cc3..d8e0e1b87778f188abdc1f4fd72c04d8ddeef564 100644 (file)
@@ -170,7 +170,7 @@ public:
   Standard_EXPORT virtual const Handle(SelectMgr_EntityOwner)& GetAssemblyOwner() const;
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 public:
 
index 68c8060da943739f3c1aa9499297b27a8a9d6910..15be832ffd207ffc0a0aba24067c0715e2abb412 100644 (file)
@@ -389,3 +389,29 @@ void SelectMgr_SelectableObjectSet::MarkDirty()
   myIsDirty[BVHSubset_3dPersistent] = Standard_True;
   myIsDirty[BVHSubset_2dPersistent] = Standard_True;
 }
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void SelectMgr_SelectableObjectSet::DumpJson (Standard_OStream& theOStream, Standard_Integer) const 
+{
+  for (Standard_Integer aSubsetIdx = 0; aSubsetIdx < BVHSubsetNb; ++aSubsetIdx)
+  {
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aSubsetIdx)
+
+    Standard_Boolean IsDirty = myIsDirty[aSubsetIdx];
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsDirty)
+
+    for (NCollection_IndexedMap<Handle(SelectMgr_SelectableObject)>::Iterator anObjectIt (myObjects[aSubsetIdx]);
+         anObjectIt.More(); anObjectIt.Next())
+    {
+      const Handle(SelectMgr_SelectableObject)& SelectableObject = anObjectIt.Value();
+      OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, SelectableObject.get())
+    }
+
+    TCollection_AsciiString separator;
+    OCCT_DUMP_FIELD_VALUE_STRING (theOStream, separator)
+  }
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLastWidth)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLastHeight)
+}
index 242abdc7e3950dd357ef86d55f7d5abeb526d778..2925e42b427c7ca03df55d0883809b842c0c5c94 100644 (file)
@@ -180,6 +180,9 @@ public:
     return myBVH[theSubset];
   }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 private:
 
   //! Returns an appropriate subset of theObject given depending on its persistence type.
index 2ef7b60606271913821f9b39f1c21b8d5ff6566d..03cbffa88f1517b4d3934add82f78e34887c775e 100644 (file)
@@ -14,6 +14,7 @@
 // commercial license or contractual agreement.
 
 #include <SelectMgr_SelectingVolumeManager.hxx>
+#include <Standard_Dump.hxx>
 
 //=======================================================================
 // function : SelectMgr_SelectingVolumeManager
@@ -482,3 +483,24 @@ void SelectMgr_SelectingVolumeManager::SetViewClipping (const SelectMgr_Selectin
   myObjectClipPlanes = theOther.myObjectClipPlanes;
   myViewClipRange    = theOther.myViewClipRange;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void SelectMgr_SelectingVolumeManager::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const 
+{
+  OCCT_DUMP_CLASS_BEGIN (theOStream, SelectMgr_SelectingVolumeManager)
+
+  for (Standard_Integer anIdx = 0; anIdx < VolumeTypesNb; ++anIdx)
+  {
+    const Handle(SelectMgr_BaseFrustum)& aSelectingVolume = mySelectingVolumes[anIdx];
+    OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, aSelectingVolume.get())
+  }
+
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myViewClipPlanes.get())
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myObjectClipPlanes.get())
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myViewClipRange)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToAllowOverlap)
+}
index d0d0ddc67395c93043f5c47bb7d474cbd34f1b5e..cac10e90dcd65ac132a4b14c462a0ac3490a0fd7 100644 (file)
@@ -236,6 +236,9 @@ public:
     return mySelectingVolumes[myActiveSelectionType / 2]->GetPlanes (thePlaneEquations);
   }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 private:
   enum { Frustum, FrustumSet, VolumeTypesNb };       //!< Defines the amount of available selecting volumes
 
index b42881df730cacab862407868f44a43a9604d0ff..c9e7f764066394f5ec121177806ce6d6c1fd0828 100644 (file)
@@ -116,3 +116,25 @@ void SelectMgr_Selection::SetSensitivity (const Standard_Integer theNewSens)
     anEntity->BaseSensitive()->SetSensitivityFactor (theNewSens);
   }
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void SelectMgr_Selection::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator anIterator (myEntities); anIterator.More(); anIterator.Next())
+  {
+    const Handle(SelectMgr_SensitiveEntity)& anEntity = anIterator.Value();
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, anEntity.get())
+  }
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMode)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySelectionState)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySensFactor)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myUpdateStatus)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myBVHUpdateStatus)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsCustomSens)
+}
index 1287306fb04d020f82e9bf35e84c755132a0d149..d21f9e6601532f4c2b9e67ea07b229c9dcae16a2 100644 (file)
@@ -139,6 +139,9 @@ public:
   //! proper updates use SelectMgr_SelectionManager::SetSelectionSensitivity method.
   Standard_EXPORT void SetSensitivity (const Standard_Integer theNewSens);
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 private:
 
   NCollection_Vector<Handle(SelectMgr_SensitiveEntity)> myEntities;
index bad38d0619c77a3a831edd4c0ce750f06cc98945..18eb572f8a623e94e7b5b83e99aa48165ab0cd4a 100644 (file)
@@ -39,3 +39,15 @@ void SelectMgr_SensitiveEntity::Clear()
   mySensitive->Clear();
   mySensitive.Nullify();
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void SelectMgr_SensitiveEntity::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySensitive.get())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsActiveForSelection)
+}
index 02e084f857ffb3c4440528253e5374c1abb28c61..eacf12b605d2c6fdabe1000a95237b78b1519b3b 100644 (file)
@@ -47,6 +47,9 @@ public:
   //! Marks entity as active for selection
   void SetActiveForSelection() const { myIsActiveForSelection = Standard_True; }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
   DEFINE_STANDARD_RTTIEXT(SelectMgr_SensitiveEntity,Standard_Transient) // Type definition
 
 private:
index 57fd7680b91c5c57065f1ca7fdca08d14b287e2e..c42f2c98e5c98b8c851acce4c1feb9e2c3a2c238 100644 (file)
@@ -107,13 +107,14 @@ void SelectMgr_ViewClipRange::AddClippingPlanes (const Graphic3d_SequenceOfHClip
 // function : DumpJson
 // purpose  :
 // =======================================================================
-void SelectMgr_ViewClipRange::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+void SelectMgr_ViewClipRange::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, SelectMgr_ViewClipRange);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, SelectMgr_ViewClipRange)
 
-  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myUnclipRange);
   for (size_t aRangeIter = 0; aRangeIter < myClipRanges.size(); ++aRangeIter)
   {
-    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myClipRanges[aRangeIter]);
+    Bnd_Range aClipRange = myClipRanges[aRangeIter];
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aClipRange)
   }
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myUnclipRange)
 }
index 16e5949778d9d0926b31fecc7932366cc8019a3d..8030d37a3131b9b3e48697ccdf044db8e5d0af54 100644 (file)
@@ -120,7 +120,7 @@ public:
   void AddClipSubRange (const Bnd_Range& theRange) { myClipRanges.push_back (theRange); }
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
 private:
 
index 998f4b7f62c2197b6acc932e9ccc4c06bc08b833..155ec2d22b85c551a89dfabafb9ae40312b597a9 100644 (file)
@@ -1091,21 +1091,38 @@ void SelectMgr_ViewerSelector::QueueBVHBuild (const Handle(Select3D_SensitiveEnt
 //function : DumpJson
 //purpose  : 
 //=======================================================================
-void SelectMgr_ViewerSelector::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const 
+void SelectMgr_ViewerSelector::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const 
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, SelectMgr_ViewerSelector);
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
 
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, preferclosest);
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToUpdateTolerance);
-  OCCT_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;
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, &mySelectingVolumeMgr)
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, &mySelectableObjects)
+
+  Standard_Integer aNbOfSelectableObjects = 0;
   for (SelectMgr_SelectableObjectSet::Iterator aSelectableIt (mySelectableObjects); aSelectableIt.More(); aSelectableIt.Next())
   {
-    aNbOfSelected++;
+    aNbOfSelectableObjects++;
   }
-  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());
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aNbOfSelectableObjects)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerances.Tolerance())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerances.CustomTolerance())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myZLayerOrderMap.Extent())
+
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myEntitySetBuilder.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCameraEye)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCameraDir)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCameraScale)
+
+  if (!myIndexes.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIndexes->Size())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCurRank)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsLeftChildQueuedFirst)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myEntityIdx)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMapOfObjectSensitives.Extent())
 }
index eca84c9f056bdc92a4355a8f0acac6d267479b86..077eef8aacd6d83ef846843d839a645946aae4fc 100644 (file)
@@ -211,7 +211,7 @@ public:
   Standard_EXPORT void AllowOverlapDetection (const Standard_Boolean theIsToAllow);
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
 public:
 
index c440561a242f7d1155da76fed70a64771e7b43e1..e897901d97b5f866d722e764d5e03cb6e17f66a7 100644 (file)
 
 #include <stdarg.h>
 
-// =======================================================================
-// function : Constructor
-// purpose :
-// =======================================================================
-Standard_DumpSentry::Standard_DumpSentry (Standard_OStream& theOStream, const char* theClassName)
-: myOStream (&theOStream)
-{
-  (*myOStream) << "\"" << theClassName << "\": {";
-}
-
-// =======================================================================
-// function : Destructor
-// purpose :
-// =======================================================================
-Standard_DumpSentry::~Standard_DumpSentry()
-{
-  (*myOStream) << "}";
-}
-
 // =======================================================================
 // function : AddValuesSeparator
 // purpose :
@@ -43,7 +24,7 @@ void Standard_Dump::AddValuesSeparator (Standard_OStream& theOStream)
   Standard_SStream aStream;
   aStream << theOStream.rdbuf();
   TCollection_AsciiString aStreamStr = Standard_Dump::Text (aStream);
-  if (!aStreamStr.EndsWith ("{"))
+  if (!aStreamStr.IsEmpty() && !aStreamStr.EndsWith ("{"))
     theOStream << ", ";
 }
 
@@ -52,7 +33,7 @@ void Standard_Dump::AddValuesSeparator (Standard_OStream& theOStream)
 //purpose  : 
 //=======================================================================
 void Standard_Dump::DumpKeyToClass (Standard_OStream& theOStream,
-                                    const char* theKey,
+                                    const TCollection_AsciiString& theKey,
                                     const TCollection_AsciiString& theField)
 {
   AddValuesSeparator (theOStream);
@@ -112,6 +93,9 @@ TCollection_AsciiString Standard_Dump::GetPointerInfo (const Handle(Standard_Tra
 // =======================================================================
 TCollection_AsciiString Standard_Dump::GetPointerInfo (const void* thePointer, const bool isShortInfo)
 {
+  if (!thePointer)
+    return TCollection_AsciiString();
+
   std::ostringstream aPtrStr;
   aPtrStr << thePointer;
   if (!isShortInfo)
@@ -133,17 +117,35 @@ TCollection_AsciiString Standard_Dump::GetPointerInfo (const void* thePointer, c
 // =======================================================================
 // DumpFieldToName
 // =======================================================================
-const char* Standard_Dump::DumpFieldToName (const char* theField)
+TCollection_AsciiString Standard_Dump::DumpFieldToName (const TCollection_AsciiString& theField)
 {
-  const char* aName = theField;
+  TCollection_AsciiString aName = theField;
+  if (theField.StartsWith ('&'))
+  {
+    aName.Remove (1, 1);
+  }
 
-  if (aName[0] == '&')
+  if (aName.Length() > 1 && aName.Value (1) == 'a')
   {
-    aName = aName + 1;
+    if (aName.Length() > 2 && aName.Value (2) == 'n')
+    {
+      aName.Remove (1, 2);
+    }
+    else
+     aName.Remove (1, 1);
+  }
+  else if (aName.Length() > 2 && ::LowerCase (aName.Value (1)) == 'm' && aName.Value (2) == 'y')
+  {
+    aName.Remove (1, 2);
   }
-  if (::LowerCase (aName[0]) == 'm' && aName[1] == 'y')
+
+  if (aName.EndsWith (".get()"))
+  {
+    aName = aName.SubString (1, aName.Length() - TCollection_AsciiString (".get()").Length());
+  }
+  else if (aName.EndsWith ("()"))
   {
-    aName = aName + 2;
+    aName = aName.SubString (1, aName.Length() - TCollection_AsciiString ("()").Length());
   }
   return aName;
 }
@@ -222,3 +224,270 @@ TCollection_AsciiString Standard_Dump::FormatJson (const Standard_SStream& theSt
   }
   return aText;
 }
+
+// =======================================================================
+// SplitJson
+// =======================================================================
+Standard_Boolean Standard_Dump::SplitJson (const TCollection_AsciiString& theStreamStr,
+                                           NCollection_IndexedDataMap<TCollection_AsciiString, Standard_DumpValue>& theKeyToValues)
+{
+  Standard_Integer aNextIndex = 1;
+  while (aNextIndex < theStreamStr.Length())
+  {
+    Standard_JsonKey aKey = Standard_JsonKey_None;
+    if (!jsonKey (theStreamStr, aNextIndex, aNextIndex, aKey))
+      return Standard_False;
+
+    Standard_Boolean aProcessed = Standard_False;
+    switch (aKey)
+    {
+      case Standard_JsonKey_Quote:
+      {
+        aProcessed = splitKeyToValue (theStreamStr, aNextIndex, aNextIndex, theKeyToValues);
+        break;
+      }
+      case Standard_JsonKey_OpenChild:
+      {
+        Standard_Integer aStartIndex = aNextIndex;
+        Standard_Integer aClosePos = nextClosePosition (theStreamStr, aStartIndex, Standard_JsonKey_OpenChild, Standard_JsonKey_CloseChild);
+        if (aClosePos == 0)
+          return Standard_False;
+
+        TCollection_AsciiString aSubStreamStr = theStreamStr.SubString (aStartIndex + JsonKeyLength (aKey), aNextIndex - 2);
+        if (!SplitJson (aSubStreamStr, theKeyToValues))
+          return Standard_False;
+
+        aNextIndex = aClosePos + Standard_Integer (JsonKeyLength (Standard_JsonKey_CloseChild));
+        break;
+      }
+      case Standard_JsonKey_SeparatorValueToValue:
+      {
+        continue;
+      }
+      default:
+        break;
+    }
+    if (!aProcessed)
+      return Standard_False;
+  }
+  return Standard_True;
+}
+
+// =======================================================================
+// HierarchicalValueIndices
+// =======================================================================
+NCollection_List<Standard_Integer> Standard_Dump::HierarchicalValueIndices (
+    const NCollection_IndexedDataMap<TCollection_AsciiString, TCollection_AsciiString>& theValues)
+{
+  NCollection_List<Standard_Integer> anIndices;
+
+  for (Standard_Integer anIndex = 1; anIndex <= theValues.Extent(); anIndex++)
+  {
+    if (HasChildKey (theValues.FindFromIndex (anIndex)))
+      anIndices.Append (anIndex);
+  }
+  return anIndices;
+}
+
+// =======================================================================
+// splitKeyToValue
+// =======================================================================
+Standard_Boolean Standard_Dump::splitKeyToValue (const TCollection_AsciiString& theStreamStr,
+                                                 Standard_Integer theStartIndex,
+                                                 Standard_Integer& theNextIndex,
+                                                 NCollection_IndexedDataMap<TCollection_AsciiString, Standard_DumpValue>& theValues)
+{
+  // find key value: "key"
+  Standard_Integer aStartIndex = theStartIndex;
+  Standard_Integer aCloseIndex = nextClosePosition (theStreamStr, aStartIndex + 1, Standard_JsonKey_None, Standard_JsonKey_Quote);
+  if (aCloseIndex == 0)
+    return Standard_False;
+
+  TCollection_AsciiString aSplitKey = theStreamStr.SubString (aStartIndex, aCloseIndex - 1);
+
+  // key to value
+  aStartIndex = aCloseIndex + 1;
+  Standard_JsonKey aKey = Standard_JsonKey_None;
+  if (!jsonKey (theStreamStr, aStartIndex, aCloseIndex, aKey))
+    return Standard_False;
+
+  // find value
+  aStartIndex = aCloseIndex;
+  aKey = Standard_JsonKey_None;
+  jsonKey (theStreamStr, aStartIndex, aCloseIndex, aKey);
+  aStartIndex = aCloseIndex;
+
+  TCollection_AsciiString aSplitValue;
+  theNextIndex = -1;
+  switch (aKey)
+  {
+    case Standard_JsonKey_OpenChild:
+    {
+      aCloseIndex = nextClosePosition (theStreamStr, aStartIndex, Standard_JsonKey_OpenChild, Standard_JsonKey_CloseChild);
+      if (aCloseIndex > aStartIndex)
+        aSplitValue = theStreamStr.SubString (aStartIndex, aCloseIndex);
+      theNextIndex = aCloseIndex + 1;
+      break;
+    }
+    case Standard_JsonKey_OpenContainer:
+    {
+      aCloseIndex = nextClosePosition (theStreamStr, aStartIndex, Standard_JsonKey_OpenContainer, Standard_JsonKey_CloseContainer);
+      if (aCloseIndex > aStartIndex)
+        aSplitValue = theStreamStr.SubString (aStartIndex, aCloseIndex - 1);
+      theNextIndex = aCloseIndex + 1;
+      break;
+    }
+    case Standard_JsonKey_Quote:
+    {
+      Standard_JsonKey aKeyTmp = Standard_JsonKey_None;
+      if (jsonKey (theStreamStr, aStartIndex, aCloseIndex, aKeyTmp) && aKeyTmp == Standard_JsonKey_Quote) // emptyValue
+      {
+        aSplitValue = "";
+        theNextIndex = aCloseIndex;
+      }
+      else
+      {
+        aCloseIndex = nextClosePosition (theStreamStr, aStartIndex + 1, Standard_JsonKey_None, Standard_JsonKey_Quote);
+        aSplitValue = theStreamStr.SubString (aStartIndex, aCloseIndex - 1);
+        theNextIndex = aCloseIndex + 1;
+      }
+      break;
+    }
+    case Standard_JsonKey_None:
+    {
+      if (aStartIndex == theStreamStr.Length())
+      {
+        aSplitValue = aStartIndex <= aCloseIndex ? theStreamStr.SubString (aStartIndex, aCloseIndex) : "";
+        aSplitValue = theStreamStr.SubString (aStartIndex, aCloseIndex);
+        aCloseIndex = aStartIndex;
+      }
+      else
+      {
+        Standard_Integer aCloseIndex1 = nextClosePosition (theStreamStr, aStartIndex, Standard_JsonKey_None, Standard_JsonKey_CloseChild) - 1;
+        Standard_Integer aCloseIndex2 = nextClosePosition (theStreamStr, aStartIndex, Standard_JsonKey_None, Standard_JsonKey_SeparatorValueToValue) - 1;
+        aCloseIndex = aCloseIndex1 < aCloseIndex2 ? aCloseIndex1 : aCloseIndex2;
+        aSplitValue = aStartIndex <= aCloseIndex ? theStreamStr.SubString (aStartIndex, aCloseIndex) : "";
+      }
+      theNextIndex = aCloseIndex + 1;
+      break;
+    }
+    default:
+      return Standard_False;
+  }
+
+  Standard_DumpValue aValue;
+  if (theValues.FindFromKey (aSplitKey, aValue))
+  {
+    Standard_Integer anIndex = 1;
+    // increment key until the new key does not exist in the container
+    TCollection_AsciiString anIndexedSuffix = TCollection_AsciiString ("_") + TCollection_AsciiString (anIndex);
+    while (theValues.FindFromKey (TCollection_AsciiString (aSplitKey + anIndexedSuffix), aValue))
+    {
+      anIndex++;
+      anIndexedSuffix = TCollection_AsciiString ("_") + TCollection_AsciiString (anIndex);
+    }
+    aSplitKey = aSplitKey + anIndexedSuffix;
+  }
+
+  theValues.Add (aSplitKey, Standard_DumpValue (aSplitValue, aStartIndex));
+  return Standard_True;
+}
+
+// =======================================================================
+// jsonKey
+// =======================================================================
+Standard_Boolean Standard_Dump::jsonKey (const TCollection_AsciiString& theStreamStr,
+                                         Standard_Integer theStartIndex,
+                                         Standard_Integer& theNextIndex,
+                                         Standard_JsonKey& theKey)
+{
+  TCollection_AsciiString aSubStreamStr = theStreamStr.SubString (theStartIndex, theStreamStr.Length());
+  for (Standard_Integer aKeyId = (Standard_Integer)Standard_JsonKey_OpenChild; aKeyId <= Standard_JsonKey_SeparatorValueToValue; aKeyId++)
+  {
+    Standard_JsonKey aKey = (Standard_JsonKey)aKeyId;
+    Standard_CString aKeyToStr = JsonKeyToString (aKey);
+    if (!aSubStreamStr.StartsWith (aKeyToStr))
+      continue;
+
+    theNextIndex = theStartIndex + Standard_Integer (JsonKeyLength (aKey));
+    theKey = aKey;
+    return Standard_True;
+  }
+  return Standard_False;
+}
+
+// =======================================================================
+// HasChildKey
+// =======================================================================
+Standard_Boolean Standard_Dump::HasChildKey (const TCollection_AsciiString& theSourceValue)
+{
+  return theSourceValue.Search (JsonKeyToString (Standard_JsonKey_SeparatorKeyToValue)) >= 0;
+}
+
+// =======================================================================
+// JsonKeyToString
+// =======================================================================
+Standard_CString Standard_Dump::JsonKeyToString (const Standard_JsonKey theKey)
+{
+  switch (theKey)
+  {
+    case Standard_JsonKey_None: return "";
+    case Standard_JsonKey_OpenChild: return "{";
+    case Standard_JsonKey_CloseChild: return "}";
+    case Standard_JsonKey_OpenContainer: return "[";
+    case Standard_JsonKey_CloseContainer: return "]";
+    case Standard_JsonKey_Quote: return "\"";
+    case Standard_JsonKey_SeparatorKeyToValue: return ": ";
+    case Standard_JsonKey_SeparatorValueToValue: return ", ";
+  }
+
+  return "";
+}
+
+// =======================================================================
+// JsonKeyLength
+// =======================================================================
+Standard_Integer Standard_Dump::JsonKeyLength (const Standard_JsonKey theKey)
+{
+  return (Standard_Integer)strlen (JsonKeyToString (theKey));
+}
+
+// =======================================================================
+// nextClosePosition
+// =======================================================================
+Standard_Integer Standard_Dump::nextClosePosition (const TCollection_AsciiString& theSourceValue,
+                                                   const Standard_Integer theStartPosition,
+                                                   const Standard_JsonKey theOpenKey,
+                                                   const Standard_JsonKey theCloseKey)
+{
+  Standard_CString anOpenKey = JsonKeyToString (theOpenKey);
+  Standard_CString aCloseKeyStr = JsonKeyToString (theCloseKey);
+
+  Standard_Integer aStartPos = theStartPosition;
+  Standard_Integer aDepthKey = 0;
+
+  while (aStartPos < theSourceValue.Length())
+  {
+    Standard_Integer anOpenKeyPos = theSourceValue.Location (anOpenKey, aStartPos, theSourceValue.Length());
+    Standard_Integer aCloseKeyPos = theSourceValue.Location (aCloseKeyStr, aStartPos, theSourceValue.Length());
+    if (aCloseKeyPos == 0)
+      break;
+
+    if (anOpenKeyPos != 0 && anOpenKeyPos <= aCloseKeyPos)
+    {
+      aDepthKey++;
+      aStartPos = anOpenKeyPos + 1;
+    }
+    else
+    {
+      if (aDepthKey == 0)
+        return aCloseKeyPos;
+      else
+      {
+        aDepthKey--;
+        aStartPos = aCloseKeyPos + 1;
+      }
+    }
+  }
+  return theSourceValue.Length();
+}
index ba5d4ae8782e98bdcee42c6fe055a26e55e0c20c..d9b56c824a1c14a82b6247e4b8096e8149dedc20 100644 (file)
 #ifndef _Standard_Dump_HeaderFile
 #define _Standard_Dump_HeaderFile
 
+#include <NCollection_IndexedDataMap.hxx>
+#include <NCollection_List.hxx>
 #include <Standard_SStream.hxx>
 #include <TCollection_AsciiString.hxx>
 
-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 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
@@ -50,14 +50,27 @@ class Standard_DumpSentry;
 //! 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 OCCT_DUMP_CLASS_BEGIN(theOStream, theName) \
-  Standard_DumpSentry aSentry (theOStream, OCCT_CLASS_NAME(theName));
+#define OCCT_DUMP_CLASS_BEGIN(theOStream, theField) \
+{ \
+  const char* className = OCCT_CLASS_NAME(theField); \
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, className) \
+}
+
+//! @def OCCT_DUMP_TRANSIENT_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 OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) \
+{ \
+  const char* className = get_type_name(); \
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, className) \
+}
 
 //! @def OCCT_DUMP_FIELD_VALUE_NUMERICAL
 //! Append into output value: "Name": Field
 #define OCCT_DUMP_FIELD_VALUE_NUMERICAL(theOStream, theField) \
 { \
-  const char* aName = Standard_Dump::DumpFieldToName (#theField); \
+  TCollection_AsciiString aName = Standard_Dump::DumpFieldToName (#theField); \
   Standard_Dump::AddValuesSeparator (theOStream); \
   theOStream << "\"" << aName << "\": " << theField; \
 }
@@ -66,7 +79,7 @@ class Standard_DumpSentry;
 //! Append into output value: "Name": "Field"
 #define OCCT_DUMP_FIELD_VALUE_STRING(theOStream, theField) \
 { \
-  const char* aName = Standard_Dump::DumpFieldToName (#theField); \
+  TCollection_AsciiString aName = Standard_Dump::DumpFieldToName (#theField); \
   Standard_Dump::AddValuesSeparator (theOStream); \
   theOStream << "\"" << aName << "\": \"" << theField << "\""; \
 }
@@ -75,11 +88,22 @@ class Standard_DumpSentry;
 //! Append into output value: "Name": "address of the pointer"
 #define OCCT_DUMP_FIELD_VALUE_POINTER(theOStream, theField) \
 { \
-  const char* aName = Standard_Dump::DumpFieldToName (#theField); \
+  TCollection_AsciiString aName = Standard_Dump::DumpFieldToName (#theField); \
   Standard_Dump::AddValuesSeparator (theOStream); \
   theOStream << "\"" << aName << "\": \"" << Standard_Dump::GetPointerInfo (theField) << "\""; \
 }
 
+//! @def OCCT_DUMP_FIELD_VALUE_STRING
+//! Append into output value: "Name": "Field"
+#define OCCT_DUMP_FIELD_VALUE_GUID(theOStream, theField) \
+{ \
+  TCollection_AsciiString aName = Standard_Dump::DumpFieldToName (#theField); \
+  Standard_Dump::AddValuesSeparator (theOStream); \
+  char aStr[Standard_GUID_SIZE_ALLOC]; \
+  theField.ToCString (aStr); \
+  theOStream << "\"" << aName << "\": \"" << aStr << "\""; \
+}
+
 //! @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.
@@ -88,12 +112,11 @@ class Standard_DumpSentry;
 //! Depth = -1 is the default value, dump here is unlimited.
 #define OCCT_DUMP_FIELD_VALUES_DUMPED(theOStream, theDepth, theField) \
 { \
-  if (theDepth != 0) \
+  if (theDepth != 0 && (void*)(theField) != NULL) \
   { \
     Standard_SStream aFieldStream; \
-    if ((theField) != NULL) \
-      (theField)->DumpJson (aFieldStream, theDepth - 1); \
-    const char* aName = Standard_Dump::DumpFieldToName (#theField); \
+    (theField)->DumpJson (aFieldStream, theDepth - 1); \
+    TCollection_AsciiString aName = Standard_Dump::DumpFieldToName (#theField); \
     Standard_Dump::DumpKeyToClass (theOStream, aName, Standard_Dump::Text (aFieldStream)); \
   } \
 }
@@ -130,10 +153,8 @@ class Standard_DumpSentry;
 { \
   if (theDepth != 0) \
   { \
-    Standard_SStream aFieldStream; \
-    theField::DumpJson (aFieldStream, theDepth - 1); \
-    const char* aName = Standard_Dump::DumpFieldToName (#theField); \
-    Standard_Dump::DumpKeyToClass (theOStream, aName, Standard_Dump::Text (aFieldStream)); \
+    Standard_Dump::AddValuesSeparator (theOStream); \
+    theField::DumpJson (theOStream, theDepth - 1); \
   } \
 }
 
@@ -143,26 +164,34 @@ class Standard_DumpSentry;
 //! 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 << "\"" << OCCT_CLASS_NAME(theName) << "\": ["; \
+  Standard_Dump::AddValuesSeparator (theOStream); \
+  theOStream << "\"" << theName << "\": ["; \
   Standard_Dump::DumpRealValues (theOStream, theCount, __VA_ARGS__);\
   theOStream << "]"; \
 }
 
-//! @brief Simple sentry class providing convenient interface to dump.
-//! Appends start and last rows in dump with class name key.
-//! An example of the using: for ClassName, the result is: "ClassName" { ... }
-//! Create instance of that class in the first row of Dump.
-class Standard_DumpSentry
+//! Kind of key in Json string
+enum Standard_JsonKey
 {
-public:
-  //! Constructor - add parameters of start class name definition in the stream
-  Standard_EXPORT Standard_DumpSentry (Standard_OStream& theOStream, const char* theClassName);
+  Standard_JsonKey_None, //!< no key
+  Standard_JsonKey_OpenChild, //!< "{"
+  Standard_JsonKey_CloseChild, //!< "}"
+  Standard_JsonKey_OpenContainer, //!< "["
+  Standard_JsonKey_CloseContainer, //!< "]"
+  Standard_JsonKey_Quote, //!< "\""
+  Standard_JsonKey_SeparatorKeyToValue, //!< ": "
+  Standard_JsonKey_SeparatorValueToValue //!< ", "
+};
 
-  //! Destructor - add parameters of stop class name definition in the stream
-  Standard_EXPORT ~Standard_DumpSentry();
+//! Type for storing a dump value with the stream position
+struct Standard_DumpValue
+{
+  Standard_DumpValue() : myStartPosition (0) {}
+  Standard_DumpValue (const TCollection_AsciiString& theValue, const Standard_Integer theStartPos)
+    : myValue (theValue), myStartPosition (theStartPos) {}
 
-private:
-  Standard_OStream* myOStream; //!< modified stream
+  TCollection_AsciiString myValue; //!< current string value
+  Standard_Integer myStartPosition; //!< position of the value first char in the whole stream
 };
 
 //! This interface has some tool methods for stream (in JSON format) processing.
@@ -183,12 +212,39 @@ public:
   //! @return text presentation
   Standard_EXPORT static TCollection_AsciiString FormatJson (const Standard_SStream& theStream, const Standard_Integer theIndent = 3);
 
-  //! Add Json values separator if the stream last symbol is not an open brace.
+  //! Converts stream into map of values. Values are not empty if the stream contains at least two values.
+  //!
+  //! The one level stream example: <class_name>key_1\value_1\key_2\value_2</class_name>
+  //! In output: theStreamKey equals class_name, theValues contains key_1, value_1, key_2, and value_2.
+  //!
+  //! Two level stream example: <class_name>key_1\value_1\key_2\value_2\key_3<subclass_name>subclass_key_1\subclass_value1</subclass_name></class_name>
+  //! In output: theStreamKey equals class_name, theValues contains key_1, value_1, key_2, and value_2, key_3 and
+  //! <subclass_name>subclass_key_1\subclass_value1</subclass_name>.
+  //! The last value might be processed later using the same method.
+  //!
+  //! @param theStream stream value
+  //! @param theKeyToValues [out] container of split values
+  Standard_EXPORT static Standard_Boolean SplitJson (const TCollection_AsciiString& theStreamStr,
+                                                     NCollection_IndexedDataMap<TCollection_AsciiString, Standard_DumpValue>& theKeyToValues);
+
+  //! Returns container of indices in values, that has hierarchical value
+  Standard_EXPORT static NCollection_List<Standard_Integer> HierarchicalValueIndices (
+    const NCollection_IndexedDataMap<TCollection_AsciiString, TCollection_AsciiString>& theValues);
+
+  //! Returns true if the value has bracket key
+  Standard_EXPORT static Standard_Boolean HasChildKey (const TCollection_AsciiString& theSourceValue);
+
+  //! Returns key value for enum type
+  Standard_EXPORT static Standard_CString JsonKeyToString (const Standard_JsonKey theKey);
+
+  //! Returns length value for enum type
+  Standard_EXPORT static Standard_Integer JsonKeyLength (const Standard_JsonKey theKey);
+
   //! @param theStream source value
   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"; }
+  static TCollection_AsciiString GetPointerPrefix() { return "0x"; }
 
   //! Convert handle pointer to address of the pointer. If the handle is NULL, the result is an empty string.
   //! @param thePointer a pointer
@@ -209,7 +265,7 @@ public:
   //! @param theKey a source value
   //! @param theField stream value
   Standard_EXPORT static void DumpKeyToClass (Standard_OStream& theOStream,
-                                              const char* theKey,
+                                              const TCollection_AsciiString& theKey,
                                               const TCollection_AsciiString& theField);
 
   //! Unite values in one value using template: "value_1", "value_2", ..., "value_n"
@@ -226,7 +282,35 @@ 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 const char* DumpFieldToName (const char* theField);
+  Standard_EXPORT static TCollection_AsciiString DumpFieldToName (const TCollection_AsciiString& theField);
+
+private:
+  //! Extracts from the string value a pair (key, value), add it into output container, update index value
+  //! Example:
+  //! stream string starting the index position contains: ..."key": <value>...
+  //! a pair key, value will be added into theValues
+  //! at beginning theIndex is the position of the quota before <key>, after the index is the next position after the value
+  //! splitDumped(aString) gives theSplitValue = "abc", theTailValue = "defg", theKey = "key"
+  Standard_EXPORT static Standard_Boolean splitKeyToValue (const TCollection_AsciiString& theStreamStr,
+                                                           Standard_Integer theStartIndex,
+                                                           Standard_Integer& theNextIndex,
+                                                           NCollection_IndexedDataMap<TCollection_AsciiString, Standard_DumpValue>& theValues);
+
+
+  //! Returns key of json in the index position. Incement the index position to the next symbol in the row
+  Standard_EXPORT static Standard_Boolean jsonKey (const TCollection_AsciiString& theStreamStr,
+                                                   Standard_Integer theStartIndex,
+                                                   Standard_Integer& theNextIndex,
+                                                   Standard_JsonKey& theKey);
+
+  //! Find position in the source string of the symbol close after the start position.
+  //! Ignore combination <symbol open> ... <symbol close> between the close symbol.
+  //! Example, for case ... { ... { ... } ...} ... } it returns the position of the forth brace
+  Standard_EXPORT static Standard_Integer nextClosePosition (const TCollection_AsciiString& theSourceValue,
+                                                             const Standard_Integer theStartPosition,
+                                                             const Standard_JsonKey theCloseKey,
+                                                             const Standard_JsonKey theOpenKey);
+
 };
 
 #endif // _Standard_Dump_HeaderFile
index d601d2080cbe614ea55169e7b1a50112fdfb1c00..f86641e8ef6a51ca97ddb7ea2f3cfb27aa795188 100644 (file)
@@ -182,3 +182,17 @@ void StdSelect_BRepOwner::UpdateHighlightTrsf (const Handle(V3d_Viewer)& theView
 
   theManager->UpdateHighlightTrsf (theViewer, Selectable(), theDispMode, myPrsSh);
 }
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void StdSelect_BRepOwner::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myShape)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPrsSh.get())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCurMode)
+}
index 3e52352418abdb6de6b29ac16b84042f04d113fd..3df108af0d17a1de70682950c433033caac26afe 100644 (file)
@@ -117,6 +117,9 @@ public:
                                                     const Handle(PrsMgr_PresentationManager3d)& theManager,
                                                     const Standard_Integer theDispMode) Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 protected:
 
   TopoDS_Shape myShape;
index 5293d3706a08b47753a664c96d3d81fe5b99f77a..aa20ba5f06f25a8b4eedcb0fc425186cea47338e 100644 (file)
@@ -71,3 +71,12 @@ void StdSelect_Shape::Compute(const Handle(Prs3d_Projector)& aProjector,
 {
   PrsMgr_PresentableObject::Compute(aProjector,aPresentation);
 }
+
+void StdSelect_Shape::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, PrsMgr_PresentableObject)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &mysh)
+}
index f6ebdd44c489047b3c7ba58ead05fe2b73076fd4..d3bb771ee7e8902ddff7c6e0a89023cbbb281cc7 100644 (file)
@@ -46,6 +46,9 @@ public:
 
   void Shape (const TopoDS_Shape& theShape) { mysh = theShape; }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 private:
 
   Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
index 51a5286e32512f904d8e005c7aa71a938f0c1850..0bd818ba30cc148f13f2eb3e5c0f3fc03d7cd38b 100644 (file)
@@ -1086,3 +1086,19 @@ Standard_Boolean StdSelect_ViewerSelector3d::ToPixMap (Image_PixMap&
   aFiller->Flush();
   return Standard_True;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void StdSelect_ViewerSelector3d::DumpJson (Standard_OStream& theOStream, Standard_Integer) const 
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myStructs.Length())
+  for (Graphic3d_SequenceOfStructure::Iterator aStructsIt (myStructs); aStructsIt.More(); aStructsIt.Next())
+  {
+    const Handle(Graphic3d_Structure)& aStructure = aStructsIt.Value();
+    OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, aStructure)
+  }
+}
index 6004c9aa70504e1bbf7b21caa7ac1e48dd644f12..9496cb5866ebf45af8d352d1943eba7951a9dcac 100644 (file)
@@ -93,6 +93,9 @@ public:
                                          const Handle(V3d_View)& theView,
                                          const Standard_Boolean theToClearOthers = Standard_True);
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
   DEFINE_STANDARD_RTTIEXT(StdSelect_ViewerSelector3d,SelectMgr_ViewerSelector)
 
 protected:
index 524f6f3d2fdf55156505eb9f987f2dc5c1a5c5f5..c0eaf85b76b58c811cc2455b698ea23b35b27da0 100644 (file)
@@ -19,6 +19,7 @@
 //             0.0     Feb  7 1997     Creation
 
 #include <Standard_DomainError.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_ImmutableObject.hxx>
 #include <Standard_Type.hxx>
@@ -405,3 +406,22 @@ void TDF_Attribute::ExtendedDump
  TDF_AttributeIndexedMap& /*aMap*/) const
 { Dump(anOS); }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDF_Attribute::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  TCollection_AsciiString aLabel;
+  TDF_Tool::Entry (Label(), aLabel);
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aLabel)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTransaction)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySavedTransaction)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFlags)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myNext.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myBackup.get())
+}
index 69289dc98042454f4132624aa32c5c7901c3829a..7c8574642429c26531c159213b5e4662cf354a3b 100644 (file)
@@ -372,6 +372,9 @@ Standard_OStream& operator<< (Standard_OStream& anOS) const
   //! Should be private.
   Standard_EXPORT void Forget (const Standard_Integer aTransaction);
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 
 friend class TDF_Data;
 friend class TDF_Label;
index 65e556990a1e211913e3605a90ff142bd79b91cf..8c8bc929d34bf40b5882356a2348661409ce014b 100644 (file)
 //Version      Date            Purpose
 //             0.0     Sep  8 1997     Creation
 
+#include <TDF_AttributeDelta.hxx>
+
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TCollection_AsciiString.hxx>
 #include <TDF_Attribute.hxx>
-#include <TDF_AttributeDelta.hxx>
 #include <TDF_Label.hxx>
 #include <TDF_Tool.hxx>
 
@@ -79,3 +81,18 @@ Standard_OStream& TDF_AttributeDelta::Dump(Standard_OStream& OS) const
   OS<<" on "<<Attribute()->DynamicType()->Name();
   return OS;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDF_AttributeDelta::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAttribute.get())
+
+  TCollection_AsciiString aStrForTDF_Label;
+  TDF_Tool::Entry (myLabel, aStrForTDF_Label);
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aStrForTDF_Label)
+}
index ced0612a22f85a1a96729baadc96b657c1e77a3c..f07f1fd3f3bcb64a2063019cb507e473e92e310b 100644 (file)
@@ -67,6 +67,9 @@ Standard_OStream& operator<< (Standard_OStream& OS) const
   return Dump(OS);
 }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 
 
 
index a5407cb53d612872d5fff493d7422a1735dd26a1..44ba6da880b034097fcf414aebafbde4c6e99854 100644 (file)
@@ -15,6 +15,7 @@
 
 
 #include <NCollection_IncAllocator.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_NoMoreObject.hxx>
 #include <Standard_NullObject.hxx>
 #include <Standard_Type.hxx>
@@ -444,3 +445,27 @@ Standard_OStream& TDF_Data::Dump(Standard_OStream& anOS) const
   anOS<<"; Current tick: "<<myTime<<";"<<std::endl;
   return anOS;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDF_Data::DumpJson (Standard_OStream& theOStream, Standard_Integer /*theDepth*/) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  TCollection_AsciiString aStrForTDF_Label;
+  TDF_Tool::Entry (myRoot, aStrForTDF_Label);
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aStrForTDF_Label)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTransaction)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNbTouchedAtt)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNotUndoMode)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTime)
+  for (TColStd_ListOfInteger::Iterator aTimeIt (myTimes); aTimeIt.More(); aTimeIt.Next())
+  {
+    const Standard_Integer aTime = aTimeIt.Value();
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aTime)
+  }
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAllowModification)
+}
index c9c3c2813f4f389ed2b97d1039ef66026f0dc97d..73a2341d3b6b4c9eaa9609bb12aa96cf30302807 100644 (file)
@@ -134,6 +134,9 @@ Standard_OStream& operator<< (Standard_OStream& anOS) const
   //! memory pages.
     const TDF_HAllocator& LabelNodeAllocator() const;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 friend class TDF_Transaction;
 friend class TDF_LabelNode;
 
index ce36db131c60af78f5df2529e418afe9d402c90b..50246c34dd65add522b61a7e8c2cf5cc4926877e 100644 (file)
@@ -19,6 +19,7 @@
 //             0.0     Sep  8 1997     Creation
 
 #include <Standard_OutOfRange.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_Type.hxx>
 #include <TCollection_ExtendedString.hxx>
 #include <TDF_AttributeDelta.hxx>
@@ -222,3 +223,23 @@ void TDF_Delta::Dump(Standard_OStream& OS) const
     OS<<"| "; attDelta->Dump(OS); OS<<std::endl;
   }
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDF_Delta::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myBeginTime)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myEndTime)
+
+  for (TDF_AttributeDeltaList::Iterator anAttDeltaListIt (myAttDeltaList); anAttDeltaListIt.More(); anAttDeltaListIt.Next())
+  {
+    const Handle(TDF_AttributeDelta)& anAttDeltaList = anAttDeltaListIt.Value();
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, anAttDeltaList.get())
+  }
+
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myName)
+}
index 5b566aacc1148448fdfcdffdab08d1cd4aeaa272..cea8dee1c8f9c286cd6f767ed4ab1db774c02a2b 100644 (file)
@@ -77,6 +77,9 @@ public:
 
   Standard_EXPORT void Dump (Standard_OStream& OS) const;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 
 friend class TDF_Data;
 
index f8f8b97c680b45a6a8e4f3ff3c37b9aa245e3384..493a7df429a7f27d24f4d5f26cf1cdce7e60f533 100644 (file)
 //Version      Date            Purpose
 //             0.0     Jul  6 1998     Creation
 
+#include <TDF_DeltaOnResume.hxx>
+
+#include <Standard_Dump.hxx>
 #include <Standard_Type.hxx>
 #include <TDF_Attribute.hxx>
-#include <TDF_DeltaOnResume.hxx>
 #include <TDF_Label.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(TDF_DeltaOnResume,TDF_AttributeDelta)
@@ -48,3 +50,14 @@ void TDF_DeltaOnResume::Apply()
   std::cout<<"Forget attribute"<<std::endl;
 #endif
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDF_DeltaOnResume::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_AttributeDelta)
+}
index 19c5c4143dbe9090064d48e3f454c4ffd2cb27d6..c27e0bb4fba7f306997956b44b88269537dd09db 100644 (file)
@@ -42,6 +42,9 @@ public:
   
   //! Applies the delta to the attribute.
   Standard_EXPORT void Apply() Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index 9e96f5737e2441dcd899236398700b614dfd6c9c..554627d816a0d3ff6824a3c13f910823e4db3d3f 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDF_Reference.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_DataSet.hxx>
 #include <TDF_Label.hxx>
-#include <TDF_Reference.hxx>
 #include <TDF_RelocationTable.hxx>
+#include <TDF_Tool.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(TDF_Reference,TDF_Attribute)
 
@@ -147,4 +149,17 @@ Standard_OStream& TDF_Reference::Dump (Standard_OStream& anOS) const
   return anOS;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDF_Reference::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
 
+  TCollection_AsciiString aLabel;
+  TDF_Tool::Entry (myOrigin, aLabel);
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aLabel)
+}
index 6d9028b1811b9d9bf3dba15a1b0f094d659d51b4..4cd2b13b88cb6c0c408adfd8d2241875256e3342 100644 (file)
@@ -62,6 +62,9 @@ public:
   
   Standard_EXPORT TDF_Reference();
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index b4561f574ab696da57f09ce732819cc236a8a4b8..0460b03b3337008cc5dc9c18e7fbc1b0ab264a94 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDF_TagSource.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_Label.hxx>
 #include <TDF_RelocationTable.hxx>
-#include <TDF_TagSource.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(TDF_TagSource,TDF_Attribute)
 
@@ -166,3 +167,16 @@ void TDF_TagSource::Paste (const Handle(TDF_Attribute)& Into,
 {
   Handle(TDF_TagSource)::DownCast(Into)->Set (myTag);
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDF_TagSource::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTag)
+}
index 54bbe10996bab07b8f7c99c0d0da0b1814323ce7..8959d6df7dc16f072d6c0999e611f066e3f852da 100644 (file)
@@ -73,6 +73,9 @@ public:
   
   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index a74121fb2a4350ecc5ca113c06d6cd4aa9f48814..b3eab9e128323723c12666702a42bc427f392d84 100644 (file)
@@ -19,6 +19,7 @@
 //             0.0     Oct  1 1997     Creation
 
 #include <Standard_DomainError.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_NullObject.hxx>
 #include <TCollection_AsciiString.hxx>
 #include <TDF_Data.hxx>
@@ -159,3 +160,15 @@ void TDF_Transaction::Abort()
   }
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDF_Transaction::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_CLASS_BEGIN (theOStream, TDF_Transaction)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myDF.get())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myUntilTransaction)
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myName)
+}
index f5f2a5937252fc5d1c01b243584db7b6d5759336..e9c370814e2f0868b00341ee35c05d50d1b23f3c 100644 (file)
@@ -93,6 +93,9 @@ public:
   //! Returns true if the transaction is open.
     Standard_Boolean IsOpen() const;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 
 
 
index b9f833d29d24ac4eb7fd3261492a9ca888f0ee69..0348e6b03147f67841045f9c0750054e0a23e7e9 100644 (file)
@@ -14,9 +14,9 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd.hxx>
 
 #include <Standard_GUID.hxx>
-#include <TDataStd.hxx>
 #include <TDataStd_ExtStringArray.hxx>
 #include <TDataStd_Integer.hxx>
 #include <TDataStd_IntegerArray.hxx>
index 101417d21c4bc7915e1775bac8afbe13ec5ba591..a5db33bd17dbfdbc496f6f161757d4b8b297febc 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_AsciiString.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TCollection_AsciiString.hxx>
-#include <TDataStd_AsciiString.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_Label.hxx>
 #include <TDF_RelocationTable.hxx>
@@ -199,3 +200,17 @@ Standard_OStream& TDataStd_AsciiString::Dump(Standard_OStream& theOS) const
   anOS << sguid << "|" <<std::endl;
   return anOS;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_AsciiString::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myString)
+  OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
+}
index c224ada97adc391c7e87dfa414b09524bae49e96..4af0f813835b0e860f41fb9fcb253a6495e4e515 100644 (file)
@@ -81,6 +81,9 @@ public:
   
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index c30bd7cc30f022ee7854a23f82ddcc75766ac8f8..382b1ada5e2ef6981b02847e9d21e92f598ef929 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_BooleanArray.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
-#include <TDataStd_BooleanArray.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_Label.hxx>
 #include <TDF_RelocationTable.hxx>
@@ -320,3 +321,23 @@ Standard_OStream& TDataStd_BooleanArray::Dump (Standard_OStream& anOS) const
   anOS <<std::endl;
   return anOS;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_BooleanArray::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  for (TColStd_Array1OfByte::Iterator aValueIt (myValues->Array1()); aValueIt.More(); aValueIt.Next())
+  {
+    const Standard_Byte& aValue = aValueIt.Value();
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aValue)
+  }
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLower)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myUpper)
+  OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
+}
index 9a48804f55238820304be3eac32f3119febad66d..2bd1eee20576cac715c8b5d199ad9f0ec9399a17 100644 (file)
@@ -99,6 +99,9 @@ public:
   
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& OS) const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 8593a65ac1ee2f7ffb81138c961ceec54f29e54c..f398ce55b345efda5903d89367ae3efbbae0ae8c 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_BooleanList.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
-#include <TDataStd_BooleanList.hxx>
 #include <TDataStd_ListIteratorOfListOfByte.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_Label.hxx>
@@ -306,3 +307,21 @@ Standard_OStream& TDataStd_BooleanList::Dump (Standard_OStream& anOS) const
   anOS << std::endl;
   return anOS;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_BooleanList::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  for (TDataStd_ListOfByte::Iterator aListIt (myList); aListIt.More(); aListIt.Next())
+  {
+    const Standard_Byte& aValue = aListIt.Value();
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aValue)
+  }
+  OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
+}
index 3879cfda417068df29498d75142a56dde37f294b..4aa9f699bda1cb101ef71a5424fefaac192c8d5c 100644 (file)
@@ -100,6 +100,9 @@ public:
   
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 49ca2e1533d796f565edd7a60626e1f2c7103a95..c0277717bd78d392e1bdb5bf2ad01db62b95d68d 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_ByteArray.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
-#include <TDataStd_ByteArray.hxx>
 #include <TDataStd_DeltaOnModificationOfByteArray.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_DefaultDeltaOnModification.hxx>
@@ -309,3 +310,21 @@ Handle(TDF_DeltaOnModification) TDataStd_ByteArray::DeltaOnModification
   else return new TDF_DefaultDeltaOnModification(OldAttribute);
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_ByteArray::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+  
+  for (TColStd_Array1OfByte::Iterator aValueIt (myValue->Array1()); aValueIt.More(); aValueIt.Next())
+  {
+    const Standard_Byte& aValue = aValueIt.Value();
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aValue)
+  }
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsDelta)
+  OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
+}
index 16cf2ed43eedad67443f99e5455a3e389fcc09b4..ec74d4a419423ee66a92d5b0e5d84029c4fab776 100644 (file)
@@ -123,6 +123,9 @@ public:
   //! Makes a DeltaOnModification between <me> and
   //! <anOldAttribute>.
   Standard_EXPORT virtual Handle(TDF_DeltaOnModification) DeltaOnModification (const Handle(TDF_Attribute)& anOldAttribute) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 private:
 
index bdd98eeeda49b9b40107f364c0d1618affa83051..7f5e4aa32b4a905c7fd5ef8e7ef4865c85dd0e7d 100644 (file)
@@ -13,8 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
-
 #include <TDataStd_ChildNodeIterator.hxx>
+
 #include <TDataStd_TreeNode.hxx>
 
 #define ChildNodeIterator_UpToBrother \
index a827f0d9bea5ec08ff7c95dde062f8cdbf774571..cc2d0f72c86c054d4c7e8dec40069461e454d03e 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_Comment.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TCollection_AsciiString.hxx>
 #include <TCollection_ExtendedString.hxx>
-#include <TDataStd_Comment.hxx>
 #include <TDataStd_Integer.hxx>
 #include <TDataStd_Real.hxx>
 #include <TDF_Attribute.hxx>
@@ -170,3 +171,16 @@ AfterRetrieval(const Standard_Boolean)
 {
   return Standard_True;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_Comment::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+  
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myString)
+}
index 9bb96df0ec960bfd64aa5389080a99b228355816..a26056ed014488708346ad1c2b77313045463af8 100644 (file)
@@ -76,6 +76,9 @@ public:
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
   
   Standard_EXPORT Standard_Boolean AfterRetrieval (const Standard_Boolean forceIt = Standard_False) Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index 1f991c1bcc5731322f244a1a6d6815ec426fa84c..6c12c3c0fa31f560856500689a22ce46f2bccea4 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_Current.hxx>
 
 #include <Standard_DomainError.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
-#include <TDataStd_Current.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_Data.hxx>
 #include <TDF_Label.hxx>
 #include <TDF_RelocationTable.hxx>
+#include <TDF_Tool.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(TDataStd_Current,TDF_Attribute)
 
@@ -165,4 +167,18 @@ Standard_OStream& TDataStd_Current::Dump (Standard_OStream& anOS) const
   return anOS;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_Current::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  TCollection_AsciiString aLabel;
+  TDF_Tool::Entry (myLabel, aLabel);
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aLabel)
+}
 
index 06a032c533a8ac8d3d1a59cacfca00ded27322f8..ebad9ea0ba3022e292565c7c90efb47ba25d6fa9 100644 (file)
@@ -72,6 +72,9 @@ public:
   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
   
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index c04ee56e2ccc0ecf5c95e23e946264626650e929..048a07e6ac7c8fda07b7068023d966a4220c3e16 100644 (file)
@@ -13,6 +13,7 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_DeltaOnModificationOfByteArray.hxx>
 
 #include <Standard_Type.hxx>
 #include <TColStd_HArray1OfByte.hxx>
@@ -20,7 +21,6 @@
 #include <TColStd_ListIteratorOfListOfInteger.hxx>
 #include <TColStd_ListOfInteger.hxx>
 #include <TDataStd_ByteArray.hxx>
-#include <TDataStd_DeltaOnModificationOfByteArray.hxx>
 #include <TDF_AttributeIterator.hxx>
 #include <TDF_DeltaOnModification.hxx>
 #include <TDF_Label.hxx>
index 064dd080b01f27a8a1c9888a0dd9071fac1b14db..dfb247e99c29b7f3ae11cbd4b8e175ee41166aa5 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_DeltaOnModificationOfExtStringArray.hxx>
 
 #include <Standard_Type.hxx>
 #include <TColStd_HArray1OfExtendedString.hxx>
 #include <TColStd_ListIteratorOfListOfInteger.hxx>
 #include <TColStd_ListOfInteger.hxx>
-#include <TDataStd_DeltaOnModificationOfExtStringArray.hxx>
 #include <TDataStd_ExtStringArray.hxx>
 #include <TDF_AttributeIterator.hxx>
 #include <TDF_DeltaOnModification.hxx>
index 5ba9f9c2c205cb453b3353f3129042445f8d49ec..6280934c5e36c153f3c26dd147f09c0441db28ed 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_DeltaOnModificationOfIntArray.hxx>
 
 #include <Standard_Type.hxx>
 #include <TColStd_HArray1OfInteger.hxx>
 #include <TColStd_ListIteratorOfListOfInteger.hxx>
 #include <TColStd_ListOfInteger.hxx>
-#include <TDataStd_DeltaOnModificationOfIntArray.hxx>
 #include <TDataStd_IntegerArray.hxx>
 #include <TDF_AttributeIterator.hxx>
 #include <TDF_DeltaOnModification.hxx>
index 6c0d12e37c8d2354cc4f0c6ec0a7ae426a3fd37f..05947ca8234848f8cd67c4631f071a09e3ea21c7 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_DeltaOnModificationOfIntPackedMap.hxx>
 
 #include <Standard_Type.hxx>
 #include <TColStd_HPackedMapOfInteger.hxx>
 #include <TColStd_MapIteratorOfPackedMapOfInteger.hxx>
 #include <TColStd_PackedMapOfInteger.hxx>
-#include <TDataStd_DeltaOnModificationOfIntPackedMap.hxx>
 #include <TDataStd_IntPackedMap.hxx>
 #include <TDF_DeltaOnModification.hxx>
 #include <TDF_Label.hxx>
index 41b65a5321bbb06838cd565883acfaee1577d86c..a04f38af4443b99331875e28b914eb5635de8187 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_DeltaOnModificationOfRealArray.hxx>
 
 #include <Standard_Type.hxx>
 #include <TColStd_HArray1OfReal.hxx>
 #include <TColStd_ListIteratorOfListOfInteger.hxx>
 #include <TColStd_ListOfInteger.hxx>
-#include <TDataStd_DeltaOnModificationOfRealArray.hxx>
 #include <TDataStd_RealArray.hxx>
 #include <TDF_AttributeIterator.hxx>
 #include <TDF_DeltaOnModification.hxx>
index 1acc960adc052cb06749add683dd034d212b45ba..b592f252d87612622afde2c6e5c9fa9802f0bc1c 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_Directory.hxx>
 
 #include <Standard_DomainError.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TDataStd.hxx>
-#include <TDataStd_Directory.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_DataSet.hxx>
 #include <TDF_Label.hxx>
@@ -173,4 +174,13 @@ Standard_OStream& TDataStd_Directory::Dump (Standard_OStream& anOS) const
   return anOS;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_Directory::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
 
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+}
index a459f35b359e53d09e4ed6b2130fa5d587d40769..726f974afa3b0e258465b213faa1462eedfbec01 100644 (file)
@@ -80,6 +80,9 @@ public:
   Standard_EXPORT virtual void References (const Handle(TDF_DataSet)& DS) const Standard_OVERRIDE;
   
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index b200ad4ca129af37b270c91b7a429a802b4c08f9..04a358a9991b0dac479c48eda88f275b7fd44203 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_Expression.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TCollection_AsciiString.hxx>
 #include <TCollection_ExtendedString.hxx>
-#include <TDataStd_Expression.hxx>
 #include <TDataStd_Variable.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_Label.hxx>
@@ -173,3 +174,21 @@ Standard_OStream& TDataStd_Expression::Dump(Standard_OStream& anOS) const
   return anOS;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_Expression::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myExpression)
+
+  for (TDF_AttributeList::Iterator aVariableIt (myVariables); aVariableIt.More(); aVariableIt.Next())
+  {
+    const Handle(TDF_Attribute)& anAttribute = aVariableIt.Value();
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, anAttribute.get())
+  }
+}
index 38a6fa152a405dae87b36f388060d7b0cac00c27..f10533091dd670c5e1a1c121e6393a8286055100 100644 (file)
@@ -77,6 +77,9 @@ public:
   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
   
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index c7cab25daa792143f6f9b93a06a17ea2a544c938..cbeb85c5bc6dcd659ff0c34ee1d2f8e7aa10aa29 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_ExtStringArray.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TCollection_ExtendedString.hxx>
 #include <TDataStd_DeltaOnModificationOfExtStringArray.hxx>
-#include <TDataStd_ExtStringArray.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_DefaultDeltaOnModification.hxx>
 #include <TDF_DeltaOnModification.hxx>
@@ -335,3 +336,20 @@ Handle(TDF_DeltaOnModification) TDataStd_ExtStringArray::DeltaOnModification
   else return new TDF_DefaultDeltaOnModification(OldAttribute);
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_ExtStringArray::DumpJson (Standard_OStream& theOStream, Standard_Integer /*theDepth*/) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  for (TColStd_Array1OfExtendedString::Iterator aValueIt (myValue->Array1()); aValueIt.More(); aValueIt.Next())
+  {
+    const TCollection_ExtendedString& aValue = aValueIt.Value();
+    OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aValue)
+  }
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsDelta)
+  OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
+}
index a7383512a7e41d096d283fa5653d127d146388f1..0b4e5f9c2167aace812d21cd37b6a4b4a8b2e96e 100644 (file)
@@ -125,6 +125,9 @@ public:
   //! Makes a DeltaOnModification between <me> and
   //! <anOldAttribute>.
   Standard_EXPORT virtual Handle(TDF_DeltaOnModification) DeltaOnModification (const Handle(TDF_Attribute)& anOldAttribute) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 private:
 
index 75806696be09d9feaba1c7be27ebffdb5b66f227..97faa89b4b43327f473b1590e570e016497b1a0c 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_ExtStringList.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TCollection_ExtendedString.hxx>
-#include <TDataStd_ExtStringList.hxx>
 #include <TDataStd_ListIteratorOfListOfExtendedString.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_Label.hxx>
@@ -366,3 +367,20 @@ Standard_OStream& TDataStd_ExtStringList::Dump (Standard_OStream& anOS) const
   anOS << std::endl;
   return anOS;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_ExtStringList::DumpJson (Standard_OStream& theOStream, Standard_Integer /*theDepth*/) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  for (TDataStd_ListOfExtendedString::Iterator aListIt (myList); aListIt.More(); aListIt.Next())
+  {
+    const TCollection_ExtendedString& aValue = aListIt.Value();
+    OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aValue);
+  }
+
+  OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
+}
index e90ce3abcebb1b9da22b111b181af61a8540fc19..d5c0c7f49ddd0504917835703b515ac3c900f61a 100644 (file)
@@ -107,6 +107,9 @@ public:
   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
   
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index 007f4551214e263fd876b5867649216b46af0a47..d652995796f1078e2cd18394e5f0bd4ac7cf50a9 100644 (file)
@@ -13,9 +13,9 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_HDataMapOfStringByte.hxx>
 
 #include <Standard_Type.hxx>
-#include <TDataStd_HDataMapOfStringByte.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(TDataStd_HDataMapOfStringByte,Standard_Transient)
 
index f2e820fc07602ba4ff9d61f798925e470702665b..9d0b6c96f22188248823f38e4e7baf80636c3a05 100644 (file)
@@ -13,9 +13,9 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_HDataMapOfStringHArray1OfInteger.hxx>
 
 #include <Standard_Type.hxx>
-#include <TDataStd_HDataMapOfStringHArray1OfInteger.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(TDataStd_HDataMapOfStringHArray1OfInteger,Standard_Transient)
 
index 4604bd7b6dc08858f931f7d704d039fb0a6e0654..71a776cfed82ab7775956e0bbbaa4901be0e55fd 100644 (file)
@@ -13,9 +13,9 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_HDataMapOfStringHArray1OfReal.hxx>
 
 #include <Standard_Type.hxx>
-#include <TDataStd_HDataMapOfStringHArray1OfReal.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(TDataStd_HDataMapOfStringHArray1OfReal,Standard_Transient)
 
index 4a5d627b0ebd735c831404e48c292590f9b50b8c..bacefddb506dd5e671c2dbf8f9feb09f908fc1f4 100644 (file)
@@ -13,9 +13,9 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_HDataMapOfStringInteger.hxx>
 
 #include <Standard_Type.hxx>
-#include <TDataStd_HDataMapOfStringInteger.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(TDataStd_HDataMapOfStringInteger,Standard_Transient)
 
index 0978f53cfa9a495331be468cf5f541a5b46b2c70..def87184351b9e43e5f8b5e320b799c908448530 100644 (file)
@@ -13,9 +13,9 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_HDataMapOfStringReal.hxx>
 
 #include <Standard_Type.hxx>
-#include <TDataStd_HDataMapOfStringReal.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(TDataStd_HDataMapOfStringReal,Standard_Transient)
 
index 63ba1e8981ffca2c06712d3a3c8806bd1039fabb..b9dc1849c8578e836139bafed994b93dea2fea84 100644 (file)
@@ -13,9 +13,9 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_HDataMapOfStringString.hxx>
 
 #include <Standard_Type.hxx>
-#include <TDataStd_HDataMapOfStringString.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(TDataStd_HDataMapOfStringString,Standard_Transient)
 
index e5162681ee4dcbe9be7c97782f25788b4bdd4b2c..ef1f71bd5014e5c2ddb3bf62ea2c40f4b3d899fe 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_IntPackedMap.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TColStd_HPackedMapOfInteger.hxx>
 #include <TColStd_PackedMapOfInteger.hxx>
 #include <TDataStd_DeltaOnModificationOfIntPackedMap.hxx>
-#include <TDataStd_IntPackedMap.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_DefaultDeltaOnModification.hxx>
 #include <TDF_DeltaOnModification.hxx>
@@ -234,4 +235,21 @@ Handle(TDF_DeltaOnModification) TDataStd_IntPackedMap::DeltaOnModification
   else return new TDF_DefaultDeltaOnModification(OldAttribute);
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_IntPackedMap::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
 
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  for (TColStd_PackedMapOfInteger::Iterator aMapIt (myMap->Map()); aMapIt.More(); aMapIt.Next())
+  {
+    Standard_Integer aKey = aMapIt.Key();
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aKey)
+  }
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsDelta)
+}
index 2aab1adb681cbb3965e0f127f88d9c1122d6dc08..c6967625eafb401beccd0f0820d44910ca30db74 100644 (file)
@@ -96,6 +96,9 @@ public:
   //! Makes a DeltaOnModification between <me> and
   //! <anOldAttribute>.
   Standard_EXPORT virtual Handle(TDF_DeltaOnModification) DeltaOnModification (const Handle(TDF_Attribute)& anOldAttribute) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 private:
 
index 36d42a1baf9fadec3704bf9d08b0646c04d615de..5aefc683cb8b1124abca059c018547b60fb7f657 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_Integer.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
-#include <TDataStd_Integer.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_Label.hxx>
 #include <TDF_Reference.hxx>
@@ -203,3 +204,16 @@ Standard_OStream& TDataStd_Integer::Dump (Standard_OStream& anOS) const
   return anOS;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_Integer::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myValue)
+  OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
+}
index 6096d5758c9d106322622e066c7380ef3632a3f0..453b701b257a600623bbe8a226beb860ab0cf352 100644 (file)
@@ -83,6 +83,9 @@ public:
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
   
   Standard_EXPORT TDataStd_Integer();
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index 2fc1c38e3f4bcc8c92fef480f113076c09615839..1bbf603417b1dc248d5939e053410e2e545469b2 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_IntegerArray.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TDataStd_DeltaOnModificationOfIntArray.hxx>
-#include <TDataStd_IntegerArray.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_DefaultDeltaOnModification.hxx>
 #include <TDF_DeltaOnModification.hxx>
@@ -336,3 +337,23 @@ Handle(TDF_DeltaOnModification) TDataStd_IntegerArray::DeltaOnModification
     return new TDataStd_DeltaOnModificationOfIntArray(Handle(TDataStd_IntegerArray)::DownCast (OldAttribute));
   else return new TDF_DefaultDeltaOnModification(OldAttribute);
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_IntegerArray::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  for (TColStd_Array1OfInteger::Iterator aValueIt (myValue->Array1()); aValueIt.More(); aValueIt.Next())
+  {
+    const Standard_Integer& aValue = aValueIt.Value();
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aValue)
+  }
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsDelta)
+  OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
+}
index 07323226d8269db014f7c8f9bcd6dd98fb8406c1..346d6c1c5f9d1705723224f2017da2b3b61e1f83 100644 (file)
@@ -129,6 +129,9 @@ public:
   //! Makes a DeltaOnModification between <me> and
   //! <anOldAttribute>.
   Standard_EXPORT virtual Handle(TDF_DeltaOnModification) DeltaOnModification (const Handle(TDF_Attribute)& anOldAttribute) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 private:
 
index 94a997370198d58ad2a4240015dd947c06d3bde1..5c462dd03e09c0b90b345dc478cee0c3ad3ec596 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_IntegerList.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TColStd_ListIteratorOfListOfInteger.hxx>
-#include <TDataStd_IntegerList.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_Label.hxx>
 #include <TDF_RelocationTable.hxx>
@@ -362,3 +363,21 @@ Standard_OStream& TDataStd_IntegerList::Dump (Standard_OStream& anOS) const
   anOS << std::endl;
   return anOS;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_IntegerList::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  for (TColStd_ListOfInteger::Iterator aListIt (myList); aListIt.More(); aListIt.Next())
+  {
+    const Standard_Integer& aValue = aListIt.Value();
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aValue)
+  }
+  OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
+}
index 67ff0f4a726af798b39bc0a1ad7f259458634f61..beb7404302eb5252c69aac4618bae95865c6226c 100644 (file)
@@ -106,6 +106,9 @@ public:
   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
   
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index 19a4c78bb1acfc1152e7256098e870978270ae18..279c14db1c5fc38b269b1d7f24dd3cb62ff5ef7a 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_Name.hxx>
 
 #include <Standard_DomainError.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TCollection_AsciiString.hxx>
 #include <TCollection_ExtendedString.hxx>
-#include <TDataStd_Name.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_ChildIterator.hxx>
 #include <TDF_Label.hxx>
@@ -192,3 +193,17 @@ Standard_OStream& TDataStd_Name::Dump (Standard_OStream& anOS) const
   anOS << sguid << std::endl;
   return anOS;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_Name::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myString)
+  OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
+}
index 9e568278d3c4dd5f4b44e1e25c78518eb772f3c9..1ccfdba10d8acd3cfe125be9728bb948b0302d26 100644 (file)
@@ -98,6 +98,9 @@ public:
   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
   
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index 1b8e92f14bf6150dc97af62b21e3e3c1fa3f80d2..dd2e3215a6f0dcc7078bd09b545643fb789d69fb 100644 (file)
@@ -14,6 +14,7 @@
 // commercial license or contractual agreement.
 
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TCollection_ExtendedString.hxx>
@@ -810,3 +811,27 @@ Standard_OStream& TDataStd_NamedData::Dump (Standard_OStream& anOS) const
   anOS << "\tArraysOfReals = " << (HasArraysOfReals() ? myArraysOfReals->Map().Extent() : 0);
   return anOS;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_NamedData::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  if (!myIntegers.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIntegers->Map().Size())
+  if (!myReals.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myReals->Map().Size())
+  if (!myStrings.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myStrings->Map().Size())
+  if (!myBytes.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myBytes->Map().Size())
+  if (!myArraysOfIntegers.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myArraysOfIntegers->Map().Size())
+  if (!myArraysOfReals.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myArraysOfReals->Map().Size())
+}
index 2cd8ae84e006ebd8d7d78732a54079d931ba5179..11fccc858f7e1491ac52ae5e519a50236231a0c9 100644 (file)
@@ -214,8 +214,11 @@ protected:
 
 
 
-
+  
 private:
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
   Handle(TDataStd_HDataMapOfStringInteger) myIntegers;
index 005e0232b874f10f452f8627790504d244576794..a385f35d093a785e09e02561d0dad520d871975c 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_NoteBook.hxx>
 
 #include <Standard_DomainError.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TDataStd_Integer.hxx>
-#include <TDataStd_NoteBook.hxx>
 #include <TDataStd_Real.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_Label.hxx>
@@ -166,4 +167,13 @@ Standard_OStream& TDataStd_NoteBook::Dump (Standard_OStream& anOS) const
   return anOS;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_NoteBook::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
 
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+}
index 38d6af65593090adf9f1e1658105d478918daea7..12d6a137a31ea01fff9149dbe184f79511a992cf 100644 (file)
@@ -79,6 +79,9 @@ public:
   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
   
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index c4e9449cc458bafee25cd513037233b4358f0d1f..e27807161f1519c4c0589bc8c676a4c59f90d837 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_Real.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TDataStd.hxx>
-#include <TDataStd_Real.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_Label.hxx>
 #include <TDF_Reference.hxx>
@@ -246,4 +247,18 @@ Standard_OStream& TDataStd_Real::Dump (Standard_OStream& anOS) const
   anOS << sguid;
   return anOS;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_Real::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myValue)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDimension)
+  OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
+}
index d20e0588c7b941068911fba055757a140fc3354d..48bb13593652e774e56e9e8ce4932c937102b591 100644 (file)
@@ -99,6 +99,9 @@ public:
   
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 82ce2827ce5739c945a18087d2ab5ce308f42c9f..7079fddcd9cecbff2725dc65d1fc190b389eaf28 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_RealArray.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TDataStd_DeltaOnModificationOfRealArray.hxx>
-#include <TDataStd_RealArray.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_DefaultDeltaOnModification.hxx>
 #include <TDF_DeltaOnModification.hxx>
@@ -332,3 +333,23 @@ Handle(TDF_DeltaOnModification) TDataStd_RealArray::DeltaOnModification
     return new TDataStd_DeltaOnModificationOfRealArray(Handle(TDataStd_RealArray)::DownCast (OldAtt));
   else return new TDF_DefaultDeltaOnModification(OldAtt);
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_RealArray::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  for (TColStd_Array1OfReal::Iterator aValueIt (myValue->Array1()); aValueIt.More(); aValueIt.Next())
+  {
+    const Standard_Real& aValue = aValueIt.Value();
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aValue)
+  }
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsDelta)
+  OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
+}
index 86f2364911f5c3a354ee36450c3a771ac1c2b6aa..38a7ab7d1f0b8628375f4c47136f52f51fda3b47 100644 (file)
@@ -128,6 +128,9 @@ public:
   //! Makes a DeltaOnModification between <me> and
   //! <anOldAttribute>.
   Standard_EXPORT virtual Handle(TDF_DeltaOnModification) DeltaOnModification (const Handle(TDF_Attribute)& anOldAttribute) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 private:
 
index 15042aefbb444a5e0bbf1cf4bedf92ad5da90462..ba792e222e569fa399982151fd8955784d86a949 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_RealList.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TColStd_ListIteratorOfListOfReal.hxx>
-#include <TDataStd_RealList.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_Label.hxx>
 #include <TDF_RelocationTable.hxx>
@@ -360,3 +361,22 @@ Standard_OStream& TDataStd_RealList::Dump (Standard_OStream& anOS) const
   anOS << std::endl;
   return anOS;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_RealList::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  for (TColStd_ListOfReal::Iterator aListIt (myList); aListIt.More(); aListIt.Next())
+  {
+    const Standard_Real& aValue = aListIt.Value();
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aValue)
+  }
+
+  OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
+}
index 06c9276e6baa2b234407b082b9925f06457e4b2f..3da451d0897b3f621e503926b3bb79cef082b40f 100644 (file)
@@ -107,6 +107,9 @@ public:
   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
   
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index 707e66e56c693a83973ed424b003ae0d5316df7f..6f66c1efa9d9de16255bbfae1b3699890411e2a7 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_ReferenceArray.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
-#include <TDataStd_ReferenceArray.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_DataSet.hxx>
 #include <TDF_Label.hxx>
 #include <TDF_RelocationTable.hxx>
+#include <TDF_Tool.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(TDataStd_ReferenceArray,TDF_Attribute)
 
@@ -330,3 +332,24 @@ Standard_OStream& TDataStd_ReferenceArray::Dump (Standard_OStream& anOS) const
   anOS << sguid << std::endl;
   return anOS;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_ReferenceArray::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  TCollection_AsciiString aLabel;
+  for (TDataStd_LabelArray1::Iterator anArrayIt (myArray->Array1()); anArrayIt.More(); anArrayIt.Next())
+  {
+    aLabel.Clear();
+    TDF_Tool::Entry (anArrayIt.Value(), aLabel);
+    OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aLabel)
+  }
+  
+  OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
+}
index 8d356200a7318d02aac5a3971e9fce5bee100237..36333eb35d7f09f811521ca166dd4bd7dae8227b 100644 (file)
@@ -103,6 +103,9 @@ public:
   Standard_EXPORT virtual void References (const Handle(TDF_DataSet)& DS) const Standard_OVERRIDE;
   
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index ef19775a4dae0b4eee40bb58ddaad5abc115367c..c341779d5f774e2c5e03ff42dfc3602b48cba13d 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_ReferenceList.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
-#include <TDataStd_ReferenceList.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_DataSet.hxx>
 #include <TDF_Label.hxx>
 #include <TDF_ListIteratorOfLabelList.hxx>
 #include <TDF_RelocationTable.hxx>
+#include <TDF_Tool.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(TDataStd_ReferenceList,TDF_Attribute)
 
@@ -383,3 +385,24 @@ Standard_OStream& TDataStd_ReferenceList::Dump (Standard_OStream& anOS) const
   anOS << std::endl;
   return anOS;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_ReferenceList::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  TCollection_AsciiString aLabel;
+  for (TDF_LabelList::Iterator aListIt (myList); aListIt.More(); aListIt.Next())
+  {
+    aLabel.Clear();
+    TDF_Tool::Entry (aListIt.Value(), aLabel);
+    OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aLabel)
+  }
+
+  OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
+}
index 5de5ddb493af1d2c67c0ce8ba0df279e049c7e97..54beb0b335954c25242beb9abba16ad513ea4565 100644 (file)
@@ -110,6 +110,9 @@ public:
   
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 68aeb672c010d8dfea0b723457a7bfae819ef384..d4de4a9956e2a8126ea575609061b3306aaebfd8 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_Relation.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TCollection_AsciiString.hxx>
 #include <TCollection_ExtendedString.hxx>
-#include <TDataStd_Relation.hxx>
 #include <TDataStd_Variable.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_Label.hxx>
@@ -173,3 +174,21 @@ Standard_OStream& TDataStd_Relation::Dump(Standard_OStream& anOS) const
   return anOS;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_Relation::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myRelation)
+
+  for (TDF_AttributeList::Iterator aVariableIt (myVariables); aVariableIt.More(); aVariableIt.Next())
+  {
+    const Handle(TDF_Attribute)& aVariable = aVariableIt.Value();
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aVariable.get())
+  }
+}
index b96be1d8dcd25076829de3576da0cd3e6982e1f3..25387a266152401f98d901c46e47f9e11ff46ea2 100644 (file)
@@ -78,6 +78,9 @@ public:
   
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 8c1150141a7e419db73b066d3fc30e86300a4646..6b25ec3124be5bde5a4dde15ca7f32329ed07343 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_Tick.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
-#include <TDataStd_Tick.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_Label.hxx>
 #include <TDF_RelocationTable.hxx>
@@ -102,3 +103,14 @@ Standard_OStream& TDataStd_Tick::Dump (Standard_OStream& anOS) const
   anOS << "Tick";
   return anOS;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_Tick::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+}
index 44a346d3d7c66fc84f94d94f4ce223e9df9bcec0..8427f8f006998e7f75873d386df350682f93aa3f 100644 (file)
@@ -60,6 +60,9 @@ public:
   
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index e4bcb98d107e4a1774097de827789f7272385b6c..1e76f1f013ed22e9508f9014c6b5f43f4e8f663f 100644 (file)
 // commercial license or contractual agreement.
 
 #include <TDataStd_TreeNode.hxx>
+
 #include <TDF_Label.hxx>
 #include <TDF_DataSet.hxx>
 #include <TDF_DeltaOnAddition.hxx>
 #include <TDF_DeltaOnRemoval.hxx>
 #include <TDF_RelocationTable.hxx>
+#include <TDF_Tool.hxx>
 #include <Standard_DomainError.hxx>
+#include <Standard_Dump.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(TDataStd_TreeNode,TDF_Attribute)
 
@@ -687,3 +690,46 @@ Standard_OStream& TDataStd_TreeNode::Dump (Standard_OStream& anOS) const
   anOS<<std::endl;
   return anOS;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_TreeNode::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  if (myFather)
+  {
+    TCollection_AsciiString aFather;
+    TDF_Tool::Entry (myFather->Label(), aFather);
+    OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aFather)
+  }
+  if (myPrevious)
+  {
+    TCollection_AsciiString aPrevious;
+    TDF_Tool::Entry (myPrevious->Label(), aPrevious);
+    OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aPrevious)
+  }
+  if (myNext)
+  {
+    TCollection_AsciiString aNext;
+    TDF_Tool::Entry (myNext->Label(), aNext);
+    OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aNext)
+  }
+  if (myFirst)
+  {
+    TCollection_AsciiString aFirst;
+    TDF_Tool::Entry (myFirst->Label(), aFirst);
+    OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aFirst)
+  }
+  if (myLast)
+  {
+    TCollection_AsciiString aLast;
+    TDF_Tool::Entry (myLast->Label(), aLast);
+    OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aLast)
+  }
+
+  OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myTreeID)
+}
index a8c90b7789d8612315b21a0fd3d66a80a9a44004..a020b72dcc1af824d5ef14b5b1d55667380c2beb 100644 (file)
@@ -214,6 +214,9 @@ public:
   
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 friend class TDataStd_ChildNodeIterator;
 
index 530f2d7484f30ed1cfa40660642bc13b53c57ce6..5ce60a1af4c159fb0fccda5aa40dbc86f17acd1e 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_UAttribute.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TDataStd.hxx>
-#include <TDataStd_UAttribute.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_DataSet.hxx>
 #include <TDF_Label.hxx>
@@ -131,4 +132,15 @@ Standard_OStream& TDataStd_UAttribute::Dump (Standard_OStream& anOS) const
   return anOS;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_UAttribute::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
 
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+  
+  OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
+}
index f9253ed6996ce1f6502d2f6ebefd95a0098db7b6..17e9891f426b9c8368aa7adac2664bfe3d1df3c2 100644 (file)
@@ -64,6 +64,9 @@ public:
   
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 59f5818ce194268b28fb859ed5cc3b16e4ebe3e9..9a37fcae9387a13449bf478bf5031d88f385dd7f 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDataStd_Variable.hxx>
 
 #include <Standard_DomainError.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TCollection_AsciiString.hxx>
@@ -23,7 +25,6 @@
 #include <TDataStd_Expression.hxx>
 #include <TDataStd_Name.hxx>
 #include <TDataStd_Real.hxx>
-#include <TDataStd_Variable.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_DataSet.hxx>
 #include <TDF_Label.hxx>
@@ -336,3 +337,16 @@ Standard_OStream& TDataStd_Variable::Dump(Standard_OStream& anOS) const
   return anOS;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDataStd_Variable::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, isConstant)
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myUnit)
+}
index 0a437f709c8f176ee6e0cb64c5c68e3f8df769b4..4b782a4bb0d9dbe4110b6bf5736d1b308767cdca 100644 (file)
@@ -140,6 +140,9 @@ public:
   Standard_EXPORT virtual void References (const Handle(TDF_DataSet)& DS) const Standard_OVERRIDE;
   
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index 2869388d9414e5cbdcd552f07f369877c27a960b..890586486296ccfccb745491a22bb8836a90eab8 100644 (file)
 //=======================================================================
 // Declarations:       
 
+#include <TDocStd.hxx>
+
 #include <CDF.hxx>
 #include <OSD_Environment.hxx>
-#include <TDocStd.hxx>
 #include <TDocStd_XLink.hxx>
 
 //#include <LCTLOFF.h>
index 1b7433bb8fc2db7ba219d01219341e5b5e154544..ee2f1ff36c1be23b7c239460194d54a3b8885e92 100644 (file)
@@ -14,6 +14,7 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDocStd_Application.hxx>
 
 #include <CDF_Directory.hxx>
 #include <CDF_DirectoryIterator.hxx>
 #include <Plugin_Failure.hxx>
 #include <Resource_Manager.hxx>
 #include <Standard_DomainError.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_ErrorHandler.hxx>
 #include <Standard_NoSuchObject.hxx>
 #include <Standard_NotImplemented.hxx>
 #include <TCollection_ExtendedString.hxx>
-#include <TDocStd_Application.hxx>
 #include <TDocStd_Document.hxx>
 #include <TDocStd_Owner.hxx>
 #include <TDocStd_PathParser.hxx>
@@ -597,3 +598,14 @@ void TDocStd_Application::OnCommitTransaction (const Handle(TDocStd_Document)&)
 {
   // nothing to do on this level
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDocStd_Application::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsDriverLoaded)
+}
index 498fac803c1f33635d19b12592819be2f16d4045..11ce9e535c5040b38d0e474dd09148c0d9e52d44 100644 (file)
@@ -267,6 +267,9 @@ public:
   //! Notification that is fired at each AbortTransaction event.
   Standard_EXPORT virtual void OnAbortTransaction (const Handle(TDocStd_Document)& theDoc);
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
   DEFINE_STANDARD_RTTIEXT(TDocStd_Application,CDF_Application)
 
 protected:
index cd4b0a688f8321e6081aeb3dcc8e95bab791cb68..6c64a88506abb6369da0aaff1cf3103f3ed98b9e 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDocStd_ApplicationDelta.hxx>
 
 #include <Standard_Type.hxx>
 #include <TCollection_AsciiString.hxx>
 #include <TCollection_ExtendedString.hxx>
-#include <TDocStd_ApplicationDelta.hxx>
 #include <TDocStd_Document.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(TDocStd_ApplicationDelta,Standard_Transient)
index 073b09d17619d112b9edb9202d54b6315c7f40c6..5503a2331b062512ac21eb96a79d083dcf871d7b 100644 (file)
@@ -14,8 +14,9 @@
 
 //             -------------
 
-#include <Standard_Type.hxx>
 #include <TDocStd_CompoundDelta.hxx>
+
+#include <Standard_Type.hxx>
 #include <TDocStd_Document.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(TDocStd_CompoundDelta,TDF_Delta)
index 99f3a293f2984037e6eec752b1ceb8cd2656516b..1319abbd0fdf5ebb7d34b3c09fdb5d5b04b24caa 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDocStd_Document.hxx>
 
 #include <CDM_Document.hxx>
 #include <CDM_MetaData.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_Type.hxx>
 #include <TCollection_AsciiString.hxx>
 #include <TCollection_ExtendedString.hxx>
@@ -33,7 +35,6 @@
 #include <TDocStd_Application.hxx>
 #include <TDocStd_CompoundDelta.hxx>
 #include <TDocStd_Context.hxx>
-#include <TDocStd_Document.hxx>
 #include <TDocStd_LabelIDMapDataMap.hxx>
 #include <TDocStd_Modified.hxx>
 #include <TDocStd_Owner.hxx>
@@ -898,3 +899,45 @@ void TDocStd_Document::BeforeClose()
         myUndoFILO.Clear();
   ClearUndos();
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDocStd_Document::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, CDM_Document)
+  
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myStorageFormat)
+
+  for (TDF_DeltaList::Iterator anUndoIt (myUndos); anUndoIt.More(); anUndoIt.Next())
+  {
+    const Handle(TDF_Delta)& anUndo = anUndoIt.Value();
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, anUndo.get())
+  }
+
+  for (TDF_DeltaList::Iterator aRedoIt (myRedos); aRedoIt.More(); aRedoIt.Next())
+  {
+    const Handle(TDF_Delta)& aRedo = aRedoIt.Value();
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aRedo.get())
+  }
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myData.get())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myUndoLimit)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myUndoTransaction)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myFromUndo.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myFromRedo.get())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySaveTime)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsNestedTransactionMode)
+
+  for (TDF_DeltaList::Iterator anUndoFILOIt (myUndoFILO); anUndoFILOIt.More(); anUndoFILOIt.Next())
+  {
+    const Handle(TDF_Delta)& anUndoFILO = anUndoFILOIt.Value();
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, anUndoFILO.get())
+  }
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myOnlyTransactionModification)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySaveEmptyLabels)
+}
index b5ac62368fd71d0e85123bbe25ca8bf0d5522283..0d07b103d1df4f183215802c1d7ed073f342266e 100644 (file)
@@ -245,6 +245,9 @@ public:
   //! Prepares document for closing
   Standard_EXPORT virtual void BeforeClose();
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 
 
 
index b8e1daa8fc6e9687be6772ed7bce93164665c975..df678338186aca7873e673c773812e66961b2d5a 100644 (file)
@@ -14,6 +14,7 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDocStd_Modified.hxx>
 
 #include <Standard_DomainError.hxx>
 #include <Standard_GUID.hxx>
@@ -22,7 +23,6 @@
 #include <TDF_Data.hxx>
 #include <TDF_Label.hxx>
 #include <TDF_RelocationTable.hxx>
-#include <TDocStd_Modified.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(TDocStd_Modified,TDF_Attribute)
 
index 8780603af66babda7ab35daba7262e5c11c869d2..37d78f5303d2137700fceaeb7e960b6eb763b512 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDocStd_MultiTransactionManager.hxx>
 
 #include <Standard_Type.hxx>
 #include <TCollection_ExtendedString.hxx>
 #include <TDocStd_ApplicationDelta.hxx>
 #include <TDocStd_Document.hxx>
-#include <TDocStd_MultiTransactionManager.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(TDocStd_MultiTransactionManager,Standard_Transient)
 
index bfa14f07c91f8bbecb600ed42b7930033edcef14..aeba4b2b18a87b583e38e2be27dbdd1c94d27545 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDocStd_Owner.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_Data.hxx>
 #include <TDF_RelocationTable.hxx>
 #include <TDocStd_Document.hxx>
-#include <TDocStd_Owner.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(TDocStd_Owner,TDF_Attribute)
 
@@ -147,3 +148,14 @@ Standard_OStream& TDocStd_Owner::Dump (Standard_OStream& anOS) const
   return anOS;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TDocStd_Owner::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myDocument.get())
+}
+
index 01768c0db7e56a99c33cee1750027507a97dd778..69e5b0534fc484d79216902b3b626fef38e9dc55 100644 (file)
@@ -68,6 +68,9 @@ public:
   
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index eba6f7203e559e35a703642b79be921eff9d2414..5f9fd775c2eced6bc026ce037d94d331a2437a31 100644 (file)
@@ -14,9 +14,9 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDocStd_PathParser.hxx>
 
 #include <TCollection_ExtendedString.hxx>
-#include <TDocStd_PathParser.hxx>
 
 TDocStd_PathParser::TDocStd_PathParser(const TCollection_ExtendedString& path)
 {
index 180bf68f58bdbd788b3bc039208224ab63c24581..be54a25ccbb37de42db9939adfc4ec47d9e8d0ab 100644 (file)
@@ -18,6 +18,8 @@
 //Version      Date            Purpose
 //             0.0     Sep 15 1997     Creation
 
+#include <TDocStd_XLink.hxx>
+
 #include <Standard_GUID.hxx>
 #include <Standard_NotImplemented.hxx>
 #include <Standard_Type.hxx>
@@ -32,7 +34,6 @@
 #include <TDF_Tool.hxx>
 #include <TDocStd.hxx>
 #include <TDocStd_Document.hxx>
-#include <TDocStd_XLink.hxx>
 #include <TDocStd_XLinkIterator.hxx>
 #include <TDocStd_XLinkRoot.hxx>
 
index d5666e9e909e82914f437dc6fb19c3c2bb41fe6e..84809a9fc9caeba07f9ffa1bdd128ce520eaa930 100644 (file)
 //Version      Date            Purpose
 //             0.0     Sep 15 1997     Creation
 
+#include <TDocStd_XLinkIterator.hxx>
+
 #include <Standard_NoMoreObject.hxx>
 #include <TDF_Data.hxx>
 #include <TDocStd_Document.hxx>
 #include <TDocStd_XLink.hxx>
-#include <TDocStd_XLinkIterator.hxx>
 #include <TDocStd_XLinkRoot.hxx>
 
 //=======================================================================
index d1c0207bebebe19b1d3a3ff0476548de36dc0c42..d0fd4462a3ae543383522ac8d628e0140bfa3197 100644 (file)
@@ -18,6 +18,8 @@
 //Version      Date            Purpose
 //             0.0     Sep 15 1997     Creation
 
+#include <TDocStd_XLinkRoot.hxx>
+
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TDF_Attribute.hxx>
@@ -25,7 +27,6 @@
 #include <TDF_RelocationTable.hxx>
 #include <TDocStd_XLink.hxx>
 #include <TDocStd_XLinkIterator.hxx>
-#include <TDocStd_XLinkRoot.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(TDocStd_XLinkRoot,TDF_Attribute)
 
index da951e4f3248475af9408a03f7b0519d9ca4b6ef..ca333c0a84dd88b130741bc0915b5e044de3e486 100644 (file)
@@ -14,6 +14,7 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <TDocStd_XLinkTool.hxx>
 
 #include <Standard_DomainError.hxx>
 #include <Standard_GUID.hxx>
@@ -36,7 +37,6 @@
 #include <TDF_Tool.hxx>
 #include <TDocStd_Document.hxx>
 #include <TDocStd_XLink.hxx>
-#include <TDocStd_XLinkTool.hxx>
 
 // standard copy
 //=======================================================================
index 9d7ec9d3d0a4807468cfcb46b0c7fbeead7534e6..34ee0bdb9e7aed9db67c719bfe8e0d62ba150248 100644 (file)
@@ -28,6 +28,7 @@
 #include <TDF_LabelList.hxx>
 #include <TDF_LabelMap.hxx>
 #include <TDF_RelocationTable.hxx>
+#include <TDF_Tool.hxx>
 #include <TNaming.hxx>
 #include <TNaming_Builder.hxx>
 #include <TNaming_Iterator.hxx>
@@ -2144,3 +2145,28 @@ void TNaming_Name::Orientation(const TopAbs_Orientation theOrientation)
   myOrientation = theOrientation;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TNaming_Name::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_CLASS_BEGIN (theOStream, TNaming_Name)
+
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myType)
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myShapeType)
+
+  for (TNaming_ListOfNamedShape::Iterator anArgsIt (myArgs); anArgsIt.More(); anArgsIt.Next())
+  {
+    const Handle(TNaming_NamedShape)& anArg = anArgsIt.Value();
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, anArg.get())
+  }
+  
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIndex)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myShape)
+
+  TCollection_AsciiString aLabel;
+  TDF_Tool::Entry (myContextLabel, aLabel);
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aLabel)
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myOrientation)
+}
index 6c51bd9ebc49f02685e3925a60ff6af57008187c..6b8fe206ae6e0bcff6626166e1efb17536598e93 100644 (file)
@@ -84,6 +84,9 @@ public:
   Standard_EXPORT Standard_Boolean Solve (const TDF_Label& aLab, const TDF_LabelMap& Valid) const;
   
   Standard_EXPORT void Paste (TNaming_Name& into, const Handle(TDF_RelocationTable)& RT) const;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
 private:
   TNaming_NameType myType;
index 860cdcd8fbae4838bf857b29f1b8daac1f2d6729..e67e4be77cfeb19227f017f34d43210551ec54f9 100644 (file)
@@ -34,6 +34,7 @@
 #include <TDF_DeltaOnRemoval.hxx>
 #include <TDF_Label.hxx>
 #include <TDF_RelocationTable.hxx>
+#include <TDF_Tool.hxx>
 #include <TNaming_Builder.hxx>
 #include <TNaming_CopyShape.hxx>
 #include <TNaming_DeltaOnModification.hxx>
@@ -89,6 +90,9 @@ public:
   //      et Trans n est pas posterieure a son BackUp
   Standard_Boolean IsValidInTrans(Standard_Integer Trans);
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
   // Memory management
   DEFINE_STANDARD_ALLOC
   
@@ -135,6 +139,23 @@ Standard_Boolean TNaming_Node::IsValidInTrans(Standard_Integer Trans)
   return 0;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TNaming_Node::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_CLASS_BEGIN (theOStream, TNaming_Node)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myOld)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myNew)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAtt)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, nextSameAttribute)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, nextSameOld)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, nextSameNew)
+}
+
 //**********************************************************************
 // Methods of TNaming_NamedShape
 //**********************************************************************
@@ -1472,6 +1493,17 @@ Handle(TNaming_NamedShape) TNaming_RefShape::NamedShape() const
   return myFirstUse->myAtt;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TNaming_RefShape::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_CLASS_BEGIN (theOStream, TNaming_NamedShape);
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myShape);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myFirstUse);
+}
 
 //**********************************************************************
 //Methods of the TNaming_Tool class
@@ -1626,3 +1658,20 @@ Standard_Integer TNaming_Tool::ValidUntil (const TopoDS_Shape&               S,
   }
   return Until;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TNaming_NamedShape::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+  
+  TCollection_AsciiString aLabel;
+  TDF_Tool::Entry (myNode->Label(), aLabel);
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aLabel)
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myEvolution)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myVersion)
+}
index 4e72e3ab3c90e407836d10609b4669523aff4e66..1533423443a018ea9c0bf221a3a994af1935b6a3 100644 (file)
@@ -135,6 +135,9 @@ public:
   
   //! Dumps the attribute on <aStream>.
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 friend class TNaming_Builder;
 friend class TNaming_Iterator;
index 989ab7d003762e9efd922f08d409871e7ceed8d8..c2d2b5785ceca73ba6ac0afec77cecdbd1b893bb 100644 (file)
@@ -1998,3 +1998,15 @@ void TNaming_Naming::ExtendedDump(Standard_OStream& anOS,
   //anOS<<"myContext: #" <<aMap.Add(myContext)<<std::endl; 
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TNaming_Naming::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+  
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myName)
+}
index f5ec41bef31ddccbe71bdf4f626d11182556455b..d853734869c6dd31a7bff5dd25e17b0716d03983 100644 (file)
@@ -101,6 +101,9 @@ public:
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
   
   Standard_EXPORT virtual void ExtendedDump (Standard_OStream& anOS, const TDF_IDFilter& aFilter, TDF_AttributeIndexedMap& aMap) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index 45a12fcf949525e876600ff2ed6d69b4a5a7ff9a..91a60597b1942c813f8ef6de463f4e31e19a6421 100644 (file)
@@ -52,6 +52,9 @@ public:
   
   Standard_EXPORT Handle(TNaming_NamedShape) NamedShape() const;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 
 
 
index d7f883d8f7c1467d68ee08f4dc8f76122c8a5d5c..a5e79d7e8a657fa9167b52585b82252431428e1a 100644 (file)
@@ -23,6 +23,7 @@
 #include <TDF_DeltaOnAddition.hxx>
 #include <TDF_DeltaOnRemoval.hxx>
 #include <TDF_RelocationTable.hxx>
+#include <TDF_Tool.hxx>
 #include <TNaming_Builder.hxx>
 #include <TNaming_DataMapIteratorOfDataMapOfShapePtrRefShape.hxx>
 #include <TNaming_PtrNode.hxx>
@@ -185,3 +186,28 @@ Standard_OStream& TNaming_UsedShapes::Dump(Standard_OStream& anOS) const
 void TNaming_UsedShapes::References(const Handle(TDF_DataSet)& ) const
 {
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TNaming_UsedShapes::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  for (TNaming_DataMapOfShapePtrRefShape::Iterator aMapIt (myMap); aMapIt.More(); aMapIt.Next())
+  {
+    const TopoDS_Shape& aShape = aMapIt.Key();
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aShape)
+
+    TCollection_AsciiString aLabel;
+    TDF_Tool::Entry (aMapIt.Value()->Label(), aLabel);
+    OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aLabel)
+
+    const TopoDS_Shape& aRefShape = aMapIt.Value()->Shape();
+
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aRefShape)
+  }
+}
index 8e3bd3df7fb4c0fe9870eb45c9ab347d4f1bcdf1..935828874e9c080cbb2b544709124dbaf5dd12a4 100644 (file)
@@ -106,6 +106,9 @@ public:
   
   //! Dumps the attribute on <aStream>.
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 friend class TNaming_Builder;
 
index 07e92ab329352d02322bf257da70cf4edf8d58c8..35588bbe2137d2215b13e08afc06c086b469ee14 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <Standard_SStream.hxx>
 #include <Standard_ErrorHandler.hxx>
+#include <Standard_Dump.hxx>
 #include <TCollection_ExtendedString.hxx>
 #include <TColStd_SequenceOfExtendedString.hxx>
 #include <Message_Msg.hxx>
@@ -234,3 +235,13 @@ void TObj_Application::ErrorMessage (const TCollection_ExtendedString &theMsg,
   myMessenger->Send ( theMsg, theLevel );
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TObj_Application::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDocStd_Application)
+}
index d393269ebdea4e9a3a8a58ad54e76df382533a62..8c44bf001a246288188eec8bee75a7f77e072598 100644 (file)
@@ -79,6 +79,9 @@ public:
   Standard_Boolean IsVerbose () const
   { return myIsVerbose; }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
  public:
   /** 
   * Redefined OCAF methods
index eff550adcab4165300067ea5aeefc9564ec592cb..7837327cf94737c69be784843ef384e261216f07 100644 (file)
@@ -46,10 +46,10 @@ TopLoc_Datum3D::TopLoc_Datum3D (const gp_Trsf& T) :
 //function : DumpJson
 //purpose  : 
 //=======================================================================
-void TopLoc_Datum3D::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+void TopLoc_Datum3D::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, TopLoc_Datum3D);
-  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myTrsf);
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myTrsf)
 }
 
 //=======================================================================
index 8c145a7752786a6c218a83f857ede4b1d83e880e..0997bca4b8ace86af4622c8a14024aea5a0d6e24 100644 (file)
@@ -54,7 +54,7 @@ public:
   
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
   //! Writes the contents of this Datum3D to the stream S.
   Standard_EXPORT void ShallowDump (Standard_OStream& S) const;
index a3530ddc58d250de3151ae7ff0b6d35615987890..a8355e411c019c26f642d4bd6d30a49a04cf227b 100644 (file)
@@ -38,12 +38,12 @@ TopLoc_ItemLocation::TopLoc_ItemLocation
 //function : DumpJson
 //purpose  : 
 //=======================================================================
-void TopLoc_ItemLocation::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+void TopLoc_ItemLocation::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, TopLoc_ItemLocation);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, TopLoc_ItemLocation)
 
-  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myTrsf);
-  OCCT_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())
 
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPower);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPower)
 }
index 90cc4103fcc951138218b8c5f8091321ecf552a0..c70f34319eb0a4aa49e49bca871c9e7460633340 100644 (file)
@@ -51,7 +51,7 @@ public:
   Standard_EXPORT TopLoc_ItemLocation(const Handle(TopLoc_Datum3D)& D, const Standard_Integer P);
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
 
 friend class TopLoc_Location;
index 2a08cbf718f4d8a80cee6965dcb34f51da9d1cf8..52e726e53ebcf18195464bec74cc580479201b47 100644 (file)
@@ -235,12 +235,12 @@ Standard_Boolean TopLoc_Location::IsDifferent
 //function : DumpJson
 //purpose  : 
 //=======================================================================
-void TopLoc_Location::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+void TopLoc_Location::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, TopLoc_Location);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, TopLoc_Location)
 
-  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &Transformation());
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsIdentity());
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &Transformation())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsIdentity())
 }
 
 //=======================================================================
index dbc8b4fd4ffb7168c0b3c1fb542503d3efdd2427..d06e755755b8616d7806bfafbd1f051f74472c03 100644 (file)
@@ -143,7 +143,7 @@ Standard_Boolean operator != (const TopLoc_Location& Other) const
 }
   
   //! Dumps the content of me into the stream
-  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
   //! Prints the contents of <me> on the stream <s>.
   Standard_EXPORT void ShallowDump (Standard_OStream& S) const;
index aa5067202f9165ab150dd55362e625b8e428ee74..855075861851e519d86007ad073f4841b64e2d8a 100644 (file)
@@ -39,12 +39,12 @@ Standard_Integer TopoDS_Shape::HashCode (const Standard_Integer theUpperBound) c
 //function : DumpJson
 //purpose  : 
 //=======================================================================
-void TopoDS_Shape::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+void TopoDS_Shape::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, TopoDS_Shape);
+  OCCT_DUMP_CLASS_BEGIN (theOStream, TopoDS_Shape)
 
-  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTShape.get());
-  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLocation);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTShape.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLocation)
 
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myOrient);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myOrient)
 }
index f9f8a3013208c545fcbc3b4f6d79f88939676ad8..52e401287a4cb6642b60d434b0d75d28f0331f39 100644 (file)
@@ -281,7 +281,7 @@ public:
   void TShape (const Handle(TopoDS_TShape)& theTShape) { myTShape = theTShape; }
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
 private:
 
index 3ae9e1f6b21372acf85d8ca108bc33c03473e0e1..82489573d790f8d198c8b559f8b3244a2df6c6b3 100644 (file)
@@ -25,8 +25,26 @@ IMPLEMENT_STANDARD_RTTIEXT(TopoDS_TShape,Standard_Transient)
 //function : DumpJson
 //purpose  : 
 //=======================================================================
-void TopoDS_TShape::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
+void TopoDS_TShape::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, TopoDS_TShape);
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFlags);
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, this)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, ShapeType())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, NbChildren())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFlags)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Free())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Free())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Locked())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Modified())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Checked())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Orientable())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Closed())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Infinite())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Convex())
 }
index 342436d3583804ed04a072cf1c61b71c451b3322..1efe412fab7c1013eeafb226f81fcaace2cf471d 100644 (file)
@@ -127,7 +127,7 @@ public:
   Standard_Integer NbChildren() const { return myShapes.Size(); }
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
 friend class TopoDS_Iterator;
 friend class TopoDS_Builder;
index 951df3752dfed939870c523fd8259617710cd962..a21cef0143a6b07940ee93ad6085c2c3895a43b1 100644 (file)
@@ -573,3 +573,14 @@ void V3d_Viewer::DisplayPrivilegedPlane (const Standard_Boolean theOnOff, const
 
   myPlaneStructure->Display();
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void V3d_Viewer::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPrivilegedPlane)
+}
index 51e2db182f4310e58572dd32bbe189d5b912f1a5..169b42aed29c5cda8535352680ec3d9dbc495913 100644 (file)
@@ -480,6 +480,9 @@ public: //! @name deprecated methods
     aColor.Values (theV1, theV2, theV3, theType) ;
   }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 private:
 
   //! Returns the default background colour.
index a02d48aa11905a3fe225cba8b24a3d598792d383..6e5e32a069bf5f50d757c575f0e98a7aa12b2f55 100644 (file)
@@ -15,6 +15,7 @@
 
 
 #include <Resource_Manager.hxx>
+#include <Standard_Dump.hxx>
 #include <TDF_Label.hxx>
 #include <TDocStd_Document.hxx>
 #include <TPrsStd_DriverTable.hxx>
@@ -67,3 +68,14 @@ void XCAFApp_Application::InitDocument(const Handle(TDocStd_Document)& aDoc) con
 {
   XCAFDoc_DocumentTool::Set(aDoc->Main());
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFApp_Application::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDocStd_Application)
+}
index ea9b93e5ba9c81f8829574ef05535495c3f6b659..05067f69c55913f324953e95fad7a8ebc066a240 100644 (file)
@@ -48,6 +48,9 @@ public:
   //! any actions with documents in order to init application
   Standard_EXPORT static Handle(XCAFApp_Application) GetApplication();
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
   DEFINE_STANDARD_RTTIEXT(XCAFApp_Application,TDocStd_Application)
 
 protected:
index 3f87af66ef9fa1cf0131b26c8f9e6feab00578ab..fa9d84e3e91e6d25570bb621f4485ad4e80a0f6b 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <XCAFDoc_Area.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_Label.hxx>
 #include <TDF_RelocationTable.hxx>
-#include <XCAFDoc_Area.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_Area,TDF_Attribute)
 
@@ -146,3 +147,16 @@ Standard_OStream& XCAFDoc_Area::Dump (Standard_OStream& anOS) const
   anOS << Get();
   return anOS;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFDoc_Area::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myValue)
+}
index f1fcf4269f826d1cec5fbd0f070aee7c6f0310d2..76de1b81a432225ad3796131bcdbb5ea172f3032 100644 (file)
@@ -66,6 +66,9 @@ public:
   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
   
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index bd6a1d623602f3ad52cd156b0b047d0e2c1121d4..97048a5040137a930cc3844118c037a657bd5cf6 100644 (file)
@@ -16,6 +16,8 @@
 #include <TDF_Tool.hxx>
 #include <XCAFDoc_AssemblyItemId.hxx>
 
+#include <Standard_Dump.hxx>
+
 XCAFDoc_AssemblyItemId::XCAFDoc_AssemblyItemId()
 {
 
@@ -135,3 +137,18 @@ XCAFDoc_AssemblyItemId::GetLabel(const Handle(TDF_Data)& aDF) const
   }
   return aLabel;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFDoc_AssemblyItemId::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+  OCCT_DUMP_CLASS_BEGIN (theOStream, XCAFDoc_AssemblyItemId)
+
+  for (TColStd_ListOfAsciiString::Iterator aPathIt (myPath); aPathIt.More(); aPathIt.Next())
+  {
+    TCollection_AsciiString aPath = aPathIt.Value();
+    OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aPath)
+  }
+}
index da41dc66b9763737232a9480a26848628e183117..181b33e22ba4359d970ad19b1817947f9c51ab6e 100644 (file)
@@ -77,6 +77,9 @@ public:
 
   //! Returns the full pass as a formatted string.
   Standard_EXPORT TCollection_AsciiString ToString() const;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
   //! Returns the last label in the path
   Standard_EXPORT TDF_Label GetLabel(const Handle(TDF_Data)& aDF) const;
index bf7b0ae3664e06c7312930c470de0f190d345b15..025672e4b7e657ac8523a8719c393dba2329e027 100644 (file)
@@ -13,6 +13,9 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <XCAFDoc_AssemblyItemRef.hxx>
+
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <TDF_Data.hxx>
 #include <TDF_Label.hxx>
@@ -24,7 +27,6 @@
 #include <TopExp.hxx>
 #include <TopoDS_Shape.hxx>
 #include <TopTools_IndexedMapOfShape.hxx>
-#include <XCAFDoc_AssemblyItemRef.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_AssemblyItemRef, TDF_Attribute)
 
@@ -299,3 +301,18 @@ XCAFDoc_AssemblyItemRef::Dump(Standard_OStream& theOS) const
     theOS << "/Subshape: " << myExtraId;
   return theOS;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFDoc_AssemblyItemRef::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myItemId)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myExtraRef)
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myExtraId)
+}
index 82474ab4305c728d218c4e9e1fd8764835ec9244..95b900d57d706b8bb8c4983dfa64d53f0f47dd69 100644 (file)
@@ -135,6 +135,9 @@ public:
 
   //! Reverts the reference to empty state.
   Standard_EXPORT void ClearExtraRef();
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 public:
 
index f1920406edb156c2a574638c2c7b6501137eef64..dc2e5b4a4a6ab1c230163a538b2cd31bd3a43c6a 100644 (file)
@@ -13,6 +13,7 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <XCAFDoc_Centroid.hxx>
 
 #include <gp_Pnt.hxx>
 #include <Standard_GUID.hxx>
@@ -20,7 +21,6 @@
 #include <TDF_Attribute.hxx>
 #include <TDF_Label.hxx>
 #include <TDF_RelocationTable.hxx>
-#include <XCAFDoc_Centroid.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_Centroid,TDF_Attribute)
 
@@ -149,3 +149,16 @@ Standard_OStream& XCAFDoc_Centroid::Dump (Standard_OStream& anOS) const
   anOS << myCentroid.Z() << ")";
   return anOS;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFDoc_Centroid::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCentroid)
+}
index bad28e8e81d8f93a01c43f2df1f9d4ac8f007339..90ac9a58e10a3ff9bc8a639e36d58cb9feb824cd 100644 (file)
@@ -69,6 +69,9 @@ public:
   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
   
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index 931c9d8462994fd6f5dbdc5bddc9604f27f0c712..f3d91cc2f517e591d057ccb9a52a1db4f5339f59 100644 (file)
@@ -13,6 +13,7 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <XCAFDoc_ClippingPlaneTool.hxx>
 
 #include <TCollection_HAsciiString.hxx>
 #include <TDataStd_Integer.hxx>
@@ -23,7 +24,6 @@
 #include <TDF_Attribute.hxx>
 #include <TDF_ChildIDIterator.hxx>
 #include <XCAFDoc.hxx>
-#include <XCAFDoc_ClippingPlaneTool.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_ClippingPlaneTool, TDF_Attribute)
 
@@ -401,3 +401,14 @@ XCAFDoc_ClippingPlaneTool::XCAFDoc_ClippingPlaneTool()
 {
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFDoc_ClippingPlaneTool::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+}
+
index 89834c89a84bf2decff4221f41ad5db80b9fce61..775fea1d1f737de62c9ee4f1a740eacf23021652 100644 (file)
@@ -116,6 +116,9 @@ public:
   Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
   
   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index e1f1ad91e271246c55560333eb1c68747c0edbd9..05fd3c0ce308217a7051c6b89ab7222d0c408005 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <XCAFDoc_Color.hxx>
 
 #include <Quantity_Color.hxx>
 #include <Quantity_ColorRGBA.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_Label.hxx>
 #include <TDF_RelocationTable.hxx>
-#include <XCAFDoc_Color.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_Color,TDF_Attribute)
 
@@ -257,3 +258,15 @@ const Standard_GUID& XCAFDoc_Color::ID() const
   Handle(XCAFDoc_Color)::DownCast(Into)->Set(myColor);
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFDoc_Color::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myColor)
+}
index db94e724f613715375bb9e7796240e80bece1407..63af4b7beff6d96bd7d5a341ff6e9bccd7516909 100644 (file)
@@ -81,6 +81,9 @@ public:
   Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
   
   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index 1385f83a575250f35bd445238dc447c5fafc228c..04fc9d94b1db15edcaf236c23b059cb6ebf22441 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <XCAFDoc_ColorTool.hxx>
 
 #include <Quantity_Color.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TDataStd_Name.hxx>
@@ -26,7 +28,6 @@
 #include <TopoDS_Shape.hxx>
 #include <XCAFDoc.hxx>
 #include <XCAFDoc_Color.hxx>
-#include <XCAFDoc_ColorTool.hxx>
 #include <XCAFDoc_DocumentTool.hxx>
 #include <XCAFDoc_GraphNode.hxx>
 #include <XCAFDoc_ShapeTool.hxx>
@@ -784,3 +785,16 @@ Standard_Boolean XCAFDoc_ColorTool::ReverseChainsOfTreeNodes()
   }
   return Standard_True;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFDoc_ColorTool::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+   
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myShapeTool.get())
+}
index 8a582ed574650547cf293ae0ba676cca54abe2bb..b1316b75d27d84b84754c3f4866f25fda3a6fa26 100644 (file)
@@ -240,6 +240,9 @@ public:
   Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
   
   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index bafc41bd6ec1872d93759bbf26dbdd32a4a46c20..ce0e31e0a2ce05231cb50b70972f53cf1fa60511 100644 (file)
@@ -11,6 +11,7 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <XCAFDoc_Datum.hxx>
 
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
@@ -19,7 +20,6 @@
 #include <TDF_Label.hxx>
 #include <TDF_ChildIterator.hxx>
 #include <TDF_RelocationTable.hxx>
-#include <XCAFDoc_Datum.hxx>
 #include <TDataStd_AsciiString.hxx>
 #include <TDataStd_IntegerArray.hxx>
 #include <TDataStd_RealArray.hxx>
@@ -547,3 +547,17 @@ void XCAFDoc_Datum::Paste(const Handle(TDF_Attribute)& theInto,
   Handle(XCAFDoc_Datum)::DownCast(theInto)->Set(myName,myDescription,myIdentification);
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFDoc_Datum::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myName.get())
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myDescription.get())
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myIdentification.get())
+}
index 2ec529efa7a8ecde5133bf326b486f74841c059a..1afe973824ddd35b7d250f296194f79be37f760d 100644 (file)
@@ -72,6 +72,9 @@ public:
   Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
   
   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
   DEFINE_STANDARD_RTTIEXT(XCAFDoc_Datum,TDF_Attribute)
 
index 4fb3b21da161bf0900add4e6738e440a5d2f2192..01b5118871bd10e13d8bf5afd4854cade0ecffac 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <XCAFDoc_DimTol.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TCollection_HAsciiString.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_Label.hxx>
 #include <TDF_RelocationTable.hxx>
-#include <XCAFDoc_DimTol.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_DimTol,TDF_Attribute)
 
@@ -175,3 +176,24 @@ void XCAFDoc_DimTol::Paste(const Handle(TDF_Attribute)& Into,
   Handle(XCAFDoc_DimTol)::DownCast(Into)->Set(myKind,myVal,myName,myDescription);
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFDoc_DimTol::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myKind)
+
+  for (TColStd_Array1OfReal::Iterator aValIt (myVal->Array1()); aValIt.More(); aValIt.Next())
+  {
+    const Standard_Real& aValue = aValIt.Value();
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aValue)
+  }
+  
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myName.get())
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myDescription.get())
+}
index b218a1e80b43b4cb7c28fd64d0d7b2f988a09d2e..52833582e604fc30cfb8a46423e7b5fd725a1e03 100644 (file)
@@ -62,6 +62,9 @@ public:
   Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
   
   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index 931a6a2e45f4af6bcf81542e431556b39fc7591d..f2f904580297fd83f9b4fe3336f1a46e2ff51214 100644 (file)
@@ -12,6 +12,7 @@
 // commercial license or contractual agreement.
 
 #include <XCAFDoc_DimTolTool.hxx>
+
 #include <Precision.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
@@ -1089,4 +1090,17 @@ void XCAFDoc_DimTolTool::SetGDTPresentations(NCollection_IndexedDataMap<TDF_Labe
       continue;
     }
   }
-}
\ No newline at end of file
+}
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFDoc_DimTolTool::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myShapeTool.get())
+}
index 38c58add41ec06d49227107a6d577848e5cfff9e..0107e59b125624e8580131a0834c533ab4660f74 100644 (file)
@@ -256,6 +256,9 @@ public:
   Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
   
   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index 0800c9d059b384091fb9d980c1f9cfd3495d987a..f25f12b6ba6879b845bd9e179b522a4ee413e502 100644 (file)
@@ -461,3 +461,14 @@ void XCAFDoc_Dimension::Paste(const Handle(TDF_Attribute)& /*Into*/,
                            const Handle(TDF_RelocationTable)& /*RT*/) const
 {
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFDoc_Dimension::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+}
index 46b320820d930118202016e939378bbc849f67df..4d3c1aa8312ad15ea927984b7d04fbeda16022d8 100644 (file)
@@ -62,6 +62,9 @@ public:
   
   //! Returns dimension object data taken from the paren's label and its sub-labels.
   Standard_EXPORT Handle(XCAFDimTolObjects_DimensionObject) GetObject() const;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
   DEFINE_STANDARD_RTTIEXT(XCAFDoc_Dimension,TDF_Attribute)
 
index 8614586137e3ef3102ad44ea97c6e6fb41e5229c..234f204d817e14b9eca58279d89cc57879e20653 100644 (file)
@@ -404,3 +404,14 @@ Standard_Boolean XCAFDoc_DocumentTool::IsXCAFDocument(const  Handle(TDocStd_Docu
   Handle(TDataStd_TreeNode) aRootNode;
   return RootL.FindAttribute (aRefGuid, aRootNode);
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFDoc_DocumentTool::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+}
index 5ff52becd1edb536668eb724ae5e0c8e6ab808c2..ec276c669ee6afe3178347cb1ee40b50d749ae16 100644 (file)
@@ -133,6 +133,9 @@ public:
   
   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
   DEFINE_STANDARD_RTTIEXT(XCAFDoc_DocumentTool,TDF_Attribute)
 
 protected:
index f1e6d239c1bc0ee0ebb4d6f17e5614ae62817c61..6d890a7306666bb1b150e34a5845ecbd3e0150f4 100644 (file)
@@ -431,3 +431,14 @@ void XCAFDoc_GeomTolerance::Paste(const Handle(TDF_Attribute)& /*Into*/,
                            const Handle(TDF_RelocationTable)& /*RT*/) const
 {
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFDoc_GeomTolerance::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+}
index 21ffc239dfeb2de11d9b4941f67296be63cf0aa6..cc1b348428ea28efd381428eeec4599feb92e85b 100644 (file)
@@ -63,6 +63,9 @@ public:
   Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
   
   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
   DEFINE_STANDARD_RTTIEXT(XCAFDoc_GeomTolerance,TDF_Attribute)
 
index 46e835cd13880a14eadc82efcd45300433f5dbc3..b07d59ca0cbb86698ce9cc7173d65692fac131bc 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <XCAFDoc_GraphNode.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_DataSet.hxx>
 #include <TDF_Label.hxx>
 #include <TDF_RelocationTable.hxx>
-#include <XCAFDoc_GraphNode.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_GraphNode,TDF_Attribute)
 
@@ -484,3 +485,28 @@ void XCAFDoc_GraphNode::BeforeForget()
     UnSetChild (1);
   }
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFDoc_GraphNode::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  for (XCAFDoc_GraphNodeSequence::Iterator anIteratorFather (myFathers); anIteratorFather.More(); anIteratorFather.Next())
+  {
+    const Handle(XCAFDoc_GraphNode)& aFather = anIteratorFather.Value();
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aFather.get())
+  }
+  
+  for (XCAFDoc_GraphNodeSequence::Iterator anIteratorChild (myChildren); anIteratorChild.More(); anIteratorChild.Next())
+  {
+    const Handle(XCAFDoc_GraphNode)& aChild = anIteratorChild.Value();
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aChild.get())
+  }
+
+  OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myGraphID)
+}
index 96380774b9ed9d3ef9fa49efb0fa2116193a000e..cf54212b7ab301161d3df0997afa674953ce0e1b 100644 (file)
@@ -141,6 +141,9 @@ public:
   
   Standard_EXPORT virtual void BeforeForget() Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index db5d16d417c48eb4463c61839c7b799c22502c45..95bf9f55bfd81eb22e07af1a32e34fa90602e38d 100644 (file)
@@ -13,6 +13,7 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <XCAFDoc_LayerTool.hxx>
 
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
@@ -28,7 +29,6 @@
 #include <XCAFDoc.hxx>
 #include <XCAFDoc_DocumentTool.hxx>
 #include <XCAFDoc_GraphNode.hxx>
-#include <XCAFDoc_LayerTool.hxx>
 #include <XCAFDoc_ShapeTool.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_LayerTool,TDF_Attribute)
@@ -622,3 +622,15 @@ void XCAFDoc_LayerTool::Paste(const Handle(TDF_Attribute)& /* into */,
 {
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFDoc_LayerTool::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myShapeTool.get())
+}
index 59cd30a60451d90bcf705426e745ffe0e6569080..b3428d3e6f2edcdb1eac68efa8317860550d2ede 100644 (file)
@@ -190,6 +190,9 @@ public:
   Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
   
   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index 61021e118a1eed829faaf2df56ed8e44a67e27b2..58dca9c77fa1e46e9d127ae7eadce6c644b3a664 100644 (file)
@@ -13,6 +13,7 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <XCAFDoc_Location.hxx>
 
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
@@ -20,7 +21,6 @@
 #include <TDF_Label.hxx>
 #include <TDF_RelocationTable.hxx>
 #include <TopLoc_Location.hxx>
-#include <XCAFDoc_Location.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_Location,TDF_Attribute)
 
@@ -121,3 +121,15 @@ const Standard_GUID& XCAFDoc_Location::ID() const
 
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFDoc_Location::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLocation)
+}
index a2dfc61a0414aa9072a517aa6d5bb4241e159ec6..60497f1d56b96c7b1bb17320077682e4f8fab535 100644 (file)
@@ -62,6 +62,9 @@ public:
   Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
   
   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index 7b6090a8b914014a587c54ef80be8664e52bc284..3b8c887a874ea32920e45a3b5e37208de795b4c9 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <XCAFDoc_Material.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TCollection_HAsciiString.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_Label.hxx>
 #include <TDF_RelocationTable.hxx>
-#include <XCAFDoc_Material.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_Material,TDF_Attribute)
 
@@ -188,3 +189,19 @@ void XCAFDoc_Material::Paste(const Handle(TDF_Attribute)& Into,
                                                 myDensName,myDensValType);
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFDoc_Material::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myName.get())
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myDescription.get())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDensity)
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myDensName.get())
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myDensValType.get())
+}
index 9a07f705c96f5480d59d4048fdd94697f6036b7d..936f38600adf71881d68d6c3a155e551dd11bdb6 100644 (file)
@@ -63,6 +63,9 @@ public:
   Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
   
   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index a62e8a12bf56a3648c5a2eca74c9dfc9ef079c4a..f50676b6ac3a285d64b798b38d54d0cc1944d14f 100644 (file)
@@ -11,6 +11,7 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <XCAFDoc_MaterialTool.hxx>
 
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
@@ -24,7 +25,6 @@
 #include <XCAFDoc.hxx>
 #include <XCAFDoc_DocumentTool.hxx>
 #include <XCAFDoc_Material.hxx>
-#include <XCAFDoc_MaterialTool.hxx>
 #include <XCAFDoc_ShapeTool.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_MaterialTool,TDF_Attribute)
@@ -266,3 +266,15 @@ void XCAFDoc_MaterialTool::Paste(const Handle(TDF_Attribute)& /*into*/,
 {
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFDoc_MaterialTool::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myShapeTool.get())
+}
index 4826d8195f5cd476fb4f4b4af3d2e7d23822cc56..07751866ab214263505de22dccce412245eb19cb 100644 (file)
@@ -91,6 +91,9 @@ public:
   Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
   
   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index 7373e719af1238b092962de30ebb72a33b855cae..4ac5d5011bb8a3d1cd9ef5f1a61c0c812d0bb233 100644 (file)
@@ -267,3 +267,17 @@ XCAFDoc_Note::Dump(Standard_OStream& theOS) const
     ;
   return theOS;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFDoc_Note::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myUserName)
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myTimeStamp)
+}
index 0f11b59ad714c2417dad8a0a11dbd317979a6615..aeb213dce31132757b43a32f242fc295c1d9181a 100644 (file)
@@ -96,6 +96,9 @@ public:
   Standard_EXPORT void Paste(const Handle(TDF_Attribute)&       theAttrInto,
                              const Handle(TDF_RelocationTable)& theRT) const Standard_OVERRIDE;
   Standard_EXPORT Standard_OStream& Dump(Standard_OStream& theOS) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 private:
 
index 3d20ae545b992c422fc5486048047c993754ef29..966fb694d36facb74410cbacd313030b0678bcf1 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <XCAFDoc_NoteBalloon.hxx>
+
 #include <Standard_GUID.hxx>
 #include <TDF_Label.hxx>
-#include <XCAFDoc_NoteBalloon.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_NoteBalloon, XCAFDoc_Note)
 
index 61efed9b2c0d283fef236dd6f80a2f3538f2bb3d..474f4012de61e50d75a603f2fd00d700d93d2e0b 100644 (file)
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <XCAFDoc_NoteBinData.hxx>
+
 #include <OSD_File.hxx>
 #include <TDataStd_AsciiString.hxx>
 #include <TDataStd_ByteArray.hxx>
@@ -19,7 +21,6 @@
 #include <TDF_ChildIterator.hxx>
 #include <TDF_Label.hxx>
 #include <XCAFDoc_Note.hxx>
-#include <XCAFDoc_NoteBinData.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_NoteBinDataContainer, Standard_Transient)
 IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_NoteBinData, Standard_Transient)
index 7e4501cd5148140edc85554b1541b817d07cc000..bb1ed7b3f2182a63b622adcd9c109cfd20b30905 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <XCAFDoc_NoteComment.hxx>
+
 #include <Standard_GUID.hxx>
 #include <TDataStd_Comment.hxx>
 #include <XCAFDoc_Note.hxx>
-#include <XCAFDoc_NoteComment.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_NoteComment, Standard_Transient)
 
index 96e8f0255baa06e0c8257ad62f780ea0f4242f49..b6c6532ab1a04f94f827a16297cbb732c94cc76f 100644 (file)
@@ -11,6 +11,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <XCAFDoc_NotesTool.hxx>
+
 #include <Standard_GUID.hxx>
 #include <NCollection_Map.hxx>
 #include <TColStd_HArray1OfByte.hxx>
@@ -24,7 +26,6 @@
 #include <XCAFDoc_AssemblyItemRef.hxx>
 #include <XCAFDoc_GraphNode.hxx>
 #include <XCAFDoc_Note.hxx>
-#include <XCAFDoc_NotesTool.hxx>
 #include <XCAFDoc_NoteComment.hxx>
 #include <XCAFDoc_NoteBalloon.hxx>
 #include <XCAFDoc_NoteBinData.hxx>
@@ -1570,3 +1571,14 @@ XCAFDoc_NotesTool::Dump(Standard_OStream& theOS) const
     ;
   return theOS;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFDoc_NotesTool::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+}
index 36f7caec5b635a6c12614947800130795fb1a10d..070713cdae2c37e81548af06bd93e13f856d24c5 100644 (file)
@@ -678,6 +678,10 @@ public:
   Standard_EXPORT void Paste(const Handle(TDF_Attribute)&       theAttrInto, 
                              const Handle(TDF_RelocationTable)& theRT) const Standard_OVERRIDE;
   Standard_EXPORT Standard_OStream& Dump(Standard_OStream& theOS) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 };
 
 DEFINE_STANDARD_HANDLE(XCAFDoc_NotesTool, TDF_Attribute)
index 938a66f94e1f946d820a5f7c1a922f8e10c78707..552732b84b9a1c59eac9148ead729deb573b1c01 100644 (file)
@@ -11,6 +11,7 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <XCAFDoc_ShapeMapTool.hxx>
 
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
@@ -19,7 +20,6 @@
 #include <TDF_RelocationTable.hxx>
 #include <TopoDS_Iterator.hxx>
 #include <TopoDS_Shape.hxx>
-#include <XCAFDoc_ShapeMapTool.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_ShapeMapTool,TDF_Attribute)
 
@@ -149,3 +149,20 @@ const TopTools_IndexedMapOfShape& XCAFDoc_ShapeMapTool::GetMap() const
 {
   return myMap;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFDoc_ShapeMapTool::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  for (TopTools_IndexedMapOfShape::Iterator aMapIt (myMap); aMapIt.More(); aMapIt.Next())
+  {
+    const TopoDS_Shape& aShape = aMapIt.Value();
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aShape)
+  }
+}
index 93cdcb3237672f092b462a24b7b445eec8541bd5..72fdee8057b7771aa5eed672a50fb5b46c7e20e3 100644 (file)
@@ -63,6 +63,9 @@ public:
   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
   
   Standard_EXPORT const TopTools_IndexedMapOfShape& GetMap() const;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index 6142603e3a274c60c67545b8f823543068fec3e7..767175f27f28396989ac65883ae533a883ba81bf 100644 (file)
@@ -13,6 +13,7 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <XCAFDoc_ShapeTool.hxx>
 
 #include <BRep_Builder.hxx>
 #include <gp_Pnt.hxx>
@@ -51,7 +52,6 @@
 #include <XCAFDoc_GraphNode.hxx>
 #include <XCAFDoc_Location.hxx>
 #include <XCAFDoc_ShapeMapTool.hxx>
-#include <XCAFDoc_ShapeTool.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_ShapeTool,TDF_Attribute)
 
@@ -2143,3 +2143,43 @@ Handle(TDataStd_NamedData) XCAFDoc_ShapeTool::GetNamedProperties (const TopoDS_S
 
   return aNamedProperty;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFDoc_ShapeTool::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  for (XCAFDoc_DataMapOfShapeLabel::Iterator aShapeLabelIt (myShapeLabels); aShapeLabelIt.More(); aShapeLabelIt.Next())
+  {
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aShapeLabelIt.Key())
+
+    TCollection_AsciiString aShapeLabel;
+    TDF_Tool::Entry (aShapeLabelIt.Value(), aShapeLabel);
+    OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aShapeLabel)
+  }
+  
+  for (XCAFDoc_DataMapOfShapeLabel::Iterator aSubShapeIt (mySubShapes); aSubShapeIt.More(); aSubShapeIt.Next())
+  {
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aSubShapeIt.Key())
+
+    TCollection_AsciiString aSubShape;
+    TDF_Tool::Entry (aSubShapeIt.Value(), aSubShape);
+    OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aSubShape)
+  }
+  
+  for (XCAFDoc_DataMapOfShapeLabel::Iterator aSimpleShapeIt (mySimpleShapes); aSimpleShapeIt.More(); aSimpleShapeIt.Next())
+  {
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aSimpleShapeIt.Key())
+
+    TCollection_AsciiString aSimpleShape;
+    TDF_Tool::Entry (aSimpleShapeIt.Value(), aSimpleShape);
+    OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aSimpleShape)
+  }
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, hasSimpleShapes)
+}
index 2cc83e0b6dd9673f0ca92b37e566c211af3ea1dd..7f66a4b1ba41746075adeade79dd14f484261b39 100644 (file)
@@ -424,6 +424,9 @@ public:
   //! @param theToCreate [in] create and assign attribute if it doesn't exist
   //! @return Handle to the NamedData attribute or Null if there is none
   Standard_EXPORT Handle(TDataStd_NamedData) GetNamedProperties(const TopoDS_Shape& theShape, const Standard_Boolean theToCreate = Standard_False) const;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
   DEFINE_STANDARD_RTTIEXT(XCAFDoc_ShapeTool,TDF_Attribute)
 
index d262e6eb336b2253fda1ad263888260054c0e549..21f4f1e8940b1366e6d76977be59ee2ee73ffdc7 100644 (file)
@@ -397,3 +397,14 @@ void XCAFDoc_View::Paste(const Handle(TDF_Attribute)& /*Into*/,
                          const Handle(TDF_RelocationTable)& /*RT*/) const
 {
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFDoc_View::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+}
index b88bfb7b9d4310d0e1dc0929191789589f1623f4..a3a12b37018403be7909359731d9f83bb6b8376f 100644 (file)
@@ -60,6 +60,9 @@ public:
   
   //! Returns view object data taken from the paren's label and its sub-labels.
   Standard_EXPORT Handle(XCAFView_Object) GetObject() const;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
   DEFINE_STANDARD_RTTIEXT(XCAFDoc_View, TDF_Attribute)
 
index eee158000d326d24cc4b3730e4aa733525ca7ad2..059bd595771ed8590a753a5c29069ebe5ae6664b 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <XCAFDoc_ViewTool.hxx>
+
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TDataStd_Name.hxx>
@@ -26,8 +28,6 @@
 #include <XCAFDoc_GraphNode.hxx>
 #include <XCAFDoc_ShapeTool.hxx>
 #include <XCAFDoc_View.hxx>
-#include <XCAFDoc_ViewTool.hxx>
-
 
 IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_ViewTool, TDF_Attribute)
 
@@ -912,3 +912,13 @@ void XCAFDoc_ViewTool::Paste(const Handle(TDF_Attribute)& /*into*/,
 {
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFDoc_ViewTool::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+}
index 78c3be2a14942a2ad75deed7b8f029b1ba910c0a..d24d4f9eb70de6c5624fadecca32172082504435 100644 (file)
@@ -156,6 +156,9 @@ public:
   Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
   
   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
+  
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
   DEFINE_STANDARD_RTTIEXT(XCAFDoc_ViewTool, TDF_Attribute)
 
index c53f8cb5a16d55abb8bc06b12292196f85d20154..93252c2747bc3e05ea7e11142681a117671917f7 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <XCAFDoc_Volume.hxx>
 
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TDF_Attribute.hxx>
 #include <TDF_Label.hxx>
 #include <TDF_RelocationTable.hxx>
-#include <XCAFDoc_Volume.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_Volume,TDF_Attribute)
 
@@ -146,3 +147,16 @@ Standard_OStream& XCAFDoc_Volume::Dump (Standard_OStream& anOS) const
   anOS << Get();
   return anOS;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void XCAFDoc_Volume::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myValue)
+}
index 751fed588ea4835490c87406f76f3874bc20b48a..8e6644ec31a0bdf402048418df0fd448c32eccb7 100644 (file)
@@ -67,6 +67,9 @@ public:
   
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 
 
 
index 434cccf7099bf0e6cdbdfb2153ce2847d724ac30..b4970370c8e596a5894acd138b63f6ecc32955fb 100644 (file)
@@ -74,14 +74,14 @@ void XCAFPrs_Style::UnSetColorCurv()
 //function : DumpJson
 //purpose  : 
 //=======================================================================
-void XCAFPrs_Style::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+void XCAFPrs_Style::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
 {
   OCCT_DUMP_CLASS_BEGIN (theOStream, XCAFPrs_Style);
 
-  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myColorSurf);
-  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myColorCurv);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myColorSurf)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myColorCurv)
 
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasColorSurf);
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasColorCurv);
-  OCCT_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 d6e7afbc27c2bf9c11d516a68327b76645cbf4b3..6ade9b236e68f316e8bdef5b44a60b7c0b5bcf67 100644 (file)
@@ -122,7 +122,7 @@ public:
   }
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
 protected:
 
index 65290c0d2143d005b0d1f6c9306801402831aa14..3ee0231b34f08b33f255e5ba292a661c7615bd7e 100644 (file)
@@ -27,6 +27,7 @@
 #include <gp_Pnt.hxx>
 #include <gp_Trsf.hxx>
 #include <gp_Vec.hxx>
+#include <Standard_Dump.hxx>
 
 Standard_Boolean gp_Ax1::IsCoaxial
 (const gp_Ax1& Other, 
@@ -84,3 +85,8 @@ gp_Ax1 gp_Ax1::Mirrored (const gp_Ax2& A2) const
   return A1;
 }
 
+void gp_Ax1::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+  OCCT_DUMP_VECTOR_CLASS (theOStream, "Location", 3, loc.X(), loc.Y(), loc.Z())
+  OCCT_DUMP_VECTOR_CLASS (theOStream, "Direction", 3, vdir.X(), vdir.Y(), vdir.Z())
+}
index 8fea4a4e4283ba1f514cdf0fcc3e0c978622e775..1b2dcd62bcd3fa291f0eb5a80bf446bff373aec5 100644 (file)
@@ -205,6 +205,9 @@ public:
     Standard_NODISCARD gp_Ax1 Translated (const gp_Pnt& P1, const gp_Pnt& P2) const;
 
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 
 
 protected:
index bcecdca6fd5ec7770ce96a47014395a7596f6368..ba8e7b155d56607e6d149ed3f8cbfdac08de227c 100644 (file)
@@ -28,6 +28,7 @@
 #include <gp_Trsf.hxx>
 #include <gp_Vec.hxx>
 #include <Standard_ConstructionError.hxx>
+#include <Standard_Dump.hxx>
 
 gp_Ax2::gp_Ax2 (const gp_Pnt& P, const gp_Dir& V) :
 axis(P,V)
@@ -113,3 +114,11 @@ gp_Ax2 gp_Ax2::Mirrored(const gp_Ax2& A2) const
   return Temp;
 }
 
+void gp_Ax2::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+  OCCT_DUMP_VECTOR_CLASS (theOStream, "Location", 3, axis.Location().X(), axis.Location().Y(), axis.Location().Z())
+  OCCT_DUMP_VECTOR_CLASS (theOStream, "Direction", 3, axis.Direction().X(), axis.Direction().Y(), axis.Direction().Z())
+
+  OCCT_DUMP_VECTOR_CLASS (theOStream, "XDirection", 3, vxdir.X(), vxdir.Y(), vxdir.Z())
+  OCCT_DUMP_VECTOR_CLASS (theOStream, "YDirection", 3, vydir.X(), vydir.Y(), vydir.Z())
+}
index c11aafdf9e52b4ea1be7c9d2ad705c3a2241bc3a..9aaa10fdd30ba35fdab27947657c8bf10c2a3107 100644 (file)
@@ -323,6 +323,9 @@ public:
     Standard_NODISCARD gp_Ax2 Translated (const gp_Pnt& P1, const gp_Pnt& P2) const;
 
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 
 
 protected:
index 40ea9ac5cb5cc80e6c07223c1a3805103d680033..fc8b27f480df994ba7383af626b4034d381ae7d8 100644 (file)
@@ -24,6 +24,7 @@
 #include <gp_Trsf2d.hxx>
 #include <gp_Vec2d.hxx>
 #include <Standard_ConstructionError.hxx>
+#include <Standard_Dump.hxx>
 
 void gp_Ax22d::Mirror (const gp_Pnt2d& P)
 {
@@ -57,3 +58,10 @@ gp_Ax22d gp_Ax22d::Mirrored(const gp_Ax2d& A1) const
   return Temp;
 }
 
+void gp_Ax22d::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+  OCCT_DUMP_VECTOR_CLASS (theOStream, "Location", 2, point.X(), point.Y())
+
+  OCCT_DUMP_VECTOR_CLASS (theOStream, "XAxis", 2, vxdir.X(), vxdir.Y())
+  OCCT_DUMP_VECTOR_CLASS (theOStream, "YAxis", 2, vydir.X(), vydir.Y())
+}
index b8371998537cf2da004ecc5998e75fc5c890263b..7b0f45dfe9620249f34bea4a02b3039494bca524 100644 (file)
@@ -210,6 +210,9 @@ public:
   //! point <P2>.
     Standard_NODISCARD gp_Ax22d Translated (const gp_Pnt2d& P1, const gp_Pnt2d& P2) const;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 
 
 
index ab24a561a9ac95587a12599803d03c4ee8b6e79e..6fb6bdfc7d8dbe6f185c54c09d93ab652a5e8cca 100644 (file)
@@ -25,6 +25,7 @@
 #include <gp_Trsf2d.hxx>
 #include <gp_Vec2d.hxx>
 #include <gp_XY.hxx>
+#include <Standard_Dump.hxx>
 
 Standard_Boolean gp_Ax2d::IsCoaxial (const gp_Ax2d& Other, 
                                     const Standard_Real AngularTolerance,
@@ -75,3 +76,10 @@ gp_Ax2d gp_Ax2d::Mirrored (const gp_Ax2d& A) const
   return AA;
 }
 
+void gp_Ax2d::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_CLASS_BEGIN (theOStream, gp_Ax2d)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &loc)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &vdir)
+}
index 20a30cc2f1a690bed699c562e76d5ef65ce8b508..bbf4e983be733c9630b89294caa6b31188868894 100644 (file)
@@ -168,6 +168,9 @@ public:
   //! point <P2>.
     Standard_NODISCARD gp_Ax2d Translated (const gp_Pnt2d& P1, const gp_Pnt2d& P2) const;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 
 
 
index 2a9a065c245eb74d84943ddb0c67c5eade4eea85..ec5e8b7c4d622c0c175fdbab940b6b1eaaf64601 100644 (file)
@@ -23,6 +23,7 @@
 #include <gp_Trsf.hxx>
 #include <gp_Vec.hxx>
 #include <Standard_ConstructionError.hxx>
+#include <Standard_Dump.hxx>
 
 //=======================================================================
 //function : gp_Ax3
@@ -105,3 +106,12 @@ gp_Ax3  gp_Ax3::Mirrored(const gp_Ax2& A2)const
   return Temp;
 }
 
+
+void gp_Ax3::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+  OCCT_DUMP_VECTOR_CLASS (theOStream, "Location", 3, Location().X(), Location().Y(), Location().Z())
+  OCCT_DUMP_VECTOR_CLASS (theOStream, "Direction", 3, Direction().X(), Direction().Y(), Direction().Z())
+
+  OCCT_DUMP_VECTOR_CLASS (theOStream, "XDirection", 3, XDirection().X(), XDirection().Y(), XDirection().Z())
+  OCCT_DUMP_VECTOR_CLASS (theOStream, "YDirection", 3, YDirection().X(), YDirection().Y(), YDirection().Z())
+}
index 2d09566fbbf1357867848ec8caf3df46a64f942f..96ccdcf8f0c96089bcfb1c3e26e3bfdba7704202 100644 (file)
@@ -290,6 +290,9 @@ public:
   Standard_NODISCARD gp_Ax3 Translated (const gp_Pnt& P1, const gp_Pnt& P2) const;
 
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 
 
 protected:
index 228e23db09b7db333ee2bf0dae860cfab41aa2fe..0714a34e6bb029279de1ac9e590a416892180d70 100644 (file)
@@ -22,6 +22,7 @@
 #include <gp_XYZ.hxx>
 #include <Standard_ConstructionError.hxx>
 #include <Standard_DomainError.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_OutOfRange.hxx>
 
 Standard_Real gp_Dir::Angle (const gp_Dir& Other) const
@@ -139,3 +140,7 @@ gp_Dir gp_Dir::Mirrored (const gp_Ax2& A2) const
   return V;
 }
 
+void gp_Dir::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+  OCCT_DUMP_VECTOR_CLASS (theOStream, "gp_Dir", 3, coord.X(), coord.Y(), coord.Z())
+}
index ae492722ef92d2bad493b4eeeb562e7eb6328cf8..17d11d883b8fefa15503dceafc888c486bffd38c 100644 (file)
@@ -263,6 +263,9 @@ public:
   Standard_NODISCARD gp_Dir Transformed (const gp_Trsf& T) const;
 
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 
 
 protected:
index 90d06bc78e55d3c582a68f0316a4060deb05ed5b..57e7b4664c73f6f6616f42d0c7984dd55510ce6b 100644 (file)
@@ -21,6 +21,7 @@
 #include <gp_XY.hxx>
 #include <Standard_ConstructionError.hxx>
 #include <Standard_DomainError.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_OutOfRange.hxx>
 
 Standard_Real gp_Dir2d::Angle (const gp_Dir2d& Other) const
@@ -101,3 +102,7 @@ gp_Dir2d gp_Dir2d::Mirrored (const gp_Ax2d& A) const
   return V;
 }
 
+void gp_Dir2d::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+  OCCT_DUMP_VECTOR_CLASS (theOStream, "gp_Dir2d", 2, coord.X(), coord.Y())
+}
index cc1333dbeeff7668d1beec4e7915422d453c1cd1..49fcbee84711a82b0bb74e3d8f9e74511d557ba9 100644 (file)
@@ -249,6 +249,9 @@ public:
   //! direction <me> is reversed.
   Standard_NODISCARD gp_Dir2d Transformed (const gp_Trsf2d& T) const;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 
 
 
index 0196ec7fe978c1f00f5515ca886630672ef54193..76b97fd48833daddd3b0fe21e467f9ad593ebaa3 100644 (file)
@@ -22,6 +22,7 @@
 #include <gp_Trsf.hxx>
 #include <gp_XYZ.hxx>
 #include <Standard_ConstructionError.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_OutOfRange.hxx>
 
 void gp_GTrsf::SetTranslationPart (const gp_XYZ& Coord)
@@ -157,3 +158,18 @@ void gp_GTrsf::SetForm()
         return;
       }
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void gp_GTrsf::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_CLASS_BEGIN (theOStream, gp_GTrsf)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &matrix)
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &loc)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, shape)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, scale)
+}
index 068aa81826f339fd5f1547f93f1d96b0be09b5dd..0d2414cae6fe01e3e2477bd32c039d04900b37e0 100644 (file)
@@ -244,6 +244,9 @@ public:
   
     gp_Trsf Trsf() const;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 
 
 
index 014797b851cb1fe0745001f6e2e5474f3df02152..dcf8fe37e8404a9136116c4b0a6f34dbfdef67bb 100644 (file)
@@ -273,7 +273,7 @@ void gp_Mat::Power (const Standard_Integer N)
 //function : DumpJson
 //purpose  : 
 //=======================================================================
-void gp_Mat::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
+void gp_Mat::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
 {
-  OCCT_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 d327280a658c99b13df66fc9d8296eb49ab544a8..8eb57bc98702b7885b2d02627ee9e254a1228350 100644 (file)
@@ -256,7 +256,7 @@ public:
     Standard_NODISCARD gp_Mat Transposed() const;
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
 
 friend class gp_XYZ;
index 27a9a35717971ed4d788a97911b2601a4f367504..4d14751d50343267d10f64b80afbcb28244c0a89 100644 (file)
@@ -30,6 +30,7 @@
 #include <gp_Trsf.hxx>
 #include <gp_Vec.hxx>
 #include <Standard_ConstructionError.hxx>
+#include <Standard_Dump.hxx>
 
 gp_Pln::gp_Pln (const gp_Pnt& P,
                const gp_Dir& V)
@@ -130,3 +131,7 @@ gp_Pln gp_Pln::Mirrored (const gp_Ax2& A2) const
   return Pl;
 }
 
+void gp_Pln::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &pos)
+}
index 7306114afac25eedec40d5b4d92e8d8d2b0f4cf5..dbb4a5f3316aab2060c07d7f24c46fe9c972fd84 100644 (file)
@@ -241,6 +241,9 @@ public:
     Standard_NODISCARD gp_Pln Translated (const gp_Pnt& P1, const gp_Pnt& P2) const;
 
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 
 
 protected:
index ac82fb208a913b5b77ec2c898a674fe7725818ca..10a9b5d4345e5a3feb44ed985b9899e530fd4d15 100644 (file)
@@ -25,6 +25,7 @@
 #include <gp_Trsf.hxx>
 #include <gp_Vec.hxx>
 #include <gp_XYZ.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_OutOfRange.hxx>
 
 void gp_Pnt::Transform (const gp_Trsf& T)
@@ -85,3 +86,7 @@ gp_Pnt gp_Pnt::Mirrored (const gp_Ax2& A2) const
   return P;
 }
 
+void gp_Pnt::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+  OCCT_DUMP_VECTOR_CLASS (theOStream, "gp_Pnt", 3, coord.X(), coord.Y(), coord.Z())
+}
index 509600961c35411c427c49790f1c237118461abc..7799a66bfbee5136ec9f20d8d1f12ea4b2f08204 100644 (file)
@@ -174,6 +174,9 @@ public:
     Standard_NODISCARD gp_Pnt Translated (const gp_Pnt& P1, const gp_Pnt& P2) const;
 
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 
 
 protected:
index f51542f05c36175ae5aadaaa17f7c24464c50499..51119eb850933c19c0cdf506a4755a7caa4b1457 100644 (file)
@@ -22,6 +22,7 @@
 #include <gp_Trsf2d.hxx>
 #include <gp_Vec2d.hxx>
 #include <gp_XY.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_OutOfRange.hxx>
 
 void gp_Pnt2d::Transform (const gp_Trsf2d& T)
@@ -69,3 +70,7 @@ gp_Pnt2d gp_Pnt2d::Mirrored (const gp_Ax2d& A) const
   return P;
 }
 
+void gp_Pnt2d::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+  OCCT_DUMP_VECTOR_CLASS (theOStream, "gp_Pnt2d", 2, coord.X(), coord.Y())
+}
index f991621ae1ba15fa529dac3d08acf1082617b89a..b26ee13dca47f7741c874177ba0c47c63ef8527e 100644 (file)
@@ -151,6 +151,9 @@ public:
     Standard_NODISCARD gp_Pnt2d Translated (const gp_Pnt2d& P1, const gp_Pnt2d& P2) const;
 
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 
 
 protected:
index 7c4a4c9cd9c18ff10ee129977c80d5936960e426..9a4e299de50089a563d7532f318496f7c70b58fa 100644 (file)
@@ -855,13 +855,12 @@ void gp_Trsf::Orthogonalize()
 //function : DumpJson
 //purpose  : 
 //=======================================================================
-void gp_Trsf::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+void gp_Trsf::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
 {
-  OCCT_DUMP_CLASS_BEGIN (theOStream, gp_Trsf);
-
-  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &loc);
-  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &matrix);
-
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, shape);
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, scale);
+  OCCT_DUMP_VECTOR_CLASS (theOStream, "Location", 3, loc.X(), loc.Y(), loc.Z())
+  OCCT_DUMP_VECTOR_CLASS (theOStream, "Matrix", 9, matrix.Value(1, 1), matrix.Value(1, 2), matrix.Value(1, 3),
+                                                   matrix.Value(2, 1), matrix.Value(2, 2), matrix.Value(2, 3),
+                                                   matrix.Value(3, 1), matrix.Value(3, 2), matrix.Value(3, 3))
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, shape)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, scale)
 }
index 85e258c67f97cab066f4342b9e6732f03282b3c5..82c15e91c1dfb91235db521143cd789a0322f2be 100644 (file)
@@ -351,7 +351,7 @@ void operator *= (const gp_Trsf& T)
   }
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
 friend class gp_GTrsf;
 
index a02fbed91377029a52b21d2b35806e37104f547e..0599ad950e4d1f031b92b5aca5e124fdcc971541 100644 (file)
@@ -38,7 +38,7 @@ Standard_Boolean gp_XYZ::IsEqual (const gp_XYZ& Other,
 //function : DumpJson
 //purpose  : 
 //=======================================================================
-void gp_XYZ::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
+void gp_XYZ::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
 {
-  OCCT_DUMP_VECTOR_CLASS (theOStream, gp_XYZ, 3, x, y, z)
+  OCCT_DUMP_VECTOR_CLASS (theOStream, "gp_XYZ", 3, x, y, z)
 }
index bc2ebdb135b9d0cd55e838a2f15aef6b5c56b396..e3b49d82eca65d20622cc67880d4c5079fe05b27 100644 (file)
@@ -328,8 +328,7 @@ public:
 
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
-
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
 protected:
 
index af10a78980d08fe022be95e4892946e0aeca8fd0..f41fbbd2b1d1a6a3e68268921e8672cd13000968 100644 (file)
@@ -11,7 +11,7 @@ set pblue 0.027
 
 set dump_aligned_off [vaspects -defaults -dumpJson -dumpCompact on]
 
-if {![regexp {"RGB": \[+([-0-9.+eE]+)\, +([-0-9.+eE]+)\, +([-0-9.+eE]+)\]} $dump_aligned_off full cred cgreen cblue]} {
+if {![regexp {"RGBA": \[+([-0-9.+eE]+)\, +([-0-9.+eE]+)\, +([-0-9.+eE]+)\, +([-0-9.+eE]+)\]} $dump_aligned_off full cred cgreen cblue]} {
   puts "Error in Dump. Wrong format of output."
 }
 
@@ -22,7 +22,7 @@ checkreal "Cblue" $cblue $pblue 1.0e-7 0.0
 
 set dump_aligned_off_deep [vaspects -defaults -dumpJson -dumpCompact on -dumpDepth 2]
 
-if {[regexp {\[+([-0-9.+eE]+)\, +([-0-9.+eE]+)\, +([-0-9.+eE]+)\]} dump_aligned_off_deep full cred cgreen cblue]} {
+if {[regexp {\[+([-0-9.+eE]+)\, +([-0-9.+eE]+)\, +([-0-9.+eE]+)\, +([-0-9.+eE]+)\]} dump_aligned_off_deep full cred cgreen cblue]} {
   puts "Error in Dump. Wrong deep of output"
 }