KVIrc  4.9.2
DeveloperAPIs
Classes | Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
KviKvsNumber Class Reference

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. More...
 
bool isInteger () const
 Returns true if the number is an integer. More...
 
bool isReal () const
 Returns true if the number is a double floating point. More...
 
kvs_real_t real () const
 Return the real number if the number itself is a double floating point. More...
 
Type type () const
 Returns the type of the number. More...
 

Protected Attributes

Type m_type
 
DataType m_u
 

Friends

class KviKvsVariant
 

Detailed Description

A class which maps every number.

Member Enumeration Documentation

Describes the type of number.

Enumerator
Real 

The number is an integer

Integer 

The number is a double floating point

Member Function Documentation

kvs_int_t KviKvsNumber::integer ( ) const
inline
bool KviKvsNumber::isInteger ( ) const
inline
bool KviKvsNumber::isReal ( ) const
inline

Returns true if the number is a double floating point.

Returns
bool

Referenced by KviKvsTreeNodeExpressionUnaryOperatorNegate::evaluateReadOnly(), and KviKvsTreeNodeExpressionUnaryOperatorBitwiseNot::evaluateReadOnly().

kvs_real_t KviKvsNumber::real ( ) const
inline
Type KviKvsNumber::type ( ) const
inline

Returns the type of the number.

Returns
Type

Friends And Related Function Documentation

friend class KviKvsVariant
friend

Member Data Documentation

Type KviKvsNumber::m_type
protected
DataType KviKvsNumber::m_u
protected

The documentation for this class was generated from the following file: