Salome HOME
NRI : Add componentusername.
[modules/kernel.git] / src / ModuleCatalog / SALOME_ModuleCatalog_Acomponent_impl.hxx
1 // File: SALOME_ModuleCatalog_Acomponent_impl.hxx
2 // Created: Tue June 28 2001
3 // Author: Estelle Deville
4 // Project: SALOME
5 // Copyright : CEA/DEN/DMSS/LGLS
6 // $Header$
7
8
9 #ifndef ACOMPONENT_IMPL_H
10 #define ACOMPONENT_IMPL_H
11
12 #include "utilities.h"
13 #include "PathPrefix.hxx"
14 #include <SALOMEconfig.h>
15 #include CORBA_SERVER_HEADER(SALOME_ModuleCatalog)
16
17 class SALOME_ModuleCatalog_AcomponentImpl: public POA_SALOME_ModuleCatalog::Acomponent,
18                       public PortableServer::RefCountServantBase 
19 {
20 public:
21   //! standard constructor
22   SALOME_ModuleCatalog_AcomponentImpl(const char* name, 
23                                       const char* username, 
24                                       const char* constraint, 
25                                       SALOME_ModuleCatalog::ComponentType componenttype, 
26                                       CORBA::Boolean componentmultistudy,
27                                       const char* icone,
28                                       SALOME_ModuleCatalog::ListOfDefInterface list_interfaces,
29                                       ListOfPathPrefix pathes);
30
31   //! standard destructor
32   virtual ~SALOME_ModuleCatalog_AcomponentImpl();
33
34   //! method to get a list of the interfaces name of a component
35   /*!
36     \return a list of the interfaces of a component 
37   */
38   virtual SALOME_ModuleCatalog::ListOfInterfaces* GetInterfaceList() ;
39
40   //! method to get one interface of a component
41   /*! If the specified interface doesn't exist, the Notfound exception is thrown
42     \param interface name const car* arguments
43     \return the wanted interface
44   */
45   virtual SALOME_ModuleCatalog::DefinitionInterface* 
46              GetInterface(const char* interfacename)
47              throw(SALOME_ModuleCatalog::NotFound);
48
49   //! method to get a list of the services name of an interface of a component
50  /*!If the specified interface doesn't exist, the Notfound exception is thrown
51    \param interfacename const char* arguments 
52    \return a list of the services of the wanted interface
53  */
54   virtual SALOME_ModuleCatalog::ListOfServices* 
55              GetServiceList(const char* interfacename)
56              throw(SALOME_ModuleCatalog::NotFound);
57
58     
59   //! method to get one service of an interface of a component
60  /*! If the wanted service or the specified interface don't exist, 
61   *  the Notfound exception is thrown
62    \param interfacename const char* arguments 
63    \param servicename const char* arguments
64    \return the wanted service
65  */
66   virtual SALOME_ModuleCatalog::Service* 
67              GetService(const char* interfacename, 
68                         const char* servicename) 
69              throw(SALOME_ModuleCatalog::NotFound);
70
71   //! method to get the default service of an interface of a component
72   /*! If the specified interface doesn't exist, the Notfound exception is thrown
73     \param interfacename const char* arguments 
74     \return the default service of the interface
75   */
76   virtual SALOME_ModuleCatalog::Service* 
77              GetDefaultService(const char* interfacename) 
78              throw(SALOME_ModuleCatalog::NotFound);
79
80   //! method to get the PathPrefix of a computer
81  /*! If the wanted computer doesn't exist, the Notfound exception is thrown
82    \param machinename const char* arguments 
83    \return the prefix path
84  */
85   virtual char* GetPathPrefix(const char* machinename) 
86                 throw(SALOME_ModuleCatalog::NotFound);
87
88   //! method to obtain the constraint affected to a component
89   /*! to be resolved by LifeCycle for the computer choice
90     \return the constraint
91   */
92   virtual char* constraint() ;
93
94   //! method to obtain the componentname
95   /*!
96     \return the component name
97   */
98   virtual char* componentname();
99
100   //! method to obtain the componentusername
101   /*!
102     \return the component user name
103   */
104   virtual char* componentusername();
105
106   //! method to define if a component can be multistudy or not
107   /*!
108     \return true if the component supports multistudy
109   */
110   virtual CORBA::Boolean multistudy();
111
112   //! method to define the type of the component
113   /*!
114     \return the component type
115   */
116   virtual SALOME_ModuleCatalog::ComponentType component_type() ;
117
118   //! method to obtain the component icone (for IAPP)
119   /*!
120     \return the component icone
121   */
122   virtual char* component_icone();
123
124 private :
125   char* _component_name ;
126   char* _component_user_name ;
127   char* _constraint;
128   char* _icone;
129   SALOME_ModuleCatalog::ComponentType _componenttype;
130   CORBA::Boolean _componentmultistudy;
131   SALOME_ModuleCatalog::ListOfDefInterface _list_interfaces;
132   ListOfPathPrefix _pathes ;
133   
134
135  //! method to duplicate a service
136   /*!
137     \param service SALOME_ModuleCatalog::Service arguments
138     \return the service
139   */
140   virtual SALOME_ModuleCatalog::Service_var _duplicate_service(SALOME_ModuleCatalog::Service service);
141 };
142
143 #endif // ACOMPONENT_IMPL_H