Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:05:31

0001 #ifndef DETECTOR_DESCRIPTION_PARSER_DDL_SAX2_CONFIG_HANDLER_H
0002 #define DETECTOR_DESCRIPTION_PARSER_DDL_SAX2_CONFIG_HANDLER_H
0003 
0004 #include "DetectorDescription/Parser/interface/DDLSAX2Handler.h"
0005 #include "DetectorDescription/Core/interface/DDName.h"
0006 #include "DetectorDescription/Core/interface/DDCompactView.h"
0007 
0008 #include <vector>
0009 #include <string>
0010 #include <xercesc/sax2/Attributes.hpp>
0011 
0012 /// DDLSAX2ConfigHandler is the handler for the configuration file.
0013 /** @class DDLSAX2ConfigHandler
0014  * @author Michael Case
0015  * 
0016  *  DDLSAX2ConfigHandler.h  -  description
0017  *  -------------------
0018  *  begin: Mon Oct 22 2001
0019  *  email: case@ucdhep.ucdavis.edu
0020  *
0021  *  This handler is used by the DDLParser to process configuration files.
0022  */
0023 class DDLSAX2ConfigHandler : public DDLSAX2Handler {
0024 public:
0025   DDLSAX2ConfigHandler(DDCompactView& cpv);
0026   ~DDLSAX2ConfigHandler() override;
0027 
0028   // -----------------------------------------------------------------------
0029   //  Handlers for the SAX ContentHandler interface
0030   // -----------------------------------------------------------------------
0031   void startElement(const XMLCh* uri, const XMLCh* localname, const XMLCh* qname, const Attributes& attrs) override;
0032 
0033   const std::vector<std::string>& getFileNames() const;
0034   const std::vector<std::string>& getURLs() const;
0035   const std::string getSchemaLocation() const;
0036   const bool doValidation() const;
0037 
0038 private:
0039   bool doValidation_;
0040   std::vector<std::string> files_;
0041   std::vector<std::string> urls_;
0042   std::string schemaLocation_;
0043   DDCompactView& cpv_;
0044 };
0045 
0046 #endif