Salome HOME
NRI : Check if a component-username is already associated with a component-name.
[modules/kernel.git] / src / DataTypeCatalog / SALOME_DataTypeCatalog_impl.hxx
1 // File: SALOME_DataTypeCatalog_impl.hxx
2 // Created: Mon Aug 08 2001
3 // Author: Estelle Deville
4 // Project: SALOME
5 // Copyright : CEA/DEN/DMSS/LGLS
6 // $Header$
7
8
9 #ifndef DATATYPECATALOG_IMPL_H
10 #define DATATYPECATALOG_IMPL_H
11
12 #include "utilities.h"
13 #include "SALOME_DataTypeCatalog_Handler.hxx"
14 #include <SALOMEconfig.h>
15 #include CORBA_SERVER_HEADER(SALOME_DataTypeCatalog)
16
17 class SALOME_DataTypeCatalogImpl: public POA_SALOME_DataTypeCatalog::DataCatalog,
18                                   public PortableServer::RefCountServantBase 
19 {
20 public:
21   //! standard constructor
22   SALOME_DataTypeCatalogImpl(int argc, char** argv);
23
24   //! standard destructor
25   virtual ~SALOME_DataTypeCatalogImpl();
26
27   //! method to get a data type list
28   /*!
29     \return a data type list 
30   */
31   virtual SALOME_DataTypeCatalog::ListOfDataTypeName* GetDataTypeList();
32
33   //! method to know if type_out is derived from type_in
34   /*!
35     \param type_in const char* arguments
36     \param type_out const char* arguments
37     \return a boolean (true if type_out is derived from type_in)
38   */
39   virtual CORBA::Boolean isDerivedFrom(const char* type_in, const char* type_out) throw(SALOME_DataTypeCatalog::NotFound);
40
41   //! method to get the name of the interface to acces the data in read mode
42   /*!
43     \param type const char* arguments
44     \return the read interface name
45   */
46   virtual char* GetDataInterfaceRead(const char* type) throw(SALOME_DataTypeCatalog::NotFound);
47
48
49   //! method to get the name of the interface to acces the data in write mode
50   /*!
51     \param type const char* arguments
52     \return the write interface name
53   */
54   virtual char* GetDataInterfaceWrite(const char* type) throw(SALOME_DataTypeCatalog::NotFound);
55
56  //! method to get parents data type list
57   /*!
58     \param type const char* arguments
59     \return a data type list 
60   */
61   virtual SALOME_DataTypeCatalog::ListOfDataTypeName* 
62   GetDataTypeParents(const char* type) throw(SALOME_DataTypeCatalog::NotFound);
63
64
65 private:
66  //! method to know if parents type of data_out derived from type_in
67   /*!
68     \param type_in const char* arguments
69     \param data_out const ParserDataType arguments (by value)
70     \return a boolean (true if type_out is derived from type_in)
71   */
72   virtual CORBA::Boolean _explore_parents(const char* type_in,
73                                           ParserDataType& data_out);
74
75
76   //! method to parse the data type catalog
77   /*! 
78     \param file const char* arguments
79     \param datatypelist ListOfParserDataType arguments
80   */
81   virtual void _parse_xml_file(const char* file, 
82                                ListOfParserDataType& datatypelist);
83
84
85  //! method to verify data type content
86   /*!
87     \param datatypelist ListOfParserDataType arguments
88     \return true if verfication is OK
89   */
90   virtual bool _verify_data_type(ListOfParserDataType datatypelist);
91
92
93  //! method to parse arguments to get general and personal catalog files
94   /*!
95     \param argc int arguments
96     \param argv char** arguments
97     \param _path_data char** arguments
98     \return true if parsing is OK
99   */
100   virtual bool _parseArguments(int argc, char **argv, char **_path_data);
101
102
103   // will contain the path to the data type catalog
104   char* _path_datatype;
105
106
107   //will contain the informations on the data type catalog(after parsing)
108   ListOfParserDataType _datatype_list ;
109 };
110
111 #endif // DATATYPECATALOG_IMPL_H