| IOLink 1.11.0

Loading...
Searching...
No Matches
MetadataNodeHelper.h
1#pragma once
2
3#include <memory>
4
5#include <iolink/IOLinkAPI.h>
6#include <iolink/metadata/MetadataNode.h>
7
8 namespace iolink
9{
10
14 class IOLINK_API MetadataNodeHelper
15{
16 public:
31 static std::shared_ptr<const MetadataNode> getNode(std::shared_ptr<const MetadataNode> root, const std::string& path);
32
39 static bool exists(std::shared_ptr<const MetadataNode> root, const std::string& path);
40
53 static std::shared_ptr<const MetadataNode> createPath(std::shared_ptr<MetadataNode> origin,
54 const std::string& path,
55 std::shared_ptr<VariantDataValue> value);
56};
57
58} // end namespace iolink
iolink::MetadataNodeHelper
A collection of functions to handle paths on MetadataNode instances.
Definition MetadataNodeHelper.h:15
iolink::MetadataNodeHelper::getNode
static std::shared_ptr< const MetadataNode > getNode(std::shared_ptr< const MetadataNode > root, const std::string &path)
Helper returning child node of given root node using a path.
iolink::MetadataNodeHelper::createPath
static std::shared_ptr< const MetadataNode > createPath(std::shared_ptr< MetadataNode > origin, const std::string &path, std::shared_ptr< VariantDataValue > value)
Helper allowing to create the given path in given tree origin.
iolink::MetadataNodeHelper::exists
static bool exists(std::shared_ptr< const MetadataNode > root, const std::string &path)
Check if a path exists in the metadata tree.
iolink
All IOLink symbols are enclosed in this namespace.
Definition ArrayX.h:8