Represents a Sofu Map, which is very similar to a dictionary
| C# |
public class Map : SofuObject, IEnumerable<KeyValuePair<string, SofuObject>>, IEnumerable
| All Members | Constructors | Methods | |||
| Icon | Member | Description |
|---|---|---|
| Map()()() |
Creates a new empty Sofu.Map
| |
| Map(Dictionary<(Of <(String, SofuObject>)>)) |
Creates a new Sofu.Map from a Dictionary.
| |
| Map(Map) |
Creates a new Sofu.Map from another Sofu.Map.
| |
| AppendComment(String) |
Appends to the comment of this SofuObject
(Inherited from SofuObject.) | |
| AsList()()() |
Tries to convert itself to a Sofu.List.
(Inherited from SofuObject.) | |
| AsMap()()() |
Tests if this Map is really a Map.
(Overrides SofuObject.AsMap()()().) | |
| AsReference()()() |
Seldom used, this allows to access the reference itself, while AsMap, AsList and AsValue access the referenced Object.
(Inherited from SofuObject.) | |
| AsValue()()() |
Tries to convert itself to a Sofu.Value
(Inherited from SofuObject.) | |
| AttributeKey(SofuObject) |
Tries to find the name of a key for an element.
Not implemented for now!.
| |
| Binarify(String, Stream) |
Writes this Map into a binary stream, does no Cross Reference checking.
(Overrides SofuObject.Binarify(String, Stream).) | |
| Binary(String, Stream) |
Writes this Object into a Stream, does Cross Reference checking.
(Inherited from SofuObject.) | |
| BinaryPack(Stream) |
Starts the binary packing as a file.
(Overrides SofuObject.BinaryPack(Stream).) | |
| Dup()()() |
Creates a shallow copy of itself.
| |
| Equals(Object) | (Inherited from Object.) | |
| Finalize()()() | (Inherited from Object.) | |
| GetComment()()() |
Accesses the comment of this SofuObject.
(Inherited from SofuObject.) | |
| GetEnumerator()()() |
Emumerator for foreach
| |
| GetHashCode()()() | (Inherited from Object.) | |
| GetType()()() | (Inherited from Object.) | |
| HasAttribute(String) |
Tests if an element exists in this Map.
| |
| HasComment()()() |
Tests if this SofuObject has a comment.
(Inherited from SofuObject.) | |
| HasList(String) |
Tests if a specific element in this Map exists and is a Sofu.List
| |
| HasMap(String) |
Tests if a specific element in this Map exists and is a Sofu.Map
| |
| HasValue(String) |
Tests if a specific element in this Map exists and is a Sofu.Value
| |
| IsDefined()()() |
Tests if this SofuObject is anything else than a Sofu.Sofu.Undefined
(Inherited from SofuObject.) | |
| IsList()()() |
Tests if this SofuObject is a Sofu.List
(Inherited from SofuObject.) | |
| IsMap()()() |
Tests if this Map is really a Map.
(Overrides SofuObject.IsMap()()().) | |
| IsReference()()() |
Tests if this SofuObject is a Sofu.Reference
(Inherited from SofuObject.) | |
| IsValue()()() |
Tests if this SofuObject is a Sofu.Value
(Inherited from SofuObject.) | |
| Length()()() |
Returns the amount key/value pairs in this Map
| |
| list(String) |
Retrives a specifc Sofu.List from this Map indentified by key.
| |
| map(String) |
Retrives a specifc Sofu.Map from this Map indentified by key.
| |
| MemberwiseClone()()() | (Inherited from Object.) | |
| Object(String) |
Retrives a specifc SofuObject from this Map indentified by key.
| |
| 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.) | |
| RemAttribute(String) |
Removes one element from this Map.
| |
| SetAttribute(String, SofuObject) |
Inserts a new element into the Map.
Any other element with the same key is replaced
| |
| SetComment(String) |
Sets a comment for this SofuObject.
(Inherited from SofuObject.) | |
| 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) |
Converts this Map and all its attributes to a string representing this Map
(Overrides SofuObject.Stringify(String, StringBuilder).) | |
| Stringify(String, TextWriter, Int32) |
Converts this Map and all its attributes to a string representing this Map
(Overrides SofuObject.Stringify(String, TextWriter, Int32).) | |
| StringML(XmlWriter) |
Writes this Object into Xml, does Cross Reference checking.
(Inherited from SofuObject.) | |
| ToString()()() | (Inherited from Object.) | |
| TypeString()()() |
Used to identify this as a Map
(Overrides SofuObject.TypeString()()().) | |
| value(String) |
Retrives a specifc Sofu.Value from this Map indentified by key.
| |
| 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(XmlWriter) |
Writes this Map into a XMLWriter
(Overrides SofuObject.WriteML(XmlWriter).) | |
| WriteML(String) |
Writes this Object into a SofuML file
(Inherited from SofuObject.) | |
| XMLcomment(XmlWriter) |
Writes this Objects comments to XML
(Inherited from SofuObject.) | |
| Xmlify(XmlWriter) |
Writes this Map into a XMLWriter
(Overrides SofuObject.Xmlify(XmlWriter).) |
Sofu.Sofu.Map config = SofuReader.LoadFile("Config.Sofu"); foreach (KeyValuePair<string,Sofu.SofuObject> entry in config) { Console.Write("Key : " + entry.Key + " Value: "); Console.WriteLine(entry.Value.AsValue().ToString()); }