20 #ifndef SUMOSAXAttributesImpl_Cached_h 21 #define SUMOSAXAttributesImpl_Cached_h 36 #include <xercesc/sax2/Attributes.hpp> 60 const std::map<int, std::string>& predefinedTagsMML,
61 const std::string& objectType);
132 long long int getLong(
int id)
const;
162 const std::string& def)
const;
204 double getFloat(
const std::string&
id)
const;
217 const std::string& def)
const;
277 std::string
getName(
int attr)
const;
SumoXMLNodeType getNodeType(bool &ok) const
Returns the value of the named attribute.
std::vector< std::string > getStringVector(int attr) const
Tries to read given attribute assuming it is a string vector.
Encapsulated Xerces-SAX-attributes.
void serialize(std::ostream &os) const
Prints all attribute names and values into the given stream.
long long int getLong(int id) const
Returns the long-value of the named (by its enum-value) attribute.
Boundary getBoundary(int attr) const
Tries to read given attribute assuming it is a Boundary.
A class that stores a 2D geometrical boundary.
RGBColor getColor() const
Returns the value of the named 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.
const std::map< int, std::string > & myPredefinedTagsMML
Map of attribute ids to their (readable) string-representation.
Encapsulated SAX-Attributes.
int getInt(int id) const
Returns the int-value of the named (by its enum-value) attribute.
double getFloat(int id) const
Returns the double-value of the named (by its enum-value) attribute.
virtual ~SUMOSAXAttributesImpl_Cached()
Destructor.
std::string getStringSecure(int id, const std::string &def) const
Returns the string-value of the named (by its enum-value) attribute.
std::string getString(int id) const
Returns the string-value of the named (by its enum-value) attribute.
bool getBool(int id) const
Returns the bool-value of the named (by its enum-value) attribute.
SUMOSAXAttributes * clone() const
return a new deep-copy attributes object
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
SumoXMLEdgeFunc
Numbers representing special SUMO-XML-attribute values for representing edge functions used in netbui...
const char * getAttributeValueSecure(int id) const
Returns Xerces-value of the named attribute.
SumoXMLEdgeFunc getEdgeFunc(bool &ok) const
Returns the value of the named attribute.
SUMOSAXAttributesImpl_Cached(const std::map< std::string, std::string > &attrs, const std::map< int, std::string > &predefinedTagsMML, const std::string &objectType)
Constructor.
std::map< std::string, std::string > myAttrs
The encapsulated attributes.
SUMOSAXAttributesImpl_Cached & operator=(const SUMOSAXAttributesImpl_Cached &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...