 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
17 #ifndef OptionsLoader_h
18 #define OptionsLoader_h
26 #include <xercesc/sax/HandlerBase.hpp>
27 #include <xercesc/sax/AttributeList.hpp>
28 #include <xercesc/sax/SAXParseException.hpp>
29 #include <xercesc/sax/SAXException.hpp>
67 XERCES_CPP_NAMESPACE::AttributeList& attributes);
97 void warning(
const XERCES_CPP_NAMESPACE::SAXParseException& exception);
104 void error(
const XERCES_CPP_NAMESPACE::SAXParseException& exception);
111 void fatalError(
const XERCES_CPP_NAMESPACE::SAXParseException& exception);
134 void setValue(
const std::string& key, std::string& value);
146 bool setSecure(
const std::string& name,
const std::string& value)
const;
bool setSecure(const std::string &name, const std::string &value) const
Tries to set the named option to the given value.
void warning(const XERCES_CPP_NAMESPACE::SAXParseException &exception)
Called on an XML-warning.
void error(const XERCES_CPP_NAMESPACE::SAXParseException &exception)
Called on an XML-error.
OptionsLoader(const bool routeOnly=false)
Constructor.
virtual void startElement(const XMLCh *const name, XERCES_CPP_NAMESPACE::AttributeList &attributes)
Called on the occurence of the beginning of a tag.
std::string myItem
The name of the currently parsed option.
bool myRootOnly
The information whether only the root element should be parsed.
bool errorOccurred() const
Returns the information whether an error occurred.
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)
bool myError
The information whether an error occurred.
A SAX-Handler for loading options.
std::string myValue
The currently read characters string.
void setValue(const std::string &key, std::string &value)
Tries to set the named option to the given value.
void fatalError(const XERCES_CPP_NAMESPACE::SAXParseException &exception)
Called on an XML-fatal error.
OptionsCont & myOptions
The options to fill.
void endElement(const XMLCh *const name)
Called on the end of an element.
OptionsLoader & operator=(const OptionsLoader &s)