1 // SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules
3 // Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : SALOME_ModuleCatalog_Acomponent_impl.hxx
25 // Author : Estelle Deville
29 #ifndef ACOMPONENT_IMPL_H
30 #define ACOMPONENT_IMPL_H
32 #include "utilities.h"
33 #include "PathPrefix.hxx"
34 #include <SALOMEconfig.h>
35 #include CORBA_SERVER_HEADER(SALOME_ModuleCatalog)
37 class SALOME_ModuleCatalog_AcomponentImpl: public POA_SALOME_ModuleCatalog::Acomponent,
38 public PortableServer::RefCountServantBase
41 //! standard constructor
42 SALOME_ModuleCatalog_AcomponentImpl(const char* name,
44 const char* constraint,
45 SALOME_ModuleCatalog::ComponentType componenttype,
46 CORBA::Boolean componentmultistudy,
48 SALOME_ModuleCatalog::ListOfDefInterface list_interfaces,
49 ListOfPathPrefix pathes);
51 //! standard destructor
52 virtual ~SALOME_ModuleCatalog_AcomponentImpl();
54 //! method to get a list of the interfaces name of a component
56 \return a list of the interfaces of a component
58 virtual SALOME_ModuleCatalog::ListOfInterfaces* GetInterfaceList() ;
60 //! method to get one interface of a component
61 /*! If the specified interface doesn't exist, the Notfound exception is thrown
62 \param interface name const car* arguments
63 \return the wanted interface
65 virtual SALOME_ModuleCatalog::DefinitionInterface*
66 GetInterface(const char* interfacename)
67 throw(SALOME_ModuleCatalog::NotFound);
69 //! method to get a list of the services name of an interface of a component
70 /*!If the specified interface doesn't exist, the Notfound exception is thrown
71 \param interfacename const char* arguments
72 \return a list of the services of the wanted interface
74 virtual SALOME_ModuleCatalog::ListOfServices*
75 GetServiceList(const char* interfacename)
76 throw(SALOME_ModuleCatalog::NotFound);
79 //! method to get one service of an interface of a component
80 /*! If the wanted service or the specified interface don't exist,
81 * the Notfound exception is thrown
82 \param interfacename const char* arguments
83 \param servicename const char* arguments
84 \return the wanted service
86 virtual SALOME_ModuleCatalog::Service*
87 GetService(const char* interfacename,
88 const char* servicename)
89 throw(SALOME_ModuleCatalog::NotFound);
91 //! method to get the default service of an interface of a component
92 /*! If the specified interface doesn't exist, the Notfound exception is thrown
93 \param interfacename const char* arguments
94 \return the default service of the interface
96 virtual SALOME_ModuleCatalog::Service*
97 GetDefaultService(const char* interfacename)
98 throw(SALOME_ModuleCatalog::NotFound);
100 //! method to get the PathPrefix of a computer
101 /*! If the wanted computer doesn't exist, the Notfound exception is thrown
102 \param machinename const char* arguments
103 \return the prefix path
105 virtual char* GetPathPrefix(const char* machinename)
106 throw(SALOME_ModuleCatalog::NotFound);
108 //! method to obtain the constraint affected to a component
109 /*! to be resolved by LifeCycle for the computer choice
110 \return the constraint
112 virtual char* constraint() ;
114 //! method to obtain the componentname
116 \return the component name
118 virtual char* componentname();
120 //! method to obtain the componentusername
122 \return the component user name
124 virtual char* componentusername();
126 //! method to define if a component can be multistudy or not
128 \return true if the component supports multistudy
130 virtual CORBA::Boolean multistudy();
132 //! method to define the type of the component
134 \return the component type
136 virtual SALOME_ModuleCatalog::ComponentType component_type() ;
138 //! method to obtain the component icone (for IAPP)
140 \return the component icone
142 virtual char* component_icone();
145 char* _component_name ;
146 char* _component_user_name ;
149 SALOME_ModuleCatalog::ComponentType _componenttype;
150 CORBA::Boolean _componentmultistudy;
151 SALOME_ModuleCatalog::ListOfDefInterface _list_interfaces;
152 ListOfPathPrefix _pathes ;
155 //! method to duplicate a service
157 \param service SALOME_ModuleCatalog::Service arguments
160 virtual SALOME_ModuleCatalog::Service_var _duplicate_service(SALOME_ModuleCatalog::Service service);
163 #endif // ACOMPONENT_IMPL_H