Reading Objects

Objects are read using a Reader object. The following functions are commonly used for reading:

// Specifies which file the Reader should read from.
bool FromFile(string filename)

// Reads a required object of any type.
// Data format: <object>
bool Read<T>(ref T value)

// Reads a required object of any type, associated with an identifier (like a name/value pair).
// Data format: <identifier> = <object>;
bool Read<T>(string identifier, ref T value)

// Reads an optional object of any type, associated with an identifier; if not present, the specified default value is used.
// Data format: [<identifier> = <object>;]
bool Read<T>(string identifier, ref T value, T defaultValue)

Next: Basic Types

Last edited Apr 18, 2012 at 1:10 PM by francisxavier, version 3

Comments

No comments yet.