1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0031313: Foundation Classes - Dump improvement for classes

- Provide DumpJson for geometrical, ocaf and visualization classes;
- Change depth parameter of DumpJson (constant is not obligate here)
- Introduce a new macro for transient objects to be called as the first row in DumpJson: OCCT_DUMP_TRANSIENT_CLASS_BEGIN. We need not put the class name in the macro, using get_type_name of Standard_Transient for it.
- change implementation of OCCT_DUMP_CLASS_BEGIN and OCCT_DUMP_TRANSIENT_CLASS_BEGIN. It is not an sentry more and it does not create a new hierarchy level. It appends a new row into the output stream: "className": <className>
- OCCT_DUMP_* does not require semicolon
- class header is included first in source files of TDataStd, TDocStd, TCAFDoc
This commit is contained in:
nds
2020-01-28 12:03:38 +03:00
committed by bugmaster
parent 00ea7f2676
commit bc73b00672
532 changed files with 5237 additions and 419 deletions

View File

@@ -14,9 +14,9 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd.hxx>
#include <Standard_GUID.hxx>
#include <TDataStd.hxx>
#include <TDataStd_ExtStringArray.hxx>
#include <TDataStd_Integer.hxx>
#include <TDataStd_IntegerArray.hxx>

View File

@@ -13,11 +13,12 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_AsciiString.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TCollection_AsciiString.hxx>
#include <TDataStd_AsciiString.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_Label.hxx>
#include <TDF_RelocationTable.hxx>
@@ -199,3 +200,17 @@ Standard_OStream& TDataStd_AsciiString::Dump(Standard_OStream& theOS) const
anOS << sguid << "|" <<std::endl;
return anOS;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_AsciiString::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myString)
OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
}

View File

@@ -81,6 +81,9 @@ public:
Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -13,10 +13,11 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_BooleanArray.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TDataStd_BooleanArray.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_Label.hxx>
#include <TDF_RelocationTable.hxx>
@@ -320,3 +321,23 @@ Standard_OStream& TDataStd_BooleanArray::Dump (Standard_OStream& anOS) const
anOS <<std::endl;
return anOS;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_BooleanArray::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
for (TColStd_Array1OfByte::Iterator aValueIt (myValues->Array1()); aValueIt.More(); aValueIt.Next())
{
const Standard_Byte& aValue = aValueIt.Value();
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aValue)
}
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLower)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myUpper)
OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
}

View File

@@ -99,6 +99,9 @@ public:
Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& OS) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -13,10 +13,11 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_BooleanList.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TDataStd_BooleanList.hxx>
#include <TDataStd_ListIteratorOfListOfByte.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_Label.hxx>
@@ -306,3 +307,21 @@ Standard_OStream& TDataStd_BooleanList::Dump (Standard_OStream& anOS) const
anOS << std::endl;
return anOS;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_BooleanList::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
for (TDataStd_ListOfByte::Iterator aListIt (myList); aListIt.More(); aListIt.Next())
{
const Standard_Byte& aValue = aListIt.Value();
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aValue)
}
OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
}

View File

@@ -100,6 +100,9 @@ public:
Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -13,10 +13,11 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_ByteArray.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TDataStd_ByteArray.hxx>
#include <TDataStd_DeltaOnModificationOfByteArray.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_DefaultDeltaOnModification.hxx>
@@ -309,3 +310,21 @@ Handle(TDF_DeltaOnModification) TDataStd_ByteArray::DeltaOnModification
else return new TDF_DefaultDeltaOnModification(OldAttribute);
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_ByteArray::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
for (TColStd_Array1OfByte::Iterator aValueIt (myValue->Array1()); aValueIt.More(); aValueIt.Next())
{
const Standard_Byte& aValue = aValueIt.Value();
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aValue)
}
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsDelta)
OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
}

View File

@@ -123,6 +123,9 @@ public:
//! Makes a DeltaOnModification between <me> and
//! <anOldAttribute>.
Standard_EXPORT virtual Handle(TDF_DeltaOnModification) DeltaOnModification (const Handle(TDF_Attribute)& anOldAttribute) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
private:

View File

@@ -13,8 +13,8 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_ChildNodeIterator.hxx>
#include <TDataStd_TreeNode.hxx>
#define ChildNodeIterator_UpToBrother \

View File

@@ -14,12 +14,13 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_Comment.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
#include <TDataStd_Comment.hxx>
#include <TDataStd_Integer.hxx>
#include <TDataStd_Real.hxx>
#include <TDF_Attribute.hxx>
@@ -170,3 +171,16 @@ AfterRetrieval(const Standard_Boolean)
{
return Standard_True;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_Comment::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myString)
}

View File

@@ -76,6 +76,9 @@ public:
Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
Standard_EXPORT Standard_Boolean AfterRetrieval (const Standard_Boolean forceIt = Standard_False) Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -14,15 +14,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_Current.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TDataStd_Current.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_Data.hxx>
#include <TDF_Label.hxx>
#include <TDF_RelocationTable.hxx>
#include <TDF_Tool.hxx>
IMPLEMENT_STANDARD_RTTIEXT(TDataStd_Current,TDF_Attribute)
@@ -165,4 +167,18 @@ Standard_OStream& TDataStd_Current::Dump (Standard_OStream& anOS) const
return anOS;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_Current::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
TCollection_AsciiString aLabel;
TDF_Tool::Entry (myLabel, aLabel);
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aLabel)
}

View File

@@ -72,6 +72,9 @@ public:
Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -13,6 +13,7 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_DeltaOnModificationOfByteArray.hxx>
#include <Standard_Type.hxx>
#include <TColStd_HArray1OfByte.hxx>
@@ -20,7 +21,6 @@
#include <TColStd_ListIteratorOfListOfInteger.hxx>
#include <TColStd_ListOfInteger.hxx>
#include <TDataStd_ByteArray.hxx>
#include <TDataStd_DeltaOnModificationOfByteArray.hxx>
#include <TDF_AttributeIterator.hxx>
#include <TDF_DeltaOnModification.hxx>
#include <TDF_Label.hxx>

View File

@@ -13,12 +13,12 @@
// 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>

View File

@@ -13,12 +13,12 @@
// 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>

View File

@@ -13,12 +13,12 @@
// 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>

View File

@@ -13,12 +13,12 @@
// 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>

View File

@@ -14,12 +14,13 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_Directory.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TDataStd.hxx>
#include <TDataStd_Directory.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_DataSet.hxx>
#include <TDF_Label.hxx>
@@ -173,4 +174,13 @@ Standard_OStream& TDataStd_Directory::Dump (Standard_OStream& anOS) const
return anOS;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_Directory::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
}

View File

@@ -80,6 +80,9 @@ public:
Standard_EXPORT virtual void References (const Handle(TDF_DataSet)& DS) const Standard_OVERRIDE;
Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -14,12 +14,13 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_Expression.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
#include <TDataStd_Expression.hxx>
#include <TDataStd_Variable.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_Label.hxx>
@@ -173,3 +174,21 @@ Standard_OStream& TDataStd_Expression::Dump(Standard_OStream& anOS) const
return anOS;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_Expression::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myExpression)
for (TDF_AttributeList::Iterator aVariableIt (myVariables); aVariableIt.More(); aVariableIt.Next())
{
const Handle(TDF_Attribute)& anAttribute = aVariableIt.Value();
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, anAttribute.get())
}
}

View File

@@ -77,6 +77,9 @@ public:
Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -13,12 +13,13 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_ExtStringArray.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TCollection_ExtendedString.hxx>
#include <TDataStd_DeltaOnModificationOfExtStringArray.hxx>
#include <TDataStd_ExtStringArray.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_DefaultDeltaOnModification.hxx>
#include <TDF_DeltaOnModification.hxx>
@@ -335,3 +336,20 @@ Handle(TDF_DeltaOnModification) TDataStd_ExtStringArray::DeltaOnModification
else return new TDF_DefaultDeltaOnModification(OldAttribute);
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_ExtStringArray::DumpJson (Standard_OStream& theOStream, Standard_Integer /*theDepth*/) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
for (TColStd_Array1OfExtendedString::Iterator aValueIt (myValue->Array1()); aValueIt.More(); aValueIt.Next())
{
const TCollection_ExtendedString& aValue = aValueIt.Value();
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aValue)
}
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsDelta)
OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
}

View File

@@ -125,6 +125,9 @@ public:
//! Makes a DeltaOnModification between <me> and
//! <anOldAttribute>.
Standard_EXPORT virtual Handle(TDF_DeltaOnModification) DeltaOnModification (const Handle(TDF_Attribute)& anOldAttribute) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
private:

View File

@@ -13,11 +13,12 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_ExtStringList.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TCollection_ExtendedString.hxx>
#include <TDataStd_ExtStringList.hxx>
#include <TDataStd_ListIteratorOfListOfExtendedString.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_Label.hxx>
@@ -366,3 +367,20 @@ Standard_OStream& TDataStd_ExtStringList::Dump (Standard_OStream& anOS) const
anOS << std::endl;
return anOS;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_ExtStringList::DumpJson (Standard_OStream& theOStream, Standard_Integer /*theDepth*/) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
for (TDataStd_ListOfExtendedString::Iterator aListIt (myList); aListIt.More(); aListIt.Next())
{
const TCollection_ExtendedString& aValue = aListIt.Value();
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aValue);
}
OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
}

View File

@@ -107,6 +107,9 @@ public:
Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -13,9 +13,9 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_HDataMapOfStringByte.hxx>
#include <Standard_Type.hxx>
#include <TDataStd_HDataMapOfStringByte.hxx>
IMPLEMENT_STANDARD_RTTIEXT(TDataStd_HDataMapOfStringByte,Standard_Transient)

View File

@@ -13,9 +13,9 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_HDataMapOfStringHArray1OfInteger.hxx>
#include <Standard_Type.hxx>
#include <TDataStd_HDataMapOfStringHArray1OfInteger.hxx>
IMPLEMENT_STANDARD_RTTIEXT(TDataStd_HDataMapOfStringHArray1OfInteger,Standard_Transient)

View File

@@ -13,9 +13,9 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_HDataMapOfStringHArray1OfReal.hxx>
#include <Standard_Type.hxx>
#include <TDataStd_HDataMapOfStringHArray1OfReal.hxx>
IMPLEMENT_STANDARD_RTTIEXT(TDataStd_HDataMapOfStringHArray1OfReal,Standard_Transient)

View File

@@ -13,9 +13,9 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_HDataMapOfStringInteger.hxx>
#include <Standard_Type.hxx>
#include <TDataStd_HDataMapOfStringInteger.hxx>
IMPLEMENT_STANDARD_RTTIEXT(TDataStd_HDataMapOfStringInteger,Standard_Transient)

View File

@@ -13,9 +13,9 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_HDataMapOfStringReal.hxx>
#include <Standard_Type.hxx>
#include <TDataStd_HDataMapOfStringReal.hxx>
IMPLEMENT_STANDARD_RTTIEXT(TDataStd_HDataMapOfStringReal,Standard_Transient)

View File

@@ -13,9 +13,9 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_HDataMapOfStringString.hxx>
#include <Standard_Type.hxx>
#include <TDataStd_HDataMapOfStringString.hxx>
IMPLEMENT_STANDARD_RTTIEXT(TDataStd_HDataMapOfStringString,Standard_Transient)

View File

@@ -13,13 +13,14 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_IntPackedMap.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TColStd_HPackedMapOfInteger.hxx>
#include <TColStd_PackedMapOfInteger.hxx>
#include <TDataStd_DeltaOnModificationOfIntPackedMap.hxx>
#include <TDataStd_IntPackedMap.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_DefaultDeltaOnModification.hxx>
#include <TDF_DeltaOnModification.hxx>
@@ -234,4 +235,21 @@ Handle(TDF_DeltaOnModification) TDataStd_IntPackedMap::DeltaOnModification
else return new TDF_DefaultDeltaOnModification(OldAttribute);
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_IntPackedMap::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
for (TColStd_PackedMapOfInteger::Iterator aMapIt (myMap->Map()); aMapIt.More(); aMapIt.Next())
{
Standard_Integer aKey = aMapIt.Key();
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aKey)
}
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsDelta)
}

View File

@@ -96,6 +96,9 @@ public:
//! Makes a DeltaOnModification between <me> and
//! <anOldAttribute>.
Standard_EXPORT virtual Handle(TDF_DeltaOnModification) DeltaOnModification (const Handle(TDF_Attribute)& anOldAttribute) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
private:

View File

@@ -14,10 +14,11 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_Integer.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TDataStd_Integer.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_Label.hxx>
#include <TDF_Reference.hxx>
@@ -203,3 +204,16 @@ Standard_OStream& TDataStd_Integer::Dump (Standard_OStream& anOS) const
return anOS;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_Integer::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myValue)
OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
}

View File

@@ -83,6 +83,9 @@ public:
Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
Standard_EXPORT TDataStd_Integer();
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -14,11 +14,12 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_IntegerArray.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TDataStd_DeltaOnModificationOfIntArray.hxx>
#include <TDataStd_IntegerArray.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_DefaultDeltaOnModification.hxx>
#include <TDF_DeltaOnModification.hxx>
@@ -336,3 +337,23 @@ Handle(TDF_DeltaOnModification) TDataStd_IntegerArray::DeltaOnModification
return new TDataStd_DeltaOnModificationOfIntArray(Handle(TDataStd_IntegerArray)::DownCast (OldAttribute));
else return new TDF_DefaultDeltaOnModification(OldAttribute);
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_IntegerArray::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
for (TColStd_Array1OfInteger::Iterator aValueIt (myValue->Array1()); aValueIt.More(); aValueIt.Next())
{
const Standard_Integer& aValue = aValueIt.Value();
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aValue)
}
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsDelta)
OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
}

View File

@@ -129,6 +129,9 @@ public:
//! Makes a DeltaOnModification between <me> and
//! <anOldAttribute>.
Standard_EXPORT virtual Handle(TDF_DeltaOnModification) DeltaOnModification (const Handle(TDF_Attribute)& anOldAttribute) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
private:

View File

@@ -13,11 +13,12 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_IntegerList.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
#include <TDataStd_IntegerList.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_Label.hxx>
#include <TDF_RelocationTable.hxx>
@@ -362,3 +363,21 @@ Standard_OStream& TDataStd_IntegerList::Dump (Standard_OStream& anOS) const
anOS << std::endl;
return anOS;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_IntegerList::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
for (TColStd_ListOfInteger::Iterator aListIt (myList); aListIt.More(); aListIt.Next())
{
const Standard_Integer& aValue = aListIt.Value();
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aValue)
}
OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
}

View File

@@ -106,6 +106,9 @@ public:
Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -14,13 +14,14 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_Name.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
#include <TDataStd_Name.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_ChildIterator.hxx>
#include <TDF_Label.hxx>
@@ -192,3 +193,17 @@ Standard_OStream& TDataStd_Name::Dump (Standard_OStream& anOS) const
anOS << sguid << std::endl;
return anOS;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_Name::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myString)
OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
}

View File

@@ -98,6 +98,9 @@ public:
Standard_EXPORT void Paste (const Handle(TDF_Attribute)& into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -15,6 +15,7 @@
#include <TDataStd_NamedData.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <TCollection_ExtendedString.hxx>
#include <TColStd_DataMapIteratorOfDataMapOfStringInteger.hxx>
@@ -893,3 +894,27 @@ Standard_OStream& TDataStd_NamedData::Dump (Standard_OStream& anOS) const
anOS << "\tArraysOfReals = " << (HasArraysOfReals() ? myArraysOfReals->Map().Extent() : 0);
return anOS;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_NamedData::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
if (!myIntegers.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIntegers->Map().Size())
if (!myReals.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myReals->Map().Size())
if (!myStrings.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myStrings->Map().Size())
if (!myBytes.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myBytes->Map().Size())
if (!myArraysOfIntegers.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myArraysOfIntegers->Map().Size())
if (!myArraysOfReals.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myArraysOfReals->Map().Size())
}

View File

@@ -283,6 +283,9 @@ public: //! @name TDF_Attribute interface
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)

View File

@@ -14,12 +14,13 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_NoteBook.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TDataStd_Integer.hxx>
#include <TDataStd_NoteBook.hxx>
#include <TDataStd_Real.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_Label.hxx>
@@ -166,4 +167,13 @@ Standard_OStream& TDataStd_NoteBook::Dump (Standard_OStream& anOS) const
return anOS;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_NoteBook::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
}

View File

@@ -79,6 +79,9 @@ public:
Standard_EXPORT void Paste (const Handle(TDF_Attribute)& into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -14,11 +14,12 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_Real.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TDataStd.hxx>
#include <TDataStd_Real.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_Label.hxx>
#include <TDF_Reference.hxx>
@@ -246,4 +247,18 @@ Standard_OStream& TDataStd_Real::Dump (Standard_OStream& anOS) const
anOS << sguid;
return anOS;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_Real::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myValue)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDimension)
OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
}

View File

@@ -99,6 +99,9 @@ public:
Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -14,11 +14,12 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_RealArray.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TDataStd_DeltaOnModificationOfRealArray.hxx>
#include <TDataStd_RealArray.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_DefaultDeltaOnModification.hxx>
#include <TDF_DeltaOnModification.hxx>
@@ -332,3 +333,23 @@ Handle(TDF_DeltaOnModification) TDataStd_RealArray::DeltaOnModification
return new TDataStd_DeltaOnModificationOfRealArray(Handle(TDataStd_RealArray)::DownCast (OldAtt));
else return new TDF_DefaultDeltaOnModification(OldAtt);
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_RealArray::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
for (TColStd_Array1OfReal::Iterator aValueIt (myValue->Array1()); aValueIt.More(); aValueIt.Next())
{
const Standard_Real& aValue = aValueIt.Value();
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aValue)
}
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsDelta)
OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
}

View File

@@ -128,6 +128,9 @@ public:
//! Makes a DeltaOnModification between <me> and
//! <anOldAttribute>.
Standard_EXPORT virtual Handle(TDF_DeltaOnModification) DeltaOnModification (const Handle(TDF_Attribute)& anOldAttribute) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
private:

View File

@@ -13,11 +13,12 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_RealList.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TColStd_ListIteratorOfListOfReal.hxx>
#include <TDataStd_RealList.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_Label.hxx>
#include <TDF_RelocationTable.hxx>
@@ -360,3 +361,22 @@ Standard_OStream& TDataStd_RealList::Dump (Standard_OStream& anOS) const
anOS << std::endl;
return anOS;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_RealList::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
for (TColStd_ListOfReal::Iterator aListIt (myList); aListIt.More(); aListIt.Next())
{
const Standard_Real& aValue = aListIt.Value();
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aValue)
}
OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
}

View File

@@ -107,6 +107,9 @@ public:
Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -13,14 +13,16 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_ReferenceArray.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TDataStd_ReferenceArray.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_DataSet.hxx>
#include <TDF_Label.hxx>
#include <TDF_RelocationTable.hxx>
#include <TDF_Tool.hxx>
IMPLEMENT_STANDARD_RTTIEXT(TDataStd_ReferenceArray,TDF_Attribute)
@@ -330,3 +332,24 @@ Standard_OStream& TDataStd_ReferenceArray::Dump (Standard_OStream& anOS) const
anOS << sguid << std::endl;
return anOS;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_ReferenceArray::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
TCollection_AsciiString aLabel;
for (TDataStd_LabelArray1::Iterator anArrayIt (myArray->Array1()); anArrayIt.More(); anArrayIt.Next())
{
aLabel.Clear();
TDF_Tool::Entry (anArrayIt.Value(), aLabel);
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aLabel)
}
OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
}

View File

@@ -103,6 +103,9 @@ public:
Standard_EXPORT virtual void References (const Handle(TDF_DataSet)& DS) const Standard_OVERRIDE;
Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -13,15 +13,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_ReferenceList.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TDataStd_ReferenceList.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_DataSet.hxx>
#include <TDF_Label.hxx>
#include <TDF_ListIteratorOfLabelList.hxx>
#include <TDF_RelocationTable.hxx>
#include <TDF_Tool.hxx>
IMPLEMENT_STANDARD_RTTIEXT(TDataStd_ReferenceList,TDF_Attribute)
@@ -383,3 +385,24 @@ Standard_OStream& TDataStd_ReferenceList::Dump (Standard_OStream& anOS) const
anOS << std::endl;
return anOS;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_ReferenceList::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
TCollection_AsciiString aLabel;
for (TDF_LabelList::Iterator aListIt (myList); aListIt.More(); aListIt.Next())
{
aLabel.Clear();
TDF_Tool::Entry (aListIt.Value(), aLabel);
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aLabel)
}
OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
}

View File

@@ -110,6 +110,9 @@ public:
Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -14,12 +14,13 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_Relation.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
#include <TDataStd_Relation.hxx>
#include <TDataStd_Variable.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_Label.hxx>
@@ -173,3 +174,21 @@ Standard_OStream& TDataStd_Relation::Dump(Standard_OStream& anOS) const
return anOS;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_Relation::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myRelation)
for (TDF_AttributeList::Iterator aVariableIt (myVariables); aVariableIt.More(); aVariableIt.Next())
{
const Handle(TDF_Attribute)& aVariable = aVariableIt.Value();
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aVariable.get())
}
}

View File

@@ -78,6 +78,9 @@ public:
Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -13,10 +13,11 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_Tick.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TDataStd_Tick.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_Label.hxx>
#include <TDF_RelocationTable.hxx>
@@ -102,3 +103,14 @@ Standard_OStream& TDataStd_Tick::Dump (Standard_OStream& anOS) const
anOS << "Tick";
return anOS;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_Tick::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
}

View File

@@ -60,6 +60,9 @@ public:
Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -15,12 +15,15 @@
// commercial license or contractual agreement.
#include <TDataStd_TreeNode.hxx>
#include <TDF_Label.hxx>
#include <TDF_DataSet.hxx>
#include <TDF_DeltaOnAddition.hxx>
#include <TDF_DeltaOnRemoval.hxx>
#include <TDF_RelocationTable.hxx>
#include <TDF_Tool.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_Dump.hxx>
IMPLEMENT_STANDARD_RTTIEXT(TDataStd_TreeNode,TDF_Attribute)
@@ -687,3 +690,46 @@ Standard_OStream& TDataStd_TreeNode::Dump (Standard_OStream& anOS) const
anOS<<std::endl;
return anOS;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_TreeNode::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
if (myFather)
{
TCollection_AsciiString aFather;
TDF_Tool::Entry (myFather->Label(), aFather);
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aFather)
}
if (myPrevious)
{
TCollection_AsciiString aPrevious;
TDF_Tool::Entry (myPrevious->Label(), aPrevious);
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aPrevious)
}
if (myNext)
{
TCollection_AsciiString aNext;
TDF_Tool::Entry (myNext->Label(), aNext);
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aNext)
}
if (myFirst)
{
TCollection_AsciiString aFirst;
TDF_Tool::Entry (myFirst->Label(), aFirst);
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aFirst)
}
if (myLast)
{
TCollection_AsciiString aLast;
TDF_Tool::Entry (myLast->Label(), aLast);
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aLast)
}
OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myTreeID)
}

View File

@@ -214,6 +214,9 @@ public:
Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
friend class TDataStd_ChildNodeIterator;

View File

@@ -14,11 +14,12 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_UAttribute.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TDataStd.hxx>
#include <TDataStd_UAttribute.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_DataSet.hxx>
#include <TDF_Label.hxx>
@@ -131,4 +132,15 @@ Standard_OStream& TDataStd_UAttribute::Dump (Standard_OStream& anOS) const
return anOS;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_UAttribute::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
}

View File

@@ -64,6 +64,9 @@ public:
Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@@ -14,8 +14,10 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TDataStd_Variable.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_Dump.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TCollection_AsciiString.hxx>
@@ -23,7 +25,6 @@
#include <TDataStd_Expression.hxx>
#include <TDataStd_Name.hxx>
#include <TDataStd_Real.hxx>
#include <TDataStd_Variable.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_DataSet.hxx>
#include <TDF_Label.hxx>
@@ -336,3 +337,16 @@ Standard_OStream& TDataStd_Variable::Dump(Standard_OStream& anOS) const
return anOS;
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void TDataStd_Variable::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, isConstant)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myUnit)
}

View File

@@ -140,6 +140,9 @@ public:
Standard_EXPORT virtual void References (const Handle(TDF_DataSet)& DS) const Standard_OVERRIDE;
Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;