Header menu logo Nu

Lens Type

Provides access to the property of a simulant via an interface. Initially inspired by Haskell lenses, but specialized for simulant properties.

Instance members

Instance member Description

this.ChangeEvent

Full Usage: this.ChangeEvent

Returns: ChangeData Address
Modifiers: abstract

The change event associated with the lensed property.

Returns: ChangeData Address

this.Get

Full Usage: this.Get

Parameters:
Returns: obj
Modifiers: abstract

Get the value of the property accessed by the lens.

world : World
Returns: obj

this.Name

Full Usage: this.Name

Returns: string
Modifiers: abstract

The name of the property accessed by the lens.

Returns: string

this.SetOpt

Full Usage: this.SetOpt

Returns: (obj -> World -> unit) voption
Modifiers: abstract

Get an optional setter function that updates the property accessed by the lens.

Returns: (obj -> World -> unit) voption

this.This

Full Usage: this.This

Returns: Simulant
Modifiers: abstract

The simulant whose property is accessed by the lens.

Returns: Simulant

this.TrySet

Full Usage: this.TrySet

Parameters:
    value : obj
    world : World

Returns: bool
Modifiers: abstract

Attempt to set the lensed property to the given value.

value : obj
world : World
Returns: bool

this.Type

Full Usage: this.Type

Returns: Type
Modifiers: abstract

The type of the lensed property.

Returns: Type

Type something to start searching.