IOLink  IOL_v1.6.1_release
MetadataNodeIterator.h
1 #pragma once
2 
3 #include <memory>
4 
5 #include <iolink/IOLinkAPI.h>
6 
7 namespace iolink
8 {
9 class MetadataIteratorObject;
10 class MetadataNode;
11 
15 class IOLINK_API MetadataNodeIterator
16 {
17 public:
19  MetadataNodeIterator(MetadataIteratorObject* it);
21 
23 
24  MetadataNodeIterator& operator=(const MetadataNodeIterator& it);
25 
26  bool next();
27  std::shared_ptr<MetadataNode> value();
28 
29  MetadataNodeIterator& operator++();
30  MetadataNodeIterator operator++(int);
31  bool operator==(const MetadataNodeIterator& rhs) const;
32  bool operator!=(const MetadataNodeIterator& rhs) const;
33  std::shared_ptr<MetadataNode> operator*();
34  std::shared_ptr<MetadataNode> operator->();
35 
36 private:
37  MetadataIteratorObject* m_object;
38 };
39 
40 class ConstMetadataIteratorObject;
41 
45 class IOLINK_API ConstMetadataNodeIterator
46 {
47 public:
49  ConstMetadataNodeIterator(ConstMetadataIteratorObject* it);
51 
53 
55 
56  bool next();
57  std::shared_ptr<const MetadataNode> value();
58 
59  ConstMetadataNodeIterator& operator++();
60  ConstMetadataNodeIterator operator++(int);
61  bool operator==(const ConstMetadataNodeIterator& rhs) const;
62  bool operator!=(const ConstMetadataNodeIterator& rhs) const;
63  std::shared_ptr<const MetadataNode> operator*();
64  std::shared_ptr<const MetadataNode> operator->();
65 
66 private:
67  ConstMetadataIteratorObject* m_object;
68 };
69 
70 } // namespace iolink