![]() |
MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
The RawProto class is used to parse and output Google prototxt file data. More...
Public Types | |
| enum | TYPE { NONE , NUMERIC , STRING } |
| Defines the type of a RawProto node. More... | |
Public Member Functions | |
| RawProto (string strName, string strValue, RawProtoCollection rgChildren=null, TYPE type=TYPE.NONE) | |
| The RawProto constructor. More... | |
| string | FindValue (string strName) |
| Searches for a falue of a node within this nodes children. More... | |
| object | FindValue (string strName, Type t) |
| Searches for a value of a node within this nodes children and return it as a given type. More... | |
| List< T > | FindArray< T > (string strName) |
| Searches for all values of a given name within this nodes children and return it as a generic List. More... | |
| bool | RemoveChild (RawProto p) |
| Removes a given child from this node's children. More... | |
| bool | RemoveChild (string strName, string strValue, bool bContains=false) |
| Removes a given child with a set value from this node's children. More... | |
| RawProto | FindChild (string strName) |
| Searches for a given node. More... | |
| int | FindChildIndex (string strName) |
| Searches for the index to a given node's child. More... | |
| RawProtoCollection | FindChildren (params string[] rgstrName) |
| Searches for all children with a given name in this node's children. More... | |
| void | ToFile (string strFileName) |
| Saves a RawProto to a file. More... | |
| override string | ToString () |
| Returns the RawProto as its full prototxt string. More... | |
Static Public Member Functions | |
| static RawProto | FromFile (string strFileName) |
| Parses a prototxt from a file and returns it as a RawProto. More... | |
| static RawProto | Parse (string str) |
| Parses a prototxt and places it in a new RawProto. More... | |
Properties | |
| string | Name [get] |
| Returns the name of the node. More... | |
| string | Value [getset] |
| Get/set the value of the node. More... | |
| TYPE | Type [get] |
| Returns the type of the node. More... | |
| RawProtoCollection | Children [get] |
| Returns a collection of this nodes child nodes. More... | |
The RawProto class is used to parse and output Google prototxt file data.
Each RawProto instance forms a tree of RawProto instances where each Leaf contains the data and branches contain a collection of child RawProto's.
Definition at line 16 of file RawProto.cs.
Defines the type of a RawProto node.
| Enumerator | |
|---|---|
| NONE | Brach node. |
| NUMERIC | Numeric leaf node. |
| STRING | Numeric string node. |
Definition at line 26 of file RawProto.cs.
| MyCaffe.basecode.RawProto.RawProto | ( | string | strName, |
| string | strValue, | ||
| RawProtoCollection | rgChildren = null, |
||
| TYPE | type = TYPE.NONE |
||
| ) |
The RawProto constructor.
| strName | Specifies the name of the node. |
| strValue | Specifies the value of the node. |
| rgChildren | Specifies the children nodes of this node (if any). |
| type | Specifies the type of the node. |
Definition at line 57 of file RawProto.cs.
| List< T > MyCaffe.basecode.RawProto.FindArray< T > | ( | string | strName | ) |
Searches for all values of a given name within this nodes children and return it as a generic List.
| T | Specifies the type of item to return. |
| strName | Specifies the name of the nodes to look for. |
Definition at line 138 of file RawProto.cs.
| RawProto MyCaffe.basecode.RawProto.FindChild | ( | string | strName | ) |
Searches for a given node.
| strName | Specifies the name of the node to look for. |
Definition at line 231 of file RawProto.cs.
| int MyCaffe.basecode.RawProto.FindChildIndex | ( | string | strName | ) |
Searches for the index to a given node's child.
| strName | Specifies the name of the child node to look for. |
Definition at line 247 of file RawProto.cs.
| RawProtoCollection MyCaffe.basecode.RawProto.FindChildren | ( | params string[] | rgstrName | ) |
Searches for all children with a given name in this node's children.
| rgstrName | Specifies a array of names to look for. |
Definition at line 263 of file RawProto.cs.
| string MyCaffe.basecode.RawProto.FindValue | ( | string | strName | ) |
Searches for a falue of a node within this nodes children.
| strName | Specifies the name of the node to look for. |
Definition at line 105 of file RawProto.cs.
| object MyCaffe.basecode.RawProto.FindValue | ( | string | strName, |
| Type | t | ||
| ) |
Searches for a value of a node within this nodes children and return it as a given type.
| strName | Specifies the name of the node to look for. |
| t | Specifies the type to convert the value, if found. |
Definition at line 122 of file RawProto.cs.
|
static |
Parses a prototxt from a file and returns it as a RawProto.
| strFileName | Specifies the file name. |
Definition at line 281 of file RawProto.cs.
|
static |
Parses a prototxt and places it in a new RawProto.
| str | Specifies the prototxt to parse. |
Definition at line 306 of file RawProto.cs.
| bool MyCaffe.basecode.RawProto.RemoveChild | ( | RawProto | p | ) |
Removes a given child from this node's children.
| p | Specifies the RawProto to remove. |
Definition at line 188 of file RawProto.cs.
| bool MyCaffe.basecode.RawProto.RemoveChild | ( | string | strName, |
| string | strValue, | ||
| bool | bContains = false |
||
| ) |
Removes a given child with a set value from this node's children.
| strName | Specifes the name of the node. |
| strValue | Specifies the value to match. |
| bContains | Optionally, specifies whether just 'containing' the value (as opposed to equallying the value) is enough to delete the bottom. |
Definition at line 200 of file RawProto.cs.
| void MyCaffe.basecode.RawProto.ToFile | ( | string | strFileName | ) |
Saves a RawProto to a file.
| strFileName | Specifies the file name. |
Definition at line 293 of file RawProto.cs.
| override string MyCaffe.basecode.RawProto.ToString | ( | ) |
Returns the RawProto as its full prototxt string.
Definition at line 681 of file RawProto.cs.
|
get |
Returns a collection of this nodes child nodes.
Definition at line 95 of file RawProto.cs.
|
get |
Returns the name of the node.
Definition at line 70 of file RawProto.cs.
|
get |
Returns the type of the node.
Definition at line 87 of file RawProto.cs.
|
getset |
Get/set the value of the node.
Definition at line 78 of file RawProto.cs.