CMS 3D CMS Logo

List of all members | Public Member Functions
DDLSAX2ExpressionHandler Class Reference

DDLSAX2ExpressionHandler is the first pass SAX2 Handler for XML files found in the configuration file. More...

#include <DDLSAX2ExpressionHandler.h>

Inheritance diagram for DDLSAX2ExpressionHandler:
DDLSAX2FileHandler DDLSAX2Handler

Public Member Functions

 DDLSAX2ExpressionHandler (DDCompactView &cpv)
 
void endElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname) override
 
void startElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const Attributes &attrs) override
 
 ~DDLSAX2ExpressionHandler ()
 
- Public Member Functions inherited from DDLSAX2FileHandler
void characters (const XMLCh *const chars, const XMLSize_t length) override
 
void comment (const XMLCh *const chars, const XMLSize_t length) override
 
 DDLSAX2FileHandler (DDCompactView &cpv)
 
void endElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname) override
 
void init ()
 
void startElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const Attributes &attrs) override
 
 ~DDLSAX2FileHandler ()
 
- Public Member Functions inherited from DDLSAX2Handler
 DDLSAX2Handler ()
 
virtual void dumpStats (const std::string &fname)
 
virtual void error (const SAXParseException &exception) override
 
virtual void fatalError (const SAXParseException &exception) override
 
unsigned int getAttrCount () const
 Get the count of attributes processed so far. More...
 
unsigned int getCharacterCount () const
 Get the count of characters processed so far. More...
 
unsigned int getElementCount () const
 Get the count of elements processed so far. More...
 
bool getSawErrors () const
 Did the XML parser see any errors? More...
 
unsigned int getSpaceCount () const
 Get the count of spaces processed so far. More...
 
virtual void ignorableWhitespace (const XMLCh *const chars, const XMLSize_t length) override
 
virtual void resetDocument () override
 
virtual void setNameSpace (const std::string &nms)
 
virtual void setUserNS (bool userns)
 
virtual void warning (const SAXParseException &exception) override
 
 ~DDLSAX2Handler ()
 

Additional Inherited Members

- Public Types inherited from DDLSAX2Handler
typedef XERCES_CPP_NAMESPACE::Attributes Attributes
 
typedef XERCES_CPP_NAMESPACE::SAXParseException SAXParseException
 
- Protected Attributes inherited from DDLSAX2Handler
XMLSize_t attrCount_
 
XMLSize_t characterCount_
 
XMLSize_t elementCount_
 
std::string nmspace_
 
bool sawErrors_
 
XMLSize_t spaceCount_
 
bool userNS_
 

Detailed Description

DDLSAX2ExpressionHandler is the first pass SAX2 Handler for XML files found in the configuration file.

Author
Michael Case

DDLSAX2ExpressionHandler.h - description

begin: Mon Feb 25, 2002

This processes only ConstantsSection/Parameter elements so there is no need to make it as elaborate as the second pass parser.

Definition at line 24 of file DDLSAX2ExpressionHandler.h.

Constructor & Destructor Documentation

DDLSAX2ExpressionHandler::DDLSAX2ExpressionHandler ( DDCompactView cpv)

Definition at line 12 of file DDLSAX2ExpressionHandler.cc.

14 {}
DDLSAX2FileHandler(DDCompactView &cpv)
DDLSAX2ExpressionHandler::~DDLSAX2ExpressionHandler ( void  )

Definition at line 16 of file DDLSAX2ExpressionHandler.cc.

17 {}

Member Function Documentation

void DDLSAX2ExpressionHandler::endElement ( const XMLCh *const  uri,
const XMLCh *const  localname,
const XMLCh *const  qname 
)
overridevirtual

Reimplemented from DDLSAX2Handler.

Definition at line 38 of file DDLSAX2ExpressionHandler.cc.

41 {}
void DDLSAX2ExpressionHandler::startElement ( const XMLCh *const  uri,
const XMLCh *const  localname,
const XMLCh *const  qname,
const Attributes attrs 
)
overridevirtual

Reimplemented from DDLSAX2Handler.

Definition at line 23 of file DDLSAX2ExpressionHandler.cc.

References equals(), ev, DDI::Singleton< I >::instance(), DDLSAX2Handler::nmspace_, AlCaHLTBitMon_QueryRunRegistry::string, toolbox::toString(), and cms::xerces::uStr().

27 {
28  if( XMLString::equals( qname, uStr("Constant").ptr()))
29  {
30  std::string varName = toString(attrs.getValue(uStr("name").ptr()));
31  std::string varValue = toString(attrs.getValue(uStr("value").ptr()));
33  ev.set(nmspace_, varName, varValue);
34  }
35 }
bool ev
static value_type & instance()
std::string toString(const char *format,...)
Definition: xdaq_compat.cc:4
std::string nmspace_
ZStr< XMLCh > uStr(char const *str)
bool equals(const edm::RefToBase< Jet > &j1, const edm::RefToBase< Jet > &j2)