CMS 3D CMS Logo

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
DDLSAX2FileHandler::endElement
void endElement(const XMLCh *uri, const XMLCh *localname, const XMLCh *qname) override
Definition: DDLSAX2FileHandler.cc:56
DDLSAX2Handler.h
DDLElementRegistry
The main class for processing parsed elements.
Definition: DDLElementRegistry.h:23
DDLSAX2FileHandler::registry
DDLElementRegistry & registry()
Definition: DDLSAX2FileHandler.h:55
DDCompactView.h
DDLSAX2FileHandler::cpv_
DDCompactView & cpv_
Definition: DDLSAX2FileHandler.h:64
DDLSAX2FileHandler
DDLSAX2FileHandler is the SAX2 Handler for XML files found in the configuration file.
Definition: DDLSAX2FileHandler.h:35
DDLSAX2FileHandler::~DDLSAX2FileHandler
~DDLSAX2FileHandler() override
Definition: DDLSAX2FileHandler.cc:22
DDLSAX2Handler
DDLSAX2Handler inherits from Xerces C++ DefaultHandler.
Definition: DDLSAX2Handler.h:27
DDLSAX2FileHandler::characters
void characters(const XMLCh *chars, XMLSize_t length) override
Definition: DDLSAX2FileHandler.cc:84
DDCompactView
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
DDLSAX2FileHandler::DDLSAX2FileHandler
DDLSAX2FileHandler(DDCompactView &cpv, DDLElementRegistry &)
Definition: DDLSAX2FileHandler.cc:13
DDLSAX2FileHandler::comment
void comment(const XMLCh *chars, XMLSize_t length) override
Definition: DDLSAX2FileHandler.cc:97
DDLSAX2FileHandler::init
void init()
Definition: DDLSAX2FileHandler.cc:17
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DDLSAX2FileHandler::parent
virtual const std::string & parent() const
Definition: DDLSAX2FileHandler.cc:103
DDLElementRegistry.h
DDLSAX2FileHandler::namesMap_
std::vector< std::string > namesMap_
Definition: DDLSAX2FileHandler.h:62
DDLSAX2Handler::Attributes
XERCES_CPP_NAMESPACE::Attributes Attributes
Definition: DDLSAX2Handler.h:29
DDName.h
DDLSAX2FileHandler::startElement
void startElement(const XMLCh *uri, const XMLCh *localname, const XMLCh *qname, const Attributes &attrs) override
Definition: DDLSAX2FileHandler.cc:24
DDLSAX2FileHandler::names_
std::vector< size_t > names_
Definition: DDLSAX2FileHandler.h:63
DDLSAX2FileHandler::registry_
DDLElementRegistry & registry_
Definition: DDLSAX2FileHandler.h:65
DDLSAX2FileHandler::createDDConstants
void createDDConstants() const
creates all DDConstant from the evaluator which has been already 'filled' in the first scan of the do...
Definition: DDLSAX2FileHandler.cc:99