Salome HOME
Implementation of the "20830: EDF 1357 GUI : Hide/Show Icon"
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_Client.cxx
index 37104eab0728c56c1fce0c9f6562f75bd8a2c331..81cc4d341dd70c064bec5e690243b7eab6534735 100644 (file)
@@ -1,44 +1,44 @@
-//  SALOME SALOMEDS : data structure of SALOME and sources of Salome data server 
+//  Copyright (C) 2007-2010  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.
 //
-//  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 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_Client.cxx
 //  Author : Yves FRICAUD
 //  Module : SALOME
 //  $Header$
-
-using namespace std;
+//
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(SALOMEDS)
 #include "SALOMEDS_StudyManager_i.hxx"
-#include "utilities.h"
 #include "SALOMEDS_AttributeName_i.hxx"
+#include "utilities.h"
+#include "HDFOI.hxx"
 
 //============================================================================
 /*! Function :
  *  Purpose  : 
  */
 //============================================================================
-static void DumpComponent(SALOMEDS::Study_ptr Study,SALOMEDS::SObject_ptr SO,Standard_Integer offset) {
+static void DumpComponent(SALOMEDS::Study_ptr Study,SALOMEDS::SObject_ptr SO, int offset) {
   SALOMEDS::SObject_var RefSO;
   SALOMEDS::ChildIterator_var it = Study->NewChildIterator(SO);
   for (; it->More();it->Next()){
@@ -48,13 +48,13 @@ static void DumpComponent(SALOMEDS::Study_ptr Study,SALOMEDS::SObject_ptr SO,Sta
     {
       SALOMEDS::AttributeName_var Name = SALOMEDS::AttributeName::_narrow(anAttr);
       CORBA::String_var Val = Name->Value();
-      for (Standard_Integer i = 1; i <= offset ; i++) 
-       MESSAGE("--");
+      for (int i = 1; i <= offset ; i++) 
+        MESSAGE("--");
       MESSAGE(">"<<CSO->GetID()<<Val);
     }
     if (CSO->ReferencedObject(RefSO)) {
-      for (Standard_Integer i = 1; i <= offset ; i++) 
-       MESSAGE(" ");
+      for (int i = 1; i <= offset ; i++) 
+        MESSAGE(" ");
       MESSAGE("*Reference"<<RefSO->GetID());
     }
     DumpComponent(Study,CSO,offset+2);
@@ -69,9 +69,9 @@ static void DumpComponent(SALOMEDS::Study_ptr Study,SALOMEDS::SObject_ptr SO,Sta
 static void DumpStudy (SALOMEDS::Study_ptr Study) {
   MESSAGE("Explore Study and Write name of each object if it exists");
   
-  Standard_CString name;
+  char* name;
   SALOMEDS::SComponentIterator_var itcomp = Study->NewComponentIterator();
-  Standard_Integer offset = 1;
+  int offset = 1;
   for (; itcomp->More(); itcomp->Next()) {
     SALOMEDS::SComponent_var SC = itcomp->Value();
     name = SC->ComponentDataType();
@@ -88,7 +88,7 @@ static void DumpStudy (SALOMEDS::Study_ptr Study) {
 static void Test(SALOMEDS::StudyManager_ptr myStudyMgr )
 {
   try {
-  Standard_CString name;
+  char* name;
   MESSAGE("Create New Study Study1");
   SALOMEDS::Study_var myStudy = myStudyMgr->NewStudy("Study1");
  
@@ -280,11 +280,9 @@ int main(int argc, char** argv)
   try {
     // Initialise the ORB.
 #if OMNIORB_VERSION >= 4
-    const char* options[][2] = { { "giopMaxMsgSize", "104857600" }, { 0, 0 } };
-    CORBA::ORB_var orb = CORBA::ORB_init( argc , argv , "omniORB4", options) ;
+    CORBA::ORB_var orb = CORBA::ORB_init( argc, argv, "omniORB4" ) ;
 #else
-    CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "omniORB3");
-    omniORB::MaxMessageSize(100 * 1024 * 1024);
+    CORBA::ORB_var orb = CORBA::ORB_init( argc, argv, "omniORB3" );
 #endif
     
     // Obtain a reference to the root POA.