![]() |
KVIrc 5.2.6
Developer APIs
|
A class which maps every number. More...
#include <KviKvsVariant.h>
Classes | |
union | DataType |
This union holds an integer or a double floating point number. More... | |
Public Types | |
enum | Type { Real , Integer } |
Describes the type of number. More... | |
Public Member Functions | |
kvs_int_t | integer () const |
Return the integer number if the number itself is an integer. | |
bool | isInteger () const |
Returns true if the number is an integer. | |
bool | isReal () const |
Returns true if the number is a double floating point. | |
kvs_real_t | real () const |
Return the real number if the number itself is a double floating point. | |
Type | type () const |
Returns the type of the number. | |
Protected Attributes | |
Type | m_type |
DataType | m_u |
Friends | |
class | KviKvsVariant |
A class which maps every number.
enum KviKvsNumber::Type |
|
inline |
Return the integer number if the number itself is an integer.
References KviKvsNumber::DataType::iInt.
Referenced by KviKvsTreeNodeExpressionUnaryOperatorBitwiseNot::evaluateReadOnly(), KviKvsTreeNodeExpressionUnaryOperatorNegate::evaluateReadOnly(), KviKvsTreeNodeOperationSelfDivision::execute(), KviKvsTreeNodeOperationSelfModulus::execute(), KviKvsTreeNodeOperationSelfMultiplication::execute(), KviKvsTreeNodeOperationSelfSubtraction::execute(), KviKvsTreeNodeOperationSelfSum::execute(), KviKvsTreeNodeSpecialCommandSwitchLabelCase::execute(), and str_kvs_fnc_isunsignednumber().
|
inline |
Returns true if the number is an integer.
Referenced by KviKvsTreeNodeOperationSelfDivision::execute(), KviKvsTreeNodeOperationSelfModulus::execute(), KviKvsTreeNodeOperationSelfMultiplication::execute(), KviKvsTreeNodeOperationSelfSubtraction::execute(), KviKvsTreeNodeOperationSelfSum::execute(), KviKvsTreeNodeSpecialCommandSwitchLabelCase::execute(), and str_kvs_fnc_isunsignednumber().
|
inline |
Returns true if the number is a double floating point.
Referenced by KviKvsTreeNodeExpressionUnaryOperatorBitwiseNot::evaluateReadOnly(), and KviKvsTreeNodeExpressionUnaryOperatorNegate::evaluateReadOnly().
|
inline |
Return the real number if the number itself is a double floating point.
References KviKvsNumber::DataType::dReal.
Referenced by KviKvsTreeNodeExpressionUnaryOperatorBitwiseNot::evaluateReadOnly(), KviKvsTreeNodeExpressionUnaryOperatorNegate::evaluateReadOnly(), KviKvsTreeNodeOperationSelfDivision::execute(), KviKvsTreeNodeOperationSelfModulus::execute(), KviKvsTreeNodeOperationSelfMultiplication::execute(), KviKvsTreeNodeOperationSelfSubtraction::execute(), KviKvsTreeNodeOperationSelfSum::execute(), KviKvsTreeNodeSpecialCommandSwitchLabelCase::execute(), and str_kvs_fnc_isunsignednumber().
|
inline |
Returns the type of the number.
|
friend |
|
protected |
Referenced by KviKvsVariant::asNumber(), and KviKvsVariant::castToNumber().
|
protected |
Referenced by KviKvsVariant::asNumber(), and KviKvsVariant::castToNumber().