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

Class which represents one node from a metadata tree. Each node contains a key and also an associated value (optional). It also contains a list of nodes which represents its children in the tree. Children can be parsed using '(Const)MetadataNodeIterator' objects provided by '(c)begin' and '(c)end' methods, or directly can be retrieved thanks to 'child' accessor method. More...

Inheritance diagram for IOLink.MetadataNode:

Public Member Functions

 MetadataNode (global::System.IntPtr cPtr, bool cMemoryOwn)
 
void Dispose ()
 
System.Collections.Generic.IEnumerator< MetadataNodeGetEnumerator ()
 
 MetadataNode (string key, VariantDataValue value)
 Constructor which takes a mandatory key, and an optional value.
 
 MetadataNode (MetadataNode other)
 
MetadataNode Clone ()
 Method to clone the current node.
 
string GetKey ()
 Accessor to the key of the current node.
 
VariantDataValue GetValue ()
 Accessor to the value of the current node.
 
uint GetChildCount ()
 Return the children's count of this node.
 
bool HasChild (string key)
 Indicate if a child identified by its key is present or not.
 
ReadonlyMetadataNode Child (string key)
 Return the child node with the given key.
 
void AddChild (MetadataNode child)
 Add a node as child. If the given child key already exists in the current node, existing child is replaced by new one.
 
void RemoveChild (string key)
 Remove child identified by its key.
 
string ToString ()
 Return a string representation.
 

Static Public Member Functions

static global::System.Runtime.InteropServices.HandleRef getCPtr (MetadataNode obj)
 

Protected Member Functions

virtual void Dispose (bool disposing)
 

Properties

string Key [get]
 The key associated with this MetadataNode
 
VariantDataValue Value [get]
 The key value with this MetadataNode
 
uint ChildCount [get]
 The number of children of this MetadataNode
 

Detailed Description

Class which represents one node from a metadata tree. Each node contains a key and also an associated value (optional). It also contains a list of nodes which represents its children in the tree. Children can be parsed using '(Const)MetadataNodeIterator' objects provided by '(c)begin' and '(c)end' methods, or directly can be retrieved thanks to 'child' accessor method.

Examples
CopyImageView.cs, and MetadataTree.cs.

Constructor & Destructor Documentation

◆ MetadataNode()

IOLink.MetadataNode.MetadataNode ( string  key,
VariantDataValue  value 
)
inline

Constructor which takes a mandatory key, and an optional value.

Parameters
keystring which identifies the node
valueVariantDataValue object associated to the key (or null)

Member Function Documentation

◆ AddChild()

void IOLink.MetadataNode.AddChild ( MetadataNode  child)
inline

Add a node as child. If the given child key already exists in the current node, existing child is replaced by new one.

Parameters
childnode to add as child to the current node
Examples
MetadataTree.cs.

◆ Child()

ReadonlyMetadataNode IOLink.MetadataNode.Child ( string  key)
inline

Return the child node with the given key.

Parameters
keythe key corresponding to one of the children of current node
Returns
the child corresponding to given key
Exceptions
ErrorIf the key is not found in the children of the current node

◆ Clone()

MetadataNode IOLink.MetadataNode.Clone ( )
inline

Method to clone the current node.

Returns
the new node

◆ GetKey()

string IOLink.MetadataNode.GetKey ( )
inline

Accessor to the key of the current node.

Returns
the current node key

◆ GetValue()

VariantDataValue IOLink.MetadataNode.GetValue ( )
inline

Accessor to the value of the current node.

Returns
the current node value

◆ HasChild()

bool IOLink.MetadataNode.HasChild ( string  key)
inline

Indicate if a child identified by its key is present or not.

Parameters
keythe key corresponding to a child or not of current node
Returns
If the node has a child with given key

◆ RemoveChild()

void IOLink.MetadataNode.RemoveChild ( string  key)
inline

Remove child identified by its key.

Parameters
keyKey whose node must be removed

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