HxmValue Class

class 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

Functions
getType Returns the type of the value.
isObject Returns true if the value is an object (i.
isNil Returns true if the value is nil.
isInt Returns true if the value is an integer value.
isDouble Returns true if the value is a double value.
isBool Returns true if the value is a boolean value.
isExpression Returns true if the value is an HxExpression.
isString Returns true if the value is a string value.
isMap Returns true if the value is an HxmMap.
isFunction Returns true if the value is an HxmFunction.
isModule Returns true if the value is an HxmModule.
isClass Returns true if the value is an HxmClass.
asInt Returns the value as an integer.
asDouble Returns the value as a double.
asBool Returns the value as a boolean.
asExpression Returns the value as a HxExpression.
asString Returns the value as a string.
asMap Returns the value as an HxmMap.
asFunction Returns the value as an HxmFunction.
asModule Returns the value as an HxmModule.
asClass Returns the value as an HxmClass.
getClass Returns the class of this value.
Overloaded operators
hxint Returns the value as an integer.
hxdouble Returns the value as a double.
bool_ Returns the value as a boolean.
HxExpression Returns the value as a HxExpression.
string Returns the value as a string.
HxmMap Returns the value as an HxmMap.
HxmFunction Returns the value as an HxmFunction.
HxmModule Returns the value as an HxmModule.
HxmClass Returns the value as an HxmClass.

Functions

HxmType HxmValue::getType() const

Returns the type of the value.

Returns:Type of the value.
See:HxmType
bool HxmValue::isObject() const

Returns true if the value is an object (i.e. not nil, bool, int or double).

bool HxmValue::isNil() const

Returns true if the value is nil.

bool HxmValue::isInt() const

Returns true if the value is an integer value.

bool HxmValue::isDouble() const

Returns true if the value is a double value.

bool HxmValue::isBool() const

Returns true if the value is a boolean value.

bool HxmValue::isExpression() const

Returns true if the value is an HxExpression.

bool HxmValue::isString() const

Returns true if the value is a string value.

bool HxmValue::isMap() const

Returns true if the value is an HxmMap.

bool HxmValue::isFunction() const

Returns true if the value is an HxmFunction.

bool HxmValue::isModule() const

Returns true if the value is an HxmModule.

bool HxmValue::isClass() const

Returns true if the value is an HxmClass.

hxint HxmValue::asInt() const

Returns the value as an integer. The value must be an integer.

hxdouble HxmValue::asDouble() const

Returns the value as a double. The value must be a double.

bool HxmValue::asBool() const

Returns the value as a boolean. The value must be a boolean.

HxExpression HxmValue::asExpression() const

Returns the value as a HxExpression. The value must be a HxExpression.

std::string HxmValue::asString() const

Returns the value as a string. The value must be a string.

HxmMap HxmValue::asMap() const

Returns the value as an HxmMap. The value must be a map.

HxmFunction HxmValue::asFunction() const

Returns the value as an HxmFunction. The value must be a function.

HxmModule HxmValue::asModule() const

Returns the value as an HxmModule. The value must be a module.

HxmClass HxmValue::asClass() const

Returns the value as an HxmClass. The value must be a class.

HxmClass HxmValue::getClass() const

Returns the class of this value. The value must be an object (i.e. not a boolean, integer, double or nil).

Overloaded operators

explicit operator HxmValue::hxint() const

Returns the value as an integer. The value must be an integer.

explicit operator HxmValue::hxdouble() const

Returns the value as a double. The value must be a double.

explicit operator HxmValue::bool_() const

Returns the value as a boolean. The value must be a boolean.

explicit operator HxmValue::HxExpression() const

Returns the value as a HxExpression. The value must be a HxExpression.

explicit operator HxmValue::std::string() const

Returns the value as a string. The value must be a string.

explicit operator HxmValue::HxmMap() const

Returns the value as an HxmMap. The value must be a map.

explicit operator HxmValue::HxmFunction() const

Returns the value as an HxmFunction. The value must be a function.

explicit operator HxmValue::HxmModule() const

Returns the value as an HxmModule. The value must be a module.

explicit operator HxmValue::HxmClass() const

Returns the value as an HxmClass. The value must be a class.