1 // SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : SALOMEDS_TextColorAttribute.cxx
25 // Author : Yves FRICAUD
30 #include "SALOMEDS_TextColorAttribute.ixx"
32 //=======================================================================
35 //=======================================================================
37 const Standard_GUID& SALOMEDS_TextColorAttribute::GetID ()
39 static Standard_GUID SALOMEDS_TextColorAttributeID ("12837189-8F52-11d6-A8A3-0001021E8C7F");
40 return SALOMEDS_TextColorAttributeID;
46 //=======================================================================
47 //function : constructor
49 //=======================================================================
50 SALOMEDS_TextColorAttribute::SALOMEDS_TextColorAttribute()
53 //=======================================================================
56 //=======================================================================
58 const Standard_GUID& SALOMEDS_TextColorAttribute::ID () const { return GetID(); }
61 //=======================================================================
64 //=======================================================================
66 Handle(TDF_Attribute) SALOMEDS_TextColorAttribute::NewEmpty () const
68 return new SALOMEDS_TextColorAttribute();
71 //=======================================================================
74 //=======================================================================
76 void SALOMEDS_TextColorAttribute::Restore(const Handle(TDF_Attribute)& with)
78 Handle(TColStd_HArray1OfReal) s = Handle(TDataStd_RealArray)::DownCast (with)->Array ();
79 TDataStd_RealArray::ChangeArray(s);
83 //=======================================================================
86 //=======================================================================
88 void SALOMEDS_TextColorAttribute::Paste (const Handle(TDF_Attribute)& into,
89 const Handle(TDF_RelocationTable)& RT) const
91 Handle(TDataStd_RealArray)::DownCast (into)->ChangeArray (Array());