Table of Contents

Class FileNode

Namespace
Emgu.CV
Assembly
Emgu.CV.dll

File Storage Node class. The node is used to store each and every element of the file storage opened for reading. When XML/YAML file is read, it is first parsed and stored in the memory as a hierarchical collection of nodes. Each node can be a "leaf" that is contain a single number or a string, or be a collection of other nodes. There can be named collections (mappings) where each element has a name and it is accessed by a name, and ordered collections (sequences) where elements do not have names but rather accessed by index. Type of the file node can be determined using FileNode::type method. Note that file nodes are only used for navigating file storages opened for reading. When a file storage is opened for writing, no data is stored in memory after it is written.

public class FileNode : UnmanagedObject, IDisposable, IEnumerable<FileNode>, IEnumerable
Inheritance
FileNode
Implements
Inherited Members

Properties

IsEmpty

Returns true if the node is empty

public bool IsEmpty { get; }

Property Value

bool

IsInt

Returns true if the node is an integer

public bool IsInt { get; }

Property Value

bool

IsMap

Returns true if the node is a mapping

public bool IsMap { get; }

Property Value

bool

IsNamed

Returns true if the node has a name

public bool IsNamed { get; }

Property Value

bool

IsNone

Returns true if the node is a "none" object

public bool IsNone { get; }

Property Value

bool

IsReal

Returns true if the node is a floating-point number

public bool IsReal { get; }

Property Value

bool

IsSeq

Returns true if the node is a sequence

public bool IsSeq { get; }

Property Value

bool

IsString

Returns true if the node is a text string

public bool IsString { get; }

Property Value

bool

Name

Get the node name or an empty string if the node is nameless

public string Name { get; }

Property Value

string

NodeType

Gets the type of the node.

public FileNode.Type NodeType { get; }

Property Value

FileNode.Type

The type of the node.

Methods

DisposeObject()

Release the unmanaged resources

protected override void DisposeObject()

GetEnumerator()

Get an enumerator of the file node children

public IEnumerator<FileNode> GetEnumerator()

Returns

IEnumerator<FileNode>

An enumerator of the file node children

ReadDouble(double)

Reads the double from the node.

public double ReadDouble(double defaultDouble = -1.7976931348623157E+308)

Parameters

defaultDouble double

The default value if one is not found in the node.

Returns

double

The double from the node.

ReadFloat(float)

Reads the float from the node.

public float ReadFloat(float defaultFloat = -3.4028235E+38)

Parameters

defaultFloat float

The default value if one is not found in the node.

Returns

float

The float from the node.

ReadInt(int)

Reads the int from the node.

public int ReadInt(int defaultInt = -2147483648)

Parameters

defaultInt int

The default value if one is not found in the node.

Returns

int

The int from the node.

ReadMat(Mat, Mat)

Reads a Mat from the node

public void ReadMat(Mat mat, Mat defaultMat = null)

Parameters

mat Mat

The Mat where the result is read into

defaultMat Mat

The default mat.

ReadString(string)

Reads the string from the node

public string ReadString(string defaultString = null)

Parameters

defaultString string

The default value if one is not found in the node.

Returns

string

The string from the node