C# Class TeaseAI_CE.Scripting.Variable

The base variable class, should be used for [bool, float, string] by-reference thread-safe
Inheritance: IKeyed
Show file Open project: TeaseAI/TeaseAI-CE Class Usage Examples

Public Properties

Property Type Description
Readonly bool

Protected Properties

Property Type Description
_value object

Public Methods

Method Description
CanWriteValue ( ) : bool
Evaluate ( Context sender, Variable left, Operators op, Variable right ) : Variable
Get ( Key key, Logger log = null ) : Variable
ToString ( ) : string
Variable ( ) : System
Variable ( IVType value ) : System
Variable ( VM value ) : System
Variable ( Variable value ) : System
Variable ( bool value ) : System
Variable ( float value ) : System
Variable ( string value ) : System
WriteValue ( StringBuilder sb ) : void

Use to write a value as a string, when writing to files.

WriteValueUser ( Context sender, StringBuilder output ) : void

Protected Methods

Method Description
getObj ( ) : object
setObj ( object value ) : void

Private Methods

Method Description
getDefault ( Type type ) : object

Method Details

CanWriteValue() public method

public CanWriteValue ( ) : bool
return bool

Evaluate() public static method

public static Evaluate ( Context sender, Variable left, Operators op, Variable right ) : Variable
sender Context
left Variable
op Operators
right Variable
return Variable

Get() public method

public Get ( Key key, Logger log = null ) : Variable
key Key
log Logger
return Variable

ToString() public method

public ToString ( ) : string
return string

Variable() public method

public Variable ( ) : System
return System

Variable() public method

public Variable ( IVType value ) : System
value IVType
return System

Variable() public method

public Variable ( VM value ) : System
value VM
return System

Variable() public method

public Variable ( Variable value ) : System
value Variable
return System

Variable() public method

public Variable ( bool value ) : System
value bool
return System

Variable() public method

public Variable ( float value ) : System
value float
return System

Variable() public method

public Variable ( string value ) : System
value string
return System

WriteValue() public method

Use to write a value as a string, when writing to files.
public WriteValue ( StringBuilder sb ) : void
sb StringBuilder
return void

WriteValueUser() public method

public WriteValueUser ( Context sender, StringBuilder output ) : void
sender Context
output StringBuilder
return void

getObj() protected method

protected getObj ( ) : object
return object

setObj() protected method

protected setObj ( object value ) : void
value object
return void

Property Details

Readonly public property

If true scripts can only read.
public bool Readonly
return bool

_value protected property

protected object _value
return object