Salome HOME
PR: merge from branch BR_UT_V310a3 tag mergeto_trunk_05dec05
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_TextColorAttribute.cxx
1 //  SALOME SALOMEDS : data structure of SALOME and sources of Salome data server 
2 //
3 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 // 
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. 
10 // 
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. 
15 // 
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 
19 // 
20 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : SALOMEDS_TextColorAttribute.cxx
25 //  Author : Yves FRICAUD
26 //  Module : SALOME
27 //  $Header$
28
29 #include "SALOMEDS_TextColorAttribute.ixx"
30 using namespace std;
31
32 //=======================================================================
33 //function : GetID
34 //purpose  : 
35 //=======================================================================
36
37 const Standard_GUID& SALOMEDS_TextColorAttribute::GetID () 
38 {
39   static Standard_GUID SALOMEDS_TextColorAttributeID ("12837189-8F52-11d6-A8A3-0001021E8C7F");
40   return SALOMEDS_TextColorAttributeID;
41 }
42
43
44
45
46 //=======================================================================
47 //function : constructor
48 //purpose  : 
49 //=======================================================================
50 SALOMEDS_TextColorAttribute::SALOMEDS_TextColorAttribute()
51 {Init(1,3);}
52
53 //=======================================================================
54 //function : ID
55 //purpose  : 
56 //=======================================================================
57
58 const Standard_GUID& SALOMEDS_TextColorAttribute::ID () const { return GetID(); }
59
60
61 //=======================================================================
62 //function : NewEmpty
63 //purpose  : 
64 //=======================================================================
65
66 Handle(TDF_Attribute) SALOMEDS_TextColorAttribute::NewEmpty () const
67 {  
68   return new SALOMEDS_TextColorAttribute(); 
69 }
70
71 //=======================================================================
72 //function : Restore
73 //purpose  : 
74 //=======================================================================
75
76 void SALOMEDS_TextColorAttribute::Restore(const Handle(TDF_Attribute)& with) 
77 {
78   Handle(TColStd_HArray1OfReal) s = Handle(TDataStd_RealArray)::DownCast (with)->Array ();
79   TDataStd_RealArray::ChangeArray(s);
80   return;
81 }
82
83 //=======================================================================
84 //function : Paste
85 //purpose  : 
86 //=======================================================================
87
88 void SALOMEDS_TextColorAttribute::Paste (const Handle(TDF_Attribute)& into,
89                                     const Handle(TDF_RelocationTable)& RT) const
90 {
91   Handle(TDataStd_RealArray)::DownCast (into)->ChangeArray (Array());
92 }
93