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.
//! @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;
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)
+}
//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)
}
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
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)
+}
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
myPrimitives.Bind(aPart, aPrims);
}
}
+
+//=======================================================================
+//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)
+}
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.
//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)
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)
+}
//! 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)
};
//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)
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)
+}
//! 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)
};
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())
+}
//! 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;
+
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)
+}
//! 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;
+
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)
+}
//! 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;
+
}
}
+//=======================================================================
+//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())
+}
//! 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;
+
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)
+}
//! 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;
+
}
+//=======================================================================
+//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)
+}
//! 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;
+
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())
+}
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;
+
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())
+}
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;
+
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)
+}
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;
+
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())
+}
+
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;
+
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())
+}
//! 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;
+
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())
+}
+
//! 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;
+
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())
+}
//! 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;
+
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())
+}
//! 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;
+
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())
+}
//! 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;
+
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())
+ }
+}
//! 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;
+
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)
+}
//! 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;
+
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())
+ }
+}
//! 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;
+
#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>
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:
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; }
};
}
//! 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)
{
}
//! 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
//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)
}
}
//! 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:
//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)
}
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:
// 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)
}
}
//! 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:
#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>
// 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)
+}
//! 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;
#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>
{
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)
+}
//! 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;
#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>
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)
+}
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;
#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)
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)
+}
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;
#define _Font_Rect_H__
#include <NCollection_Vec2.hxx>
+#include <Standard_Dump.hxx>
//! Auxiliary POD structure - 2D rectangle definition.
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__
}
}
+//=======================================================================
+//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)
+}
//! 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;
+
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)
+}
//! 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;
+
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)
+}
+
//! 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;
+
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)
+}
//! 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;
+
#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)
+}
//! 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;
+
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)
+}
//! 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;
+
{
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)
+}
//! 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)
protected:
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)
+}
//! 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;
+
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)
+}
//! 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;
+
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)
+}
//! 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;
+
{
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
//! 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)
protected:
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)
+}
//! 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;
+
}
+void Geom_Geometry::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+ OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+}
//! 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;
+
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)
+}
//! 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;
+
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)
+}
//! 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;
+
{
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)
+}
//! 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;
+
{
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)
+}
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:
}
+//=======================================================================
+//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())
+}
//! 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)
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)
+}
//! 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;
+
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)
+}
//! 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;
+
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)
+}
//! 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;
+
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)
+}
//! 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;
+
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)
+}
//! 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;
+
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)
+}
//! 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;
+
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)
+}
//! 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)
{
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)
+}
//! 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;
+
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)
+}
//! 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;
+
#include <Geom_Transformation.hxx>
+#include <Standard_Dump.hxx>
+
IMPLEMENT_STANDARD_RTTIEXT(Geom_Transformation, Standard_Transient)
Geom_Transformation::Geom_Transformation () { }
gpTrsf.PreMultiply (Other->Trsf());
}
+
+void Geom_Transformation::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &gpTrsf)
+}
//! 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;
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)
+}
//! 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;
+
}
}
+//=======================================================================
+//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)
+}
//! 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;
+
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)
+}
//! 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;
+
#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)
+}
//! "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;
+
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)
+}
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;
+
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)
+}
//! 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;
+
{
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)
+}
//! 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)
protected:
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)
+}
//! 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;
+
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)
+}
//! 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;
+
G->Translate (P1, P2);
return G;
}
+
+void Geom2d_Geometry::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+ OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+}
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;
+
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)
+}
//! 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;
+
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)
+}
//! 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;
+
{
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)
+}
//! 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;
+
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)
+}
//! 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;
+
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)
+}
//! 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;
+
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)
+}
//! 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;
+
//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)
}
}
//! 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:
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 :
return aBsdf;
}
+
+//=======================================================================
+//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)
+}
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.
//! 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
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
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)
+}
//! 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
#include <Graphic3d_StructureManager.hxx>
#include <Graphic3d_TransModeFlags.hxx>
#include <Graphic3d_GraphicDriver.hxx>
+#include <Standard_Dump.hxx>
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_CStructure,Standard_Transient)
{
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)
+}
//! 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;
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)
+}
//! 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:
}
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, myId)
+
+ 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)
+}
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.
// 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)
}
//! 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:
? (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)
+}
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
}
}
+ //! 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)
+ }
};
}
}
}
+
+// =======================================================================
+// 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])
+}
//! 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.
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)
+}
//! 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;
+
public:
//! Deactivates the reflective properties of the surface with specified reflection type.
{
return theAxis * theAxis.Dot(theVector) * 2.f - theVector;
}
+
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void Graphic3d_PBRMaterial::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_PBRMaterial)
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myColor)
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMetallic)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myRoughness)
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myEmission)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIOR)
+}
Standard_EXPORT static Standard_ShortReal SpecIBLMapSamplesFactor (Standard_ShortReal theProbability,
Standard_ShortReal theRoughness);
+ //! Dumps the content of me into the stream
+ Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
private:
//! Calculates geometry factor of Cook-Torrance BRDF using Smith formula.
//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)
}
}
//! 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;
};
#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)
+}
//! 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
}
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())
+ }
+}
//! 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;
#include "Graphic3d_Structure.pxx"
+#include <Standard_Dump.hxx>
+
#include <stdio.h>
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Structure,Standard_Transient)
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)
+}
//! 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.
}
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)
+}
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.
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.
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:
#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
}
}
+ //! 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
#include <Graphic3d_LightSet.hxx>
#include <Graphic3d_PolygonOffset.hxx>
#include <Precision.hxx>
+#include <Standard_Dump.hxx>
#include <TCollection_AsciiString.hxx>
enum Graphic3d_ZLayerSetting
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
}
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)
+}
}
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:
#define _NCollection_Buffer_HeaderFile
#include <NCollection_BaseAllocator.hxx>
+#include <Standard_Dump.hxx>
#include <Standard_Transient.hxx>
//! Low-level buffer object.
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
#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.
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];
#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) \
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
#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
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
// 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)
}
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:
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)
+}
+
//!
//! 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)
//! 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:
//! 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.
#include <OpenGl_Element.hxx>
+#include <Standard_Dump.hxx>
+
// =======================================================================
// function : OpenGl_Element
// purpose :
{
//
}
+
+// =======================================================================
+// 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)
+}
//! 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();
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)
+}
//! 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:
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)
+}
//! 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.
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)
+}
Standard_EXPORT virtual ~OpenGl_GraduatedTrihedron();
//! Draw the element.
- Standard_EXPORT virtual void Render (const Handle(OpenGl_Workspace)& theWorkspace) const;
+ Standard_EXPORT virtual void Render (const Handle(OpenGl_Workspace)& theWorkspace) const Standard_OVERRIDE;
//! Release OpenGL resources.
- Standard_EXPORT virtual void Release (OpenGl_Context* theCtx);
+ Standard_EXPORT virtual void Release (OpenGl_Context* theCtx) Standard_OVERRIDE;
//! Setup configuration.
Standard_EXPORT void SetValues (const Graphic3d_GraduatedTrihedron& theData);
Standard_EXPORT 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.
// 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)
}
Standard_Boolean IsRaytracable() const { return myIsRaytracable; }
//! 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:
{
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)
+}
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
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)
+}
#include <NCollection_Sequence.hxx>
#include <NCollection_DataMap.hxx>
+class OpenGl_FrameBuffer;
class OpenGl_Structure;
class OpenGl_Workspace;
struct OpenGl_GlobalLayerSettings;
//! Assigns BVH tree builder for frustom culling.
Standard_EXPORT 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.
#include <OpenGl_Vec.hxx>
#include <NCollection_Vector.hxx>
+#include <Standard_Dump.hxx>
//! Software implementation for OpenGL matrix stack.
template<class T>
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
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)
+}
//! 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
//! 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!
#include <OpenGl_GlCore11.hxx>
#include <OpenGl_StencilTest.hxx>
+#include <Standard_Dump.hxx>
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)
+}
Standard_EXPORT OpenGl_StencilTest ();
//! Render primitives to the window
- Standard_EXPORT virtual void Render (const Handle(OpenGl_Workspace)& theWorkspace) const;
+ Standard_EXPORT virtual void Render (const Handle(OpenGl_Workspace)& theWorkspace) const Standard_OVERRIDE;
- Standard_EXPORT virtual void Release (OpenGl_Context* theContext);
+ Standard_EXPORT virtual void Release (OpenGl_Context* theContext) Standard_OVERRIDE;
Standard_EXPORT 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
{
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)
+}
//! 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();
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)
+}
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
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:
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)
+}
//! 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
}
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)
+}
//! 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;
for (i = Nodes.Lower(); i <= Nodes.Upper(); i++)
myNodes(j++) = Nodes(i);
}
+
+//=======================================================================
+//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())
+}
//! Returns the table of nodes for this polygon.
TColgp_Array1OfPnt2d& ChangeNodes() { return myNodes; }
+
+ //! 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)
aCopy->Deflection(myDeflection);
return aCopy;
}
+
+//=======================================================================
+//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())
+}
//! the data structure of this polygon.
TColStd_Array1OfReal& ChangeParameters() const { return myParameters->ChangeArray1(); }
+ //! 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)
private:
// commercial license or contractual agreement.
#include <Poly_PolygonOnTriangulation.hxx>
+#include <Standard_Dump.hxx>
IMPLEMENT_STANDARD_RTTIEXT(Poly_PolygonOnTriangulation,Standard_Transient)
}
myParameters = theParameters;
}
+
+//=======================================================================
+//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())
+}
//! Raises exception if array size doesn't much number of polygon nodes.
Standard_EXPORT void SetParameters (const Handle(TColStd_HArray1OfReal)& theParameters);
+ //! 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)
private:
#include <gp_Pnt.hxx>
#include <Poly_Triangle.hxx>
#include <Standard_DomainError.hxx>
+#include <Standard_Dump.hxx>
#include <Standard_NullObject.hxx>
#include <Standard_Type.hxx>
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())
+}
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;
// 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)
}
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:
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;
};
// 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)
}
-
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;
// 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)
}
-
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:
// 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)
}
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:
// 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())
}
-
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:
// 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)
}
-
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:
// 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())
}
-
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:
{
//
}
+
+// =======================================================================
+// 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)
+}
//! 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;
// 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())
}
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:
// 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)
}
-
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:
// 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)
}
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
{
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)
+}
//! 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.
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)
+ }
};
//=======================================================================
//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, myRgb.r(), myRgb.g(), myRgb.b())
}
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:
//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)
}
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:
{
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)
+}
//! Returns the amount of points in set
Standard_EXPORT virtual Standard_Integer NbSubElements() 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(Select3D_InteriorSensitivePointSet,Select3D_SensitiveSet)
protected:
{
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)
+}
//! 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
{
//
}
+
+//=======================================================================
+//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)
+}
//! 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);
{
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())
+}
//! Returns the amount of sub-entities (points or planar convex polygons)
Standard_EXPORT virtual Standard_Integer NbSubElements() 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:
Select3D_TypeOfSensitivity mySensType; //!< Type of sensitivity: interior or boundary
{
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)
+}
//! 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
{
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)
+}
//! 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
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)
+}
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
}
}
}
+
+// =======================================================================
+// 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)
+}
//! 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.
{
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)
+}
//! 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
{
//
}
+
+//=======================================================================
+//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)
+}
//! 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.
//! 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
};
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)
+}
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:
{
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)
+}
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
{
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)
+}
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:
#include <gp_Pnt.hxx>
#include <TColgp_HArray1OfPnt.hxx>
#include <SelectBasics_PickResult.hxx>
+#include <Standard_Dump.hxx>
class Bnd_Box;
class gp_Pnt;
//! 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
};
//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)
}
}
//! 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)
// 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)
}
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:
// 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)
}
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;
protected:
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)
+}
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.
// commercial license or contractual agreement.
#include <SelectMgr_SelectingVolumeManager.hxx>
+#include <Standard_Dump.hxx>
//=======================================================================
// function : SelectMgr_SelectingVolumeManager
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)
+}
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
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)
+}
//! 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;
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)
+}
//! 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:
// 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)
}
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:
//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())
}
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:
#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 :
Standard_SStream aStream;
aStream << theOStream.rdbuf();
TCollection_AsciiString aStreamStr = Standard_Dump::Text (aStream);
- if (!aStreamStr.EndsWith ("{"))
+ if (!aStreamStr.IsEmpty() && !aStreamStr.EndsWith ("{"))
theOStream << ", ";
}
//purpose :
//=======================================================================
void Standard_Dump::DumpKeyToClass (Standard_OStream& theOStream,
- const char* theKey,
+ const TCollection_AsciiString& theKey,
const TCollection_AsciiString& theField)
{
AddValuesSeparator (theOStream);
// =======================================================================
TCollection_AsciiString Standard_Dump::GetPointerInfo (const void* thePointer, const bool isShortInfo)
{
+ if (!thePointer)
+ return TCollection_AsciiString();
+
std::ostringstream aPtrStr;
aPtrStr << thePointer;
if (!isShortInfo)
// =======================================================================
// 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;
}
}
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();
+}
#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
//! 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; \
}
//! 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 << "\""; \
}
//! 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.
//! 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)); \
} \
}
{ \
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); \
} \
}
//! 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.
//! @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
//! @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"
//! 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
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)
+}
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;
{
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)
+}
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;
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)
+ }
+}
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:
// 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>
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())
+}
//! 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;
//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>
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)
+}
return Dump(OS);
}
+ //! Dumps the content of me into the stream
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
#include <NCollection_IncAllocator.hxx>
+#include <Standard_Dump.hxx>
#include <Standard_NoMoreObject.hxx>
#include <Standard_NullObject.hxx>
#include <Standard_Type.hxx>
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)
+}
//! 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;
// 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>
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)
+}
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;
//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)
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)
+}
//! 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;
// 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)
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)
+}
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;
+
// 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)
{
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)
+}
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;
+
// 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>
}
}
+//=======================================================================
+//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)
+}
//! 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;
+
// 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>
// 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>
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)
+}
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;
+
// 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>
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)
+}
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;
+
// 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>
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)
+}
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;
+
// 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>
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)
+}
//! 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:
// 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 \
// 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>
{
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)
+}
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;
// 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)
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)
+}
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;
// 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>
#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>
// 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>
// 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>
// 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>
// 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>
// 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>
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)
+}
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;
// 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>
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())
+ }
+}
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;
// 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>
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)
+}
//! 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:
// 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>
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)
+}
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;
// 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)
// 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)
// 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)
// 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)
// 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)
// 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)
// 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>
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)
+}
//! 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:
// 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>
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)
+}
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;
// 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>
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)
+}
//! 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:
// 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>
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)
+}
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;
// 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>
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)
+}
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;
#include <TDataStd_NamedData.hxx>
+#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <TCollection_ExtendedString.hxx>
#include <TColStd_DataMapIteratorOfDataMapOfStringInteger.hxx>
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())
+}
Standard_EXPORT virtual 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;
DEFINE_STANDARD_RTTIEXT(TDataStd_NamedData,TDF_Attribute)
// 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>
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)
+}
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;
// 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>
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)
+}
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;
+
// 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>
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)
+}
//! 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:
// 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>
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)
+}
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;
// 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)
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)
+}
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;
// 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)
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)
+}
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;
+
// 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>
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())
+ }
+}
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;
+
// 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>
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)
+}
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;
+
// 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)
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)
+}
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;
// 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>
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)
+}
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;
+
// 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>
#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>
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)
+}
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;
//=======================================================================
// Declarations:
+#include <TDocStd.hxx>
+
#include <CDF.hxx>
#include <OSD_Environment.hxx>
-#include <TDocStd.hxx>
#include <TDocStd_XLink.hxx>
//#include <LCTLOFF.h>
// 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>
{
// 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)
+}
//! 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:
// 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)
// -------------
-#include <Standard_Type.hxx>
#include <TDocStd_CompoundDelta.hxx>
+
+#include <Standard_Type.hxx>
#include <TDocStd_Document.hxx>
IMPLEMENT_STANDARD_RTTIEXT(TDocStd_CompoundDelta,TDF_Delta)
// 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>
#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>
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)
+}
//! 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;
+
// 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>
#include <TDF_Data.hxx>
#include <TDF_Label.hxx>
#include <TDF_RelocationTable.hxx>
-#include <TDocStd_Modified.hxx>
IMPLEMENT_STANDARD_RTTIEXT(TDocStd_Modified,TDF_Attribute)
// 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)
// 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)
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())
+}
+
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;
+
// 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)
{
//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>
#include <TDF_Tool.hxx>
#include <TDocStd.hxx>
#include <TDocStd_Document.hxx>
-#include <TDocStd_XLink.hxx>
#include <TDocStd_XLinkIterator.hxx>
#include <TDocStd_XLinkRoot.hxx>
//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>
//=======================================================================
//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>
#include <TDF_RelocationTable.hxx>
#include <TDocStd_XLink.hxx>
#include <TDocStd_XLinkIterator.hxx>
-#include <TDocStd_XLinkRoot.hxx>
IMPLEMENT_STANDARD_RTTIEXT(TDocStd_XLinkRoot,TDF_Attribute)
// 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>
#include <TDF_Tool.hxx>
#include <TDocStd_Document.hxx>
#include <TDocStd_XLink.hxx>
-#include <TDocStd_XLinkTool.hxx>
// standard copy
//=======================================================================
#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>
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)
+}
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;
#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>
// 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
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
//**********************************************************************
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
}
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)
+}
//! 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;
//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)
+}
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;
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;
+
#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>
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)
+ }
+}
//! 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;
#include <Standard_SStream.hxx>
#include <Standard_ErrorHandler.hxx>
+#include <Standard_Dump.hxx>
#include <TCollection_ExtendedString.hxx>
#include <TColStd_SequenceOfExtendedString.hxx>
#include <Message_Msg.hxx>
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)
+}
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
//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)
}
//=======================================================================
//! 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;
//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)
}
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;
//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())
}
//=======================================================================
}
//! 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;
//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)
}
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:
//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())
}
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;
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)
+}
Standard_DEPRECATED ("Deprecated method - DefinedLights() should be used instead")
const Handle(V3d_Light)& DefinedLight() const { return myDefinedLightsIterator.Value(); }
+ //! 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.
#include <Resource_Manager.hxx>
+#include <Standard_Dump.hxx>
#include <TDF_Label.hxx>
#include <TDocStd_Document.hxx>
#include <TPrsStd_DriverTable.hxx>
{
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)
+}
//! 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:
// 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)
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)
+}
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;
#include <XCAFDoc_AssemblyItemId.hxx>
+#include <Standard_Dump.hxx>
+
XCAFDoc_AssemblyItemId::XCAFDoc_AssemblyItemId()
{
aStr.Remove(1, 1);
return aStr;
}
+
+//=======================================================================
+//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)
+ }
+}
//! 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;
struct Hasher
{
// 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>
#include <TopExp.hxx>
#include <TopoDS_Shape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
-#include <XCAFDoc_AssemblyItemRef.hxx>
IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_AssemblyItemRef, TDF_Attribute)
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)
+}
//! 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:
// 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>
#include <TDF_Attribute.hxx>
#include <TDF_Label.hxx>
#include <TDF_RelocationTable.hxx>
-#include <XCAFDoc_Centroid.hxx>
IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_Centroid,TDF_Attribute)
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)
+}
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;
// 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>
#include <TDF_Attribute.hxx>
#include <TDF_ChildIDIterator.hxx>
#include <XCAFDoc.hxx>
-#include <XCAFDoc_ClippingPlaneTool.hxx>
IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_ClippingPlaneTool, TDF_Attribute)
{
}
+//=======================================================================
+//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)
+}
+
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;
// 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)
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)
+}
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;
// 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>
#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>
}
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())
+}
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;
// 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>
#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>
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())
+}
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)
// 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)
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())
+}
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;
// commercial license or contractual agreement.
#include <XCAFDoc_DimTolTool.hxx>
+
#include <Precision.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
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())
+}
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;
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)
+}
//! 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)
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)
+}
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)
};
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)
+}
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)
// 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)
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)
+}
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;
+
// 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>
#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)
{
}
+//=======================================================================
+//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())
+}
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;
// 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>
#include <TDF_Label.hxx>
#include <TDF_RelocationTable.hxx>
#include <TopLoc_Location.hxx>
-#include <XCAFDoc_Location.hxx>
IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_Location,TDF_Attribute)
}
+//=======================================================================
+//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)
+}
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;
// 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)
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())
+}
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;
// 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>
#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)
{
}
+//=======================================================================
+//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())
+}
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;
;
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)
+}
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;
protected:
// 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_NoteComment)
// 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 <Standard_GUID.hxx>
#include <TDF_Label.hxx>
-#include <XCAFDoc_NoteBinData.hxx>
IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_NoteBinData, XCAFDoc_Note)
// 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 <TDF_Label.hxx>
-#include <XCAFDoc_NoteComment.hxx>
IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_NoteComment, XCAFDoc_Note)
// 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>
#include <TDF_Tool.hxx>
#include <XCAFDoc.hxx>
#include <XCAFDoc_GraphNode.hxx>
-#include <XCAFDoc_NotesTool.hxx>
#include <XCAFDoc_NoteBalloon.hxx>
#include <XCAFDoc_NoteComment.hxx>
#include <XCAFDoc_NoteBinData.hxx>
;
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)
+}
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;
};
// 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>
#include <TDF_RelocationTable.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
-#include <XCAFDoc_ShapeMapTool.hxx>
IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_ShapeMapTool,TDF_Attribute)
{
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)
+ }
+}
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;
// 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>
#include <XCAFDoc_GraphNode.hxx>
#include <XCAFDoc_Location.hxx>
#include <XCAFDoc_ShapeMapTool.hxx>
-#include <XCAFDoc_ShapeTool.hxx>
IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_ShapeTool,TDF_Attribute)
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)
+}
//! @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)
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)
+}
//! 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)
// 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>
#include <XCAFDoc_GraphNode.hxx>
#include <XCAFDoc_ShapeTool.hxx>
#include <XCAFDoc_View.hxx>
-#include <XCAFDoc_ViewTool.hxx>
-
IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_ViewTool, TDF_Attribute)
{
}
+//=======================================================================
+//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)
+}
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)
theAspect->SetTextureSet (aTextureSet);
theAspect->SetTextureMapOn (true);
}
+
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void XCAFDoc_VisMaterial::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, myRawName.get())
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPbrMat)
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCommonMat)
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAlphaMode)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAlphaCutOff)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsDoubleSided)
+}
//! @param theRelTable [in] relocation table
Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& theInto,
const Handle(TDF_RelocationTable)& theRelTable) 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:
#include <Graphic3d_Vec.hxx>
#include <Image_Texture.hxx>
#include <Quantity_ColorRGBA.hxx>
+#include <Standard_Dump.hxx>
class Graphic3d_Aspects;
class Graphic3d_MaterialAspect;
&& theOther.Shininess == Shininess
&& theOther.Transparency == Transparency;
}
-};
+
+ //! Dumps the content of me into the stream
+ void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const
+ {
+ OCCT_DUMP_CLASS_BEGIN (theOStream, XCAFDoc_VisMaterialCommon)
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, DiffuseTexture.get())
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &AmbientColor)
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &DiffuseColor)
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &SpecularColor)
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &EmissiveColor)
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Shininess)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Transparency)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsDefined)
+ }
+};
#endif // _XCAFDoc_VisMaterialCommon_HeaderFile
#include <Graphic3d_Vec.hxx>
#include <Image_Texture.hxx>
#include <Quantity_ColorRGBA.hxx>
+#include <Standard_Dump.hxx>
//! Metallic-roughness PBR material definition.
struct XCAFDoc_VisMaterialPBR
&& theOther.Roughness == Roughness
&& theOther.RefractionIndex == RefractionIndex;
}
+
+ //! Dumps the content of me into the stream
+ void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const
+ {
+ OCCT_DUMP_CLASS_BEGIN (theOStream, XCAFDoc_VisMaterialPBR)
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, BaseColorTexture.get())
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, MetallicRoughnessTexture.get())
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, EmissiveTexture.get())
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, OcclusionTexture.get())
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, NormalTexture.get())
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &BaseColor)
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &EmissiveFactor)
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Metallic)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Roughness)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, RefractionIndex)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsDefined)
+ }
};
#endif // _XCAFDoc_VisMaterialPBR_HeaderFile
// 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)
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)
+}
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;
+
//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)
}
}
//! 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:
#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,
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())
+}
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:
#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)
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())
+}
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:
#include <gp_Trsf2d.hxx>
#include <gp_Vec2d.hxx>
#include <Standard_ConstructionError.hxx>
+#include <Standard_Dump.hxx>
void gp_Ax22d::Mirror (const gp_Pnt2d& P)
{
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())
+}
//! 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;
+
#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,
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)
+}
//! 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;
+
#include <gp_Trsf.hxx>
#include <gp_Vec.hxx>
#include <Standard_ConstructionError.hxx>
+#include <Standard_Dump.hxx>
//=======================================================================
//function : gp_Ax3
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())
+}
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:
#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
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())
+}
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:
#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
return V;
}
+void gp_Dir2d::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+ OCCT_DUMP_VECTOR_CLASS (theOStream, "gp_Dir2d", 2, coord.X(), coord.Y())
+}
//! 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;
+
#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)
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)
+}
gp_Trsf Trsf() const;
+ //! Dumps the content of me into the stream
+ Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
//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)
}
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;
#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)
return Pl;
}
+void gp_Pln::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &pos)
+}
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:
#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)
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())
+}
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:
#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)
return P;
}
+void gp_Pnt2d::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+ OCCT_DUMP_VECTOR_CLASS (theOStream, "gp_Pnt2d", 2, coord.X(), coord.Y())
+}
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:
//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)
}
}
//! 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;
//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)
}
//! 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:
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."
}
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"
}