Salome HOME
Issue 0020194: EDF 977 ALL: Get rid of warnings PACKAGE_VERSION already defined
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_ClientAttributes.hxx
index 69ae2d131d710a2475bc3f64ea37cf91b3db5be9..0846ced785e1ecf03f2fc3cb97fed388fda7e2a6 100644 (file)
@@ -1,26 +1,28 @@
-// Copyright (C) 2005  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.
+//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-// 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
+//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//  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
 //
 //  File   : SALOMEDS_Attributes.hxx
 //  Author : Sergey RUIN
 //  Module : SALOME
-
+//
 #ifndef __SALOMEDSCLIENT_ATTRIBUTES__H__
 #define __SALOMEDSCLIENT_ATTRIBUTES__H__
 
@@ -56,6 +58,7 @@
 #include "SALOMEDSImpl_AttributeFlags.hxx"
 #include "SALOMEDSImpl_AttributeGraphic.hxx"
 #include "SALOMEDSImpl_AttributeParameter.hxx"
+#include "SALOMEDSImpl_AttributeString.hxx"
 
 #include "SALOMEDS_GenericAttribute.hxx"
 #include "SALOMEDS_AttributeName.hxx"
 #include "SALOMEDS_AttributeFlags.hxx"
 #include "SALOMEDS_AttributeGraphic.hxx"
 #include "SALOMEDS_AttributeParameter.hxx"
+#include "SALOMEDS_AttributeString.hxx"
 
 #define __CreateClientAttributeLocal(CORBA_Name) if (strcmp(aTypeOfAttribute.c_str(), #CORBA_Name) == 0) { \
-    Handle(SALOMEDSImpl_##CORBA_Name) A = Handle(SALOMEDSImpl_##CORBA_Name)::DownCast(theGA); \
+    SALOMEDSImpl_##CORBA_Name* A = dynamic_cast<SALOMEDSImpl_##CORBA_Name*>(theGA); \
     aGA = new SALOMEDS_##CORBA_Name(A); \
   }
 
@@ -127,7 +131,8 @@ __CreateClientAttributeLocal(AttributeFlags) \
 __CreateClientAttributeLocal(AttributeGraphic) \
 __CreateClientAttributeLocal(AttributeTreeNode) \
 __CreateClientAttributeLocal(AttributeUserID) \
-__CreateClientAttributeLocal(AttributeParameter)
+__CreateClientAttributeLocal(AttributeParameter) \
+__CreateClientAttributeLocal(AttributeString)
 
 #define __CreateGenericClientAttributeCORBA \
 __CreateClientAttributeCORBA(AttributeReal) \
@@ -158,6 +163,7 @@ __CreateClientAttributeCORBA(AttributeFlags) \
 __CreateClientAttributeCORBA(AttributeGraphic) \
 __CreateClientAttributeCORBA(AttributeTreeNode) \
 __CreateClientAttributeCORBA(AttributeUserID) \
-__CreateClientAttributeCORBA(AttributeParameter)
+__CreateClientAttributeCORBA(AttributeParameter) \
+__CreateClientAttributeCORBA(AttributeString)
 
 #endif