IOLink C# 1.16.1
Loading...
Searching...
No Matches
IOLink.MetadataNode Class Reference
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)
 
 MetadataNode (MetadataNode other)
 
MetadataNode Clone ()
 
string GetKey ()
 
VariantDataValue GetValue ()
 
uint GetChildCount ()
 Return the children's count of this node.
 
bool HasChild (string key)
 
ReadonlyMetadataNode Child (string key)
 
void AddChild (MetadataNode child)
 
void RemoveChild (string key)
 
string ToString ()
 Return a string representation.
 
string PrettyPrint (SWIGTYPE_p_PrettyPrintOptions options)
 
MetadataNode DeepClone ()
 

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 Associated VariantDataValue is not cloned, but shared between the original and the clone.

Returns
the new node

◆ DeepClone()

MetadataNode IOLink.MetadataNode.DeepClone ( )
inline

Method to clone the current node and all its children Associated VariantDataValues are not cloned, but shared between the original and the clone.

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

◆ PrettyPrint()

string IOLink.MetadataNode.PrettyPrint ( SWIGTYPE_p_PrettyPrintOptions  options)
inline

Formats and returns a string representation of a metadata tree. This function recursively traverses a metadata tree and generates a formatted string representation of its structure and values. The formatting is controlled by the provided PrettyPrintOptions, which specify options such as maximum depth, indentation size, and whether to display values or types.

Parameters
optionsThe configuration options for controlling the formatting of the output. These options include maximum depth, value display preferences, and string truncation settings.
Returns
A formatted string representation of the metadata tree.

◆ 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: