Ipelib
ipe::XmlAttributes Class Reference

#include <ipexml.h>

Public Types

typedef Map::const_iterator const_iterator

Public Member Functions

const_iterator begin () const
const_iterator end () const
 XmlAttributes ()
void clear ()
String operator[] (String str) const
bool has (String str) const
bool has (String str, String &val) const
void add (String key, String val)
void setSlash ()
bool slash () const

Detailed Description

Stores attributes of an XML tag.

Member Typedef Documentation

◆ const_iterator

typedef Map::const_iterator ipe::XmlAttributes::const_iterator

Iterator for (key, value) pairs.

Constructor & Destructor Documentation

◆ XmlAttributes()

XmlAttributes::XmlAttributes ( )

Constructor for an empty collection.

Member Function Documentation

◆ begin()

const_iterator ipe::XmlAttributes::begin ( ) const
inline

Return const iterator for first attribute.

◆ end()

const_iterator ipe::XmlAttributes::end ( ) const
inline

Return const iterator for end of attributes.

◆ clear()

void XmlAttributes::clear ( )

Remove all attributes.

Referenced by ipe::XmlParser::parseAttributes().

◆ operator[]()

String XmlAttributes::operator[] ( String str) const

Return attribute with given key.

Returns an empty string if no attribute with this key exists.

References ipe::String::find().

◆ has() [1/2]

◆ has() [2/2]

bool XmlAttributes::has ( String str,
String & val ) const

Check whether attribute exists, set val if so.

References ipe::String::find().

◆ add()

void XmlAttributes::add ( String key,
String val )

Add a new attribute.

Referenced by ipe::XmlParser::parseAttributes().

◆ setSlash()

void ipe::XmlAttributes::setSlash ( )
inline

Set that the tag contains the final /.

Referenced by ipe::XmlParser::parseAttributes().

◆ slash()

bool ipe::XmlAttributes::slash ( ) const
inline

The documentation for this class was generated from the following files: