19 #ifndef SUMOSAXAttributesImpl_Xerces_h 20 #define SUMOSAXAttributesImpl_Xerces_h 31 #include <xercesc/sax2/Attributes.hpp> 55 const std::map<int, XMLCh*>& predefinedTags,
56 const std::map<int, std::string>& predefinedTagsMML,
57 const std::string& objectType);
128 long long int getLong(
int id)
const;
158 const std::string& def)
const;
200 double getFloat(
const std::string&
id)
const;
213 const std::string& def)
const;
271 std::string
getName(
int attr)
const;
299 const XERCES_CPP_NAMESPACE::Attributes&
myAttrs;
SUMOSAXAttributesImpl_Xerces & operator=(const SUMOSAXAttributesImpl_Xerces &src)
Invalidated assignment operator.
int getInt(int id) const
Returns the int-value of the named (by its enum-value) attribute.
std::vector< std::string > getAttributeNames() const
Retrieves all attribute names.
RightOfWay getRightOfWay(bool &ok) const
returns rightOfWay method
RightOfWay
algorithms for computing right of way
A class that stores a 2D geometrical boundary.
double getFloat(int id) const
Returns the double-value of the named (by its enum-value) attribute.
const std::map< int, std::string > & myPredefinedTagsMML
Map of attribute ids to their (readable) string-representation.
SUMOSAXAttributes * clone() const
return a new deep-copy attributes object
virtual ~SUMOSAXAttributesImpl_Xerces()
Destructor.
PositionVector getShape(int attr) const
Tries to read given attribute assuming it is a PositionVector.
const AttrMap & myPredefinedTags
Map of attribute ids to their xerces-representation.
Encapsulated SAX-Attributes.
const XERCES_CPP_NAMESPACE::Attributes & myAttrs
The encapsulated attributes.
SumoXMLNodeType getNodeType(bool &ok) const
Returns the value of the named attribute.
bool getBool(int id) const
Returns the bool-value of the named (by its enum-value) attribute.
bool hasAttribute(int id) const
Returns the information whether the named (by its enum-value) attribute is within the current list...
Encapsulated Xerces-SAX-attributes.
std::string getString(int id) const
Returns the string-value of the named (by its enum-value) attribute.
SumoXMLEdgeFunc getEdgeFunc(bool &ok) const
Returns the value of the named attribute.
FringeType getFringeType(bool &ok) const
returns fringe type
std::string getStringSecure(int id, const std::string &def) const
Returns the string-value of the named (by its enum-value) attribute.
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
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.
long long int getLong(int id) const
Returns the long-value of the named (by its enum-value) attribute.
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::string getName(int attr) const
Converts the given attribute id into a man readable string.
const XMLCh * 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.
FringeType
algorithms for computing right of way
RGBColor getColor() const
Returns the value of the named attribute.
Boundary getBoundary(int attr) const
Tries to read given attribute assuming it is a Boundary.