1 // File: SALOME_DataTypeCatalog_impl.hxx
2 // Created: Mon Aug 08 2001
3 // Author: Estelle Deville
5 // Copyright : CEA/DEN/DMSS/LGLS
9 #ifndef DATATYPECATALOG_IMPL_H
10 #define DATATYPECATALOG_IMPL_H
12 #include "utilities.h"
13 #include "SALOME_DataTypeCatalog_Handler.hxx"
14 #include <SALOMEconfig.h>
15 #include CORBA_SERVER_HEADER(SALOME_DataTypeCatalog)
17 class SALOME_DataTypeCatalogImpl: public POA_SALOME_DataTypeCatalog::DataCatalog,
18 public PortableServer::RefCountServantBase
21 //! standard constructor
22 SALOME_DataTypeCatalogImpl(int argc, char** argv);
24 //! standard destructor
25 virtual ~SALOME_DataTypeCatalogImpl();
27 //! method to get a data type list
29 \return a data type list
31 virtual SALOME_DataTypeCatalog::ListOfDataTypeName* GetDataTypeList();
33 //! method to know if type_out is derived from type_in
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)
39 virtual CORBA::Boolean isDerivedFrom(const char* type_in, const char* type_out) throw(SALOME_DataTypeCatalog::NotFound);
41 //! method to get the name of the interface to acces the data in read mode
43 \param type const char* arguments
44 \return the read interface name
46 virtual char* GetDataInterfaceRead(const char* type) throw(SALOME_DataTypeCatalog::NotFound);
49 //! method to get the name of the interface to acces the data in write mode
51 \param type const char* arguments
52 \return the write interface name
54 virtual char* GetDataInterfaceWrite(const char* type) throw(SALOME_DataTypeCatalog::NotFound);
56 //! method to get parents data type list
58 \param type const char* arguments
59 \return a data type list
61 virtual SALOME_DataTypeCatalog::ListOfDataTypeName*
62 GetDataTypeParents(const char* type) throw(SALOME_DataTypeCatalog::NotFound);
66 //! method to know if parents type of data_out derived from type_in
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)
72 virtual CORBA::Boolean _explore_parents(const char* type_in,
73 ParserDataType& data_out);
76 //! method to parse the data type catalog
78 \param file const char* arguments
79 \param datatypelist ListOfParserDataType arguments
81 virtual void _parse_xml_file(const char* file,
82 ListOfParserDataType& datatypelist);
85 //! method to verify data type content
87 \param datatypelist ListOfParserDataType arguments
88 \return true if verfication is OK
90 virtual bool _verify_data_type(ListOfParserDataType datatypelist);
93 //! method to parse arguments to get general and personal catalog files
95 \param argc int arguments
96 \param argv char** arguments
97 \param _path_data char** arguments
98 \return true if parsing is OK
100 virtual bool _parseArguments(int argc, char **argv, char **_path_data);
103 // will contain the path to the data type catalog
104 char* _path_datatype;
107 //will contain the informations on the data type catalog(after parsing)
108 ListOfParserDataType _datatype_list ;
111 #endif // DATATYPECATALOG_IMPL_H