The ConfigMember class is used to represent named parameters, class fields and script variables / functions.
sealed class
|
ConfigMember
|
extends
|
ConfigItem
|
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.
The optional text comment of the member.
public
property
|
Comment
{
get
}
|
||
type
|
string
|
||
value
|
The
comment
text
or
null . |
The fields value constraint.
public
property
|
Constraint
{
get
}
|
||
type
|
ConfigExpression
|
||
value
|
The
constraint
or
null . |
Returns the documentation of this config item.
public
property
|
Documentation
{
get
}
|
||
type
|
IMemberDocNode
|
||
value
|
The
documentation
or
null
if
not
found. |
||
inherited
|
ConfigItem.Documentation
|
Returns the class type that uses this config member as a class field.
public
property
|
EnclosingClassType
{
get
}
|
||
type
|
ClassType
|
||
value
|
The
owning
class
type
or
null . |
See also:
EnclosingConfigScriptReturns the config script that contains this config member as a variable or function.
public
property
|
EnclosingConfigScript
{
get
}
|
||
type
|
ConfigScript
|
||
value
|
The
owning
config
script
or
null . |
See also:
EnclosingClassTypeReturns the config type that contains this item.
public
property
|
EnclosingConfigType
{
get
}
|
||
type
|
ConfigType
|
||
value
|
The
owning
config
type
or
null . |
||
inherited
|
ConfigItem.EnclosingConfigType
|
Returns the function that uses this config member as a parameter.
public
property
|
EnclosingFunction
{
get
}
|
||
type
|
ConfigMember
|
||
value
|
The
owning
function
or
null . |
See also:
EnclosingClassTypeDoes this member have a value constraint?
public
property
|
HasConstraint
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
this
member
has
a
value
constraint,
false
if
not. |
Does this config member represent a field of a class type?
public
property
|
IsField
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
this
is
a
class
field,
false
if
not. |
Does this config member represent a script function?
public
property
|
IsFunction
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
this
is
a
script
function,
false
if
not. |
Is this config member intern?
public
property
|
IsIntern
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
this
config
field
is
intern,
false
if
it
is
public. |
See also:
ConfigModifiers.InternDoes this config member represent a parameter of a function?
public
property
|
IsParameter
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
this
is
a
function
parameter,
false
if
not. |
Does this config member represent a script variable?
public
property
|
IsVariable
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
this
is
a
script
variable,
false
if
not. |
Is this config member virtual?
public
property
|
IsVirtual
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
this
config
field
is
virtual,
false
if
not. |
The config item name.
public
property
|
Name
{
get
}
|
||
type
|
string
|
||
value
|
|
The item name. | |
inherited
|
ConfigItem.Name
|
Returns the function parameters of this config member.
public
property
|
Parameters
{
get
}
|
||
type
|
IVectorConst<ConfigMember>
|
||
value
|
|
The list of function parameters. |
Remarks:
If this config member does not represent a function, an empty list is returned.
Returns source code range of this object.
public
property
|
Range
{
get
}
|
||
type
|
RangeI
|
||
value
|
The source code character range or Inv if none. | ||
inherited
|
ConfigNode.Range
|
The value type of this member.
public
virtual
property
|
Type
{
get
}
|
||
type
|
ConfigType
|
||
value
|
|
The member type. | |
inherited
|
ConfigItem.Type
|
The default value of the member.
public
property
|
Value
{
get
}
|
||
type
|
ConfigExpression
|
||
value
|
The
default
value
or
null . |
Accesses the value of the script variable this config member represents.
public
property
|
Variable
{
get
}
|
||
type
|
ConfigValue
|
||
value
|
|
The script variable value. |
public
method
|
CallFunction
(ConfigValue[] arguments)
|
||
type
|
ConfigValue
|
||
params
|
arguments
|
Validates the value constraint of this member.
public
method
|
CheckConstraint
(ConfigValue value,
IConfigValueBag scope = null)
|
||
type
|
bool
|
||
params
|
value
|
[not-null]
|
The value to check. |
scope
|
The
scope
to
use
for
evaluation.
Defaults
to
null . |
||
returns
|
true
if
value
satisfies
the
constraint,
false
if
it
violates
it.
|
Clears the source code range.
public
method
|
ClearRange
()
|
||
inherited
|
ConfigNode.ClearRange
|
See also:
ConfigNode.RangeCollects all config members that are referenced by this member.
public
method
|
EvaluateReferences
(IConfigValueBag scope,
IVector<ConfigMember> members = null)
|
||
type
|
IVectorConst<ConfigMember>
|
||
params
|
scope
|
[not-null]
|
The evaluation scope. |
members
|
Output
for
collected
references
or
null . |
||
returns
|
|
The collected config members. |
Finds all config nodes which code range (see Range) intersects with the given range (see Intersects).
public
override
method
|
FindAt
(RangeI range,
ICollector<ConfigNode> nodes)
|
||
params
|
range
|
The code range to intersect with. | |
nodes
|
[not-null]
|
The output nodes. | |
overrides
|
ConfigItem.FindAt
|
Resolves all references in this PSI node.
public
override
method
|
Resolve
()
|
||
type
|
ResolveResult
|
||
returns
|
The result of the resolver cycle. | ||
overrides
|
ConfigItem.Resolve
|
Provides additional information about the parsing process.
public
method
|
SetParseInfo
(RangeI range)
|
||
params
|
range
|
The source code range. | |
inherited
|
ConfigNode.SetParseInfo
|
[Pure]
|
||||
public
override
method
|
ToString
()
|
|||
type
|
string
|
|||
inherited
|
ConfigNode.ToString
|
Validates the state of this object.
public
override
method
|
Validate
(Validator validator)
|
||
params
|
validator
|
[not-null]
|
The validator object. |
implements
|
ConfigNode.Validate
|
Produces source code by feeding the given source code writer.
public
override
method
|
WriteSourceCode
(SourceCodeWriter writer,
Context context)
|
||
params
|
writer
|
[not-null]
|
The source code writer to use. |
context
|
[not-null]
|
Context information. | |
implements
|
ConfigNode.WriteSourceCode
|