Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:08:22

0001 #ifndef DETECTOR_DESCRIPTION_REGRESSION_TEST_SAXTODOM2_H
0002 #define DETECTOR_DESCRIPTION_REGRESSION_TEST_SAXTODOM2_H
0003 
0004 #include <xercesc/util/XercesDefs.hpp>
0005 #include <map>
0006 #include <string>
0007 #include <vector>
0008 
0009 #include "DataFormats/Math/interface/Graph.h"
0010 #include "DataFormats/Math/interface/GraphWalker.h"
0011 #include "DetectorDescription/RegressionTest/src/TinyDom2.h"
0012 #include "xercesc/sax/SAXParseException.hpp"
0013 #include "xercesc/sax2/Attributes.hpp"
0014 #include "xercesc/sax2/DefaultHandler.hpp"
0015 #include "xercesc/util/XercesVersion.hpp"
0016 
0017 class AttributeList;
0018 
0019 class SaxToDom2 : public XERCES_CPP_NAMESPACE::DefaultHandler {
0020 public:
0021   using Attributes = XERCES_CPP_NAMESPACE::Attributes;
0022   using SAXParseException = XERCES_CPP_NAMESPACE::SAXParseException;
0023   SaxToDom2();
0024   ~SaxToDom2() override;
0025   void startElement(const XMLCh* uri, const XMLCh* localname, const XMLCh* qname, const Attributes& attrs) override;
0026   void endElement(const XMLCh* uri, const XMLCh* name, const XMLCh* qname) override;
0027   const TinyDom2& dom() const;
0028 
0029   // errors
0030   void error(const SAXParseException& e) override;
0031 
0032 private:
0033   std::vector<Node2> parent_;
0034   TinyDom2 dom_;
0035 };
0036 
0037 #endif