MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
MyCaffe.common.PropertyTree Class Reference

The PropertyTree class implements a simple property tree similar to the ptree in Boost. More...

Public Member Functions

 PropertyTree ()
 The constructor. More...
 
void Put (string str, string strVal)
 Add a new property string value. More...
 
void Put (string str, double dfVal)
 Add a new property numeric value. More...
 
void AddChild (string str, PropertyTree pt)
 Add a new child to the Property tree. More...
 
Property Get (string strName)
 Retrieves a property at the current level of the tree. More...
 
List< PropertyGetChildren (string strName)
 Retrieves all properties with the given key at the current level of the tree. More...
 
void Clear ()
 Clear all nodes and values from the tree. More...
 
string ToJson ()
 Converts the property tree to a Json representation. More...
 

Properties

List< PropertyTreeChildren [get]
 Returns a list of all child property trees within the tree. More...
 

Detailed Description

The PropertyTree class implements a simple property tree similar to the ptree in Boost.

Definition at line 12 of file PropertyTree.cs.

Constructor & Destructor Documentation

◆ PropertyTree()

MyCaffe.common.PropertyTree.PropertyTree ( )

The constructor.

Definition at line 20 of file PropertyTree.cs.

Member Function Documentation

◆ AddChild()

void MyCaffe.common.PropertyTree.AddChild ( string  str,
PropertyTree  pt 
)

Add a new child to the Property tree.

Parameters
strSpecifies the key name of the child.
ptSpecifies the property child tree.

Definition at line 55 of file PropertyTree.cs.

◆ Clear()

void MyCaffe.common.PropertyTree.Clear ( )

Clear all nodes and values from the tree.

Definition at line 92 of file PropertyTree.cs.

◆ Get()

Property MyCaffe.common.PropertyTree.Get ( string  strName)

Retrieves a property at the current level of the tree.

Parameters
strNameSpecifies the name of the property.
Returns
The property is returned.

Definition at line 68 of file PropertyTree.cs.

◆ GetChildren()

List< Property > MyCaffe.common.PropertyTree.GetChildren ( string  strName)

Retrieves all properties with the given key at the current level of the tree.

Parameters
strNameSpecifies the name of the children.
Returns
The list of properties for the children are returned.

Definition at line 81 of file PropertyTree.cs.

◆ Put() [1/2]

void MyCaffe.common.PropertyTree.Put ( string  str,
double  dfVal 
)

Add a new property numeric value.

Parameters
strSpecifies the key.
dfValSpecifies the numeric value.

Definition at line 42 of file PropertyTree.cs.

◆ Put() [2/2]

void MyCaffe.common.PropertyTree.Put ( string  str,
string  strVal 
)

Add a new property string value.

Parameters
strSpecifies the key.
strValSpecifies the string value.

Definition at line 29 of file PropertyTree.cs.

◆ ToJson()

string MyCaffe.common.PropertyTree.ToJson ( )

Converts the property tree to a Json representation.

THIS METHOD IS NOT COMPLETE YET.

Returns
The Json string representing the tree is returned.

Definition at line 123 of file PropertyTree.cs.

Property Documentation

◆ Children

List<PropertyTree> MyCaffe.common.PropertyTree.Children
get

Returns a list of all child property trees within the tree.

Definition at line 101 of file PropertyTree.cs.


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