1
1
/*
2
2
* ViSP, open source Visual Servoing Platform software.
3
- * Copyright (C) 2005 - 2023 by Inria. All rights reserved.
3
+ * Copyright (C) 2005 - 2024 by Inria. All rights reserved.
4
4
*
5
5
* This software is free software; you can redistribute it and/or modify
6
6
* it under the terms of the GNU General Public License as published by
36
36
\brief Tools to simplify the creation of xml parser based on the libXML2
37
37
*/
38
38
39
- #ifndef vpXmlParser_HH
40
- #define vpXmlParser_HH
39
+ #ifndef VP_XML_PARSER_H
40
+ #define VP_XML_PARSER_H
41
41
42
42
#include < visp3/core/vpConfig.h>
43
43
44
44
#ifdef VISP_HAVE_XML2
45
45
46
46
#include < visp3/core/vpException.h>
47
47
48
- #include < libxml/parser.h>
49
-
50
48
#include < iomanip>
51
49
#include < map>
52
50
#include < sstream>
53
51
#include < string.h>
54
52
#include < string>
55
53
#include < typeinfo>
56
54
55
+ struct _xmlDoc ;
56
+ typedef _xmlDoc xmlDoc;
57
+ typedef xmlDoc *xmlDocPtr;
58
+
59
+ struct _xmlNode ;
60
+ typedef _xmlNode xmlNode;
61
+ typedef xmlNode *xmlNodePtr;
62
+
57
63
BEGIN_VISP_NAMESPACE
58
64
/* !
59
65
\class vpXmlParser
@@ -93,6 +99,8 @@ BEGIN_VISP_NAMESPACE
93
99
A class to parse this document is declared as follows:
94
100
95
101
\code
102
+ #include <libxml/parser.h>
103
+
96
104
class vpDataParser: public vpXmlParser
97
105
{
98
106
private:
@@ -105,7 +113,7 @@ BEGIN_VISP_NAMESPACE
105
113
range,
106
114
step,
107
115
size_filter
108
- }dataToParse
116
+ } dataToParse
109
117
110
118
vpDataParser(){
111
119
nodeMap["config"] = config;
@@ -117,8 +125,7 @@ BEGIN_VISP_NAMESPACE
117
125
virtual void writeMainClass(xmlNodePtr node);
118
126
virtual void readMainClass(xmlDocPtr doc, xmlNodePtr node);
119
127
120
- // additionals methods specific to the data to parse
121
- // such as: accessors
128
+ // additional methods specific to the data to parse such as: accessors
122
129
}
123
130
\endcode
124
131
@@ -184,7 +191,7 @@ class VISP_EXPORT vpXmlParser
184
191
185
192
As the content of the function depends on the structure of the file to
186
193
read, data name, data types and data values, it has to be reimplemented
187
- for every type of filenam
194
+ for every type of filename.
188
195
189
196
\param doc : a pointer representing the document
190
197
\param node : the root node of the document
@@ -264,7 +271,7 @@ class VISP_EXPORT vpXmlParser
264
271
dataToParse["size_filter"] = 3;
265
272
\endcode
266
273
267
- Or, you can use keyzord instead of number as key but it implies to declare
274
+ Or, you can use keyword instead of number as key but it implies to declare
268
275
in the child class an enumeration type of the name. For example:
269
276
270
277
\code
@@ -307,7 +314,7 @@ class VISP_EXPORT vpXmlParser
307
314
static function vpXmlParser::cleanup() that calls xmlCleanupParser() that
308
315
could be called just before exit().
309
316
*/
310
- static void cleanup () { xmlCleanupParser (); }
317
+ static void cleanup ();
311
318
// @}
312
319
};
313
320
END_VISP_NAMESPACE
0 commit comments