1 // File: SALOME_ModuleCatalog_impl.hxx
2 // Created: Tue June 28 2001
3 // Author: Estelle Deville
5 // Copyright : CEA/DEN/DMSS/LGLS
9 #ifndef MODULECATALOG_IMPL_H
10 #define MODULECATALOG_IMPL_H
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)
18 class SALOME_ModuleCatalogImpl: public POA_SALOME_ModuleCatalog::ModuleCatalog,
19 public PortableServer::RefCountServantBase
22 //! standard constructor
23 SALOME_ModuleCatalogImpl(int artgc, char** argv);
25 //! standard destructor
26 virtual ~SALOME_ModuleCatalogImpl();
28 //! method to get a component list
30 \return a component list
32 virtual SALOME_ModuleCatalog::ListOfComputers* GetComputerList();
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
39 virtual char* GetPathPrefix(const char* machinename);
41 //! method to get a component list
43 \return a component list
45 virtual SALOME_ModuleCatalog::ListOfComponents* GetComponentList();
47 //! method to get a component list of component name and component icone
49 \return a list of couple (component name, component icone)
51 virtual SALOME_ModuleCatalog::ListOfIAPP_Affich* GetComponentIconeList();
53 //! method to get a component list of a wanted type
55 \return a component list
57 virtual SALOME_ModuleCatalog::ListOfComponents*
58 GetTypedComponentList(SALOME_ModuleCatalog::ComponentType component_type);
60 //! method to get a component
62 \param componentname const char* arguments
63 \return the wanted component
65 virtual SALOME_ModuleCatalog::Acomponent_ptr
66 GetComponent(const char* componentname);
71 //! method to parse one module catalog
73 \param file const char* arguments
74 \param modulelist ListOfParserComponent arguments
75 \param pathlist ListOfParserPathPrefix arguments
77 virtual void _parse_xml_file(const char* file,
78 ListOfParserComponent& modulelist,
79 ListOfParserPathPrefix& pathlist);
81 //! method to create a list of interfaces from the parsing of the catalog
83 \param list_interface ListOfDefinitionInterface arguments
84 \return the interfaces list
86 virtual SALOME_ModuleCatalog::ListOfDefInterface
87 duplicate_interfaces(ListOfDefinitionInterface list_interface);
89 //! method to create the path prefix structures from the catalog parsing
91 \param pathes ListOfParserPathPrefix arguments
94 virtual ListOfPathPrefix duplicate_pathes(ListOfParserPathPrefix pathes);
96 //! method to verify path prefix content
98 \param pathlist ListOfParserPathPrefix arguments
99 \return true if verfication is OK
101 virtual bool _verify_path_prefix(ListOfParserPathPrefix pathlist);
104 //! method to parse arguments to get general and personal catalog files
106 \param argc int arguments
107 \param argv char** arguments
108 \param _general char** arguments
109 \return true if parsing is OK
111 virtual bool _parseArguments(int argc, char **argv,
112 char **_general, char** _personal);
115 // Theses variables will contain the path to the general and personal catalogs
117 char* _personal_path;
120 // These variables will contain the informations on the general common catalog
121 ListOfParserComponent _general_module_list ;
122 ListOfParserPathPrefix _general_path_list ;
124 // These variables will contain the informations on the personal catalog
125 ListOfParserComponent _personal_module_list ;
126 ListOfParserPathPrefix _personal_path_list ;
130 #endif // MODULECATALOG_IMPL_H