Salome HOME
22587: [CEA 1166] Exception KeyError in module threading at Salome exit
[modules/yacs.git] / src / SALOMEDS / SALOMEDS_AttReal_i.cxx
index e144805466b1206e69775dd691ead6722398ecc8..0e75e2305dd60ed9e734432e19cef9fa93e1f6f3 100644 (file)
@@ -1,37 +1,37 @@
-//  SALOME SALOMEDS : data structure of SALOME and sources of Salome data server 
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+// 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, or (at your option) any later version.
 //
+// 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_AttReal_i.cxx
 //  Author : Estelle Deville
 //  Module : SALOME
 //  $Header$
-
-using namespace std;
+//
 #include "SALOMEDS_AttReal_i.hxx"
 #include "utilities.h"
-#include <TDF_Tool.hxx>
 #include <stdio.h>
 #include <cstring>
+#include <SALOMEDSImpl_AttributeReal.hxx>
+
 
 //============================================================================
 /*! Function : Set
@@ -41,7 +41,7 @@ using namespace std;
 void SALOMEDS_AttReal_i::Set(CORBA::Double r)
 {
   CheckLocked();
-  TDataStd_Real::Set (_Lab,r);
+  SALOMEDSImpl_AttributeReal::Set (_Lab,r);
 }
 
 //============================================================================
@@ -51,9 +51,9 @@ void SALOMEDS_AttReal_i::Set(CORBA::Double r)
 //============================================================================
 CORBA::Double SALOMEDS_AttReal_i::Get()
 {
-  Handle(TDataStd_Real) Att;
+  SALOMEDSImpl_AttributeReal* Att;
   CORBA::Double x;
-  if (_Lab.FindAttribute(TDataStd_Real::GetID(),Att))
+  if ((Att=(SALOMEDSImpl_AttributeReal*)_Lab.FindAttribute(TDataStd_Real::GetID())))
     x = Att->Get ();
   return x;
 }
@@ -89,8 +89,7 @@ void SALOMEDS_AttReal_i::Load()
 //============================================================================
 CORBA::Boolean SALOMEDS_AttReal_i::GetPtr(SALOMEDS::SObject_ptr anObject)
 {
-  Handle(TDataStd_Real) Att;
-  return _Lab.FindAttribute(TDataStd_Real::GetID(),Att);
+  return _Lab.IsAttribute(SALOMEDSImpl_AttributeReal::GetID());
 }
 
 //============================================================================