1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
23 // File : SALOMEDS_AttLong_i.cxx
24 // Author : Estelle Deville
28 #include "SALOMEDS_AttLong_i.hxx"
29 #include "utilities.h"
31 #include <SALOMEDSImpl_AttributeInteger.hxx>
34 //============================================================================
36 * Purpose : Affect a value to the basic attribute
38 //============================================================================
39 void SALOMEDS_AttLong_i::Set(CORBA::Long i)
42 SALOMEDSImpl_AttributeInteger::Set (_Lab,i);
45 //============================================================================
47 * Purpose : Get basic attribute's value
49 //============================================================================
50 CORBA::Long SALOMEDS_AttLong_i::Get()
52 SALOMEDSImpl_AttributeInteger* Att = NULL;
54 if ((Att=(SALOMEDSImpl_AttributeInteger*)_Lab.FindAttribute(SALOMEDSImpl_AttributeInteger::GetID())))
59 //============================================================================
63 //============================================================================
64 char* SALOMEDS_AttLong_i::Save()
66 BEGIN_OF("SALOMEDS_AttLong_i::Save");
67 CORBA::Long x = this->Get();
68 char* out= new char[12];
73 //============================================================================
77 //============================================================================
78 void SALOMEDS_AttLong_i::Load()
80 BEGIN_OF("SALOMEDS_AttLong_i::Load");
83 //============================================================================
85 * Purpose : return sobject associated to the basic attribute (if exist)
87 //============================================================================
88 CORBA::Boolean SALOMEDS_AttLong_i::GetPtr(SALOMEDS::SObject_ptr anObject)
90 return (_Lab.IsAttribute(SALOMEDSImpl_AttributeInteger::GetID()));
93 //============================================================================
94 /*! Function : GetType
97 //============================================================================
98 char* SALOMEDS_AttLong_i::GetType()
100 return CORBA::string_dup(_type);