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,
43 const char* constraint,
44 SALOME_ModuleCatalog::ComponentType componenttype,
45 CORBA::Boolean componentmultistudy,
47 SALOME_ModuleCatalog::ListOfDefInterface list_interfaces,
48 ListOfPathPrefix pathes);
50 //! standard destructor
51 virtual ~SALOME_ModuleCatalog_AcomponentImpl();
53 //! method to get a list of the interfaces name of a component
55 \return a list of the interfaces of a component
57 virtual SALOME_ModuleCatalog::ListOfInterfaces* GetInterfaceList() ;
59 //! method to get one interface of a component
60 /*! If the specified interface doesn't exist, the Notfound exception is thrown
61 \param interface name const car* arguments
62 \return the wanted interface
64 virtual SALOME_ModuleCatalog::DefinitionInterface*
65 GetInterface(const char* interfacename)
66 throw(SALOME_ModuleCatalog::NotFound);
68 //! method to get a list of the services name of an interface of a component
69 /*!If the specified interface doesn't exist, the Notfound exception is thrown
70 \param interfacename const char* arguments
71 \return a list of the services of the wanted interface
73 virtual SALOME_ModuleCatalog::ListOfServices*
74 GetServiceList(const char* interfacename)
75 throw(SALOME_ModuleCatalog::NotFound);
78 //! method to get one service of an interface of a component
79 /*! If the wanted service or the specified interface don't exist,
80 * the Notfound exception is thrown
81 \param interfacename const char* arguments
82 \param servicename const char* arguments
83 \return the wanted service
85 virtual SALOME_ModuleCatalog::Service*
86 GetService(const char* interfacename,
87 const char* servicename)
88 throw(SALOME_ModuleCatalog::NotFound);
90 //! method to get the default service of an interface of a component
91 /*! If the specified interface doesn't exist, the Notfound exception is thrown
92 \param interfacename const char* arguments
93 \return the default service of the interface
95 virtual SALOME_ModuleCatalog::Service*
96 GetDefaultService(const char* interfacename)
97 throw(SALOME_ModuleCatalog::NotFound);
99 //! method to get the PathPrefix of a computer
100 /*! If the wanted computer doesn't exist, the Notfound exception is thrown
101 \param machinename const char* arguments
102 \return the prefix path
104 virtual char* GetPathPrefix(const char* machinename)
105 throw(SALOME_ModuleCatalog::NotFound);
107 //! method to obtain the constraint affected to a component
108 /*! to be resolved by LifeCycle for the computer choice
109 \return the constraint
111 virtual char* constraint() ;
113 //! method to obtain the componentname
115 \return the component name
117 virtual char* componentname();
119 //! method to define if a component can be multistudy or not
121 \return true if the component supports multistudy
123 virtual CORBA::Boolean multistudy();
125 //! method to define the type of the component
127 \return the component type
129 virtual SALOME_ModuleCatalog::ComponentType component_type() ;
131 //! method to obtain the component icone (for IAPP)
133 \return the component icone
135 virtual char* component_icone();
138 char* _component_name ;
141 SALOME_ModuleCatalog::ComponentType _componenttype;
142 CORBA::Boolean _componentmultistudy;
143 SALOME_ModuleCatalog::ListOfDefInterface _list_interfaces;
144 ListOfPathPrefix _pathes ;
147 //! method to duplicate a service
149 \param service SALOME_ModuleCatalog::Service arguments
152 virtual SALOME_ModuleCatalog::Service_var _duplicate_service(SALOME_ModuleCatalog::Service service);
155 #endif // ACOMPONENT_IMPL_H