IOLink
IOL_v1.1.0_release
|
A collection of functions to handle paths on MetadataNode instances. More...
#include <iolink/metadata/MetadataNodeHelper.h>
Static Public Member Functions | |
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. More... | |
static bool | exists (std::shared_ptr< const MetadataNode > root, const std::string &path) |
Check if a path exists in the metadata tree. More... | |
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. More... | |
A collection of functions to handle paths on MetadataNode instances.
|
static |
Helper allowing to create the given path in given tree origin.
ex: /MRC/ext/pixelSize" or "MRC/ext/pixelSize" The method will only create missing nodes in given tree origin. If specified, the given value will be affected to last node of the given path ("pixelSize" in above example). If the whole path already exists, the last node will be overwritten with a created one containing given value.
origin | node from where the path must be created |
path | path to create |
value | value to affect to the leaf of given path, null by default |
|
static |
Check if a path exists in the metadata tree.
root | The node from which to check the path. |
path | The path to test. |
|
static |
Helper returning child node of given root node using a path.
ex: "/MRC/ext/pixelSize"
The following paths are equivalent: "/MRC/ext/pixelSize", "MRC/ext/pixelSize", "\\MRC\\ext\\pixelSize" and "MRC\\ext\\pixelSize"
If child node doesn't exist, nullptr is returned.
Warning: Doesn't support wildcards or regexp.
root | root of metadata tree to parse |
path | path of nodes to follow to access to the searched one |