HxmValue Class¶
- class Hexaly.Modeler.HxmValue¶
General value container. Any value can be contained in an instance of this class (integer, double, boolean, string, HxExpression, module, map, function and also non exposed types like files or dates).
- Since:
10.0
Summary¶
Returns the type of the value. |
|
Returns true if the value is a nil value. |
|
Returns true if the value is an integer value. |
|
Returns true if the value is a double value. |
|
Returns true if the value is a boolean value. |
|
Returns true if the value is a string value. |
|
Returns true if the value is a HxExpression. |
|
Returns true if the value is a HxmFunction. |
|
Returns true if the value is a HxmModule. |
|
Returns true if the value is a HxmMap. |
|
Returns the value as an integer. |
|
Returns the value as a double. |
|
Returns the value as a boolean. |
|
Returns the value as a string. |
|
Returns the value as an expression. |
|
Returns the value as a function. |
|
Returns the value as a module. |
|
Returns the value as a map. |
|
Releases the reference. |
Instance methods¶
- HxmType GetValueType()¶
Returns the type of the value.
- Returns:
The type of the value.
- Return type:
- bool IsNil()¶
Returns true if the value is a nil value.
- bool IsInt()¶
Returns true if the value is an integer value.
- bool IsDouble()¶
Returns true if the value is a double value.
- bool IsBool()¶
Returns true if the value is a boolean value.
- bool IsString()¶
Returns true if the value is a string value.
- bool IsExpression()¶
Returns true if the value is a
HxExpression
.
- bool IsFunction()¶
Returns true if the value is a
HxmFunction
.
- long AsInt()¶
Returns the value as an integer. The value must be an integer.
- Returns:
Integer value.
- Return type:
long
- double AsDouble()¶
Returns the value as a double. The value must be a double.
- Returns:
Double value.
- Return type:
double
- bool AsBool()¶
Returns the value as a boolean. The value must be a boolean.
- Returns:
Boolean value.
- Return type:
bool
- string AsString()¶
Returns the value as a string. The value must be a string.
- Returns:
String value.
- Return type:
string
- Hexaly.Optimizer.HxExpression AsExpression()¶
Returns the value as an expression. The value must be a
Hexaly.Optimizer.HxExpression
.- Returns:
Expression value.
- Return type:
- HxmFunction AsFunction()¶
Returns the value as a function. The value must be a
HxmFunction
.- Returns:
Function value.
- Return type:
- HxmModule AsModule()¶
Returns the value as a module. The value must be a
HxmModule
.- Returns:
Module value.
- Return type:
- HxmMap AsMap()¶
Returns the value as a map. The value must be a
HxmMap
.- Returns:
Map value.
- Return type:
- void Dispose()¶
Releases the reference. If this value was already released, returns immediately and does nothing. Invoking any method on this object after this operation will throw an exception.
Note: Releasing a reference does not necessarily imply that the underlying value object is destroyed. It is only destroyed if no more references point to it.
- Since:
11.5