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

interface IFileFormat in Tinman.Terrain.Util

Base interface for classes that can read and optionally write certain file formats.

interface IFileFormat extends IPleaseIncludeInBinaryThanks
  base of FileFormat

Attributes

Description

Long description of this file format.

property Description { get }
type string
value [not-null] The description string.

Name

The file format name.

property Name { get }
type string
value [not-null] The file format name.

Next

Returns the next file format.

[ThreadSafe]
property Next { get }
type IFileFormat
value The next file format or null.

Remarks:

The first file format can be obtained from implementing classes. This property can be used to cycle all available file formats of the same type.

Type

The type of this file format (e.g. images, shapes, 3D models).

property Type { get }
type string
value [not-null] The human-readable type name.

Methods

CanRead

Can this file format object be used to read the given path?

method CanRead (string suffix, bool directory = false)
type bool
params suffix [not-null] The lower-case pathname suffix (without '.'). Will be empty if the path does not have a pathname suffix.
  directory Does the path refer to a directory (true) or to a file (false)? Defaults to false.
returns true if this file format can be used, false if not.

CanReadFind

Returns the first file format in the chain (see IFileFormat) that can read the given path.

method CanReadFind (string suffix, bool directory = false)
type IFileFormat
params suffix [not-null] The lower-case pathname suffix (without '.'). Will be empty if the path does not have a pathname suffix.
  directory Does the path refer to a directory (true) or to a file (false)? Defaults to false.
returns The found file format or null.

CanWrite

Can this file format object be used to write the given path?

method CanWrite (string suffix)
type bool
params suffix [not-null] The lower-case pathname suffix (without '.'). Will be empty if the path does not have a pathname suffix.
returns true if this file format can be used, false if not.

PleaseIncludeInBinaryThanks

This is a no-op method that forces the compiler / linker to include this type in the resulting binary.

method PleaseIncludeInBinaryThanks ()
inherited IPleaseIncludeInBinaryThanks.PleaseIncludeInBinaryThanks

Remarks:

Calling this stub method makes sure that all lazy constructor calls have been made.

To initialize everything, an application needs to call this method on its root module(s) (see TinmanModule), followed by a call to PleaseIncludeInBinaryThanksAll.