MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
Specifies a key-value pair of properties. More...
Public Member Functions | |
PropertySet (Dictionary< string, string > rgProp) | |
The constructor, initialized with a dictionary of properties. More... | |
PropertySet (string strProp) | |
The constructor, initialized with a string containing a set of ';' separated key-value pairs. More... | |
PropertySet () | |
The constructor. More... | |
bool | MovePropertyToBlob (string strName) |
Move the property from the list of properties to the list of blobs, storing the blob as a 0 terminated string of bytes. More... | |
void | Merge (PropertySet prop) |
Merge a given property set into this one. More... | |
string | GetProperty (string strName, bool bThrowExceptions=true) |
Returns a property as a string value. More... | |
int | GetPropertyInt (string strName, bool bThrowExceptions=true) |
Returns an int property as a int value. More... | |
byte[] | GetPropertyBlob (string strName, bool bThrowExceptions=true) |
Returns a property blob as a byte array value. More... | |
void | DeleteProperty (string strName) |
Delete a property by name. More... | |
void | SetProperty (string strName, string strVal) |
Sets a property in the property set to a value if it exists, otherwise it adds the new property. More... | |
void | SetPropertyInt (string strName, int nVal) |
Sets an int property in the property set to a value if it exists, otherwise it adds the new property. More... | |
void | SetPropertyBlob (string strName, byte[] rg) |
Sets a property in the blob set to a byte array if it exists, otherwise it adds the new blob. More... | |
DateTime | GetPropertyAsDateTime (string strName) |
Returns a property as a DateTime value. More... | |
bool | GetPropertyAsBool (string strName, bool bDefault=false) |
Returns a property as a boolean value. More... | |
int | GetPropertyAsInt (string strName, int nDefault=0) |
Returns a property as an integer value. More... | |
double | GetPropertyAsDouble (string strName, double dfDefault=0) |
Returns a property as an double value. More... | |
override string | ToString () |
Returns the string representation of the properties. More... | |
IEnumerator< KeyValuePair< string, string > > | GetEnumerator () |
Returns an enumerator of the key/value pairs. More... | |
Properties | |
List< string > | PropertyNames [get] |
Returns the list of property names contained in the property set. More... | |
List< string > | PropertyBlobNames [get] |
Returns the list of blob names contained in the property set. More... | |
List< string > | PropertyIntNames [get] |
Returns the list of integer property names contained in the property set. More... | |
Specifies a key-value pair of properties.
Definition at line 15 of file PropertySet.cs.
MyCaffe.basecode.PropertySet.PropertySet | ( | Dictionary< string, string > | rgProp | ) |
The constructor, initialized with a dictionary of properties.
rgProp | Specifies the properties to initialize the property set with. |
Definition at line 25 of file PropertySet.cs.
MyCaffe.basecode.PropertySet.PropertySet | ( | string | strProp | ) |
The constructor, initialized with a string containing a set of ';' separated key-value pairs.
strProp | Specifies the set of key-value pairs separated by ';'. Each key-value pair is in the format: 'key'='value'. |
Definition at line 34 of file PropertySet.cs.
MyCaffe.basecode.PropertySet.PropertySet | ( | ) |
The constructor.
Definition at line 60 of file PropertySet.cs.
void MyCaffe.basecode.PropertySet.DeleteProperty | ( | string | strName | ) |
Delete a property by name.
strName | Specifies the proeprty to delete. |
Definition at line 201 of file PropertySet.cs.
IEnumerator< KeyValuePair< string, string > > MyCaffe.basecode.PropertySet.GetEnumerator | ( | ) |
Returns an enumerator of the key/value pairs.
Definition at line 342 of file PropertySet.cs.
string MyCaffe.basecode.PropertySet.GetProperty | ( | string | strName, |
bool | bThrowExceptions = true |
||
) |
Returns a property as a string value.
strName | Specifies the name of the property to retrieve. |
bThrowExceptions | When true (the default), an exception is thrown if the property is not found, otherwise a value of null is returned when not found. |
Definition at line 146 of file PropertySet.cs.
bool MyCaffe.basecode.PropertySet.GetPropertyAsBool | ( | string | strName, |
bool | bDefault = false |
||
) |
Returns a property as a boolean value.
strName | Specifies the name of the property. |
bDefault | Specifies the default value returned when the property is not found. |
Definition at line 267 of file PropertySet.cs.
DateTime MyCaffe.basecode.PropertySet.GetPropertyAsDateTime | ( | string | strName | ) |
Returns a property as a DateTime value.
strName | Specifies the name of the property. |
Definition at line 250 of file PropertySet.cs.
double MyCaffe.basecode.PropertySet.GetPropertyAsDouble | ( | string | strName, |
double | dfDefault = 0 |
||
) |
Returns a property as an double value.
strName | Specifies the name of the property. |
dfDefault | Specifies the default value returned when the property is not found. |
Definition at line 307 of file PropertySet.cs.
int MyCaffe.basecode.PropertySet.GetPropertyAsInt | ( | string | strName, |
int | nDefault = 0 |
||
) |
Returns a property as an integer value.
strName | Specifies the name of the property. |
nDefault | Specifies the default value returned when the property is not found. |
Definition at line 287 of file PropertySet.cs.
byte[] MyCaffe.basecode.PropertySet.GetPropertyBlob | ( | string | strName, |
bool | bThrowExceptions = true |
||
) |
Returns a property blob as a byte array value.
strName | Specifies the name of the property blob to retrieve. |
bThrowExceptions | When true (the default), an exception is thrown if the property blob is not found, otherwise a value of null is returned when not found. |
Definition at line 184 of file PropertySet.cs.
int MyCaffe.basecode.PropertySet.GetPropertyInt | ( | string | strName, |
bool | bThrowExceptions = true |
||
) |
Returns an int property as a int value.
strName | Specifies the name of the int property. |
bThrowExceptions | When true (the default), an exception is thrown if the property is not found, otherwise a value of null is returned when not found. |
Definition at line 165 of file PropertySet.cs.
void MyCaffe.basecode.PropertySet.Merge | ( | PropertySet | prop | ) |
Merge a given property set into this one.
prop | Specifies the property set to merge into this one. |
Definition at line 121 of file PropertySet.cs.
bool MyCaffe.basecode.PropertySet.MovePropertyToBlob | ( | string | strName | ) |
Move the property from the list of properties to the list of blobs, storing the blob as a 0 terminated string of bytes.
strName | Specifies the name of the property to move. |
Definition at line 93 of file PropertySet.cs.
void MyCaffe.basecode.PropertySet.SetProperty | ( | string | strName, |
string | strVal | ||
) |
Sets a property in the property set to a value if it exists, otherwise it adds the new property.
strName | Specifies the property name. |
strVal | Specifies the new property value. |
Definition at line 211 of file PropertySet.cs.
void MyCaffe.basecode.PropertySet.SetPropertyBlob | ( | string | strName, |
byte[] | rg | ||
) |
Sets a property in the blob set to a byte array if it exists, otherwise it adds the new blob.
strName | Specifies the name of the blob. |
rg | Specifies the blob data. |
Definition at line 237 of file PropertySet.cs.
void MyCaffe.basecode.PropertySet.SetPropertyInt | ( | string | strName, |
int | nVal | ||
) |
Sets an int property in the property set to a value if it exists, otherwise it adds the new property.
strName | Specifies the property name. |
nVal | Specifies the new property value. |
Definition at line 224 of file PropertySet.cs.
override string MyCaffe.basecode.PropertySet.ToString | ( | ) |
Returns the string representation of the properties.
Definition at line 325 of file PropertySet.cs.
|
get |
Returns the list of blob names contained in the property set.
Definition at line 75 of file PropertySet.cs.
|
get |
Returns the list of integer property names contained in the property set.
Definition at line 83 of file PropertySet.cs.
|
get |
Returns the list of property names contained in the property set.
Definition at line 67 of file PropertySet.cs.