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

class ConfigValue in Tinman.Core.Config

Abstract base class for ConfigValue implementations.

abstract class ConfigValue implements ICodeOutput
  ICodeRange
  IEquatable<ConfigValue>
  IValidatable
  IVersioned

Public / Constants

ContextIncludeVirtualFields

public constant ContextIncludeVirtualFields = "include-virtual-fields"
type string

False

The boolean value false.

[ShutdownSurvive]
public static readonly field False
type ConfigValue

Remarks:

This config value is immutable. Modifying its value will produce undefined behaviour.

Invalid

An invalid value.

[ShutdownSurvive]
public static readonly field Invalid
type ConfigValue

Remarks:

This config value is immutable. Modifying its value will produce undefined behaviour.

Null

The null value for ClassType values.

[ShutdownSurvive]
public static readonly field Null
type ConfigValue

Remarks:

This config value is immutable. Modifying its value will produce undefined behaviour.

One

The number value 1.

[ShutdownSurvive]
public static readonly field One
type ConfigValue

Remarks:

This config value is immutable. Modifying its value will produce undefined behaviour.

True

The boolean value true.

[ShutdownSurvive]
public static readonly field True
type ConfigValue

Remarks:

This config value is immutable. Modifying its value will produce undefined behaviour.

Zero

The number value 0.

[ShutdownSurvive]
public static readonly field Zero
type ConfigValue

Remarks:

This config value is immutable. Modifying its value will produce undefined behaviour.

Public / Attributes

Bool

Accesses the config value, assuming a conversion to Bool exists.

public virtual property Bool { get set }
type bool
value The config value.

See also:

ConfigType.IsBoolean
ConfigType.IsConvertibleTo

Exceptions:

CanConfigure

Can the Configure method be called on this config value?

public property CanConfigure { get }
type bool
value true if Configure can be called,
false if not.

Elements

Accesses the config value, assuming it is an array value.

public virtual property Elements { get }
type ValueArray
value [not-null] The config value.

See also:

ConfigType.IsArray
ArrayType

Exceptions:

EvaluatedBy

Returns the config expression that has been evaluated to create this config value.

public property EvaluatedBy { get }
type ConfigExpression
value The config expression or null if not known resp. applicable.

Fields

Accesses the config value, assuming it is a class value.

public virtual property Fields { get }
type IConfigValueBag
value [not-null] The config value.

See also:

ConfigType.IsClass
ClassType

Exceptions:

IsInvalid

public virtual property IsInvalid { get }
type bool
value

IsNull

public virtual property IsNull { get }
type bool
value

Num

Accesses the config value, assuming a conversion to Num exists.

public virtual property Num { get set }
type float64
value The config value.

See also:

ConfigType.IsNumber
ConfigType.IsConvertibleTo

Exceptions:

Path

Accesses the config value, assuming a conversion to Path exists.

public virtual property Path { get set }
type Path
value The config value.

See also:

ConfigType.IsPath
ConfigType.IsConvertibleTo

Exceptions:

Range

Returns source code range of this object.

public property Range { get }
type RangeI
value The source code character range or Inv if none.
implements ICodeRange.Range

Str

Accesses the config value, assuming a conversion to Str exists.

public virtual property Str { get set }
type string
value The config value.

See also:

ConfigType.IsString
ConfigType.IsConvertibleTo

Exceptions:

SyntaxWeightCtor

public property SyntaxWeightCtor { get }
type int32
value

Type

Returns the type of this config property value.

public abstract property Type { get }
type ConfigType
value [not-null] The type of this property value.

Version

Returns the current version of object.

public virtual property Version { get }
type int32
value The current version number.
implements IVersioned.Version

Remarks:

For each modification, the version is incremented by at least one.

Public / Constructors

Evaluate

Parses the given config expression and returns the resulting config value.

public static method Evaluate (string expression)
type ConfigValue
params expression [not-null] The config expression.
returns [not-null] The config value.

Exceptions:

New

Creates a new Bool config value object for the the given value.

public static method New (bool value)
type ConfigValue
params value The initial value.
returns [not-null] The ConfigValue object.

Creates a new Num config value object for the the given value.

public static method New (float64 value)
type ConfigValue
params value The initial value.
returns [not-null] The ConfigValue object.

Creates a new Path config value object for the the given value.

public static method New (Path value)
type ConfigValue
params value The initial value.
returns [not-null] The ConfigValue object.

Creates a new Str config value object for the the given value.

public static method New (string value)
type ConfigValue
params value The initial value.
returns [not-null] The ConfigValue object.

NewArray

Creates a new Path config value array for the the given values.

public static method NewArray (bool[] values)
type ConfigValue
params values The initial values.
returns [not-null] The ConfigValue object.

Creates a new Path config value array for the the given values.

public static method NewArray (float64[] values)
type ConfigValue
params values The initial values.
returns [not-null] The ConfigValue object.

Creates a new Path config value array for the the given values.

public static method NewArray (string[] values)
type ConfigValue
params values The initial values.
returns [not-null] The ConfigValue object.

Creates a new Path config value array for the the given values.

public static method NewArray (Path[] values)
type ConfigValue
params values The initial values.
returns [not-null] The ConfigValue object.

Public / Methods

Cache

Caches the given object.

[EmptyBody]
public virtual method Cache (object obj)
type ConfigValue
params obj The native object
returns [not-null] this

Remarks:

This method can be called after a config value has been constructed for a native object.

Cached

Returns the cached object.

[EmptyBody]
public virtual method Cached (int32 version)
type object
params version The config value version.
returns The cached native object or null if not present or outdated.

Configure

Uses this config value and creates a native object from it.

[OwnerReturn]
public method Configure ()
type IConfigurable
returns [not-null] The created object.

Remarks:

An IConfiguratorObject instance must have been specified for the ClassType of this value (see Configurator).

Exceptions:

Equals

Compares this object with the given one.

[Pure]
public method Equals (ConfigValue 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

GetField

Returns the value of the given field.

public method GetField (string name, bool notNull = false)
type ConfigValue
params name [not-null] The field name.
  notNull Call NotNull on field value? Defaults to false.
returns [not-null] The field value.

See also:

Fields

Exceptions:

GetFieldBool

Returns the value of the given field.

public method GetFieldBool (string name)
type bool
params name [not-null] The field name.
returns The field value.

See also:

Fields

Exceptions:

GetFieldDouble

Returns the value of the given field.

public method GetFieldDouble (string name)
type float64
params name [not-null] The field name.
returns The field value.

See also:

Fields

Exceptions:

GetFieldInt

Returns the value of the given field.

public method GetFieldInt (string name)
type int32
params name [not-null] The field name.
returns The field value.

See also:

Fields

Exceptions:

GetFieldPath

Returns the value of the given field.

public method GetFieldPath (string name, bool notNull = false)
type Path
params name [not-null] The field name.
  notNull Call NotNull on field value? Defaults to false.
returns The field value.

See also:

Fields

Exceptions:

GetFieldStr

Returns the value of the given field.

public method GetFieldStr (string name, bool notNull = false)
type string
params name [not-null] The field name.
  notNull Call NotNull on field value? Defaults to false.
returns The field value.

See also:

Fields

Exceptions:

New

Creates a new instance of this nullable type and sets this value to the resulting value.

public method New ()
type ConfigValue
returns [not-null] this

Creates a new instance of the given nullable type and sets this value to the resulting value.

public virtual method New (ConfigType type)
type ConfigValue
params type The nullable type to instantiate or null to use the value base type.
returns [not-null] this

Exceptions:

NotNull

Ensures that this config value is not equal to Null, i.e. IsNull will return false.

public method NotNull ()
type ConfigValue
returns [not-null] this

Exceptions:

Set

Sets the value to the given value.

public virtual method Set (ConfigValue value)
type ConfigValue
params value [not-null] The other value.
returns [not-null] this

Exceptions:

SetField

Sets the value of the given field.

public method SetField (string name, ConfigValue value)
type ConfigValue
params name [not-null] The field name.
  value [not-null] The field value.
returns [not-null] this

See also:

Fields

Exceptions:


Sets the value of the given field.

public method SetField (string name, IConfigurable value)
type ConfigValue
params name [not-null] The field name.
  value The field value.
returns [not-null] this

See also:

Fields

Exceptions:

SetFieldBool

Sets the value of the given field.

public method SetFieldBool (string name, bool value)
type ConfigValue
params name [not-null] The field name.
  value The field value.
returns [not-null] this

See also:

Fields

Exceptions:

SetFieldNum

Sets the value of the given field.

public method SetFieldNum (string name, float64 value)
type ConfigValue
params name [not-null] The field name.
  value The field value.
returns [not-null] this

See also:

Fields

Exceptions:

SetFieldPath

Sets the value of the given field.

public method SetFieldPath (string name, Path value)
type ConfigValue
params name [not-null] The field name.
  value The field value.
returns [not-null] this

See also:

Fields

Exceptions:

SetFieldStr

Sets the value of the given field.

public method SetFieldStr (string name, string value)
type ConfigValue
params name [not-null] The field name.
  value The field value.
returns [not-null] this

See also:

Fields

Exceptions:

ToString

[Pure]
public override method ToString ()
type string

public method ToString (bool includeVirtualFields)
type string
params includeVirtualFields

Validate

Validates the state of this object.

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

ValidateFlush

Flushes all cached validation results.

public virtual method ValidateFlush ()

Remarks:

Call this method when external changes have taken place, such as file deletions / creations.

WriteSourceCode

Produces source code by feeding the given source code writer.

public abstract method WriteSourceCode (SourceCodeWriter writer, Context context)
params writer [not-null] The source code writer to use.
  context [not-null] Context information.
implements ICodeOutput.WriteSourceCode

Exceptions:

Protected / Attributes

DoSyntaxWeightCtor

Returns the syntax weight for this config value (for pretty-print only).

protected abstract property DoSyntaxWeightCtor { get }
type int32
value The syntax weight.

Exceptions:

Protected / Constructors

ConfigValue

protected constructor ConfigValue ()

Protected / Methods

DoEquals

Compares this config value and the given one for equality.

protected abstract method DoEquals (ConfigValue other)
type bool
params other The other config value. This will never be null. Also, the types of this config value and the given one are mutually convertible to each other.
returns true if both config values are equal, false if not.

Exceptions:

DoValidate

Validates this config value.

[EmptyBody]
protected virtual method DoValidate (Validator validator)
params validator The validator to use.

Exceptions: