vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DynamicMenu_XMLPart.h
Go to the documentation of this file.
1 #include <xercesc/framework/LocalFileFormatTarget.hpp>
2 #include <xercesc/parsers/AbstractDOMParser.hpp>
3 #include <xercesc/dom/DOMErrorHandler.hpp>
4 #include <xercesc/util/XMLString.hpp>
5 #include <xercesc/dom/DOMLocator.hpp>
6 #include <xercesc/util/XMLString.hpp>
7 #include <xercesc/dom/DOMImplementation.hpp>
8 #include <xercesc/dom/DOMImplementationRegistry.hpp>
9 #include <xercesc/dom/DOMImplementationLS.hpp>
10 #include <xercesc/dom/DOMBuilder.hpp>
11 #include <xercesc/framework/MemBufInputSource.hpp>
12 #include <xercesc/framework/Wrapper4InputSource.hpp>
13 
14 #if defined(XERCES_NEW_IOSTREAMS)
15 #include <iostream>
16 #else
17 #include <iostream.h>
18 #endif
19 
20 
21 namespace APMenu
22 {
23 
24 
25  // ---------------------------------------------------------------------------
26  // Simple error handler deriviative to install on parser
27  // ---------------------------------------------------------------------------
28  class MenuLoaderErrorHandler : public XERCES_CPP_NAMESPACE_QUALIFIER DOMErrorHandler
29  {
30  public:
33 
34  // Getter methods
35  bool getSawErrors() const;
36 
37  // Implementation of the DOM ErrorHandler interface
38  bool handleError(const XERCES_CPP_NAMESPACE_QUALIFIER DOMError& domError);
39  void resetErrors();
40 
41  private :
42  // Unimplemented constructors and operators
44  void operator=(const MenuLoaderErrorHandler&);
45 
46 
47  // -----------------------------------------------------------------------
48  // Private data members
49  //
50  // fSawErrors
51  // This is set if we get any errors, and is queryable via a getter
52  // method. Its used by the main code to suppress output if there are
53  // errors.
54  // -----------------------------------------------------------------------
55  bool fSawErrors;
56  };
57 
59  return fSawErrors;
60  }
61 
62 
63 }