X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FTNaming%2FTNaming_Name.cxx;h=34ee0bdb9e7aed9db67c719bfe8e0d62ba150248;hb=bc73b00672a218a1301520a3562ece96f72a679c;hpb=00ea7f2676893c9dd9b31cf1f0a8bcad61416a6a diff --git a/src/TNaming/TNaming_Name.cxx b/src/TNaming/TNaming_Name.cxx index 9d7ec9d3d0..34ee0bdb9e 100644 --- a/src/TNaming/TNaming_Name.cxx +++ b/src/TNaming/TNaming_Name.cxx @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -2144,3 +2145,28 @@ void TNaming_Name::Orientation(const TopAbs_Orientation theOrientation) myOrientation = theOrientation; } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= +void TNaming_Name::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, TNaming_Name) + + OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myType) + OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myShapeType) + + for (TNaming_ListOfNamedShape::Iterator anArgsIt (myArgs); anArgsIt.More(); anArgsIt.Next()) + { + const Handle(TNaming_NamedShape)& anArg = anArgsIt.Value(); + OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, anArg.get()) + } + + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIndex) + OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myShape) + + TCollection_AsciiString aLabel; + TDF_Tool::Entry (myContextLabel, aLabel); + OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aLabel) + OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myOrientation) +}