IOLink C# 1.11.0
Loading...
Searching...
No Matches
IOLink.MetadataNodeHelper Class Reference

A collection of functions to handle paths on MetadataNode instances. More...

Inheritance diagram for IOLink.MetadataNodeHelper:

Public Member Functions

 MetadataNodeHelper (global::System.IntPtr cPtr, bool cMemoryOwn)
 
void Dispose ()
 

Static Public Member Functions

static global::System.Runtime.InteropServices.HandleRef getCPtr (MetadataNodeHelper obj)
 
static global::System.Runtime.InteropServices.HandleRef swigRelease (MetadataNodeHelper obj)
 
static ReadonlyMetadataNode GetNode (ReadonlyMetadataNode root, string path)
 Helper returning child node of given root node using a path. ex: "/MRC/ext/pixelSize".
 
static bool Exists (ReadonlyMetadataNode root, string path)
 Check if a path exists in the metadata tree.
 
static ReadonlyMetadataNode CreatePath (MetadataNode origin, string path, VariantDataValue value)
 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.
 

Protected Member Functions

virtual void Dispose (bool disposing)
 

Protected Attributes

bool swigCMemOwn
 

Detailed Description

A collection of functions to handle paths on MetadataNode instances.

Examples
CopyImageView.cs, and MetadataTree.cs.

Member Function Documentation

◆ CreatePath()

static ReadonlyMetadataNode IOLink.MetadataNodeHelper.CreatePath ( MetadataNode  origin,
string  path,
VariantDataValue  value 
)
inlinestatic

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.

Parameters
originnode from where the path must be created
pathpath to create
valuevalue to affect to the leaf of given path, null by default
Returns
the origin node
Examples
CopyImageView.cs, and MetadataTree.cs.

◆ Exists()

static bool IOLink.MetadataNodeHelper.Exists ( ReadonlyMetadataNode  root,
string  path 
)
inlinestatic

Check if a path exists in the metadata tree.

Parameters
rootThe node from which to check the path.
pathThe path to test.

◆ GetNode()

static ReadonlyMetadataNode IOLink.MetadataNodeHelper.GetNode ( ReadonlyMetadataNode  root,
string  path 
)
inlinestatic

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.

Parameters
rootroot of metadata tree to parse
pathpath of nodes to follow to access to the searched one
Returns
searched child node if found (nullptr otherwise)
Examples
MetadataTree.cs.

The documentation for this class was generated from the following file: