IN2OSM  1.0.1
attribute_iterator< Ch >

Iterator of child attributes of xml_node. More...

#include <rapidxml_iterators.hpp>

Collaboration diagram for attribute_iterator< Ch >:
Collaboration graph

Public Types

typedef xml_attribute< Ch > value_type
 
typedef xml_attribute< Ch > & reference
 
typedef xml_attribute< Ch > * pointer
 
typedef std::ptrdiff_t difference_type
 
typedef std::bidirectional_iterator_tag iterator_category
 

Public Member Functions

 attribute_iterator ()
 
 attribute_iterator (xml_node< Ch > *node)
 
reference operator* () const
 
pointer operator-> () const
 
attribute_iteratoroperator++ ()
 
attribute_iterator operator++ (int)
 
attribute_iteratoroperator-- ()
 
attribute_iterator operator-- (int)
 
bool operator== (const attribute_iterator< Ch > &rhs)
 
bool operator!= (const attribute_iterator< Ch > &rhs)
 

Private Attributes

xml_attribute< Ch > * m_attribute
 

Detailed Description

template<class Ch>
class rapidxml::attribute_iterator< Ch >

Iterator of child attributes of xml_node.

Definition at line 95 of file rapidxml_iterators.hpp.

Member Typedef Documentation

◆ difference_type

typedef std::ptrdiff_t difference_type

Definition at line 103 of file rapidxml_iterators.hpp.

◆ iterator_category

typedef std::bidirectional_iterator_tag iterator_category

Definition at line 104 of file rapidxml_iterators.hpp.

◆ pointer

typedef xml_attribute<Ch>* pointer

Definition at line 102 of file rapidxml_iterators.hpp.

◆ reference

typedef xml_attribute<Ch>& reference

Definition at line 101 of file rapidxml_iterators.hpp.

◆ value_type

Definition at line 100 of file rapidxml_iterators.hpp.

Constructor & Destructor Documentation

◆ attribute_iterator() [1/2]

attribute_iterator ( )
inline

Definition at line 106 of file rapidxml_iterators.hpp.

107  : m_attribute(0)
108  {
109  }
xml_attribute< Ch > * m_attribute

◆ attribute_iterator() [2/2]

attribute_iterator ( xml_node< Ch > *  node)
inline

Definition at line 111 of file rapidxml_iterators.hpp.

112  : m_attribute(node->first_attribute())
113  {
114  }
xml_attribute< Ch > * m_attribute

Member Function Documentation

◆ operator!=()

bool operator!= ( const attribute_iterator< Ch > &  rhs)
inline

Definition at line 161 of file rapidxml_iterators.hpp.

162  {
163  return m_attribute != rhs.m_attribute;
164  }
xml_attribute< Ch > * m_attribute

◆ operator*()

reference operator* ( ) const
inline

Definition at line 116 of file rapidxml_iterators.hpp.

117  {
118  assert(m_attribute);
119  return *m_attribute;
120  }
xml_attribute< Ch > * m_attribute

◆ operator++() [1/2]

attribute_iterator& operator++ ( )
inline

Definition at line 128 of file rapidxml_iterators.hpp.

129  {
130  assert(m_attribute);
131  m_attribute = m_attribute->next_attribute();
132  return *this;
133  }
xml_attribute< Ch > * m_attribute

◆ operator++() [2/2]

attribute_iterator operator++ ( int  )
inline

Definition at line 135 of file rapidxml_iterators.hpp.

136  {
137  attribute_iterator tmp = *this;
138  ++this;
139  return tmp;
140  }

◆ operator--() [1/2]

attribute_iterator& operator-- ( )
inline

Definition at line 142 of file rapidxml_iterators.hpp.

143  {
144  assert(m_attribute && m_attribute->previous_attribute());
145  m_attribute = m_attribute->previous_attribute();
146  return *this;
147  }
xml_attribute< Ch > * m_attribute
Here is the call graph for this function:

◆ operator--() [2/2]

attribute_iterator operator-- ( int  )
inline

Definition at line 149 of file rapidxml_iterators.hpp.

150  {
151  attribute_iterator tmp = *this;
152  ++this;
153  return tmp;
154  }

◆ operator->()

pointer operator-> ( ) const
inline

Definition at line 122 of file rapidxml_iterators.hpp.

123  {
124  assert(m_attribute);
125  return m_attribute;
126  }
xml_attribute< Ch > * m_attribute

◆ operator==()

bool operator== ( const attribute_iterator< Ch > &  rhs)
inline

Definition at line 156 of file rapidxml_iterators.hpp.

157  {
158  return m_attribute == rhs.m_attribute;
159  }
xml_attribute< Ch > * m_attribute

Member Data Documentation

◆ m_attribute

xml_attribute<Ch>* m_attribute
private

Definition at line 168 of file rapidxml_iterators.hpp.


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