1 // Copyright (c) 2020 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 #include <TDataStd_GenericExtString.hxx>
15 #include <Standard_Dump.hxx>
17 IMPLEMENT_STANDARD_RTTIEXT(TDataStd_GenericExtString,TDF_Attribute)
19 //=======================================================================
22 //=======================================================================
23 void TDataStd_GenericExtString::Set (const TCollection_ExtendedString& S)
25 if(myString == S) return;
31 //=======================================================================
34 //=======================================================================
35 const TCollection_ExtendedString& TDataStd_GenericExtString::Get () const
40 //=======================================================================
43 //=======================================================================
44 void TDataStd_GenericExtString::SetID( const Standard_GUID& theGuid)
46 if(myID == theGuid) return;
52 //=======================================================================
55 //=======================================================================
56 const Standard_GUID& TDataStd_GenericExtString::ID () const { return myID; }
58 //=======================================================================
61 //=======================================================================
62 void TDataStd_GenericExtString::Restore(const Handle(TDF_Attribute)& with)
64 Handle(TDataStd_GenericExtString) anAtt = Handle(TDataStd_GenericExtString)::DownCast (with);
65 myString = anAtt->Get();
69 //=======================================================================
72 //=======================================================================
73 void TDataStd_GenericExtString::Paste (const Handle(TDF_Attribute)& into,
74 const Handle(TDF_RelocationTable)&/* RT*/) const
76 Handle(TDataStd_GenericExtString) anAtt = Handle(TDataStd_GenericExtString)::DownCast (into);
81 //=======================================================================
84 //=======================================================================
85 void TDataStd_GenericExtString::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
87 OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
88 OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
89 OCCT_DUMP_FIELD_VALUE_STRING (theOStream, Get())
90 OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)