Sofu Documentation
Reference Class
NamespacesSofu.SofuReference
Represents a Reference. Provides modified AsList, AsValue and AsMap so you can work with it as if it was the referenced object. Also provides modified IsList, IsValue, IsMap and IsDefined. Reference is designed to transparent, normally you shouldn't care if you are working with a Reference or not, just use the file.map("Reference"), file.IsMap("Reference"), file.Object("Reference").AsMap() to get the referenced SofuObject. Even if you create Sofu Files, just put in the same Object twice to have one converted to a Reference during output.
Declaration Syntax
C#
public class Reference : SofuObject
Members
All MembersConstructorsMethods



IconMemberDescription
Reference()()()
Creates a new Reference without target information

Reference(String)
Creates a new empty Reference with target information, used during parsing. This will not create a valid reference

Reference(String, SofuObject)
Creates a new Reference with target information and a target

AppendComment(String)
Appends to the comment of this SofuObject
(Inherited from SofuObject.)
AsList()()()
Returns the referent as a List
(Overrides SofuObject.AsList()()().)
AsMap()()()
Returns the referent as a Map
(Overrides SofuObject.AsMap()()().)
AsReference()()()
Seldom used, this allows to access the reference itself, while AsMap, AsList and AsValue access the referenced Object.
(Overrides SofuObject.AsReference()()().)
AsValue()()()
Returns the referent as a Value
(Overrides SofuObject.AsValue()()().)
Binarify(String, Stream)
Writes this Object into a Stream, does no Cross Reference checking.
(Inherited from SofuObject.)
Binary(String, Stream)
Writes this Object into a Stream, does Cross Reference checking.
(Inherited from SofuObject.)
BinaryPack(Stream)
Starts the binary packing, boxes every other SofuObject into a Map
(Inherited from SofuObject.)
Dangle(SofuObject)
Sets the target to a specific SofuObject without changing the targetstring. Used during parsing of files.

Equals(Object) (Inherited from Object.)
Finalize()()() (Inherited from Object.)
GetComment()()()
Accesses the comment of this SofuObject.
(Inherited from SofuObject.)
GetHashCode()()() (Inherited from Object.)
GetType()()() (Inherited from Object.)
HasComment()()()
Tests if this SofuObject has a comment.
(Inherited from SofuObject.)
IsDefined()()()
Checks if the referent is a defined
(Overrides SofuObject.IsDefined()()().)
IsList()()()
Checks if the referent is a List
(Overrides SofuObject.IsList()()().)
IsMap()()()
Checks if the referent is a Map
(Overrides SofuObject.IsMap()()().)
IsReference()()()
Identifies itself as a Reference.
(Overrides SofuObject.IsReference()()().)
IsValid()()()
Tests if a target is set.

IsValue()()()
Checks if the referent is a Value
(Overrides SofuObject.IsValue()()().)
MemberwiseClone()()() (Inherited from Object.)
Pack()()()
Packs this SofuObject and all those it contains into a string.
(Inherited from SofuObject.)
PackComment(Stream)
Writes the comments of this Object into a Stream
(Inherited from SofuObject.)
PackHeader(Stream)
Creates the Header of a binary sofu file into a stream
(Inherited from SofuObject.)
PackLong(UInt32, Stream)
Packs one unsigned Integer into the output stream
(Inherited from SofuObject.)
PackLong(Int32, Stream)
Packs one unsigned Integer into the output stream
(Inherited from SofuObject.)
PackText(String, Stream)
Writes a text into an output stream
(Inherited from SofuObject.)
SetComment(String)
Sets a comment for this SofuObject.
(Inherited from SofuObject.)
SetTarget(String)
Sets the target to a targetstring

SetTarget(String, SofuObject)
Sets the target to a targetstring and targetObject

String(String, StringBuilder)
Identifies cross references and calls Stringify with its parameters
(Inherited from SofuObject.)
String(String, TextWriter, Int32)
Identifies cross references and calls Stringify with its parameters
(Inherited from SofuObject.)
Stringify(String, StringBuilder)
Packs this SofuObject into a string
(Inherited from SofuObject.)
Stringify(String, TextWriter, Int32)
Packs this SofuObject into a string
(Inherited from SofuObject.)
StringML(XmlWriter)
Writes this Object into Xml, does Cross Reference checking.
(Inherited from SofuObject.)
Target()()()
Returns its target

ToString()()()
Returns its targetstring used during the creation
(Overrides Object.ToString()()().)
TypeString()()()
Used to identify this as a Reference
(Overrides SofuObject.TypeString()()().)
Write(TextWriter)
Writes the contents of this SofuObject into a TextWriter
(Inherited from SofuObject.)
Write(String)
Write this SofuObject into a file. Uses the default encoding of UTF-16.
(Inherited from SofuObject.)
Write(String, Encoding)
Write this SofuObject into a file.
(Inherited from SofuObject.)
WriteBinary(Stream, Int32, Endianness)
Writes this SofuObject and all its children into a binary sofu file
(Inherited from SofuObject.)
WriteBinary(Stream, Encoding, Endianness)
Writes this SofuObject and all its children into a binary sofu file
(Inherited from SofuObject.)
WriteBinary(Stream, Encoding)
Writes this SofuObject and all its children into a binary sofu file
(Inherited from SofuObject.)
WriteBinary(Stream, Int32)
Writes this SofuObject and all its children into a binary sofu file
(Inherited from SofuObject.)
WriteBinary(Stream, Endianness)
Writes this SofuObject and all its children into a binary sofu file
(Inherited from SofuObject.)
WriteBinary(Stream)
Writes this SofuObject and all its children into a binary sofu file
(Inherited from SofuObject.)
WriteBinary(String, Int32, Endianness)
Writes this SofuObject and all its children into a binary sofu file
(Inherited from SofuObject.)
WriteBinary(String, Encoding, Endianness)
Writes this SofuObject and all its children into a binary sofu file
(Inherited from SofuObject.)
WriteBinary(String, Encoding)
Writes this SofuObject and all its children into a binary sofu file
(Inherited from SofuObject.)
WriteBinary(String, Int32)
Writes this SofuObject and all its children into a binary sofu file
(Inherited from SofuObject.)
WriteBinary(String, Endianness)
Writes this SofuObject and all its children into a binary sofu file
(Inherited from SofuObject.)
WriteBinary(String)
Writes this SofuObject and all its children into a binary sofu file
(Inherited from SofuObject.)
WriteML(String)
Writes this Object into a SofuML file
(Inherited from SofuObject.)
WriteML(XmlWriter)
Writes this Object into a SofuML tree.
(Inherited from SofuObject.)
XMLcomment(XmlWriter)
Writes this Objects comments to XML
(Inherited from SofuObject.)
Xmlify(XmlWriter)
Write this SofuObject into an XmlWriter.
(Inherited from SofuObject.)
Remarks
The "target"-string is only used during parsing. The Parser first collects all Reference in the file and points them to the right Objects during postprocessing.
Inheritance Hierarchy
Object
SofuObject
 Reference

Assembly: Sofu (Module: Sofu) Version: 0.2.1.0 (0.2.1.0)