IOLink IOL_v1.8.0_release
Loading...
Searching...
No Matches
MetadataNode.h
1#pragma once
2
3#include <memory>
4#include <mutex>
5#include <string>
6
7#include <iolink/VariantDataValue.h>
8#include <iolink/metadata/MetadataNodeIterator.h>
9
10namespace iolink
11{
12
20class IOLINK_API MetadataNode
21{
22public:
28 MetadataNode(const std::string& key, std::shared_ptr<VariantDataValue> value);
29
30 MetadataNode(const MetadataNode& other);
31 MetadataNode& operator=(const MetadataNode& other);
32
33 MetadataNode(MetadataNode&& other) noexcept;
34 MetadataNode& operator=(MetadataNode&& other) noexcept;
35
37
42 std::shared_ptr<MetadataNode> clone() const;
43
48 const std::string& key() const;
49
54 std::shared_ptr<VariantDataValue> value() const;
55
59 size_t childCount() const;
60
67 bool hasChild(const std::string& key) const;
68
76 std::shared_ptr<const MetadataNode> child(const std::string& key) const;
77
85 std::shared_ptr<MetadataNode> child(const std::string& key);
86
92 void addChild(std::shared_ptr<MetadataNode> child);
93
98 void removeChild(const std::string& key);
99
104
109
114
119
124
129
133 std::string toString() const;
134
135private:
136 class Private;
137 Private* m_private;
138};
139
140} // end namespace iolink