CMS 3D CMS Logo

DDLSAX2FileHandler.h
Go to the documentation of this file.
1 #ifndef DETECTORDESCRIPTION_PARSER_DDL_SAX2FILEHANDLER_H
2 #define DETECTORDESCRIPTION_PARSER_DDL_SAX2FILEHANDLER_H
3 
4 #include <stddef.h>
5 #include <xercesc/sax2/Attributes.hpp>
6 #include <map>
7 #include <string>
8 #include <vector>
9 
14 
15 class DDCompactView;
16 
18 
35 {
36  public:
37 
40 
41  void init() ;
42 
43  // -----------------------------------------------------------------------
44  // Handlers for the SAX ContentHandler interface
45  // -----------------------------------------------------------------------
46 
47  void startElement(const XMLCh* const uri, const XMLCh* const localname,
48  const XMLCh* const qname, const Attributes& attrs) override;
49  void endElement(const XMLCh* const uri, const XMLCh* const localname,
50  const XMLCh* const qname) override;
51  void characters (const XMLCh *const chars, const XMLSize_t length) override;
52  void comment (const XMLCh *const chars, const XMLSize_t length ) override;
53 
54  private:
55  virtual const std::string& parent() const;
56  virtual const std::string& self() const;
57 
58  private:
60  void createDDConstants() const;
61 
62  std::vector< std::string > namesMap_;
63  std::vector< size_t > names_;
65 };
66 
67 #endif
DDLSAX2FileHandler(DDCompactView &cpv)
virtual const std::string & parent() const
void endElement(const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname) override
std::vector< std::string > namesMap_
type of data representation of DDCompactView
Definition: DDCompactView.h:90
DDLSAX2FileHandler is the SAX2 Handler for XML files found in the configuration file.
void comment(const XMLCh *const chars, const XMLSize_t length) override
void characters(const XMLCh *const chars, const XMLSize_t length) override
std::vector< size_t > names_
DDCompactView & cpv_
DDLSAX2Handler inherits from Xerces C++ DefaultHandler.
void startElement(const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const Attributes &attrs) override
XERCES_CPP_NAMESPACE::Attributes Attributes
void createDDConstants() const
creates all DDConstant from the evaluator which has been already &#39;filled&#39; in the first scan of the do...