LSPValue Class¶
-
class
LSPValue
¶ General value container. Any value can be contained in an instance of this class (integer, double, boolean, string, LSExpression, module, map, function and also non exposed types like files or dates).
Since: 10.0
Summary¶
getType |
Returns the type of the value. |
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 localsolver::LSExpression. |
isString |
Returns true if the value is a string value. |
isMap |
Returns true if the value is an LSPMap. |
isFunction |
Returns true if the value is an LSPFunction. |
isModule |
Returns true if the value is an LSPModule. |
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 localsolver::LSExpression. |
asString |
Returns the value as a string. |
asMap |
Returns the value as an LSPMap. |
asFunction |
Returns the value as an LSPFunction. |
asModule |
Returns the value as an LSPModule. |
lsint |
Returns the value as an integer. |
lsdouble |
Returns the value as a double. |
bool_ |
Returns the value as a boolean. |
LSExpression |
Returns the value as a localsolver::LSExpression. |
string |
Returns the value as a string. |
LSPMap |
Returns the value as an LSPMap. |
LSPFunction |
Returns the value as an LSPFunction. |
LSPModule |
Returns the value as an LSPModule. |
Functions¶
-
LSPType
LSPValue
::
getType
() const¶ Returns the type of the value.
Returns: Type of the value. See: LSPType
-
bool
LSPValue
::
isExpression
() const¶ Returns true if the value is an
localsolver::LSExpression
.
-
bool
LSPValue
::
isFunction
() const¶ Returns true if the value is an
LSPFunction
.
-
LSExpression
LSPValue
::
asExpression
() const¶ Returns the value as a
localsolver::LSExpression
. The value must be a LSExpression.
-
LSPFunction
LSPValue
::
asFunction
() const¶ Returns the value as an
LSPFunction
. The value must be a function.
Overloaded operators¶
-
explicit
operator LSPValue::lsint
() const¶ Returns the value as an integer. The value must be an integer.
-
explicit
operator LSPValue::lsdouble
() const¶ Returns the value as a double. The value must be a double.
-
explicit
operator LSPValue::bool_
() const¶ Returns the value as a boolean. The value must be a boolean.
-
explicit
operator LSPValue::LSExpression
() const¶ Returns the value as a
localsolver::LSExpression
. The value must be a LSExpression.
-
explicit
operator LSPValue::std::string
() const¶ Returns the value as a string. The value must be a string.
-
explicit
operator LSPValue::LSPMap
() const¶ Returns the value as an
LSPMap
. The value must be a map.
-
explicit
operator LSPValue::LSPFunction
() const¶ Returns the value as an
LSPFunction
. The value must be a function.