1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules
24 // File : SALOME_ModuleCatalog_impl.hxx
25 // Author : Estelle Deville
29 #ifndef MODULECATALOG_IMPL_H
30 #define MODULECATALOG_IMPL_H
32 #include "SALOME_ModuleCatalog.hxx"
37 #include <SALOMEconfig.h>
38 #include CORBA_SERVER_HEADER(SALOME_ModuleCatalog)
41 #pragma warning(disable:4275) // Disable warning interface non dll
42 #pragma warning(disable:4290) // Warning Exception ...
45 class MODULECATALOG_EXPORT SALOME_ModuleCatalogImpl: public POA_SALOME_ModuleCatalog::ModuleCatalog
50 //! standard constructor
51 SALOME_ModuleCatalogImpl(int artgc, char** argv, CORBA::ORB_ptr orb = NULL);
53 //! standard destructor
54 virtual ~SALOME_ModuleCatalogImpl();
56 //! method to get a component list
58 * \return a component list
60 virtual SALOME_ModuleCatalog::ListOfComputers* GetComputerList();
62 //! method to get the list of all types of the catalog
64 * \return the types list
66 virtual SALOME_ModuleCatalog::ListOfTypeDefinition* GetTypes();
68 //! method to get the PathPrefix of a computer
69 /*! If the wanted computer doesn't exist, the Notfound exception is thrown
70 * \param machinename const char* arguments
71 * \return the prefix path
73 virtual char* GetPathPrefix(const char* machinename);
75 //! method to read a XML file and import new components into the component list
76 /*! If the XML file doesn't exist or is not readable, the Notfound exception is thrown
77 * \param const char* xmlFileName
79 virtual void ImportXmlCatalogFile(const char* xmlFileName);
81 //! method to get a component list
83 * \return a component list
85 virtual SALOME_ModuleCatalog::ListOfComponents* GetComponentList();
87 //! method to get a component list of component name and component icone
89 * \return a list of couple (component name, component icone)
91 virtual SALOME_ModuleCatalog::ListOfIAPP_Affich* GetComponentIconeList();
93 //! method to get a component list of a wanted type
95 * \return a component list
97 virtual SALOME_ModuleCatalog::ListOfComponents*
98 GetTypedComponentList(SALOME_ModuleCatalog::ComponentType component_type);
100 //! method to get a component
102 * \param componentname const char* arguments
103 * \return the wanted component
105 virtual SALOME_ModuleCatalog::Acomponent_ptr
106 GetComponent(const char* componentname);
108 //! method to get a component description
110 * \param componentname const char* arguments
111 * \return the wanted component description
113 virtual SALOME_ModuleCatalog::ComponentDef*
114 GetComponentInfo(const char *name);
116 //! method to check the server is alive
119 //! get PID of the server
120 CORBA::Long getPID();
122 //! shutdown server and exit
123 void ShutdownWithExit();
129 //! method to parse arguments to get general and personal catalog files
131 * \param argc int arguments
132 * \param argv char** arguments
133 * \param _general char** arguments
134 * \return true if parsing is OK
136 virtual bool _parseArguments(int argc, char **argv,
137 char **_general, char** _personal);
144 #endif // MODULECATALOG_IMPL_H