1 // Copyright (C) 2007-2019 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, or (at your option) any later version.
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
23 // SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
24 // File : SALOMEDS_AttLong_i.cxx
25 // Author : Estelle Deville
29 #include "SALOMEDS_AttLong_i.hxx"
30 #include "utilities.h"
32 #include <SALOMEDSImpl_AttributeInteger.hxx>
35 //============================================================================
37 * Purpose : Affect a value to the basic attribute
39 //============================================================================
40 void SALOMEDS_AttLong_i::Set(CORBA::Long i)
43 SALOMEDSImpl_AttributeInteger::Set (_Lab,i);
46 //============================================================================
48 * Purpose : Get basic attribute's value
50 //============================================================================
51 CORBA::Long SALOMEDS_AttLong_i::Get()
53 SALOMEDSImpl_AttributeInteger* Att = NULL;
55 if ((Att=(SALOMEDSImpl_AttributeInteger*)_Lab.FindAttribute(SALOMEDSImpl_AttributeInteger::GetID())))
60 //============================================================================
64 //============================================================================
65 char* SALOMEDS_AttLong_i::Save()
67 BEGIN_OF("SALOMEDS_AttLong_i::Save");
68 CORBA::Long x = this->Get();
69 char* out= new char[12];
74 //============================================================================
78 //============================================================================
79 void SALOMEDS_AttLong_i::Load()
81 BEGIN_OF("SALOMEDS_AttLong_i::Load");
84 //============================================================================
86 * Purpose : return sobject associated to the basic attribute (if exist)
88 //============================================================================
89 CORBA::Boolean SALOMEDS_AttLong_i::GetPtr(SALOMEDS::SObject_ptr anObject)
91 return (_Lab.IsAttribute(SALOMEDSImpl_AttributeInteger::GetID()));
94 //============================================================================
95 /*! Function : GetType
98 //============================================================================
99 char* SALOMEDS_AttLong_i::GetType()
101 return CORBA::string_dup(_type);