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