| IOLink C# 1.11.0

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties | List of all members
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< MetadataNode > | GetEnumerator ()
| 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

  key | string which identifies the node
  value | VariantDataValue 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

  child | node 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

  key | the key corresponding to one of the children of current node

Returns
  the child corresponding to given key

Exceptions

  Error | If 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

  key | the 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

  key | Key whose node must be removed

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

- Release/net/generated/MetadataNode.cs