Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
arxml_node_iterator.h
1#ifndef ARXML_NODE_ITERATOR
2#define ARXML_NODE_ITERATOR
3
4#include <utility>
5#include "./arxml_node.h"
6
7namespace arxml
8{
12 {
13 private:
14 pugi::xml_node_iterator mIterator;
15
16 public:
17 ArxmlNodeIterator() = delete;
18
21 explicit ArxmlNodeIterator(pugi::xml_node_iterator iterator) : mIterator{iterator}
22 {
23 }
24
25 inline bool operator==(const ArxmlNodeIterator& rhs) const
26 {
27 return mIterator == rhs.mIterator;
28 }
29
30 inline bool operator!=(const ArxmlNodeIterator& rhs) const
31 {
32 return mIterator != rhs.mIterator;
33 }
34
35 inline ArxmlNode operator*() const
36 {
37 pugi::xml_node _xmlNode(*mIterator);
38 ArxmlNode _result(std::move(_xmlNode));
39 return _result;
40 }
41
42 inline ArxmlNodeIterator& operator++()
43 {
44 ++mIterator;
45 return *this;
46 }
47
48 inline ArxmlNodeIterator operator++(int)
49 {
50 ArxmlNodeIterator _retval = *this;
51 ++mIterator;
52 return _retval;
53 }
54
55 inline ArxmlNodeIterator& operator--()
56 {
57 --mIterator;
58 return *this;
59 }
60
61 inline ArxmlNodeIterator operator--(int)
62 {
63 ArxmlNodeIterator _retval = *this;
64 --mIterator;
65 return _retval;
66 }
67 };
68}
69
70#endif
Read-only access iterator for a range of ARXML nodes.
Definition: arxml_node_iterator.h:12
ArxmlNodeIterator(pugi::xml_node_iterator iterator)
Constructor.
Definition: arxml_node_iterator.h:21
AUTOSAR XML (ARXML) configuration files utilities namespace.
Definition: arxml_node.cpp:6