Salome HOME
This commit was generated by cvs2git to create tag 'V1_4_0b2'.
[modules/kernel.git] / src / ModuleCatalog / SALOME_ModuleCatalog_Acomponent_impl.hxx
1 //  SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules
2 //
3 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 // 
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. 
10 // 
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. 
15 // 
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 
19 // 
20 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : SALOME_ModuleCatalog_Acomponent_impl.hxx
25 //  Author : Estelle Deville
26 //  Module : SALOME
27 //  $Header$
28
29 #ifndef ACOMPONENT_IMPL_H
30 #define ACOMPONENT_IMPL_H
31
32 #include "utilities.h"
33 #include "PathPrefix.hxx"
34 #include <SALOMEconfig.h>
35 #include CORBA_SERVER_HEADER(SALOME_ModuleCatalog)
36
37 class SALOME_ModuleCatalog_AcomponentImpl: public POA_SALOME_ModuleCatalog::Acomponent,
38                       public PortableServer::RefCountServantBase 
39 {
40 public:
41   //! standard constructor
42   SALOME_ModuleCatalog_AcomponentImpl(const char* name, 
43                                       const char* username, 
44                                       const char* constraint, 
45                                       SALOME_ModuleCatalog::ComponentType componenttype, 
46                                       CORBA::Boolean componentmultistudy,
47                                       const char* icone,
48                                       SALOME_ModuleCatalog::ListOfDefInterface list_interfaces,
49                                       ListOfPathPrefix pathes);
50
51   //! standard destructor
52   virtual ~SALOME_ModuleCatalog_AcomponentImpl();
53
54   //! method to get a list of the interfaces name of a component
55   /*!
56     \return a list of the interfaces of a component 
57   */
58   virtual SALOME_ModuleCatalog::ListOfInterfaces* GetInterfaceList() ;
59
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
64   */
65   virtual SALOME_ModuleCatalog::DefinitionInterface* 
66              GetInterface(const char* interfacename)
67              throw(SALOME_ModuleCatalog::NotFound);
68
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
73  */
74   virtual SALOME_ModuleCatalog::ListOfServices* 
75              GetServiceList(const char* interfacename)
76              throw(SALOME_ModuleCatalog::NotFound);
77
78     
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
85  */
86   virtual SALOME_ModuleCatalog::Service* 
87              GetService(const char* interfacename, 
88                         const char* servicename) 
89              throw(SALOME_ModuleCatalog::NotFound);
90
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
95   */
96   virtual SALOME_ModuleCatalog::Service* 
97              GetDefaultService(const char* interfacename) 
98              throw(SALOME_ModuleCatalog::NotFound);
99
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
104  */
105   virtual char* GetPathPrefix(const char* machinename) 
106                 throw(SALOME_ModuleCatalog::NotFound);
107
108   //! method to obtain the constraint affected to a component
109   /*! to be resolved by LifeCycle for the computer choice
110     \return the constraint
111   */
112   virtual char* constraint() ;
113
114   //! method to obtain the componentname
115   /*!
116     \return the component name
117   */
118   virtual char* componentname();
119
120   //! method to obtain the componentusername
121   /*!
122     \return the component user name
123   */
124   virtual char* componentusername();
125
126   //! method to define if a component can be multistudy or not
127   /*!
128     \return true if the component supports multistudy
129   */
130   virtual CORBA::Boolean multistudy();
131
132   //! method to define the type of the component
133   /*!
134     \return the component type
135   */
136   virtual SALOME_ModuleCatalog::ComponentType component_type() ;
137
138   //! method to obtain the component icone (for IAPP)
139   /*!
140     \return the component icone
141   */
142   virtual char* component_icone();
143
144 private :
145   char* _component_name ;
146   char* _component_user_name ;
147   char* _constraint;
148   char* _icone;
149   SALOME_ModuleCatalog::ComponentType _componenttype;
150   CORBA::Boolean _componentmultistudy;
151   SALOME_ModuleCatalog::ListOfDefInterface _list_interfaces;
152   ListOfPathPrefix _pathes ;
153   
154
155  //! method to duplicate a service
156   /*!
157     \param service SALOME_ModuleCatalog::Service arguments
158     \return the service
159   */
160   virtual SALOME_ModuleCatalog::Service_var _duplicate_service(SALOME_ModuleCatalog::Service service);
161 };
162
163 #endif // ACOMPONENT_IMPL_H