Salome HOME
2e6eaff655bd67d1be3ad08a9fb0bda3d1ef04bb
[modules/kernel.git] / src / ModuleCatalog / SALOME_ModuleCatalog_Handler.hxx
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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.
10 //
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.
15 //
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
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //  SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules
23 //  File   : SALOME_ModuleCatalog_Handler.hxx
24 //  Author : Estelle Deville
25 //  Module : SALOME
26 //  $Header$
27 //
28 #ifndef SALOME_CATALOG_HANDLER_H
29 #define SALOME_CATALOG_HANDLER_H
30
31 #include "SALOME_ModuleCatalog.hxx"
32
33 #include "SALOME_ModuleCatalog_Parser.hxx"
34
35 #include <string>
36 #include <stack>
37 #include <map>
38
39 #include <libxml/parser.h>
40
41 class MODULECATALOG_EXPORT SALOME_ModuleCatalog_Handler
42 {
43 public:
44   //! standard constructor
45   SALOME_ModuleCatalog_Handler(ParserPathPrefixes& pathList,ParserComponents& moduleList,ParserTypes& typeMap,TypeList& typeList);
46
47   //! standard destructor
48   virtual ~SALOME_ModuleCatalog_Handler();
49
50   void ProcessXmlDocument(xmlDocPtr theDoc);
51  
52 private:
53
54   const char *test_path_prefix_name ;
55   const char *test_computer_name ;
56   const char *test_computer_list ;
57   const char *test_path_prefix ;
58   const char *test_path_prefix_list;
59
60   const char *test_component_name;
61   const char *test_component_username;
62   const char *test_component_type ;
63   const char *test_component_multistudy ;
64   const char *test_component_icon ;
65   const char *test_component_impltype;
66   const char *test_component_implname;
67   const char *test_component_version;
68   const char *test_component_comment;
69   
70   const char *test_interface_name;
71   
72   const char *test_service_name;
73   const char *test_defaultservice;
74   const char *test_typeofnode;
75   
76   const char *test_inParameter_type;
77   const char *test_inParameter_name;
78   const char *test_inParameter;
79   const char *test_inParameter_list;
80   
81   const char *test_outParameter_type;
82   const char *test_outParameter_name;
83   const char *test_outParameter;
84   const char *test_outParameter_list;
85   
86   const char *test_inDataStreamParameter_type;
87   const char *test_inDataStreamParameter_name;
88   const char *test_inDataStreamParameter_dependency;
89   const char *test_inDataStreamParameter;
90   const char *test_inDataStreamParameter_list;
91   
92   const char *test_outDataStreamParameter_type;
93   const char *test_outDataStreamParameter_name;
94   const char *test_outDataStreamParameter_dependency;
95   const char *test_outDataStreamParameter;
96   const char *test_outDataStreamParameter_list;
97   
98   const char *test_service;
99   const char *test_service_list;
100   const char *test_interface_list;
101   const char *test_constraint;
102   
103   const char *test_component_list;
104   const char *test_component;
105   
106   ParserPathPrefix _pathPrefix;
107   
108   ParserComponent _aModule;
109   
110   ParserPathPrefixes&  _pathList;
111   ParserComponents&    _moduleList;
112   
113   ParserInterfaces _interfaceList;
114   ParserInterface  _aInterface;
115   
116   ParserServices   _serviceList;
117   ParserService    _aService;
118
119   ParserParameters _inParamList;
120   ParserParameter  _inParam;
121   
122   ParserParameters _outParamList;
123   ParserParameter  _outParam;
124   
125   ParserDataStreamParameters _inDataStreamParamList;
126   ParserDataStreamParameter  _inDataStreamParam;
127   
128   ParserDataStreamParameters _outDataStreamParamList;
129   ParserDataStreamParameter  _outDataStreamParam;
130
131   ParserTypes& _typeMap;
132   TypeList& _typeList;
133
134   ParserSequences _sequenceMap;
135   ParserObjrefs _objrefMap;
136   ParserStructs _structMap;
137 };
138
139 #endif // SALOME_CATALOG_HANDLER_H