1 // SALOME DataTypeCatalog : catalog of data types
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : SALOME_DataTypeCatalog_impl.hxx
25 // Author : Estelle Deville
29 #ifndef DATATYPECATALOG_IMPL_H
30 #define DATATYPECATALOG_IMPL_H
32 #include "utilities.h"
33 #include "SALOME_DataTypeCatalog_Handler.hxx"
34 #include <SALOMEconfig.h>
35 #include CORBA_SERVER_HEADER(SALOME_DataTypeCatalog)
37 class SALOME_DataTypeCatalogImpl: public POA_SALOME_DataTypeCatalog::DataCatalog,
38 public PortableServer::RefCountServantBase
41 //! standard constructor
42 SALOME_DataTypeCatalogImpl(int argc, char** argv);
44 //! standard destructor
45 virtual ~SALOME_DataTypeCatalogImpl();
47 //! method to get a data type list
49 \return a data type list
51 virtual SALOME_DataTypeCatalog::ListOfDataTypeName* GetDataTypeList();
53 //! method to know if type_out is derived from type_in
55 \param type_in const char* arguments
56 \param type_out const char* arguments
57 \return a boolean (true if type_out is derived from type_in)
59 virtual CORBA::Boolean isDerivedFrom(const char* type_in, const char* type_out) throw(SALOME_DataTypeCatalog::NotFound);
61 //! method to get the name of the interface to acces the data in read mode
63 \param type const char* arguments
64 \return the read interface name
66 virtual char* GetDataInterfaceRead(const char* type) throw(SALOME_DataTypeCatalog::NotFound);
69 //! method to get the name of the interface to acces the data in write mode
71 \param type const char* arguments
72 \return the write interface name
74 virtual char* GetDataInterfaceWrite(const char* type) throw(SALOME_DataTypeCatalog::NotFound);
76 //! method to get parents data type list
78 \param type const char* arguments
79 \return a data type list
81 virtual SALOME_DataTypeCatalog::ListOfDataTypeName*
82 GetDataTypeParents(const char* type) throw(SALOME_DataTypeCatalog::NotFound);
86 //! method to know if parents type of data_out derived from type_in
88 \param type_in const char* arguments
89 \param data_out const ParserDataType arguments (by value)
90 \return a boolean (true if type_out is derived from type_in)
92 virtual CORBA::Boolean _explore_parents(const char* type_in,
93 ParserDataType& data_out);
96 //! method to parse the data type catalog
98 \param file const char* arguments
99 \param datatypelist ListOfParserDataType arguments
101 virtual void _parse_xml_file(const char* file,
102 ListOfParserDataType& datatypelist);
105 //! method to verify data type content
107 \param datatypelist ListOfParserDataType arguments
108 \return true if verfication is OK
110 virtual bool _verify_data_type(ListOfParserDataType datatypelist);
113 //! method to parse arguments to get general and personal catalog files
115 \param argc int arguments
116 \param argv char** arguments
117 \param _path_data char** arguments
118 \return true if parsing is OK
120 virtual bool _parseArguments(int argc, char **argv, char **_path_data);
123 // will contain the path to the data type catalog
124 char* _path_datatype;
127 //will contain the informations on the data type catalog(after parsing)
128 ListOfParserDataType _datatype_list ;
131 #endif // DATATYPECATALOG_IMPL_H