ConfigMember

Description

sealed class Tinman.Core.Config.ConfigMember

Derived from

ConfigItem abstract

The ConfigMember class is used to represent named parameters, class fields and script variables / functions.

Member names are unique within their respective scope (i.e. config script of class type). This means that the parameter list of a function is not taken into account when resolving identifiers to functions.

Public / Methods

Call​Function


public method CallFunction → (1)

arguments in : ConfigValue [ ]

The function arguments.

returns → ConfigValue

The return value of the called script function.

Calls the script function this member represents.

If this config member is not a script function, ConfigValue.Invalid is returned.

ConfigException

If an unexpected error has occurred while obtaining the config value, for example while evaluating default argument expressions for the function call.

Check​Constraint


public method CheckConstraint → (2)

value in : ConfigValue

[not-null]
The value to check.

scope opt : IConfigValueBag = null

The scope to use for evaluation.

returns → bool

true if value in satisfies the constraint, false if it violates it.

Validates the value constraint of this member.

ConfigException

If an error has occurred while evaluating the constraint expression.

Evaluate​References


public method EvaluateReferences → (2)

scope in : IConfigValueBag

[not-null]
The evaluation scope.

members opt : IVector<ConfigMember> = null

Output for collected references or null.

returns → IVectorConst<ConfigMember>

The collected config members.

Collects all config members that are referenced by this member.

Public / Attributes

Comment


public attribute Comment → (get)

value : string

The comment text or null.

The optional text comment of the member.

Constraint


public attribute Constraint → (get)

value : ConfigExpression

The constraint or null.

The fields value constraint.

Enclosing​Class​Type


public attribute EnclosingClassType → (get)

value : ClassType

The owning class type or null.

Returns the class type that uses this config member as a class field or initializer.

Enclosing​Config​Script


public attribute EnclosingConfigScript → (get)

value : ConfigScript

The owning config script or null.

Returns the config script that contains this config member as a variable or function.

Enclosing​Function


public attribute EnclosingFunction → (get)

value : ConfigMember

The owning function or null.

Returns the function that uses this config member as a parameter.

Has​Constraint


public attribute HasConstraint → (get)

value : bool

true if this member has a value constraint, false if not.

Does this member have a value constraint?

Is​Field


public attribute IsField → (get)

value : bool

true if this is a class field, false if not.

Does this config member represent a field of a class type?

Is​Function


public attribute IsFunction → (get)

value : bool

true if this is a script function, false if not.

Does this config member represent a script function?

Is​Initializer


public attribute IsInitializer → (get)

value : bool

true if this is an initializer, false if not.

Does this config member represent an initializer of an object creation statement?

Is​Intern


public attribute IsIntern → (get)

value : bool

true if this config field is intern, false if it is public.

Is this config member intern?

Is​Parameter


public attribute IsParameter → (get)

value : bool

true if this is a function parameter, false if not.

Does this config member represent a parameter of a function?

Is​Variable


public attribute IsVariable → (get)

value : bool

true if this is a script variable, false if not.

Does this config member represent a script variable?

Is​Virtual


public attribute IsVirtual → (get)

value : bool

true if this config field is virtual, false if not.

Is this config member virtual?

Parameters


public attribute Parameters → (get)

value : IVectorConst<ConfigMember>

[not-null]
The list of function parameters.

Returns the function parameters of this config member.

If this config member does not represent a function, an empty list is returned.

Value


public attribute Value → (get)

value : ConfigExpression

The default value or null.

The default value of the member.

Variable


public attribute Variable → (get)

value : ConfigValue

[not-null]
The script variable value.

Accesses the value of the script variable this config member represents.

If this config member is not a script variable, ConfigValue.Invalid is returned.

ConfigException

If an unexpected error has occurred while obtaining the config value, for example while retrieving a virtual field of a class value.