CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DDLSAX2FileHandler.h
Go to the documentation of this file.
1 #ifndef DETECTOR_DESCRIPTION_PARSER_DDL_SAX2_FILE_HANDLER_H
2 #define DETECTOR_DESCRIPTION_PARSER_DDL_SAX2_FILE_HANDLER_H
3 
4 #include <cstddef>
5 #include <map>
6 #include <string>
7 #include <vector>
8 #include <xercesc/sax2/Attributes.hpp>
9 
14 
15 class DDCompactView;
16 class DDLElementRegistry;
17 
19 
36 public:
38  ~DDLSAX2FileHandler() override;
39 
40  void init();
41 
42  // -----------------------------------------------------------------------
43  // Handlers for the SAX ContentHandler interface
44  // -----------------------------------------------------------------------
45 
46  void startElement(const XMLCh* uri, const XMLCh* localname, const XMLCh* qname, const Attributes& attrs) override;
47  void endElement(const XMLCh* uri, const XMLCh* localname, const XMLCh* qname) override;
48  void characters(const XMLCh* chars, XMLSize_t length) override;
49  void comment(const XMLCh* chars, XMLSize_t length) override;
50 
52  void createDDConstants() const;
53 
54 protected:
56 
57 private:
58  virtual const std::string& parent() const;
59  virtual const std::string& self() const;
60 
61 private:
62  std::vector<std::string> namesMap_;
63  std::vector<size_t> names_;
66 };
67 
68 #endif
virtual const std::string & parent() const
void comment(const XMLCh *chars, XMLSize_t length) override
DDLElementRegistry & registry_
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
DDLSAX2FileHandler is the SAX2 Handler for XML files found in the configuration file.
~DDLSAX2FileHandler() override
std::vector< size_t > names_
DDLElementRegistry & registry()
std::vector< std::string > namesMap_
DDCompactView & cpv_
void endElement(const XMLCh *uri, const XMLCh *localname, const XMLCh *qname) override
XERCES_CPP_NAMESPACE::Attributes Attributes
DDLSAX2Handler inherits from Xerces C++ DefaultHandler.
The main class for processing parsed elements.
void startElement(const XMLCh *uri, const XMLCh *localname, const XMLCh *qname, const Attributes &attrs) override
DDLSAX2FileHandler(DDCompactView &cpv, DDLElementRegistry &)
void characters(const XMLCh *chars, XMLSize_t length) override
void createDDConstants() const
creates all DDConstant from the evaluator which has been already &#39;filled&#39; in the first scan of the do...