-// SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules
+// Copyright (C) 2007-2012 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
//
-// 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 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules
// File : SALOME_ModuleCatalog_Client.cxx
// Module : SALOME
-
+//
/* $Header$ */
#include <iostream>
#include "SALOME_ModuleCatalog.hh"
#include <string>
#include "utilities.h"
-using namespace std;
void PrintService(SALOME_ModuleCatalog::Acomponent_ptr C,
- const string & InterfaceName,
- const string & ServiceName);
+ const std::string & InterfaceName,
+ const std::string & ServiceName);
void PrintInterface(SALOME_ModuleCatalog::Acomponent_ptr C,
- const string & InterfaceName);
+ const std::string & InterfaceName);
void PrintComponent(SALOME_ModuleCatalog::Acomponent_ptr C);
CORBA::Object_var objVar, objVarN;
try {
- // initialize the ORB
+ // initialize the ORB
orb = CORBA::ORB_init (argc, argv);
MESSAGE("Get Typed Component list (SUPERV Type)");
list_typed_composants
= Catalogue->GetTypedComponentList(SALOME_ModuleCatalog::SUPERV);
-#ifndef WNT
for (unsigned int ind = 0; ind < list_typed_composants->length();ind++)
-#else
- for (ind = 0; ind < list_typed_composants->length();ind++)
-#endif
MESSAGE("Component SUPERV list : " << list_typed_composants[ind]);
// Get list of couple (component name, component icone)
SALOME_ModuleCatalog::ListOfIAPP_Affich_var list_composants_icone
= Catalogue->GetComponentIconeList();
-#ifndef WNT
for (unsigned int ind = 0; ind < list_composants_icone->length();ind++)
-#else
- for (ind = 0; ind < list_composants_icone->length();ind++)
-#endif
{
MESSAGE("Component name: " << list_composants_icone[ind].modulename);
MESSAGE("Component icone: " << list_composants_icone[ind].moduleicone);
}
catch(SALOME_ModuleCatalog::NotFound &ex){
INFOS("SALOME_ModuleCatalog::NotFound")
- cerr << ex.what << endl;
+ std::cerr << ex.what << std::endl;
}
catch(CORBA::SystemException&) {
INFOS("Caught CORBA::SystemException.")
INFOS("CosNaming::NamingContext::NotEmpty")
}
- catch(CORBA::Exception &sysEx) {
+ catch(CORBA::Exception &) {
INFOS("Caught CORBA::Exception.")
}
void PrintComponent(SALOME_ModuleCatalog::Acomponent_ptr C)
{
- const char *_name = C->componentname();
-
MESSAGE("Name : " << C->componentname());
MESSAGE("Type : " << C->component_type() << " multistudy : " << C->multistudy());
MESSAGE("Constraint : " << C->constraint());
void PrintInterface(SALOME_ModuleCatalog::Acomponent_ptr C,
- const string & InterfaceName)
+ const std::string & InterfaceName)
{
unsigned int i, n;
-
+
SALOME_ModuleCatalog::DefinitionInterface_var _interf
= C->GetInterface(InterfaceName.c_str());
MESSAGE ("Interface : " << _interf->interfacename);
}
void PrintService(SALOME_ModuleCatalog::Acomponent_ptr C,
- const string & InterfaceName,
- const string & ServiceName)
+ const std::string & InterfaceName,
+ const std::string & ServiceName)
{
int i, n;
for (i = 0; i<n; i++)
{
MESSAGE(" Parameter "
- << Service->ServiceinParameter[i].Parametername);
+ << Service->ServiceinParameter[i].Parametername);
MESSAGE(" Type : "
- << Service->ServiceinParameter[i].Parametertype);
+ << Service->ServiceinParameter[i].Parametertype);
}
MESSAGE("Out Parameter(s):");
for (i = 0; i<n; i++)
{
MESSAGE(" Parameter "
- << Service->ServiceoutParameter[i].Parametername);
+ << Service->ServiceoutParameter[i].Parametername);
MESSAGE(" Type : "
- << Service->ServiceoutParameter[i].Parametertype);
+ << Service->ServiceoutParameter[i].Parametertype);
}
MESSAGE("In DataStreamParameter(s):");
for (i = 0; i<n; i++)
{
MESSAGE(" Parameter "
- << Service->ServiceinDataStreamParameter[i].Parametername);
+ << Service->ServiceinDataStreamParameter[i].Parametername);
MESSAGE(" Type : "
- << Service->ServiceinDataStreamParameter[i].Parametertype);
+ << Service->ServiceinDataStreamParameter[i].Parametertype);
MESSAGE(" Dependency : "
- << Service->ServiceinDataStreamParameter[i].Parametertype);
+ << Service->ServiceinDataStreamParameter[i].Parametertype);
}
MESSAGE("Out DataStreamParameter(s):");
for (i = 0; i<n; i++)
{
MESSAGE(" Parameter "
- << Service->ServiceoutDataStreamParameter[i].Parametername);
+ << Service->ServiceoutDataStreamParameter[i].Parametername);
MESSAGE(" Type : "
- << Service->ServiceoutDataStreamParameter[i].Parametertype);
+ << Service->ServiceoutDataStreamParameter[i].Parametertype);
MESSAGE(" Dependency : "
- << Service->ServiceoutDataStreamParameter[i].Parametertype);
+ << Service->ServiceoutDataStreamParameter[i].Parametertype);
}