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

class VirtualPath in Tinman.Core.IO.Files

Represents a virtual path mapping.

sealed class VirtualPath implements IConfigurable
  IEquatable<VirtualPath>
  IValidatable

See also:

VirtualFileSystem

Configuration

Config

The configurator object for this type.

public static property Config { get }
type IConfigurator<VirtualPath>
value [not-null] The configurator object.

ConfigUsage

The configurator object for VirtualPathUsage.

public static readonly field ConfigUsage
type IConfigurator<VirtualPathUsage>

Public / Attributes

FileSystem

The path in the filesystem.

public readonly field FileSystem
type Path

Remarks:

This value is never null and always in canonical form (see Canonical).

Mapped

The mapped virtual resource path.

public readonly field Mapped
type Path

Remarks:

This value is never null, always absolute and does not have a root selector.

Usage

The usage flag of this resource path mapping.

public readonly field Usage
type VirtualPathUsage

Public / Constructors

VirtualPath

Creates a new instance of VirtualPath.

public constructor VirtualPath (Path fileSystem, Path mapped = null, VirtualPathUsage usage = VirtualPathUsage.Read)
params fileSystem [not-null] The resource path in the filesystem.
  mapped The mapped engine resource path. If null the fileSystem path will be mapped to root (i.e. '/'). Defaults to null.
  usage The resource path usage flag. Defaults to Read.

Public / Methods

Equals

Compares this object with the given one.

[Pure]
public method Equals (VirtualPath other)
type bool
params other The object to compare to.
returns true if this object is equal to other, false if not.
implements IEquatable.Equals

ToConfig

Returns the configuration value that describes this object.

public method ToConfig ()
type ConfigValue
returns [not-null] The configuration value.
implements IConfigurable.ToConfig

Remarks:

All configurable objects need to implement this interface. For simple types, it is preferable to delegate to ToValue.

The returned value may be of type Invalid, which means that this object in its current state cannot be described with the configuration API.

Before returning the resulting configuration value, Cache must be called on it, passing this IConfigurable object as parameter.

ToFileSystem

Converts the given mapped path into a filesystem path.

public method ToFileSystem (Path mapped, string rootSelector = null)
type Path
params mapped [not-null] The mapped path.
  rootSelector The filesystem root selector or null. Defaults to null.
returns The filesystem path or null if there is no suitable mapping.

ToMapped

Converts the given filesystem path into a mapped path.

public method ToMapped (Path fileSystem, string rootSelector = null)
type Path
params fileSystem [not-null] The filesystem path.
  rootSelector The filesystem root selector or null. Defaults to null.
returns The mapped path or null if there is no suitable mapping.

ToString

[Pure]
public override method ToString ()
type string

Validate

Validates the state of this object.

public method Validate (Validator validator)
params validator [not-null] The validator object.
implements IValidatable.Validate