22 #ifndef SUMOSAXAttributesImpl_Xerces_h
23 #define SUMOSAXAttributesImpl_Xerces_h
38 #include <xercesc/sax2/Attributes.hpp>
62 const std::map<int, XMLCh*>& predefinedTags,
63 const std::map<int, std::string>& predefinedTagsMML,
64 const std::string& objectType);
135 long long int getLong(
int id)
const;
165 const std::string& def)
const;
220 const std::string& def)
const;
280 std::string
getName(
int attr)
const;
302 const XERCES_CPP_NAMESPACE::Attributes&
myAttrs;
SumoXMLEdgeFunc getEdgeFunc(bool &ok) const
Returns the value of the named attribute.
SUMOSAXAttributesImpl_Xerces & operator=(const SUMOSAXAttributesImpl_Xerces &src)
Invalidated assignment operator.
bool hasAttribute(int id) const
Returns the information whether the named (by its enum-value) attribute is within the current list...
std::string getString(int id) const
Returns the string-value of the named (by its enum-value) attribute.
SumoXMLNodeType getNodeType(bool &ok) const
Returns the value of the named attribute.
long long int getLong(int id) const
Returns the long-value of the named (by its enum-value) attribute.
SUMOSAXAttributesImpl_Xerces(const XERCES_CPP_NAMESPACE::Attributes &attrs, const std::map< int, XMLCh * > &predefinedTags, const std::map< int, std::string > &predefinedTagsMML, const std::string &objectType)
Constructor.
bool getBool(int id) const
Returns the bool-value of the named (by its enum-value) attribute.
A class that stores a 2D geometrical boundary.
const std::map< int, std::string > & myPredefinedTagsMML
Map of attribute ids to their (readable) string-representation.
RGBColor getColor() const
Returns the value of the named attribute.
virtual ~SUMOSAXAttributesImpl_Xerces()
Destructor.
const AttrMap & myPredefinedTags
Map of attribute ids to their xerces-representation.
std::string getStringSecure(int id, const std::string &def) const
Returns the string-value of the named (by its enum-value) attribute.
Encapsulated SAX-Attributes.
const XERCES_CPP_NAMESPACE::Attributes & myAttrs
The encapsulated attributes.
SUMOReal getFloat(int id) const
Returns the SUMOReal-value of the named (by its enum-value) attribute.
int getInt(int id) const
Returns the int-value of the named (by its enum-value) attribute.
PositionVector getShape(int attr) const
Tries to read given attribute assuming it is a PositionVector.
std::string getName(int attr) const
Converts the given attribute id into a man readable string.
Encapsulated Xerces-SAX-attributes.
void serialize(std::ostream &os) const
Prints all attribute names and values into the given stream.
Boundary getBoundary(int attr) const
Tries to read given attribute assuming it is a Boundary.
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
std::map< int, XMLCh * > AttrMap
Definition of a map of attribute ids to their xerces-representation.
SumoXMLEdgeFunc
Numbers representing special SUMO-XML-attribute values for representing edge functions used in netbui...
std::vector< std::string > getStringVector(int attr) const
Tries to read given attribute assuming it is a string vector.
const XMLCh * getAttributeValueSecure(int id) const
Returns Xerces-value of the named attribute.