Salome HOME
Merge branch 'rbe/evol-job-newparams'
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_Attributes.hxx
index 2d39bb79fede9b09dfd7fe6eb1c8f6f1e6268aba..a6df5a0369c327fd6bb50f9179808ab589d95ebb 100644 (file)
@@ -1,7 +1,29 @@
+// 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
+//
+// 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
+//
+
 //  File   : SALOMEDS_Attributes.hxx
 //  Author : Sergey RUIN
 //  Module : SALOME
-
+//
 #ifndef __SALOMEDS_ATTRIBUTES__H__
 #define __SALOMEDS_ATTRIBUTES__H__
 
@@ -35,6 +57,8 @@
 #include "SALOMEDSImpl_AttributeFileType.hxx"
 #include "SALOMEDSImpl_AttributeFlags.hxx"
 #include "SALOMEDSImpl_AttributeGraphic.hxx"
+#include "SALOMEDSImpl_AttributeParameter.hxx"
+#include "SALOMEDSImpl_AttributeString.hxx"
 
 #include "SALOMEDS_GenericAttribute_i.hxx"
 #include "SALOMEDS_AttributeName_i.hxx"
 #include "SALOMEDS_AttributeFileType_i.hxx"
 #include "SALOMEDS_AttributeFlags_i.hxx"
 #include "SALOMEDS_AttributeGraphic_i.hxx"
+#include "SALOMEDS_AttributeParameter_i.hxx"
+#include "SALOMEDS_AttributeString_i.hxx"
 
-#define __CreateCORBAAttribute(CORBA_Name) if (strcmp(aTypeOfAttribute, #CORBA_Name) == 0) { \
-    Handle(SALOMEDSImpl_##CORBA_Name) A = Handle(SALOMEDSImpl_##CORBA_Name)::DownCast(theAttr); \
+#define __CreateCORBAAttribute(CORBA_Name) else if (strcmp(aTypeOfAttribute, #CORBA_Name) == 0) { \
+    SALOMEDSImpl_##CORBA_Name* A = dynamic_cast<SALOMEDSImpl_##CORBA_Name*>(theAttr); \
     SALOMEDS_##CORBA_Name##_i* Attr = new SALOMEDS_##CORBA_Name##_i(A, theOrb); \
     attr_servant = Attr; \
     anAttribute = Attr->CORBA_Name::_this(); \
 
 
 #define __CreateGenericCORBAAttribute \
+  if(0){} \
 __CreateCORBAAttribute(AttributeReal) \
 __CreateCORBAAttribute(AttributeInteger) \
 __CreateCORBAAttribute(AttributeSequenceOfReal) \
@@ -102,6 +129,8 @@ __CreateCORBAAttribute(AttributeFileType) \
 __CreateCORBAAttribute(AttributeFlags) \
 __CreateCORBAAttribute(AttributeGraphic) \
 __CreateCORBAAttribute(AttributeTreeNode) \
-__CreateCORBAAttribute(AttributeUserID)
+__CreateCORBAAttribute(AttributeUserID) \
+__CreateCORBAAttribute(AttributeParameter) \
+__CreateCORBAAttribute(AttributeString)
 
 #endif