26 #include <xercesc/sax2/Attributes.hpp>
51 const std::vector<std::string>& predefinedTagsMML,
52 const std::string& objectType);
79 std::string
getString(
int id,
bool* isPresent =
nullptr)
const;
113 double getFloat(
const std::string&
id)
const;
125 const std::string& def)
const;
135 std::string
getName(
int attr)
const;
Encapsulated SAX-Attributes.
Encapsulated Xerces-SAX-attributes.
std::string getName(int attr) const
Converts the given attribute id into a man readable string.
~SUMOSAXAttributesImpl_Cached()
Destructor.
SUMOSAXAttributesImpl_Cached & operator=(const SUMOSAXAttributesImpl_Cached &src)=delete
Invalidated assignment operator.
std::string getStringSecure(int id, const std::string &def) const
Returns the string-value of the named (by its enum-value) attribute.
std::map< std::string, std::string > myAttrs
The encapsulated attributes.
double getFloat(const std::string &id) const
Returns the double-value of the named attribute.
SUMOSAXAttributesImpl_Cached(const std::map< std::string, std::string > &attrs, const std::vector< std::string > &predefinedTagsMML, const std::string &objectType)
Constructor.
SUMOSAXAttributesImpl_Cached(const SUMOSAXAttributesImpl_Cached &src)=delete
Invalidated copy constructor.
const std::string & getAttributeValueSecure(int id) const
Returns Xerces-value of the named attribute.
void serialize(std::ostream &os) const
Prints all attribute names and values into the given stream.
std::vector< std::string > getAttributeNames() const
Retrieves all attribute names.
std::string getString(int id, bool *isPresent=nullptr) const
Returns the string-value of the named (by its enum-value) attribute.
SUMOSAXAttributes * clone() const
return a new deep-copy attributes object
const std::vector< std::string > & myPredefinedTagsMML
Map of attribute ids to their (readable) string-representation.
bool hasAttribute(int id) const
Returns the information whether the named (by its enum-value) attribute is within the current list.