0031313: Foundation Classes - Dump improvement for classes
[occt.git] / src / TDataStd / TDataStd_Tick.cxx
CommitLineData
b311480e 1// Created on: 2007-05-29
2// Created by: Vlad Romashko
973c2be1 3// Copyright (c) 2007-2014 OPEN CASCADE SAS
b311480e 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
b311480e 6//
d5f74e42 7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
b311480e 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
7fd59977 15
bc73b006 16#include <TDataStd_Tick.hxx>
42cf5bc1 17
bc73b006 18#include <Standard_Dump.hxx>
42cf5bc1 19#include <Standard_GUID.hxx>
20#include <Standard_Type.hxx>
42cf5bc1 21#include <TDF_Attribute.hxx>
22#include <TDF_Label.hxx>
23#include <TDF_RelocationTable.hxx>
7fd59977 24
92efcf78 25IMPLEMENT_STANDARD_RTTIEXT(TDataStd_Tick,TDF_Attribute)
26
7fd59977 27//=======================================================================
28//function : GetID
29//purpose :
30//=======================================================================
31const Standard_GUID& TDataStd_Tick::GetID ()
32{
33 static Standard_GUID TDataStd_TickID("40DC60CD-30B9-41be-B002-4169EFB34EA5");
34 return TDataStd_TickID;
35}
36
37//=======================================================================
38//function : Set
39//purpose :
40//=======================================================================
41Handle(TDataStd_Tick) TDataStd_Tick::Set (const TDF_Label& L)
42{
43 Handle(TDataStd_Tick) A;
44 if (!L.FindAttribute(TDataStd_Tick::GetID (), A))
45 {
46 A = new TDataStd_Tick();
47 L.AddAttribute(A);
48 }
49 return A;
50}
51
52//=======================================================================
53//function : TDataStd_Tick
54//purpose :
55//=======================================================================
56TDataStd_Tick::TDataStd_Tick ()
57{
58}
59
60//=======================================================================
61//function : ID
62//purpose :
63//=======================================================================
64const Standard_GUID& TDataStd_Tick::ID () const
65{
66 return GetID();
67}
68
69//=======================================================================
70//function : NewEmpty
71//purpose :
72//=======================================================================
73Handle(TDF_Attribute) TDataStd_Tick::NewEmpty() const
74{
75 return new TDataStd_Tick();
76}
77
78//=======================================================================
79//function : Restore
80//purpose :
81//=======================================================================
35e08fe8 82void TDataStd_Tick::Restore (const Handle(TDF_Attribute)& )
7fd59977 83{
84 // There are no fields in this attribute.
85}
86
87//=======================================================================
88//function : Paste
89//purpose :
90//=======================================================================
35e08fe8 91void TDataStd_Tick::Paste(const Handle(TDF_Attribute)& ,
92 const Handle(TDF_RelocationTable)& ) const
7fd59977 93{
94 // There are no fields in this attribute.
95}
96
97//=======================================================================
98//function : Dump
99//purpose :
100//=======================================================================
101Standard_OStream& TDataStd_Tick::Dump (Standard_OStream& anOS) const
102{
103 anOS << "Tick";
104 return anOS;
105}
bc73b006 106
107//=======================================================================
108//function : DumpJson
109//purpose :
110//=======================================================================
111void TDataStd_Tick::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
112{
113 OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
114
115 OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
116}