C# Class Encog.Persist.PersistReader

Utility class for reading Encog persited object files.
Show file Open project: encog/encog-silverlight-core Class Usage Examples

Public Methods

Method Description
Advance ( String name ) : bool

Advance to the specified object.

AdvanceObjectsCollection ( ) : void

Advance to the objects collection.

BuildDirectory ( ) : IList

Build a directory entry list for the file.

Close ( ) : void

Close the file.

PersistReader ( IPersistenceLocation location ) : System

Construct a persist reader.

ReadHeader ( ) : string>.IDictionary

Read an Encog header.

ReadNextTag ( String name ) : bool

Read until the next tag of the specified name.

ReadNextText ( String name ) : String

Read all text until the specified ending tag is found.

ReadObject ( String name ) : IEncogPersistedObject

Read the specific object, search through the objects until its found.

ReadValue ( String name ) : String

Read the value in a period delimited string. For example property.name.value.

SaveModified ( WriteXML xmlOut, String targetName, String newName, String newDesc ) : void

Modify the properties of this object.

SaveTo ( WriteXML xmlOut, String skip ) : void

Save all objects to the specified steam, skip the one specified by the skip parameter. Do not attempt to understand the structure, just copy.

Private Methods

Method Description
AdvanceObjects ( String name ) : bool

Once you are in the objects collection, advance to a specific object.

AdvanceToTag ( String tag ) : bool

Advance to the specified tag.

CopyAttributes ( WriteXML xmlOut, String>.IDictionary replace ) : void

Copy all of the attributes to the writer.

CopyXML ( WriteXML xmlOut, String>.IDictionary replace ) : void

Copy an XML object, no need to know what it contains, just copy it. This way we will not damage unknown objects during a merge.

SkipObject ( ) : void

Skip the current object.

Method Details

Advance() public method

Advance to the specified object.
public Advance ( String name ) : bool
name String The name of the object looking for.
return bool

AdvanceObjectsCollection() public method

Advance to the objects collection.
public AdvanceObjectsCollection ( ) : void
return void

BuildDirectory() public method

Build a directory entry list for the file.
public BuildDirectory ( ) : IList
return IList

Close() public method

Close the file.
public Close ( ) : void
return void

PersistReader() public method

Construct a persist reader.
public PersistReader ( IPersistenceLocation location ) : System
location IPersistenceLocation The location to use.
return System

ReadHeader() public method

Read an Encog header.
public ReadHeader ( ) : string>.IDictionary
return string>.IDictionary

ReadNextTag() public method

Read until the next tag of the specified name.
public ReadNextTag ( String name ) : bool
name String The name searched for.
return bool

ReadNextText() public method

Read all text until the specified ending tag is found.
public ReadNextText ( String name ) : String
name String The tag.
return String

ReadObject() public method

Read the specific object, search through the objects until its found.
public ReadObject ( String name ) : IEncogPersistedObject
name String The name of the object you are looking for.
return IEncogPersistedObject

ReadValue() public method

Read the value in a period delimited string. For example property.name.value.
public ReadValue ( String name ) : String
name String The property to read.
return String

SaveModified() public method

Modify the properties of this object.
public SaveModified ( WriteXML xmlOut, String targetName, String newName, String newDesc ) : void
xmlOut Encog.Parse.Tags.Write.WriteXML The XML writer.
targetName String The name of the object to change.
newName String The new name of this object.
newDesc String The new description of this object.
return void

SaveTo() public method

Save all objects to the specified steam, skip the one specified by the skip parameter. Do not attempt to understand the structure, just copy.
public SaveTo ( WriteXML xmlOut, String skip ) : void
xmlOut Encog.Parse.Tags.Write.WriteXML The XML writer to save the objects to.
skip String The object to skip.
return void