-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
+// Copyright (C) 2007-2011 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()){
{
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);
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();
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");
{
try {
// Initialise the ORB.
- CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "omniORB3");
- omniORB::MaxMessageSize(100 * 1024 * 1024);
+#if OMNIORB_VERSION >= 4
+ CORBA::ORB_var orb = CORBA::ORB_init( argc, argv, "omniORB4" ) ;
+#else
+ CORBA::ORB_var orb = CORBA::ORB_init( argc, argv, "omniORB3" );
+#endif
// Obtain a reference to the root POA.
CORBA::Object_var obj = orb->resolve_initial_references("RootPOA");