Salome HOME
sources v1.2
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_TextHighlightColorAttribute.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_TextHighlightColorAttribute.cxx
25 //  Author : Yves FRICAUD
26 //  Module : SALOME
27 //  $Header: 
28
29 using namespace std;
30 #include "SALOMEDS_TextHighlightColorAttribute.ixx"
31
32 //=======================================================================
33 //function : GetID
34 //purpose  : 
35 //=======================================================================
36
37 const Standard_GUID& SALOMEDS_TextHighlightColorAttribute::GetID () 
38 {
39   static Standard_GUID SALOMEDS_TextHighlightColorAttributeID ("12837190-8F52-11d6-A8A3-0001021E8C7F");
40   return SALOMEDS_TextHighlightColorAttributeID;
41 }
42
43
44
45 //=======================================================================
46 //function : constructor
47 //purpose  : 
48 //=======================================================================
49 SALOMEDS_TextHighlightColorAttribute::SALOMEDS_TextHighlightColorAttribute()
50 {Init(1,3);}
51
52 //=======================================================================
53 //function : ID
54 //purpose  : 
55 //=======================================================================
56
57 const Standard_GUID& SALOMEDS_TextHighlightColorAttribute::ID () const { return GetID(); }
58
59
60 //=======================================================================
61 //function : NewEmpty
62 //purpose  : 
63 //=======================================================================
64
65 Handle(TDF_Attribute) SALOMEDS_TextHighlightColorAttribute::NewEmpty () const
66 {  
67   return new SALOMEDS_TextHighlightColorAttribute(); 
68 }
69
70 //=======================================================================
71 //function : Restore
72 //purpose  : 
73 //=======================================================================
74
75 void SALOMEDS_TextHighlightColorAttribute::Restore(const Handle(TDF_Attribute)& with) 
76 {
77   Handle(TColStd_HArray1OfReal) s = Handle(TDataStd_RealArray)::DownCast (with)->Array ();
78   TDataStd_RealArray::ChangeArray(s);
79   return;
80 }
81
82 //=======================================================================
83 //function : Paste
84 //purpose  : 
85 //=======================================================================
86
87 void SALOMEDS_TextHighlightColorAttribute::Paste (const Handle(TDF_Attribute)& into,
88                                                   const Handle(TDF_RelocationTable)& ) const
89 {
90   Handle(TDataStd_RealArray)::DownCast (into)->ChangeArray (Array());
91 }
92