21 #ifndef OptionsLoader_h 22 #define OptionsLoader_h 34 #include <xercesc/sax/HandlerBase.hpp> 35 #include <xercesc/sax/AttributeList.hpp> 36 #include <xercesc/sax/SAXParseException.hpp> 37 #include <xercesc/sax/SAXException.hpp> 75 XERCES_CPP_NAMESPACE::AttributeList& attributes);
105 void warning(
const XERCES_CPP_NAMESPACE::SAXParseException& exception);
112 void error(
const XERCES_CPP_NAMESPACE::SAXParseException& exception);
119 void fatalError(
const XERCES_CPP_NAMESPACE::SAXParseException& exception);
142 void setValue(
const std::string& key, std::string& value);
154 bool setSecure(
const std::string& name,
const std::string& value)
const;
std::string myItem
The name of the currently parsed option.
std::string myValue
The currently read characters string.
void endElement(const XMLCh *const name)
Called on the end of an element.
OptionsCont & myOptions
The options to fill.
void error(const XERCES_CPP_NAMESPACE::SAXParseException &exception)
Called on an XML-error.
bool setSecure(const std::string &name, const std::string &value) const
Tries to set the named option to the given value.
bool myError
The information whether an error occured.
OptionsLoader(const bool routeOnly=false)
Constructor.
bool myRootOnly
The information whether only the root element should be parsed.
void setValue(const std::string &key, std::string &value)
Tries to set the named option to the given value.
virtual void startElement(const XMLCh *const name, XERCES_CPP_NAMESPACE::AttributeList &attributes)
Called on the occurence of the beginning of a tag.
void fatalError(const XERCES_CPP_NAMESPACE::SAXParseException &exception)
Called on an XML-fatal error.
bool errorOccured() const
Returns the information whether an error occured.
A SAX-Handler for loading options.
void warning(const XERCES_CPP_NAMESPACE::SAXParseException &exception)
Called on an XML-warning.
const std::string & getItem() const
Returns the last item read.
void characters(const XMLCh *const chars, const XERCES3_SIZE_t length)
Called on the occurence of character data.
A storage for options typed value containers)
OptionsLoader & operator=(const OptionsLoader &s)