TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class TextDocument in Tinman.Core.Document

The TextDocument class is the root of a simple object model for formatted text documents.

sealed class TextDocument extends ContentNode<IBlockNode>
  implements ITextDocument

Serialization

SerialId

Serialization information about this type.

public static readonly field SerialId
type ISerialTypeInfo

Public / Attributes

Content

The content nodes.

public property Content { get }
type IVectorConst<T>
value [not-null] The content nodes.
inherited ContentNode.Content

IsEmpty

Is this document node empty (i.e. it contains whitespace only)?

public override property IsEmpty { get }
type bool
value true if this document node is empty, false if not.
inherited ContentNode.IsEmpty

SerialType

Returns the serial type of this object.

public property SerialType { get }
type ISerialTypeInfo
value [not-null] The serial type.
inherited SerializableBase.SerialType

SerialVersion

Returns the serial data version.

public virtual property SerialVersion { get }
type int32
value [>=1] The serial data version tag.
inherited SerializableBase.SerialVersion

Remarks:

An ISerializable implementation is required to support all versions up to the one returned by SerialVersion.

See also:

ISerializable.Serialize
ISerializable.Deserialize

Public / Constructors

TextDocument

Creates a new instance of TextDocument.

public constructor TextDocument ()

Public / Methods

Accept

Accepts the given node visitor.

public override method Accept (IDocumentNodeVisitor visitor, object userData)
params visitor The visitor to accept. If null the method shall return silently.
  userData Optional user data object.
implements DocumentNode.Accept

AcceptContent

Calls Accept on each content node.

public method AcceptContent (IDocumentNodeVisitor visitor, object userData)
params visitor The visitor to accept. If null the method returns silently.
  userData Optional user data object.
inherited ContentNode.AcceptContent

Add

Adds the given element to this collection.

public method Add (T element)
type bool
params element The element to add.
returns true if the collection has changed, false if not.
inherited ContentNode.Add

Remarks:

Implementing methods shall return false iff the element has already been collected, i.e. it is contained in the collection. If in doubt, return true.

Deserialize

Initializes the state of this object from the given data stream.

public override method Deserialize (int32 serialVersion, ISerializer data)
type ISerializable
params serialVersion [>=1] The serial data version.
  data [not-null] The serial data stream.
returns [not-null] The deserialized object. This will typically be this, but in some circumstances, another instance may be returned (e.g. singletons).
inherited ContentNode.Deserialize

Remarks:

The Deserialize method will be called immediately after the object has been instantiated via its default constructor.

The provided serialVersion number is guaranteed to be equal to or less than the SerialVersion returned by this object (i.e. ISerializable object must provide backwards compatibility).

See also:

ISerializable.Serialize
ISerializable.SerialVersion

FromString

Creates a TextDocument from the given formatted text.

public static method FromString (string content)
type TextDocument
params content [not-null] The formatted text.
returns [not-null] The text document.

See also:

DocumentUtil

Serialize

Serializes the current state of this object to the given data stream.

public override method Serialize (ISerializer data)
params data [not-null] The serial data stream.
inherited ContentNode.Serialize

See also:

ISerializable.Deserialize
ISerializable.SerialVersion

ToString

[Pure]
public override sealed method ToString ()
type string
inherited DocumentNode.ToString

Validate

Validates the state of this object.

public override method Validate (Validator validator)
params validator [not-null] The validator object.
inherited ContentNode.Validate

WriteSourceCode

Produces source code by feeding the given source code writer.

public override method WriteSourceCode (SourceCodeWriter writer, Context context)
params writer [not-null] The source code writer to use.
  context [not-null] Context information.
inherited ContentNode.WriteSourceCode