Salome HOME
Initialisation de la base KERNEL avec la version operationnelle de KERNEL_SRC issue...
[modules/kernel.git] / src / ModuleCatalog / SALOME_ModuleCatalog_impl.hxx
1 // File: SALOME_ModuleCatalog_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 MODULECATALOG_IMPL_H
10 #define MODULECATALOG_IMPL_H
11
12 #include "utilities.h"
13 #include "SALOME_ModuleCatalog_Handler.hxx"
14 #include "PathPrefix.hxx"
15 #include <SALOMEconfig.h>
16 #include CORBA_SERVER_HEADER(SALOME_ModuleCatalog)
17
18 class SALOME_ModuleCatalogImpl: public POA_SALOME_ModuleCatalog::ModuleCatalog,
19                                 public PortableServer::RefCountServantBase 
20 {
21 public:
22   //! standard constructor
23   SALOME_ModuleCatalogImpl(int artgc, char** argv);
24
25   //! standard destructor
26   virtual ~SALOME_ModuleCatalogImpl();
27
28   //! method to get a component list
29   /*!
30     \return a component list 
31   */
32   virtual SALOME_ModuleCatalog::ListOfComputers* GetComputerList();
33
34   //! method to get the PathPrefix of a computer
35  /*! If the wanted computer doesn't exist, the Notfound exception is thrown
36    \param machinename const char* arguments 
37    \return the prefix path
38  */
39   virtual char* GetPathPrefix(const char* machinename);
40
41   //! method to get a component list
42   /*!
43     \return a component list 
44   */
45   virtual SALOME_ModuleCatalog::ListOfComponents* GetComponentList();
46
47   //! method to get a component list of component name and component icone
48   /*!
49     \return a list of couple (component name, component icone) 
50   */
51   virtual SALOME_ModuleCatalog::ListOfIAPP_Affich* GetComponentIconeList();
52
53   //! method to get a component list of a wanted type
54   /*!
55     \return a component list 
56   */
57   virtual SALOME_ModuleCatalog::ListOfComponents* 
58     GetTypedComponentList(SALOME_ModuleCatalog::ComponentType component_type);
59
60   //! method to get a component
61   /*!
62     \param componentname const char* arguments 
63     \return the wanted component
64   */
65   virtual SALOME_ModuleCatalog::Acomponent_ptr 
66     GetComponent(const char* componentname);
67
68   void ping(){};
69
70 private:
71   //! method to parse one module catalog
72   /*! 
73     \param file const char* arguments
74     \param modulelist ListOfParserComponent arguments
75     \param pathlist ListOfParserPathPrefix arguments
76   */
77   virtual void _parse_xml_file(const char* file, 
78                           ListOfParserComponent& modulelist, 
79                           ListOfParserPathPrefix& pathlist);
80
81  //! method to create a list of interfaces from the parsing of the catalog
82   /*!
83     \param list_interface ListOfDefinitionInterface arguments
84     \return the interfaces list
85   */
86   virtual SALOME_ModuleCatalog::ListOfDefInterface 
87           duplicate_interfaces(ListOfDefinitionInterface list_interface);
88   
89  //! method to create the path prefix structures from the catalog parsing
90   /*!
91     \param pathes ListOfParserPathPrefix arguments
92     \return the pathes
93   */
94   virtual ListOfPathPrefix duplicate_pathes(ListOfParserPathPrefix pathes);
95
96  //! method to verify path prefix content
97   /*!
98     \param pathlist ListOfParserPathPrefix arguments
99     \return true if verfication is OK
100   */
101   virtual bool _verify_path_prefix(ListOfParserPathPrefix pathlist);
102
103
104  //! method to parse arguments to get general and personal catalog files
105   /*!
106     \param argc int arguments
107     \param argv char** arguments
108     \param _general char** arguments
109     \return true if parsing is OK
110   */
111   virtual bool _parseArguments(int argc, char **argv, 
112                                char **_general, char** _personal);
113
114
115   // Theses variables will contain the path to the general and personal catalogs
116   char* _general_path;
117   char* _personal_path;
118
119
120   // These variables will contain the informations on the general common catalog
121   ListOfParserComponent _general_module_list ;
122   ListOfParserPathPrefix _general_path_list ;
123
124   // These variables will contain the informations on the personal catalog
125   ListOfParserComponent _personal_module_list ;
126   ListOfParserPathPrefix _personal_path_list ; 
127
128 };
129
130 #endif // MODULECATALOG_IMPL_H