Salome HOME
ADD a end user module (services.py) to help the manipulation of SALOME KERNEL service...
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_AttLong_i.cxx
index e4fed96006849bc3255127493acaef2004bded76..a418d7715df1ae79c0a9d0f39a803475d2708628 100644 (file)
@@ -1,36 +1,36 @@
-//  SALOME SALOMEDS : data structure of SALOME and sources of Salome data server 
+// Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-// 
-//  This library is free software; you can redistribute it and/or 
-//  modify it under the terms of the GNU Lesser General Public 
-//  License as published by the Free Software Foundation; either 
-//  version 2.1 of the License. 
-// 
-//  This library is distributed in the hope that it will be useful, 
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-//  Lesser General Public License for more details. 
-// 
-//  You should have received a copy of the GNU Lesser General Public 
-//  License along with this library; if not, write to the Free Software 
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-// 
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
 //
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
 //
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
+//  SALOME SALOMEDS : data structure of SALOME and sources of Salome data server 
 //  File   : SALOMEDS_AttLong_i.cxx
 //  Author : Estelle Deville
 //  Module : SALOME
 //  $Header$
-
+//
 #include "SALOMEDS_AttLong_i.hxx"
 #include "utilities.h"
-#include <TDF_Tool.hxx>
 #include <stdio.h>
-using namespace std;
+#include <SALOMEDSImpl_AttributeInteger.hxx>
+
 
 //============================================================================
 /*! Function : Set
@@ -40,7 +40,7 @@ using namespace std;
 void SALOMEDS_AttLong_i::Set(CORBA::Long i)
 {
   CheckLocked();
-  TDataStd_Integer::Set (_Lab,i);
+  SALOMEDSImpl_AttributeInteger::Set (_Lab,i);
 }
 
 //============================================================================
@@ -50,9 +50,9 @@ void SALOMEDS_AttLong_i::Set(CORBA::Long i)
 //============================================================================
 CORBA::Long SALOMEDS_AttLong_i::Get()
 {
-  Handle(TDataStd_Integer) Att;
+  SALOMEDSImpl_AttributeInteger* Att = NULL;
   CORBA::Long x;
-  if (_Lab.FindAttribute(TDataStd_Integer::GetID(),Att))
+  if ((Att=(SALOMEDSImpl_AttributeInteger*)_Lab.FindAttribute(SALOMEDSImpl_AttributeInteger::GetID())))
     x = Att->Get ();
   return x;
 }
@@ -88,8 +88,7 @@ void SALOMEDS_AttLong_i::Load()
 //============================================================================
 CORBA::Boolean SALOMEDS_AttLong_i::GetPtr(SALOMEDS::SObject_ptr anObject)
 {
-  Handle(TDataStd_Integer) Att;
-  return _Lab.FindAttribute(TDataStd_Integer::GetID(),Att);
+  return (_Lab.IsAttribute(SALOMEDSImpl_AttributeInteger::GetID()));
 }
 
 //============================================================================