]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
merged from V2_2_0_maintainance_18mar05 SARGE_Port_V221
authorprascle <prascle>
Fri, 18 Mar 2005 12:01:58 +0000 (12:01 +0000)
committerprascle <prascle>
Fri, 18 Mar 2005 12:01:58 +0000 (12:01 +0000)
26 files changed:
bin/runSalome.py
salome_adm/unix/SALOMEconfig.h.in
salome_adm/unix/config_files/ac_cxx_depend_flag.m4
salome_adm/unix/config_files/check_cas.m4
salome_adm/unix/config_files/check_med2.m4
salome_adm/unix/make_commence.in
src/Container/Container_i.cxx
src/Container/Makefile.in
src/Container/SALOME_ContainerManager.cxx
src/Container/SALOME_ContainerManagerServer.cxx [new file with mode: 0644]
src/MEDWrapper/Base/MED_Common.hxx
src/MEDWrapper/V2_1/MED_V2_1_Wrapper.cxx
src/MEDWrapper/V2_1/MEDdatasetNumEcrire.cxx
src/MEDWrapper/V2_1/MEDdatasetNumLire.cxx
src/MEDWrapper/V2_1/Makefile.in
src/MEDWrapper/V2_2/MED_V2_2_Wrapper.cxx
src/Makefile.in
src/ResourcesManager/SALOME_ResourcesManager.cxx
src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.cxx
src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.cxx
src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.cxx
src/SALOMEDS/SALOMEDS_UseCaseIterator_i.cxx
src/SALOMEGUI/QAD_ObjectBrowser.cxx
src/Session/Session_ServerLauncher.cxx
src/Session/Session_ServerThread.cxx
src/Utils/Utils_CorbaException.hxx

index 8654391888a12509e0d17b18db271b4d4279c4a2..055268c56ccc5f976f3a529c982d50a8059e4263 100755 (executable)
@@ -409,6 +409,41 @@ class SessionServer(Server):
       
 # ---
 
+class ContainerManagerServer(Server):
+    def __init__(self,args):
+        self.args=args
+        self.initArgs()
+        self.SCMD1=['SALOME_ContainerManagerServer']
+        self.SCMD2=[]
+        if 'registry' in self.args['embedded']:
+            self.SCMD1+=['--with','Registry',
+                         '(','--salome_session','theSession',')']
+        if 'moduleCatalog' in self.args['embedded']:
+            self.SCMD1+=['--with','ModuleCatalog','(','-common']
+            self.SCMD2+=['-personal',
+                         '${HOME}/Salome/resources/CatalogModulePersonnel.xml',')']
+        if 'study' in self.args['embedded']:
+            self.SCMD2+=['--with','SALOMEDS','(',')']
+        if 'cppContainer' in self.args['embedded']:
+            self.SCMD2+=['--with','Container','(','FactoryServer',')']
+        
+    def setpath(self,modules_list,modules_root_dir):
+        cata_path=[]
+        list_modules = modules_list[:]
+        list_modules.reverse()
+        for module in ["KERNEL"] + list_modules:
+            module_root_dir=modules_root_dir[module]
+            module_cata=module+"Catalog.xml"
+            print "   ", module_cata
+            cata_path.extend(
+                glob.glob(os.path.join(module_root_dir,"share",
+                                       self.args['appname'],"resources",
+                                       module_cata)))
+        if 'moduleCatalog' in self.args['embedded']:
+            self.CMD=self.SCMD1 + [string.join(cata_path,':')] + self.SCMD2
+        else:
+            self.CMD=self.SCMD1 + self.SCMD2
+
 class NotifyServer(Server):
     def __init__(self,args,modules_root_dir):
         self.args=args
@@ -521,6 +556,14 @@ def startSalome(args, modules_list, modules_root_dir):
         myServer.run()
         clt.waitNS("/myStudyManager")
 
+    #
+    # Lancement ContainerManagerServer
+    #
+    
+    myCmServer = ContainerManagerServer(args)
+    myCmServer.setpath(modules_list,modules_root_dir)
+    myCmServer.run()
+
     #
     # Lancement Session Server
     #
index e79eb7ae8bffbc07c456b2e5f1656819d67e0bac..c1be35bd0e09f8dc1685af461002a3238a206fdd 100644 (file)
   See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
 ------------------------------------------------------------------------------------*/
 
+#ifndef SALOME_CONFIG_H
+#define SALOME_CONFIG_H
+
 #define DEBUG
 
 #define QUOTE(x)  #x
 #define CORBA_CLIENT_HEADER(x)  QUOTE(x@IDL_CLN_H@)
 #define CORBA_SERVER_HEADER(x)  QUOTE(x@IDL_SRV_H@)
 
+#ifndef @MACHINE@
+  #define @MACHINE@
+#endif
+
+#endif
index 9e3d4ecc97e9754f67a361b3464adcc627987b37..ee49cd8a3f8653b28bcdec4191d752b7e3bbbcac 100644 (file)
@@ -44,12 +44,14 @@ dnl on utilise donc gnu pour generer les dependances.
      DEPCXX=g++
      DEPCXXFLAGS="-Wno-deprecated"
      DIFFFLAGS="-w"
+     MACHINE="OSF1"
      ;;
    *)
      DEPCC=${CC-cc}
      DEPCXX=${CXX-c++}
      DEPCXXFLAGS="\${CXXFLAGS}"
      DIFFFLAGS="-b -B"
+     MACHINE="PCLINUX"
      ;;
  esac
  C_DEPEND_FLAG=
@@ -137,5 +139,6 @@ dnl use g++ option -MG : asume unknown file will be construct later
  AC_SUBST(DEPCXXFLAGS)
  AC_SUBST(C_DEPEND_FLAG)
  AC_SUBST(CXX_DEPEND_FLAG)
+ AC_SUBST(MACHINE)
 ])
 ])
index 3b3f654f985c277a0e68ebae50162ddbb4c3193d..b27c7deacb222a222820aac2226837713a737b90 100644 (file)
@@ -113,7 +113,14 @@ dnl test c++ compiler flag for unsigned character
 dnl cascade headers
 
   CPPFLAGS_old="$CPPFLAGS"
-  CAS_CPPFLAGS="-DOCC_VERSION_MAJOR=$OCC_VERSION_MAJOR -DLIN -DLINTEL -DCSFDB -DNO_CXX_EXCEPTION -DNo_exception -DHAVE_CONFIG_H -DHAVE_LIMITS_H -DHAVE_WOK_CONFIG_H -I$CASROOT/inc"
+case $host_os in
+   linux*)
+      CAS_CPPFLAGS="-DOCC_VERSION_MAJOR=$OCC_VERSION_MAJOR -DLIN -DLINTEL -DCSFDB -DNO_CXX_EXCEPTION -DNo_exception -DHAVE_CONFIG_H -DHAVE_LIMITS_H -DHAVE_WOK_CONFIG_H -I$CASROOT/inc"
+      ;;
+   osf*)
+      CAS_CPPFLAGS="-DOCC_VERSION_MAJOR=$OCC_VERSION_MAJOR -DLIN -DLINTEL -DCSFDB -DNo_exception -DHAVE_CONFIG_H -DHAVE_LIMITS_H -DHAVE_WOK_CONFIG_H -I$CASROOT/inc"
+      ;;
+esac
   CPPFLAGS="$CPPFLAGS $CAS_CPPFLAGS"
 
   echo
index 6e8192b44a273dfbab82eaa0ea9b8fd15cb0604c..3b8fd9f8d815934b00d90089d17fccc2f5eb8fef 100644 (file)
@@ -24,6 +24,7 @@ AC_DEFUN([CHECK_MED2],[
 AC_REQUIRE([AC_PROG_CC])dnl
 AC_REQUIRE([AC_PROG_CPP])dnl
 AC_REQUIRE([CHECK_HDF5])dnl
+AC_REQUIRE([AC_DEPEND_FLAG])dnl
 
 AC_CHECKING(for MED2)
 
@@ -41,57 +42,38 @@ MED2_INCLUDES=""
 MED2_LIBS=""
 MED2_MT_LIBS=""
 
-med2_ok=no
+LOCAL_INCLUDES=""
+LOCAL_LIBS=""
 
-LOCAL_INCLUDES="$HDF5_INCLUDES"
-LOCAL_LIBS="-lmed $HDF5_LIBS"
+med2_ok=no
 
+dnl check, if there is MED library
 if test -z $MED2HOME
 then
    AC_MSG_WARN(undefined MED2HOME variable which specify med2 installation directory)
 else
-   LOCAL_INCLUDES="$LOCAL_INCLUDES -I$MED2HOME/include"
-   LOCAL_LIBS="-L$MED2HOME/lib $LOCAL_LIBS"
+   LOCAL_INCLUDES="$HDF5_INCLUDES -I$MED2HOME/include"
+   LOCAL_LIBS="-L$MED2HOME/lib -lmed $HDF5_LIBS"
 fi
 
 dnl check med2 header
-
 CPPFLAGS_old="$CPPFLAGS"
-dnl we must test system : linux = -DPCLINUX
-dnl we must test system : Alpha-OSF = -DOSF1
-case $host_os in
-   linux*)
-      CPPFLAGS="$CPPFLAGS -DPCLINUX $LOCAL_INCLUDES"
-      ;;
-   osf*)
-      CPPFLAGS="$CPPFLAGS -DOSF1 $LOCAL_INCLUDES"
-      ;;
-esac
+CPPFLAGS="$CPPFLAGS -D$MACHINE $LOCAL_INCLUDES"
 AC_CHECK_HEADER(med.h,med2_ok=yes ,med2_ok=no)
 CPPFLAGS="$CPPFLAGS_old"
 
+dnl check med2 library
 if  test "x$med2_ok" = "xyes"
 then
-
-dnl check med2 library
-
   LIBS_old="$LIBS"
   LIBS="$LIBS $LOCAL_LIBS"
   AC_CHECK_LIB(med,MEDouvrir,med2_ok=yes,med2_ok=no)
   LIBS="$LIBS_old"
-
 fi
 
 if  test "x$med2_ok" = "xyes"
 then
-case $host_os in
-   linux*)
-        MED2_INCLUDES="-DPCLINUX $LOCAL_INCLUDES"
-      ;;
-   osf*)
-      MED2_INCLUDES="-DOSF1 $LOCAL_INCLUDES"
-      ;;
-esac
+  MED2_INCLUDES="-D$MACHINE $LOCAL_INCLUDES"
   MED2_LIBS="$LOCAL_LIBS"
   MED2_MT_LIBS="$LOCAL_LIBS"
 fi
index d23993edfb6aa17b7bc964c534f73e078189594a..faf3e9a0ef6a6ac1699b563b6e93d7011970d859 100644 (file)
@@ -193,6 +193,7 @@ CXXFLAGS+= $(CORBA_CXXFLAGS)
 # add corba libs when link salome application ! 
 #LDFLAGS+= $(CORBA_LIBS)
 LIBS+=$(CORBA_LIBS)
+LIBSFORBIN+=$(CORBA_LIBS)
 
 DOXYGEN = @DOXYGEN@
 
index b65bf13bdc699ace327f474ac8f111e2124c8a3e..2a4257217fc0f766672fc8be8a8c7a98637aea0c 100644 (file)
@@ -332,8 +332,8 @@ void SigIntHandler(int what , siginfo_t * siginfo ,
 
 // Get the PID of the Container
 
-long Engines_Container_i::getPID() {
-    return (long)getpid();
+CORBA::Long Engines_Container_i::getPID() {
+    return (CORBA::Long)getpid();
 }
 
 // Get the hostName of the Container
index 1ed861ed014cb06824dccabd9b1f2570993797c3..fa963603b2e7c1e5197cd99ab423f60e34a0e6a2 100644 (file)
@@ -49,7 +49,7 @@ LIB_SERVER_IDL = SALOME_Registry.idl SALOME_Component.idl SALOME_ContainerManage
 LIB_CLIENT_IDL = 
 
 # Executables targets
-BIN = SALOME_Container
+BIN = SALOME_Container SALOME_ContainerManagerServer
 BIN_SRC = SALOME_Container_SignalsHandler.cxx
 BIN_SERVER_IDL = SALOME_Component.idl SALOME_ContainerManager.idl
 
index d5fad0ae9d78a25f89e79f76aee7cf28d5553397..77cebf354f276ab3fdf1011c6f677b222330fcbb 100644 (file)
@@ -15,8 +15,16 @@ SALOME_ContainerManager::SALOME_ContainerManager(CORBA::ORB_ptr orb)
 {
   _NS=new SALOME_NamingService(orb);
   PortableServer::POA_var root_poa=PortableServer::POA::_the_root_poa();
-  PortableServer::ObjectId_var id=root_poa->activate_object(this);
-  CORBA::Object_var obj=root_poa->id_to_reference(id);
+  PortableServer::POAManager_var pman = root_poa->the_POAManager();
+  PortableServer::POA_var my_poa;
+  CORBA::PolicyList policies;
+  policies.length(1);
+  PortableServer::ThreadPolicy_var threadPol=root_poa->create_thread_policy(PortableServer::SINGLE_THREAD_MODEL);
+  policies[0]=PortableServer::ThreadPolicy::_duplicate(threadPol);
+  my_poa=root_poa->create_POA("SThreadPOA",pman,policies);
+  threadPol->destroy();
+  PortableServer::ObjectId_var id=my_poa->activate_object(this);
+  CORBA::Object_var obj=my_poa->id_to_reference(id);
   Engines::ContainerManager_var refContMan = Engines::ContainerManager::_narrow(obj);
   _NS->Register(refContMan,_ContainerManagerNameInNS);
 }
diff --git a/src/Container/SALOME_ContainerManagerServer.cxx b/src/Container/SALOME_ContainerManagerServer.cxx
new file mode 100644 (file)
index 0000000..77297a4
--- /dev/null
@@ -0,0 +1,39 @@
+#include "SALOME_ContainerManager.hxx"
+#include "utilities.h"
+
+int main(int argc, char* argv[])
+{
+  PortableServer::POA_var root_poa;
+  PortableServer::POAManager_var pman;
+  CORBA::Object_var obj;
+
+  CORBA::ORB_var orb = CORBA::ORB_init( argc , argv ) ;
+  try{ 
+       obj = orb->resolve_initial_references("RootPOA");
+       if(!CORBA::is_nil(obj))
+         root_poa = PortableServer::POA::_narrow(obj);
+       if(!CORBA::is_nil(root_poa))
+         pman = root_poa->the_POAManager();
+      }
+  catch(CORBA::COMM_FAILURE&){
+    MESSAGE( "Container: CORBA::COMM_FAILURE: Unable to contact the Naming Service" );
+  }
+  try{
+    SALOME_ContainerManager *cmServ=new SALOME_ContainerManager(orb);
+    pman->activate();
+    orb->run();
+  }catch(CORBA::SystemException&){
+    MESSAGE("Caught CORBA::SystemException.");
+  }catch(PortableServer::POA::WrongPolicy&){
+    MESSAGE("Caught CORBA::WrongPolicyException.");
+  }catch(PortableServer::POA::ServantAlreadyActive&){
+    MESSAGE("Caught CORBA::ServantAlreadyActiveException");
+  }catch(CORBA::Exception&){
+    MESSAGE("Caught CORBA::Exception.");
+  }catch(std::exception& exc){
+    MESSAGE("Caught std::exception - "<<exc.what()); 
+  }catch(...){
+    MESSAGE("Caught unknown exception.");
+  }
+}
+
index c2ae4252289d9c4ff0ed64c209e35e1c4560b191..a4d5af9f3466d56b7a1c06f0f8c89f4e462fcdfe 100644 (file)
@@ -42,6 +42,8 @@ extern "C"{
 
 #include <boost/shared_ptr.hpp>
 
+#include "SALOMEconfig.h"
+
 namespace MED{
 
   enum EVersion {eVUnknown = -1, eV2_1, eV2_2};
@@ -148,8 +150,12 @@ namespace MED{
 
   typedef enum {eFAUX, eVRAI} EBooleen ; 
   typedef double TFloat;
+#if defined(SUN4SOL2) || defined(PCLINUX) || defined(OSF1_32) || defined(IRIX64_32) || defined(RS6000) || defined(HP9000)
   typedef int TInt;
-
+#endif
+#if defined(IRIX64) || defined(OSF1)
+  typedef long TInt;
+#endif
   typedef hid_t TIdt;
   typedef herr_t TErr;
 
index 9dc64affcd2f80d6ddddbd82aa15a1fe2847d2c8..04afa18fcd2e1437706d25b4360da4823a8cdc5b 100644 (file)
@@ -135,7 +135,7 @@ namespace MED{
       TErr aRet = MEDmaaInfo(myFile->Id(),
                             theMeshId,
                             &theInfo.myName[0],
-                            &theInfo.myDim);
+                            (med_2_1::med_int *)&theInfo.myDim);
       if(theErr) 
        *theErr = aRet;
       else if(aRet < 0)
@@ -243,13 +243,13 @@ namespace MED{
                             &aMeshInfo.myName[0],
                             theFamId,
                             &theInfo.myName[0],
-                            &theInfo.myId,
-                            &theInfo.myAttrId[0],
-                            &theInfo.myAttrVal[0],
+                            (med_2_1::med_int *)&theInfo.myId,
+                            (med_2_1::med_int *)&theInfo.myAttrId[0],
+                            (med_2_1::med_int *)&theInfo.myAttrVal[0],
                             &theInfo.myAttrDesc[0],
-                            &theInfo.myNbAttr,
+                            (med_2_1::med_int *)&theInfo.myNbAttr,
                             &theInfo.myGroupNames[0],
-                            &theInfo.myNbGroup);
+                            (med_2_1::med_int *)&theInfo.myNbGroup);
       
       if(theErr) 
        *theErr = aRet;
@@ -278,8 +278,8 @@ namespace MED{
                           &aMeshInfo.myName[0],
                           &anInfo.myName[0],
                           anInfo.myId,
-                          &anInfo.myAttrId[0],
-                          &anInfo.myAttrVal[0],
+                          (med_2_1::med_int *)&anInfo.myAttrId[0],
+                          (med_2_1::med_int *)&anInfo.myAttrVal[0],
                           &anInfo.myAttrDesc[0],
                           anInfo.myNbAttr,
                           &anInfo.myGroupNames[0],
@@ -341,9 +341,9 @@ namespace MED{
       
       MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo;
 
-      med_repere& aRepere = static_cast<med_repere>(theInfo.mySystem);
-      med_booleen& anIsElemNames = static_cast<med_booleen>(theInfo.myIsElemNames);
-      med_booleen& anIsElemNum = static_cast<med_booleen>(theInfo.myIsElemNum);
+      med_repere& aRepere = (med_repere&)(theInfo.mySystem);
+      med_booleen& anIsElemNames = (med_booleen&)(theInfo.myIsElemNames);
+      med_booleen& anIsElemNum = (med_booleen&)(theInfo.myIsElemNum);
 
       TErr aRet = MEDnoeudsLire(myFile->Id(),
                                &aMeshInfo.myName[0],
@@ -355,9 +355,9 @@ namespace MED{
                                &theInfo.myCoordUnits[0],
                                &theInfo.myElemNames[0],
                                &anIsElemNames,
-                               &theInfo.myElemNum[0],
+                               (med_2_1::med_int *)&theInfo.myElemNum[0],
                                &anIsElemNum,
-                               &theInfo.myFamNum[0],
+                               (med_2_1::med_int *)&theInfo.myFamNum[0],
                                theInfo.myNbElem);
 
       ADDMSG(MYDEBUG," myDim="<<aMeshInfo.myDim<<" myNbElem="<<theInfo.myNbElem<<" ... ");
@@ -381,9 +381,9 @@ namespace MED{
       MED::TNodeInfo& anInfo = const_cast<MED::TNodeInfo&>(theInfo);
       MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo;
       
-      med_repere& aRepere = static_cast<med_repere>(theInfo.mySystem);
-      med_booleen& anIsElemNames = static_cast<med_booleen>(theInfo.myIsElemNames);
-      med_booleen& anIsElemNum = static_cast<med_booleen>(theInfo.myIsElemNum);
+      med_repere& aRepere = (med_repere&)(theInfo.mySystem);
+      med_booleen& anIsElemNames = (med_booleen&)(theInfo.myIsElemNames);
+      med_booleen& anIsElemNum = (med_booleen&)(theInfo.myIsElemNum);
 
       TErr aRet = MEDnoeudsEcr(myFile->Id(),
                               &aMeshInfo.myName[0],
@@ -395,9 +395,9 @@ namespace MED{
                               &anInfo.myCoordUnits[0],
                               &anInfo.myElemNames[0],
                               anIsElemNames,
-                              &anInfo.myElemNum[0],
+                              (med_2_1::med_int *)&anInfo.myElemNum[0],
                               anIsElemNum,
-                              &anInfo.myFamNum[0],
+                              (med_2_1::med_int *)&anInfo.myFamNum[0],
                               anInfo.myNbElem,
                               MED_REMP);
       if(theErr) 
@@ -489,22 +489,22 @@ namespace MED{
       MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo;
       TInt aNbElem = theInfo.myElemNum.size();
 
-      med_booleen& anIsElemNames = static_cast<med_booleen>(theInfo.myIsElemNames);
-      med_booleen& anIsElemNum = static_cast<med_booleen>(theInfo.myIsElemNum);
-      med_entite_maillage& anEntity = static_cast<med_entite_maillage>(theInfo.myTEntity);
-      med_geometrie_element& aGeom = static_cast<med_geometrie_element>(theInfo.myTGeom);
-      med_connectivite& aConn = static_cast<med_connectivite>(theInfo.myTConn);
+      med_booleen& anIsElemNames = (med_booleen&)(theInfo.myIsElemNames);
+      med_booleen& anIsElemNum = (med_booleen&)(theInfo.myIsElemNum);
+      med_entite_maillage& anEntity = (med_entite_maillage&)(theInfo.myTEntity);
+      med_geometrie_element& aGeom = (med_geometrie_element&)(theInfo.myTGeom);
+      med_connectivite& aConn = (med_connectivite&)(theInfo.myTConn);
 
       TErr aRet = MEDelementsLire(myFile->Id(),
                                  &aMeshInfo.myName[0],
                                  aMeshInfo.myDim,
-                                 &theInfo.myConn[0],
+                                 (med_2_1::med_int *)&theInfo.myConn[0],
                                  MED_FULL_INTERLACE,
                                  &theInfo.myElemNames[0],
                                  &anIsElemNames,
-                                 &theInfo.myElemNum[0],
+                                 (med_2_1::med_int *)&theInfo.myElemNum[0],
                                  &anIsElemNum,
-                                 &theInfo.myFamNum[0],
+                                 (med_2_1::med_int *)&theInfo.myFamNum[0],
                                  aNbElem,
                                  anEntity,
                                  aGeom,
@@ -529,22 +529,22 @@ namespace MED{
       MED::TCellInfo& anInfo = const_cast<MED::TCellInfo&>(theInfo);
       MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo;
 
-      med_booleen& anIsElemNames = static_cast<med_booleen>(theInfo.myIsElemNames);
-      med_booleen& anIsElemNum = static_cast<med_booleen>(theInfo.myIsElemNum);
-      med_entite_maillage& anEntity = static_cast<med_entite_maillage>(theInfo.myTEntity);
-      med_geometrie_element& aGeom = static_cast<med_geometrie_element>(theInfo.myTGeom);
-      med_connectivite& aConn = static_cast<med_connectivite>(theInfo.myTConn);
+      med_booleen& anIsElemNames = (med_booleen&)(theInfo.myIsElemNames);
+      med_booleen& anIsElemNum = (med_booleen&)(theInfo.myIsElemNum);
+      med_entite_maillage& anEntity = (med_entite_maillage&)(theInfo.myTEntity);
+      med_geometrie_element& aGeom = (med_geometrie_element&)(theInfo.myTGeom);
+      med_connectivite& aConn = (med_connectivite&)(theInfo.myTConn);
 
       TErr aRet = MEDelementsEcr(myFile->Id(),
                                 &aMeshInfo.myName[0],
                                 aMeshInfo.myDim,
-                                &anInfo.myConn[0],
+                                (med_2_1::med_int *)&anInfo.myConn[0],
                                 MED_FULL_INTERLACE,
                                 &anInfo.myElemNames[0],
                                 anIsElemNames,
-                                &anInfo.myElemNum[0],
+                                (med_2_1::med_int *)&anInfo.myElemNum[0],
                                 anIsElemNum,
-                                &anInfo.myFamNum[0],
+                                (med_2_1::med_int *)&anInfo.myFamNum[0],
                                 anInfo.myNbElem,
                                 anEntity,
                                 aGeom,
@@ -601,7 +601,7 @@ namespace MED{
       if(theErr && *theErr < 0)
        return;
       
-      med_type_champ& aType = static_cast<med_type_champ>(theInfo.myType);
+      med_type_champ& aType = (med_type_champ&)(theInfo.myType);
 
       TErr aRet = MEDchampInfo(myFile->Id(),
                               theFieldId,
@@ -628,7 +628,7 @@ namespace MED{
       
       MED::TFieldInfo& anInfo = const_cast<MED::TFieldInfo&>(theInfo);
       
-      med_type_champ& aType = static_cast<med_type_champ>(theInfo.myType);
+      med_type_champ& aType = (med_type_champ&)(theInfo.myType);
       
       TErr aRet = MEDchampCr(myFile->Id(),
                             &anInfo.myName[0],
@@ -685,11 +685,11 @@ namespace MED{
       MED::TFieldInfo& anInfo = const_cast<MED::TFieldInfo&>(theInfo);
       TEntityInfo::const_iterator anIter = theEntityInfo.begin();
       for(; anIter != theEntityInfo.end(); anIter++){
-       const med_entite_maillage& anEntity = static_cast<const med_entite_maillage>(anIter->first);
+       const med_entite_maillage& anEntity = (const med_entite_maillage&)(anIter->first);
        const TGeom& aTGeom = anIter->second;
        TGeom::const_iterator anGeomIter = aTGeom.begin();
        for(; anGeomIter != aTGeom.end(); anGeomIter++){
-         const med_geometrie_element& aGeom = static_cast<const med_geometrie_element>(anGeomIter->first);
+         const med_geometrie_element& aGeom = (const med_geometrie_element&)(anGeomIter->first);
          aNbTimeStamps = MEDnPasdetemps(myFile->Id(),&anInfo.myName[0],anEntity,aGeom);
          if(aNbTimeStamps){
            theEntity = EEntiteMaillage(anEntity);
@@ -722,10 +722,10 @@ namespace MED{
       MED::TFieldInfo& aFieldInfo = *theInfo.myFieldInfo;
       MED::TMeshInfo& aMeshInfo = *aFieldInfo.myMeshInfo;
       
-      med_entite_maillage& anEntity = static_cast<med_entite_maillage>(theInfo.myEntity);
+      med_entite_maillage& anEntity = (med_entite_maillage&)(theInfo.myEntity);
       
       TGeom::iterator anIter = aTGeom.begin();
-      med_geometrie_element& aGeom = static_cast<med_geometrie_element>(anIter->first);
+      med_geometrie_element& aGeom = (med_geometrie_element&)(anIter->first);
       
       TErr aRet = MEDpasdetempsInfo(myFile->Id(),
                                    &aFieldInfo.myName[0],
@@ -733,11 +733,11 @@ namespace MED{
                                    aGeom,
                                    theTimeStampId,
                                    &aMeshInfo.myName[0],
-                                   &theInfo.myNbGauss,
-                                   &theInfo.myNumDt,
+                                   (med_2_1::med_int *)&theInfo.myNbGauss,
+                                   (med_2_1::med_int *)&theInfo.myNumDt,
                                    &theInfo.myUnitDt[0],
                                    &theInfo.myDt,
-                                   &theInfo.myNumOrd);
+                                   (med_2_1::med_int *)&theInfo.myNumOrd);
 
       if(theErr) 
        *theErr = aRet;
@@ -764,11 +764,11 @@ namespace MED{
       MED::TFieldInfo& aFieldInfo = *aTimeStampInfo.myFieldInfo;
       MED::TMeshInfo& aMeshInfo = *aFieldInfo.myMeshInfo;
       
-      med_entite_maillage& anEntity = static_cast<med_entite_maillage>(aTimeStampInfo.myEntity);
+      med_entite_maillage& anEntity = (med_entite_maillage&)(aTimeStampInfo.myEntity);
       TGeom& aTGeom = aTimeStampInfo.myGeom;
       TGeom::iterator anIter = aTGeom.begin();
       for(; anIter != aTGeom.end(); anIter++){
-       med_geometrie_element& aGeom = static_cast<med_geometrie_element>(anIter->first);
+       med_geometrie_element& aGeom = (med_geometrie_element&)(anIter->first);
        TInt aNbVal = MEDnVal(anId,
                              &aFieldInfo.myName[0],
                              anEntity,
@@ -866,10 +866,10 @@ namespace MED{
       MED::TMeshInfo& aMeshInfo = *aFieldInfo.myMeshInfo;
       MED::TMeshValue& aMeshValue = aVal.myMeshValue;
       
-      med_entite_maillage& anEntity = static_cast<med_entite_maillage>(aTimeStampInfo.myEntity);
+      med_entite_maillage& anEntity = (med_entite_maillage&)(aTimeStampInfo.myEntity);
       TMeshValue::iterator anIter = aMeshValue.begin();
       for(; anIter != aMeshValue.end(); anIter++){
-       med_geometrie_element& aGeom = static_cast<med_geometrie_element>(anIter->first);
+       med_geometrie_element& aGeom = (med_geometrie_element&)(anIter->first);
        TValue& aValue = aVal.myMeshValue[EGeometrieElement(aGeom)];
        med_int iEnd = aValue.size();
        med_int aNbVal = iEnd / aFieldInfo.myNbComp;
index 85fb2a7b23f82243b730ee7680edd3ea29370fd6..846ea206a62d5906d251084dfc615a388e80330a 100644 (file)
@@ -18,6 +18,7 @@
 
 #include "med.hxx"
 #include "med_outils.hxx"
+#include <stdlib.h>
 
 /*
  * - Nom de la fonction : _MEDdatasetNumEcrire
index 8195e36a7c3a4e331dd0ffd20be37f70acb397e0..8eef19f6c07c98abb26771da1afc66b8063ce5c8 100644 (file)
@@ -18,6 +18,7 @@
 
 #include "med.hxx"
 #include "med_outils.hxx"
+#include <stdlib.h>
 
 /*
  * - Nom de la fonction : _MEDdatasetNumLire
index 3344a7b1e745ca853ff7a65d1d52885af2ea5ebc..778b2726719a0742f52c8d5661f165390c42689c 100644 (file)
@@ -161,7 +161,7 @@ EXPORT_HEADERS = \
 BIN = mdump_V2_1 test1_V2_1
 BIN_SRC = 
 
-CPPFLAGS+= $(BOOST_CPPFLAGS) $(HDF5_INCLUDES) -DPCLINUX
+CPPFLAGS+= -D@MACHINE@ $(BOOST_CPPFLAGS) $(HDF5_INCLUDES)
 
 LDFLAGS+= $(HDF5_LIBS) -lMEDWrapperBase
 
index e744c183f2db6c352f953975e40a2c8403b44629..179bfa45cb4769ea2b20cf1ba47a86519655796e 100644 (file)
@@ -133,12 +133,12 @@ namespace MED{
       if(theErr && !*theErr)
        return;
       
-      med_maillage& aType = static_cast<med_maillage>(theInfo.myType);
+      med_maillage& aType = (med_maillage&)(theInfo.myType);
 
       TErr aRet = MEDmaaInfo(myFile->Id(),
                             theMeshId,
                             &theInfo.myName[0],
-                            &theInfo.myDim,
+                            (med_int *)&theInfo.myDim,
                             &aType,
                             &theInfo.myDesc[0]);
       if(theErr) 
@@ -159,7 +159,7 @@ namespace MED{
       
       MED::TMeshInfo& anInfo = const_cast<MED::TMeshInfo&>(theInfo);
       
-      med_maillage& aType = static_cast<med_maillage>(theInfo.myType);
+      med_maillage& aType = (med_maillage&)(theInfo.myType);
 
       TErr aRet = MEDmaaCr(myFile->Id(),
                           &anInfo.myName[0],
@@ -255,13 +255,13 @@ namespace MED{
                             &aMeshInfo.myName[0],
                             theFamId,
                             &theInfo.myName[0],
-                            &theInfo.myId,
-                            &theInfo.myAttrId[0],
-                            &theInfo.myAttrVal[0],
+                            (med_int *)&theInfo.myId,
+                            (med_int *)&theInfo.myAttrId[0],
+                            (med_int *)&theInfo.myAttrVal[0],
                             &theInfo.myAttrDesc[0],
-                            &theInfo.myNbAttr,
+                            (med_int *)&theInfo.myNbAttr,
                             &theInfo.myGroupNames[0],
-                            &theInfo.myNbGroup);
+                            (med_int *)&theInfo.myNbGroup);
       
       if(theErr) 
        *theErr = aRet;
@@ -296,8 +296,8 @@ namespace MED{
                           &aMeshInfo.myName[0],
                           &anInfo.myName[0],
                           anInfo.myId,
-                          &anInfo.myAttrId[0],
-                          &anInfo.myAttrVal[0],
+                          (med_int*)&anInfo.myAttrId[0],
+                          (med_int*)&anInfo.myAttrVal[0],
                           &anInfo.myAttrDesc[0],
                           anInfo.myNbAttr,
                           &anInfo.myGroupNames[0],
@@ -336,8 +336,8 @@ namespace MED{
       
       MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo;
 
-      med_entite_maillage& anEntity = static_cast<med_entite_maillage>(theTEntity);
-      med_geometrie_element& aGeom = static_cast<med_geometrie_element>(theTGeom);
+      med_entite_maillage& anEntity = (med_entite_maillage&)(theTEntity);
+      med_geometrie_element& aGeom = (med_geometrie_element&)(theTGeom);
 
       TErr aRet = MEDnomLire(myFile->Id(),
                             &aMeshInfo.myName[0],
@@ -367,12 +367,12 @@ namespace MED{
       
       MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo;
       
-      med_entite_maillage& anEntity = static_cast<med_entite_maillage>(theTEntity);
-      med_geometrie_element& aGeom = static_cast<med_geometrie_element>(theTGeom);
+      med_entite_maillage& anEntity = (med_entite_maillage&)(theTEntity);
+      med_geometrie_element& aGeom = (med_geometrie_element&)(theTGeom);
 
       TErr aRet = MEDnumLire(myFile->Id(),
                             &aMeshInfo.myName[0],
-                            &theInfo.myElemNum[0],
+                            (med_int*)&theInfo.myElemNum[0],
                             nb,
                             anEntity,
                             aGeom);
@@ -398,12 +398,12 @@ namespace MED{
       
       MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo;
       
-      med_entite_maillage& anEntity = static_cast<med_entite_maillage>(theTEntity);
-      med_geometrie_element& aGeom = static_cast<med_geometrie_element>(theTGeom);
+      med_entite_maillage& anEntity = (med_entite_maillage&)(theTEntity);
+      med_geometrie_element& aGeom = (med_geometrie_element&)(theTGeom);
 
       TErr aRet = MEDfamLire(myFile->Id(),
                             &aMeshInfo.myName[0],
-                            &theInfo.myFamNum[0],
+                            (med_int*)&theInfo.myFamNum[0],
                             nb,
                             anEntity,
                             aGeom);
@@ -436,9 +436,9 @@ namespace MED{
       MED::TElemInfo& anInfo = const_cast<MED::TElemInfo&>(theInfo);
       MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo;
 
-      med_booleen& anIsElemNames = static_cast<med_booleen>(theInfo.myIsElemNames);
-      med_entite_maillage& anEntity = static_cast<med_entite_maillage>(theTEntity);
-      med_geometrie_element& aGeom = static_cast<med_geometrie_element>(theTGeom);
+      med_booleen& anIsElemNames = (med_booleen&)(theInfo.myIsElemNames);
+      med_entite_maillage& anEntity = (med_entite_maillage&)(theTEntity);
+      med_geometrie_element& aGeom = (med_geometrie_element&)(theTGeom);
       
       TErr aRet = 0;
       if (anIsElemNames){
@@ -477,15 +477,15 @@ namespace MED{
       MED::TElemInfo& anInfo = const_cast<MED::TElemInfo&>(theInfo);
       MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo;
 
-      med_booleen& anIsElemNum = static_cast<med_booleen>(theInfo.myIsElemNum);
-      med_entite_maillage& anEntity = static_cast<med_entite_maillage>(theTEntity);
-      med_geometrie_element& aGeom = static_cast<med_geometrie_element>(theTGeom);
+      med_booleen& anIsElemNum = (med_booleen&)(theInfo.myIsElemNum);
+      med_entite_maillage& anEntity = (med_entite_maillage&)(theTEntity);
+      med_geometrie_element& aGeom = (med_geometrie_element&)(theTGeom);
       
       TErr aRet = 0;
       if (anIsElemNum){
        aRet  = MEDnumEcr(myFile->Id(),
                          &aMeshInfo.myName[0],
-                         &anInfo.myElemNum[0],
+                         (med_int*)&anInfo.myElemNum[0],
                          anInfo.myElemNum.size(),
                          anEntity,
                          aGeom);
@@ -518,12 +518,12 @@ namespace MED{
       MED::TElemInfo& anInfo = const_cast<MED::TElemInfo&>(theInfo);
       MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo;
 
-      med_entite_maillage& anEntity = static_cast<med_entite_maillage>(theTEntity);
-      med_geometrie_element& aGeom = static_cast<med_geometrie_element>(theTGeom);
+      med_entite_maillage& anEntity = (med_entite_maillage&)(theTEntity);
+      med_geometrie_element& aGeom = (med_geometrie_element&)(theTGeom);
       
       TErr aRet = MEDfamEcr(myFile->Id(),
                            &aMeshInfo.myName[0],
-                           &anInfo.myFamNum[0],
+                           (med_int *)&anInfo.myFamNum[0],
                            anInfo.myFamNum.size(),
                            anEntity,
                            aGeom);
@@ -564,9 +564,9 @@ namespace MED{
       
       MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo;
 
-      med_repere& aRepere = static_cast<med_repere>(theInfo.mySystem);
-      med_booleen& anIsElemNames = static_cast<med_booleen>(theInfo.myIsElemNames);
-      med_booleen& anIsElemNum = static_cast<med_booleen>(theInfo.myIsElemNum);
+      med_repere& aRepere = (med_repere&)(theInfo.mySystem);
+      med_booleen& anIsElemNames = (med_booleen&)(theInfo.myIsElemNames);
+      med_booleen& anIsElemNum = (med_booleen&)(theInfo.myIsElemNum);
 
       TErr aRet = MEDnoeudsLire(myFile->Id(),
                                &aMeshInfo.myName[0],
@@ -578,9 +578,9 @@ namespace MED{
                                &theInfo.myCoordUnits[0],
                                &theInfo.myElemNames[0],
                                &anIsElemNames,
-                               &theInfo.myElemNum[0],
+                               (med_int *)&theInfo.myElemNum[0],
                                &anIsElemNum,
-                               &theInfo.myFamNum[0],
+                               (med_int *)&theInfo.myFamNum[0],
                                theInfo.myNbElem);
       if(theErr) 
        *theErr = aRet;
@@ -601,9 +601,9 @@ namespace MED{
       MED::TNodeInfo& anInfo = const_cast<MED::TNodeInfo&>(theInfo);
       MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo;
       
-      med_repere& aRepere = static_cast<med_repere>(theInfo.mySystem);
-      med_booleen& anIsElemNames = static_cast<med_booleen>(theInfo.myIsElemNames);
-      med_booleen& anIsElemNum = static_cast<med_booleen>(theInfo.myIsElemNum);
+      med_repere& aRepere = (med_repere&)(theInfo.mySystem);
+      med_booleen& anIsElemNames = (med_booleen&)(theInfo.myIsElemNames);
+      med_booleen& anIsElemNum = (med_booleen&)(theInfo.myIsElemNum);
 
       TErr aRet = MEDnoeudsEcr(myFile->Id(),
                               &aMeshInfo.myName[0],
@@ -615,9 +615,9 @@ namespace MED{
                               &anInfo.myCoordUnits[0],
                               &anInfo.myElemNames[0],
                               anIsElemNames,
-                              &anInfo.myElemNum[0],
+                              (med_int *)&anInfo.myElemNum[0],
                               anIsElemNum,
-                              &anInfo.myFamNum[0],
+                              (med_int *)&anInfo.myFamNum[0],
                               anInfo.myNbElem);
       if(theErr) 
        *theErr = aRet;
@@ -647,16 +647,16 @@ namespace MED{
       MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo;
       TInt aNbElem = theInfo.myElemNum.size();
 
-      med_entite_maillage& anEntity = static_cast<med_entite_maillage>(theInfo.myTEntity);
-      med_connectivite& aConn = static_cast<med_connectivite>(theInfo.myTConn);
+      med_entite_maillage& anEntity = (med_entite_maillage&)(theInfo.myTEntity);
+      med_connectivite& aConn = (med_connectivite&)(theInfo.myTConn);
       
       TErr aRet = 0;
       
       aRet = MEDpolygoneConnLire(myFile->Id(), 
                                 &aMeshInfo.myName[0],
-                                &theInfo.myIndex[0],
+                                (med_int *)&theInfo.myIndex[0],
                                 aNbElem+1,
-                                &theInfo.myConn[0],
+                                (med_int *)&theInfo.myConn[0],
                                 anEntity,
                                 aConn);
 
@@ -697,14 +697,14 @@ namespace MED{
       MED::TPolygoneInfo& anInfo = const_cast<MED::TPolygoneInfo&>(theInfo);
       MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo;
 
-      med_entite_maillage& anEntity = static_cast<med_entite_maillage>(theInfo.myTEntity);
-      med_connectivite& aConn = static_cast<med_connectivite>(theInfo.myTConn);
+      med_entite_maillage& anEntity = (med_entite_maillage&)(theInfo.myTEntity);
+      med_connectivite& aConn = (med_connectivite&)(theInfo.myTConn);
       
       TErr aRet = MEDpolygoneConnEcr(myFile->Id(),
                                     &aMeshInfo.myName[0],
-                                    &anInfo.myIndex[0],
+                                    (med_int *)&anInfo.myIndex[0],
                                     anInfo.myNbElem+1,
-                                    &anInfo.myConn[0],
+                                    (med_int *)&anInfo.myConn[0],
                                     anEntity,
                                     aConn);
       
@@ -748,8 +748,8 @@ namespace MED{
 
       MED::TMeshInfo& aMeshInfo = const_cast<MED::TMeshInfo&>(theMeshInfo);
       
-      med_entite_maillage& anEntity = static_cast<med_entite_maillage>(theTEntity);
-      med_connectivite& aConn = static_cast<med_connectivite>(theTConn);
+      med_entite_maillage& anEntity = (med_entite_maillage&)(theTEntity);
+      med_connectivite& aConn = (med_connectivite&)(theTConn);
 
       med_int taille = 0;
 
@@ -778,17 +778,17 @@ namespace MED{
       MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo;
       TInt aNbElem = theInfo.myElemNum.size();
 
-      med_connectivite& aConn = static_cast<med_connectivite>(theInfo.myTConn);
+      med_connectivite& aConn = (med_connectivite&)(theInfo.myTConn);
       
       TErr aRet = 0;
       
       aRet = MEDpolyedreConnLire(myFile->Id(), 
                                 &aMeshInfo.myName[0],
-                                &theInfo.myIndex[0],
+                                (med_int *)&theInfo.myIndex[0],
                                 aNbElem+1,
-                                &theInfo.myFacesIndex[0],
+                                (med_int *)&theInfo.myFacesIndex[0],
                                 theInfo.myNbFacesIndex,
-                                &theInfo.myConn[0],
+                                (med_int *)&theInfo.myConn[0],
                                 aConn);
 
       if(theErr) 
@@ -827,18 +827,18 @@ namespace MED{
       MED::TPolyedreInfo& anInfo = const_cast<MED::TPolyedreInfo&>(theInfo);
       MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo;
 
-      med_booleen& anIsElemNames = static_cast<med_booleen>(theInfo.myIsElemNames);
-      med_booleen& anIsElemNum = static_cast<med_booleen>(theInfo.myIsElemNum);
-      med_entite_maillage& anEntity = static_cast<med_entite_maillage>(theInfo.myTEntity);
-      med_connectivite& aConn = static_cast<med_connectivite>(theInfo.myTConn);
+      med_booleen& anIsElemNames = (med_booleen&)(theInfo.myIsElemNames);
+      med_booleen& anIsElemNum = (med_booleen&)(theInfo.myIsElemNum);
+      med_entite_maillage& anEntity = (med_entite_maillage&)(theInfo.myTEntity);
+      med_connectivite& aConn = (med_connectivite&)(theInfo.myTConn);
       
       TErr aRet = MEDpolyedreConnEcr(myFile->Id(),
                                     &aMeshInfo.myName[0],
-                                    &anInfo.myIndex[0],
+                                    (med_int *)&anInfo.myIndex[0],
                                     anInfo.myNbElem+1,
-                                    &anInfo.myFacesIndex[0],
+                                    (med_int *)&anInfo.myFacesIndex[0],
                                     anInfo.myNbFacesIndex,
-                                    &anInfo.myConn[0],
+                                    (med_int *)&anInfo.myConn[0],
                                     aConn);
       
       if(theErr) 
@@ -862,7 +862,7 @@ namespace MED{
       if (anIsElemNum){
        aRet  = MEDnumEcr(myFile->Id(),
                          &aMeshInfo.myName[0],
-                         &anInfo.myElemNum[0],
+                         (med_int *)&anInfo.myElemNum[0],
                          anInfo.myElemNum.size(),
                          anEntity,
                          MED_POLYEDRE);
@@ -875,7 +875,7 @@ namespace MED{
       
       aRet = MEDfamEcr(myFile->Id(),
                       &aMeshInfo.myName[0],
-                      &anInfo.myFamNum[0],
+                      (med_int *)&anInfo.myFamNum[0],
                       anInfo.myFamNum.size(),
                       anEntity,
                       MED_POLYEDRE);
@@ -906,13 +906,13 @@ namespace MED{
       if(theErr && !*theErr) EXCEPTION(runtime_error,"GetPolyedreInfo - (...)");
 
       MED::TMeshInfo& aMeshInfo = const_cast<MED::TMeshInfo&>(theMeshInfo);
-      med_connectivite& aConn = static_cast<med_connectivite>(theTConn);
+      med_connectivite& aConn = (med_connectivite&)(theTConn);
       
       TErr aRet = MEDpolyedreInfo(myFile->Id(), 
                                  &aMeshInfo.myName[0], 
                                  aConn,
-                                 &nf,
-                                 &nc);
+                                 (med_int *)&nf,
+                                 (med_int *)&nc);
 
       if(theErr) 
        *theErr = aRet;
@@ -992,22 +992,22 @@ namespace MED{
       MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo;
       TInt aNbElem = theInfo.myElemNum.size();
 
-      med_booleen& anIsElemNames = static_cast<med_booleen>(theInfo.myIsElemNames);
-      med_booleen& anIsElemNum = static_cast<med_booleen>(theInfo.myIsElemNum);
-      med_entite_maillage& anEntity = static_cast<med_entite_maillage>(theInfo.myTEntity);
-      med_geometrie_element& aGeom = static_cast<med_geometrie_element>(theInfo.myTGeom);
-      med_connectivite& aConn = static_cast<med_connectivite>(theInfo.myTConn);
+      med_booleen& anIsElemNames = (med_booleen&)(theInfo.myIsElemNames);
+      med_booleen& anIsElemNum = (med_booleen&)(theInfo.myIsElemNum);
+      med_entite_maillage& anEntity = (med_entite_maillage&)(theInfo.myTEntity);
+      med_geometrie_element& aGeom = (med_geometrie_element&)(theInfo.myTGeom);
+      med_connectivite& aConn = (med_connectivite&)(theInfo.myTConn);
 
       TErr aRet = MEDelementsLire(myFile->Id(),
                                  &aMeshInfo.myName[0],
                                  aMeshInfo.myDim,
-                                 &theInfo.myConn[0],
+                                 (med_int *)&theInfo.myConn[0],
                                  MED_FULL_INTERLACE,
                                  &theInfo.myElemNames[0],
                                  &anIsElemNames,
-                                 &theInfo.myElemNum[0],
+                                 (med_int *)&theInfo.myElemNum[0],
                                  &anIsElemNum,
-                                 &theInfo.myFamNum[0],
+                                 (med_int *)&theInfo.myFamNum[0],
                                  aNbElem,
                                  anEntity,
                                  aGeom,
@@ -1031,22 +1031,22 @@ namespace MED{
       MED::TCellInfo& anInfo = const_cast<MED::TCellInfo&>(theInfo);
       MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo;
 
-      med_booleen& anIsElemNames = static_cast<med_booleen>(theInfo.myIsElemNames);
-      med_booleen& anIsElemNum = static_cast<med_booleen>(theInfo.myIsElemNum);
-      med_entite_maillage& anEntity = static_cast<med_entite_maillage>(theInfo.myTEntity);
-      med_geometrie_element& aGeom = static_cast<med_geometrie_element>(theInfo.myTGeom);
-      med_connectivite& aConn = static_cast<med_connectivite>(theInfo.myTConn);
+      med_booleen& anIsElemNames = (med_booleen&)(theInfo.myIsElemNames);
+      med_booleen& anIsElemNum = (med_booleen&)(theInfo.myIsElemNum);
+      med_entite_maillage& anEntity = (med_entite_maillage&)(theInfo.myTEntity);
+      med_geometrie_element& aGeom = (med_geometrie_element&)(theInfo.myTGeom);
+      med_connectivite& aConn = (med_connectivite&)(theInfo.myTConn);
 
       TErr aRet = MEDelementsEcr(myFile->Id(),
                                 &aMeshInfo.myName[0],
                                 aMeshInfo.myDim,
-                                &anInfo.myConn[0],
+                                (med_int *)&anInfo.myConn[0],
                                 MED_FULL_INTERLACE,
                                 &anInfo.myElemNames[0],
                                 anIsElemNames,
-                                &anInfo.myElemNum[0],
+                                (med_int *)&anInfo.myElemNum[0],
                                 anIsElemNum,
-                                &anInfo.myFamNum[0],
+                                (med_int *)&anInfo.myFamNum[0],
                                 anInfo.myNbElem,
                                 anEntity,
                                 aGeom,
@@ -1098,7 +1098,7 @@ namespace MED{
       if(theErr && !*theErr)
        return;
       
-      med_type_champ& aType = static_cast<med_type_champ>(theInfo.myType);
+      med_type_champ& aType = (med_type_champ&)(theInfo.myType);
 
       TErr aRet = MEDchampInfo(myFile->Id(),
                               theFieldId,
@@ -1125,7 +1125,7 @@ namespace MED{
       
       MED::TFieldInfo& anInfo = const_cast<MED::TFieldInfo&>(theInfo);
       
-      med_type_champ& aType = static_cast<med_type_champ>(theInfo.myType);
+      med_type_champ& aType = (med_type_champ&)(theInfo.myType);
       
       TErr aRet = MEDchampCr(myFile->Id(),
                             &anInfo.myName[0],
@@ -1173,11 +1173,11 @@ namespace MED{
       MED::TFieldInfo& anInfo = const_cast<MED::TFieldInfo&>(theInfo);
       TEntityInfo::const_iterator anIter = theEntityInfo.begin();
       for(; anIter != theEntityInfo.end(); anIter++){
-       const med_entite_maillage& anEntity = static_cast<const med_entite_maillage>(anIter->first);
+       const med_entite_maillage& anEntity = (const med_entite_maillage&)(anIter->first);
        const TGeom& aTGeom = anIter->second;
        TGeom::const_iterator anGeomIter = aTGeom.begin();
        for(; anGeomIter != aTGeom.end(); anGeomIter++){
-         const med_geometrie_element& aGeom = static_cast<const med_geometrie_element>(anGeomIter->first);
+         const med_geometrie_element& aGeom = (const med_geometrie_element&)(anGeomIter->first);
          TInt aTmp = MEDnPasdetemps(myFile->Id(),&anInfo.myName[0],anEntity,aGeom);
          aNbTimeStamps = max(aTmp,aNbTimeStamps);
          if (aNbTimeStamps<1)
@@ -1215,26 +1215,26 @@ namespace MED{
       MED::TFieldInfo& aFieldInfo = *theInfo.myFieldInfo;
       MED::TMeshInfo& aMeshInfo = *aFieldInfo.myMeshInfo;
       
-      med_entite_maillage& anEntity = static_cast<med_entite_maillage>(theInfo.myEntity);
+      med_entite_maillage& anEntity = (med_entite_maillage&)(theInfo.myEntity);
       
       TGeom::iterator anIter = aTGeom.begin();
-      med_geometrie_element& aGeom = static_cast<med_geometrie_element>(anIter->first);
+      med_geometrie_element& aGeom = (med_geometrie_element&)(anIter->first);
 
-      med_booleen& anIsLocal = static_cast<med_booleen>(aFieldInfo.myIsLocal);
+      med_booleen& anIsLocal = (med_booleen&)(aFieldInfo.myIsLocal);
       
       TErr aRet = MEDpasdetempsInfo(myFile->Id(),
                                    &aFieldInfo.myName[0],
                                    anEntity,
                                    aGeom,
                                    theTimeStampId,
-                                   &theInfo.myNbGauss,
-                                   &theInfo.myNumDt,
-                                   &theInfo.myNumOrd,
+                                   (med_int *)&theInfo.myNbGauss,
+                                   (med_int *)&theInfo.myNumDt,
+                                   (med_int *)&theInfo.myNumOrd,
                                    &theInfo.myUnitDt[0],
                                    &theInfo.myDt,
                                    &aMeshInfo.myName[0],
                                    &anIsLocal,
-                                   &aFieldInfo.myNbRef);
+                                   (med_int *)&aFieldInfo.myNbRef);
       if(theErr) 
        *theErr = aRet;
       else if(aRet < 0)
@@ -1260,12 +1260,12 @@ namespace MED{
       MED::TFieldInfo& aFieldInfo = *aTimeStampInfo.myFieldInfo;
       MED::TMeshInfo& aMeshInfo = *aFieldInfo.myMeshInfo;
       
-      med_entite_maillage& anEntity = static_cast<med_entite_maillage>(aTimeStampInfo.myEntity);
-      med_mode_profil& aPflMode = static_cast<med_mode_profil>(theVal.myPflMode);
+      med_entite_maillage& anEntity = (med_entite_maillage&)(aTimeStampInfo.myEntity);
+      med_mode_profil& aPflMode = (med_mode_profil&)(theVal.myPflMode);
       TGeom& aTGeom = aTimeStampInfo.myGeom;
       TGeom::iterator anIter = aTGeom.begin();
       for(; anIter != aTGeom.end(); anIter++){
-       med_geometrie_element& aGeom = static_cast<med_geometrie_element>(anIter->first);
+       med_geometrie_element& aGeom = (med_geometrie_element&)(anIter->first);
        TInt aNbVal = MEDnVal(anId,
                              &aFieldInfo.myName[0],
                              anEntity,
@@ -1369,11 +1369,11 @@ namespace MED{
       MED::TMeshInfo& aMeshInfo = *aFieldInfo.myMeshInfo;
       MED::TMeshValue& aMeshValue = aVal.myMeshValue;
       
-      med_entite_maillage& anEntity = static_cast<med_entite_maillage>(aTimeStampInfo.myEntity);
-      med_mode_profil& aPflMode = static_cast<med_mode_profil>(theVal.myPflMode);
+      med_entite_maillage& anEntity = (med_entite_maillage&)(aTimeStampInfo.myEntity);
+      med_mode_profil& aPflMode = (med_mode_profil&)(theVal.myPflMode);
       TMeshValue::iterator anIter = aMeshValue.begin();
       for(; anIter != aMeshValue.end(); anIter++){
-       med_geometrie_element& aGeom = static_cast<med_geometrie_element>(anIter->first);
+       med_geometrie_element& aGeom = (med_geometrie_element&)(anIter->first);
        TValue& aValue = aVal.myMeshValue[EGeometrieElement(aGeom)];
        med_int iEnd = aValue.size();
        med_int aNbVal = iEnd / aFieldInfo.myNbComp;
index c64ecb109433b89435f4d252b44a9209994fa6e7..d0daa6ea2ccadc113dbad80d8cfa27adc50801cd 100644 (file)
@@ -48,7 +48,7 @@ endif
 
 ifeq (@WITHIHM@,no)
 SUBDIRS = MSG2QM SALOMELocalTrace SALOMETraceCollector Logger Utils CASCatch \
-          GenericObj NamingService Registry \
+          GenericObj MEDWrapper NamingService Registry \
          ModuleCatalog DataTypeCatalog RessourcesCatalog \
          ResourcesManager Notification  NOTIFICATION_SWIG \
          Container TestContainer LifeCycleCORBA HDFPersist Prs \
index f84a3586760858222e7b692cd357db1fa716dd65..da3c8997719c5ed064796246f516d69831eba151 100644 (file)
@@ -11,6 +11,7 @@
 #include <iostream>
 #include <string.h>
 #include <map>
+#include <list>
 
 #include <sys/types.h>
 #include <sys/stat.h>
index 4ef3cbd66ba738f56aa897fc9246776890bce08f..ba6c5914e4281779fbb92efd696b18b39c918225 100644 (file)
@@ -12,7 +12,6 @@
 #include <TColStd_HSequenceOfInteger.hxx>
 #include <TCollection_AsciiString.hxx>
 #include <Standard_Failure.hxx>
-#include <Standard_ErrorHandler.hxx>
 
 #include "SALOMEDS_AttributeTableOfInteger_i.hxx"
 #include "SALOMEDS.hxx"
index a979fd5e2059b82c4e880507dc04c299e8663f3a..89f0c2f95c58aeacb9a43ba384c0f9d12128c8fb 100644 (file)
@@ -15,7 +15,6 @@
 #include <TColStd_HSequenceOfReal.hxx>
 #include <TCollection_AsciiString.hxx>
 #include <Standard_Failure.hxx>
-#include <Standard_ErrorHandler.hxx>
 
 #include <strstream>
 #include <string>
index 763b803227509434ce8c3422f6f3057bd7473613..d127ceb2dd05f9aef24be3b01bd18b6ef2787147 100644 (file)
@@ -13,7 +13,6 @@
 #include <TColStd_HSequenceOfExtendedString.hxx>
 
 #include <Standard_Failure.hxx>
-#include <Standard_ErrorHandler.hxx>
 
 #include <strstream>
 #include <string>
index 38dbd0568f403f2fd229defb7ba15959214b788a..706cba9da3e8cd7fee613e62267abd99ee5be641 100644 (file)
@@ -8,12 +8,11 @@
 //  Author : Yves FRICAUD
 //  Module : SALOME
 
-using namespace std;
 #include "SALOMEDS_UseCaseIterator_i.hxx"
 #include "SALOMEDS_SObject_i.hxx"
 #include "utilities.h"
 
-
+using namespace std;
 
 //============================================================================
 /*! Function : constructor
index e97f591edf5ac71c0340e4e9c70edcf3d78ca39e..958cd0b28e2f388dcd6c140ec6f94f5cfa14b92b 100644 (file)
@@ -340,8 +340,11 @@ void QAD_ObjectBrowser::setupListView()
 
 /*!
   Event filter
+  We can use the following static variables for drag-n-drop operations because it is impossible
+  to perform several dragging operation at one time.
 */
-
+static bool dragged = false;
+static QStringList draggedlist;
 bool QAD_ObjectBrowser::eventFilter( QObject* o, QEvent* e )
 {
   QAD_Desktop* Desktop     = (QAD_Desktop*) QAD_Application::getDesktop();
@@ -357,7 +360,7 @@ bool QAD_ObjectBrowser::eventFilter( QObject* o, QEvent* e )
       // Test if clicked on selection and start drag if necessary
       QMouseEvent* me = ( QMouseEvent* )e;
       QAD_ObjectBrowserItem* item = ( QAD_ObjectBrowserItem* )( myUseCaseView->itemAt( me->pos() ) );
-      if ( item && item->isSelected() && me->button() == LeftButton) {
+      if ( item && item->isSelected() && me->button() == LeftButton && !(me->state() & (ControlButton | ShiftButton)) ) {
        if ( me->pos().x() > myUseCaseView->header()->sectionPos( myUseCaseView->header()->mapToIndex( 0 ) ) +
                             myUseCaseView->treeStepSize() * ( item->depth() + ( myUseCaseView->rootIsDecorated() ? 1 : 0 ) ) + 
                             myUseCaseView->itemMargin() ||
@@ -378,13 +381,40 @@ bool QAD_ObjectBrowser::eventFilter( QObject* o, QEvent* e )
            }
          }
          if ( done && !entryList.isEmpty() ) {
-           QTextDrag *d = new QTextDrag( entryList.join("*"), myUseCaseView->viewport() );
-           d->dragMove();
+           draggedlist = entryList;
+           // vsr 03/03/05 - start dragging only if mouse starts moving after pressing left button (see below)
+           //QTextDrag *d = new QTextDrag( entryList.join("*"), myUseCaseView->viewport() );
+           //d->dragMove();
+           dragged = true;
            return true;
          }
        }
       }
     }
+    else if ( e->type() == QEvent::MouseMove ) {
+      // vsr 03/03/05 - start dragging only if mouse starts moving
+      if ( dragged ) {
+       if ( !draggedlist.isEmpty() ) {
+         QTextDrag *d = new QTextDrag( draggedlist.join("*"), myUseCaseView->viewport() );
+         d->dragMove();
+       }
+       dragged = false;
+       draggedlist.clear();
+      }
+    }
+    else if ( e->type() == QEvent::MouseButtonRelease ) {
+      // vsr 03/03/05 - if dragging was not performed (mouse was not moved after mouse press)
+      // simulate the ordinary mouse click that means just selection of the one item
+      QMouseEvent* me = ( QMouseEvent* )e;
+      if ( dragged ) {
+       draggedlist.clear();
+       dragged = false;
+       QAD_ObjectBrowserItem* item = ( QAD_ObjectBrowserItem* )( myUseCaseView->itemAt( me->pos() ) );
+       myUseCaseView->clearSelection();
+       myUseCaseView->setSelected( item, true );
+       myUseCaseView->setCurrentItem( item );
+      }
+    }
     else if ( e->type() == QEvent::DragMove ) {
       QDragMoveEvent* dme = ( QDragMoveEvent* )e;
       if ( dme->source() == myUseCaseView->viewport() ) {
@@ -1423,9 +1453,6 @@ void QAD_ObjectBrowser::showUseCasePopupMenu(QListViewItem* theItem)
 */
 void QAD_ObjectBrowser::onSelectedItem()
 {
-  if (currentPage()==myListView)
-    myUseCaseView->clearSelection();
-
   QListView* whoIs;
   if ( sender()->inherits("QListView") )
     whoIs = (QListView*)sender();
index 8c0fccbf34f2921083b949afc0a8cd2c4d351aef..c1b32b7bdf4048ab6caf88c03ebdcae669bf7aa9 100644 (file)
@@ -181,16 +181,6 @@ void Session_ServerLauncher::CheckArgs()
 
 void Session_ServerLauncher::ActivateAll()
 {
-  
-  // Always launch ContainerManager
-
-  char** argv = new char* [1];
-  argv[0] = "ContainerManager";
-  Session_SessionThread* aServerThread2
-    = new Session_SessionThread(1, argv, _orb,_root_poa,_GUIMutex,_ServerLaunch);
-  _serverThreads.push_front(aServerThread2);
-
-  aServerThread2->Init();
 
   list<ServArg>::iterator itServ;
   for (itServ = _argServToLaunch.begin(); itServ !=_argServToLaunch.end(); itServ++)
@@ -216,7 +206,7 @@ void Session_ServerLauncher::ActivateAll()
   // Always launch Session Server
 
   int argc=1;
-  argv = new char*[argc];
+  char **argv = new char*[argc];
   argv[0] = "Session";
   Session_SessionThread* aServerThread
     = new Session_SessionThread(argc, argv, _orb,_root_poa,_GUIMutex,_ServerLaunch);
index 4908aae5483ff3139f4940385f5cf5785f8491fa..d3bf23b36c0972a8162742eb41829139ab6daedc 100644 (file)
@@ -33,7 +33,6 @@
 #include "Session_ServerThread.hxx"
 
 #include "SALOME_Container_i.hxx"
-#include "SALOME_ContainerManager.hxx"
 #include "SALOMEDS_StudyManager_i.hxx"
 #include "SALOME_ModuleCatalog_impl.hxx"
 #include "RegistryService.hxx"
 
 using namespace std;
 
-const int Session_ServerThread::NB_SRV_TYP = 6;
+const int Session_ServerThread::NB_SRV_TYP = 5;
 const char* Session_ServerThread::_serverTypes[NB_SRV_TYP] = {"Container",
                                                              "ModuleCatalog",
                                                              "Registry",
                                                              "SALOMEDS",
-                                                             "Session",
-                                                              "ContainerManager"};
+                                                             "Session"};
 
 //=============================================================================
 /*! 
@@ -158,12 +156,6 @@ void Session_ServerThread::Init()
              ActivateSession(_argc, _argv);
              break;
            }
-         case 5: // Container Manager
-           {
-             NamingService_WaitForServerReadiness(_NS,"");
-             ActivateContainerManager(_argc, _argv);
-             break;
-           }
          default:
            {
              ASSERT(0);
@@ -333,44 +325,6 @@ void Session_ServerThread::ActivateRegistry(int argc,
  */
 //=============================================================================
 
-void Session_ServerThread::ActivateContainerManager(int argc,
-                                            char ** argv)
-{
-  try
-    {
-      PortableServer::POA_var root_poa=PortableServer::POA::_the_root_poa();
-      cout << "ActivateContainerManager ......!!!! " << endl;
-      SALOME_ContainerManager * myContainer 
-       = new SALOME_ContainerManager(_orb);
-    }
-  catch(CORBA::SystemException&)
-    {
-      INFOS("Caught CORBA::SystemException.");
-    }
-  catch(PortableServer::POA::WrongPolicy&)
-    {
-      INFOS("Caught CORBA::WrongPolicyException.");
-    }
-  catch(PortableServer::POA::ServantAlreadyActive&)
-    {
-      INFOS("Caught CORBA::ServantAlreadyActiveException");
-    }
-  catch(CORBA::Exception&)
-    {
-      INFOS("Caught CORBA::Exception.");
-    }
-  catch(...)
-    {
-      INFOS("Caught unknown exception.");
-    }
-}
-
-//=============================================================================
-/*! 
- *  
- */
-//=============================================================================
-
 void Session_ServerThread::ActivateContainer(int argc,
                                             char ** argv)
 {
index 5d6d5bf514785a3bee222e2b144228d58c57b68a..c05e8e50ac70e1dbb169cf341976726f05de1010 100644 (file)
@@ -45,7 +45,7 @@
                 throw SALOME::SALOME_Exception(ExDescription); \
               }
 
-#include <ostream.h>
+#include <ostream>
 
 //Dump the CORBA exception type.
 inline std::ostream& operator<<(std::ostream& os, const CORBA::Exception& e)