Back to index

salome-med  6.5.0
MEDMEM_TraitsForFields.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 #ifndef __MEDMEM_TRAITSFORFIELDS_HXX__
00024 #define __MEDMEM_TRAITSFORFIELDS_HXX__
00025 
00026 #include CORBA_SERVER_HEADER(MED)
00027 #include "MEDMEM_Tags.hxx"
00028 #include "MEDMEM_InterlacingPolicy.hxx"
00029 
00030 namespace MEDMEM
00031 {
00032 template < typename T, typename INTERLACING_TAG >
00033 struct FIELDI_TRAITS
00034 {
00035   typedef typename T::InterfaceForServant InterfaceForServant;
00036   typedef typename T::FieldCorbaPtrType FieldCorbaPtrType;
00037   typedef typename T::SimpleFieldCorbaPtrType SimpleFieldCorbaPtrType;
00038   typedef typename T::SimpleFieldGlobalType SimpleFieldGlobalType;
00039   typedef typename T::SeqType SeqType;
00040   typedef typename T::SeqVarType SeqVarType;
00041   typedef typename T::SenderPtrType SenderPtrType;
00042   typedef typename T::SenderVarType SenderVarType;
00043 };
00044 
00045 template < >
00046 struct FIELDI_TRAITS<double, FullInterlace>
00047 {
00048   typedef POA_SALOME_MED::FIELDDOUBLEFULL InterfaceForServant;
00049   typedef SALOME_MED::FIELDDOUBLEFULL_ptr FieldCorbaPtrType;
00050   typedef SALOME_MED::FIELDDOUBLE_ptr SimpleFieldCorbaPtrType;
00051   typedef SALOME_MED::FIELDDOUBLE SimpleFieldGlobalType;
00052   typedef SALOME_TYPES::ListOfDouble SeqType;
00053   typedef SALOME_TYPES::ListOfDouble_var SeqVarType;
00054   typedef SALOME::SenderDouble_ptr SenderPtrType;
00055   typedef SALOME::SenderDouble_var SenderVarType;
00056 };
00057 
00058 template < >
00059 struct FIELDI_TRAITS<double, NoInterlace>
00060 {
00061   typedef POA_SALOME_MED::FIELDDOUBLENO InterfaceForServant;
00062   typedef SALOME_MED::FIELDDOUBLENO_ptr FieldCorbaPtrType;
00063   typedef SALOME_MED::FIELDDOUBLE_ptr SimpleFieldCorbaPtrType;
00064   typedef SALOME_MED::FIELDDOUBLE SimpleFieldGlobalType;
00065   typedef SALOME_TYPES::ListOfDouble SeqType;
00066   typedef SALOME_TYPES::ListOfDouble_var SeqVarType;
00067   typedef SALOME::SenderDouble_ptr SenderPtrType;
00068   typedef SALOME::SenderDouble_var SenderVarType;
00069 };
00070 
00071 template < >
00072 struct FIELDI_TRAITS<double, NoInterlaceByType>
00073 {
00074   typedef POA_SALOME_MED::FIELDDOUBLENOBYTYPE InterfaceForServant;
00075   typedef SALOME_MED::FIELDDOUBLENOBYTYPE_ptr FieldCorbaPtrType;
00076   typedef SALOME_MED::FIELDDOUBLE_ptr SimpleFieldCorbaPtrType;
00077   typedef SALOME_MED::FIELDDOUBLE SimpleFieldGlobalType;
00078   typedef SALOME_TYPES::ListOfDouble SeqType;
00079   typedef SALOME_TYPES::ListOfDouble_var SeqVarType;
00080   typedef SALOME::SenderDouble_ptr SenderPtrType;
00081   typedef SALOME::SenderDouble_var SenderVarType;
00082 };
00083 
00084 template < >
00085 struct FIELDI_TRAITS<int, FullInterlace>
00086 {
00087   typedef POA_SALOME_MED::FIELDINTFULL InterfaceForServant;
00088   typedef SALOME_MED::FIELDINTFULL_ptr FieldCorbaPtrType;
00089   typedef SALOME_MED::FIELDINT_ptr SimpleFieldCorbaPtrType;
00090   typedef SALOME_MED::FIELDINT SimpleFieldGlobalType;
00091   typedef SALOME_TYPES::ListOfLong SeqType;
00092   typedef SALOME_TYPES::ListOfLong_var SeqVarType;
00093   typedef SALOME::SenderInt_ptr SenderPtrType;
00094   typedef SALOME::SenderInt_var SenderVarType;
00095 };
00096 
00097 template < >
00098 struct FIELDI_TRAITS<int, NoInterlace>
00099 {
00100   typedef POA_SALOME_MED::FIELDINTNO InterfaceForServant;
00101   typedef SALOME_MED::FIELDINTNO_ptr FieldCorbaPtrType;
00102   typedef SALOME_MED::FIELDINT_ptr SimpleFieldCorbaPtrType;
00103   typedef SALOME_MED::FIELDINT SimpleFieldGlobalType;
00104   typedef SALOME_TYPES::ListOfLong SeqType;
00105   typedef SALOME_TYPES::ListOfLong_var SeqVarType;
00106   typedef SALOME::SenderInt_ptr SenderPtrType;
00107   typedef SALOME::SenderInt_var SenderVarType;
00108 };
00109 
00110 template < >
00111 struct FIELDI_TRAITS<int, NoInterlaceByType>
00112 {
00113   typedef POA_SALOME_MED::FIELDINTNOBYTYPE InterfaceForServant;
00114   typedef SALOME_MED::FIELDINTNOBYTYPE_ptr FieldCorbaPtrType;
00115   typedef SALOME_MED::FIELDINT_ptr SimpleFieldCorbaPtrType;
00116   typedef SALOME_MED::FIELDINT SimpleFieldGlobalType;
00117   typedef SALOME_TYPES::ListOfLong SeqType;
00118   typedef SALOME_TYPES::ListOfLong_var SeqVarType;
00119   typedef SALOME::SenderInt_ptr SenderPtrType;
00120   typedef SALOME::SenderInt_var SenderVarType;
00121 };
00122 }
00123 
00124 #endif