Salome HOME
Issue 0020194: EDF 977 ALL: Get rid of warnings PACKAGE_VERSION already defined
[modules/kernel.git] / src / ModuleCatalog / SALOME_ModuleCatalog_Parser.hxx
index c23dde27ef3b3a9e7ba92bc500217f3cfceef159..c0548b485801fc3a81cc8d56959a3c01d7e711fe 100644 (file)
@@ -1,26 +1,25 @@
-//  SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules
+//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-// 
-//  This library is free software; you can redistribute it and/or 
-//  modify it under the terms of the GNU Lesser General Public 
-//  License as published by the Free Software Foundation; either 
-//  version 2.1 of the License. 
-// 
-//  This library is distributed in the hope that it will be useful, 
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-//  Lesser General Public License for more details. 
-// 
-//  You should have received a copy of the GNU Lesser General Public 
-//  License along with this library; if not, write to the Free Software 
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-// 
-//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
 //
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
 //
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+//  SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules
 //  File   : SALOME_ModuleCatalog_Parser.hxx
 //  Author : Estelle Deville
 //  Module : SALOME
@@ -31,6 +30,7 @@
 
 #include <string>
 #include <vector>
+#include <map>
 
 // Type Definitions
 struct ParserPathPrefix
@@ -95,23 +95,43 @@ struct ParserComponent
   std::string         constraint;
   ParserInterfaces    interfaces;
   ParserPathPrefixes  prefixes;
-  bool                implementationType;
+  std::string         implementationType;
+  std::string         implementationName;
   std::string         version;
   std::string         comment;
 };
 
 typedef std::vector<ParserComponent> ParserComponents ;
 
-#ifdef WRITE_CATA_COMPONENT
-// contains all the paths and the computers defined in the catalog 
-       ParserPathPrefixes  _pathList;
-  
-// contains all the modules defined in the catalog
-       ParserComponents    _moduleList; 
-#else
-extern ParserPathPrefixes _pathList;
-extern ParserComponents   _moduleList; 
-#endif
+struct ParserType
+{
+  std::string         name;
+  std::string         kind;
+  std::string         id;
+  std::string         content;
+  std::vector<std::string> bases;
+  std::vector< std::pair<std::string,std::string> > members;
+};
+typedef std::map<std::string,ParserType> ParserTypes ;
+typedef std::map<std::string,ParserType&> RefTypes ;
+typedef std::vector<ParserType> TypeList ;
 
+struct ParserSequence:public ParserType
+{
+  ParserSequence(){kind="sequence";}
+};
+typedef std::map<std::string,ParserSequence> ParserSequences ;
+
+struct ParserObjref:public ParserType
+{
+  ParserObjref(){kind="objref";}
+};
+typedef std::map<std::string,ParserObjref> ParserObjrefs ;
+
+struct ParserStruct:public ParserType
+{
+  ParserStruct(){kind="struct";}
+};
+typedef std::map<std::string,ParserStruct> ParserStructs ;
 
 #endif // SALOME_CATALOG_PARSER_H