-// SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules
+// 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
//
-// 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_impl.hxx
// Author : Estelle Deville
// Module : SALOME
// $Header$
-
-
+//
#ifndef MODULECATALOG_IMPL_H
#define MODULECATALOG_IMPL_H
-#include "utilities.h"
+#include "SALOME_ModuleCatalog.hxx"
+
#include <string>
#include <map>
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOME_ModuleCatalog)
-class SALOME_ModuleCatalogImpl: public POA_SALOME_ModuleCatalog::ModuleCatalog,
- public PortableServer::RefCountServantBase
+#ifdef WNT
+#pragma warning(disable:4275) // Disable warning interface non dll
+#pragma warning(disable:4290) // Warning Exception ...
+#endif
+
+class MODULECATALOG_EXPORT SALOME_ModuleCatalogImpl: public POA_SALOME_ModuleCatalog::ModuleCatalog
{
public:
//! standard constructor
*/
virtual SALOME_ModuleCatalog::ListOfComputers* GetComputerList();
+ //! method to get the list of all types of the catalog
+ /*!
+ * \return the types list
+ */
+ virtual SALOME_ModuleCatalog::ListOfTypeDefinition* GetTypes();
+
//! method to get the PathPrefix of a computer
/*! If the wanted computer doesn't exist, the Notfound exception is thrown
\param machinename const char* arguments
\param componentname const char* arguments
\return the wanted component description
*/
- virtual SALOME_ModuleCatalog::Component *
+ virtual SALOME_ModuleCatalog::ComponentDef *
GetComponentInfo(const char *name);
void ping(){};
+ CORBA::Long getPID();
+ void ShutdownWithExit();
- void shutdown() { if (_orb) _orb->shutdown(1); };
+ void shutdown() { if(!CORBA::is_nil(_orb)) _orb->shutdown(0); };
private:
//! method to parse one module catalog
\param file const char* arguments
\param modulelist ParserComponents arguments
\param pathlist ParserPathPrefixes arguments
+ \param typeMap ParserTypes arguments
*/
virtual void _parse_xml_file(const char* file,
- ParserComponents & modulelist,
- ParserPathPrefixes & pathlist);
+ ParserComponents & modulelist,
+ ParserPathPrefixes & pathlist,
+ ParserTypes& typeMap,
+ TypeList& typeList);
//! method to find component in the parser list
/*!
\param C_corba Component argument
\param C_parser const ParserComponent argument
*/
- void duplicate(SALOME_ModuleCatalog::Component & C_corba,
- const ParserComponent & C_parser);
+ void duplicate(SALOME_ModuleCatalog::ComponentDef & C_corba,
+ const ParserComponent & C_parser);
//! method to create a CORBA interface description from parser
/*!
\param I_parser const ParserInterface argument
*/
void duplicate(SALOME_ModuleCatalog::DefinitionInterface & I_corba,
- const ParserInterface & I_parser);
+ const ParserInterface & I_parser);
//! method to create a CORBA service description from parser
/*!
\param S_parser const ParserService argument
*/
void duplicate(SALOME_ModuleCatalog::Service & S_corba,
- const ParserService & service);
+ const ParserService & service);
//! method to create a CORBA parameter description from parser
/*!
\param P_parser const ParserParameter argument
*/
void duplicate(SALOME_ModuleCatalog::ServicesParameter & P_corba,
- const ParserParameter & P_parser);
+ const ParserParameter & P_parser);
//! method to create a CORBA datastream parameter description from parser
/*!
\param P_parser const ParserDataStreamParameter argument
*/
void duplicate(SALOME_ModuleCatalog::ServicesDataStreamParameter & P_corba,
- const ParserDataStreamParameter & P_parser);
+ const ParserDataStreamParameter & P_parser);
//! method to create the path prefix structures from the catalog parsing
/*!
\return true if parsing is OK
*/
virtual bool _parseArguments(int argc, char **argv,
- char **_general, char** _personal);
+ char **_general, char** _personal);
// Theses variables will contain the path to the general and personal catalogs
// These variables will contain the informations on the general common catalog
ParserComponents _general_module_list ;
ParserPathPrefixes _general_path_list ;
+ ParserTypes _typeMap;
+ TypeList _typeList;
// These variables will contain the informations on the personal catalog
ParserComponents _personal_module_list ;
ParserPathPrefixes _personal_path_list ;
- std::map <std::string, SALOME_ModuleCatalog::DataStreamType>
- DataStreamTypeConvert;
-
std::map <std::string, SALOME_ModuleCatalog::DataStreamDependency>
DataStreamDepConvert;