KVIrc  4.9.2
DeveloperAPIs
Public Types | Static Public Member Functions | List of all members
KviKvsVariantComparison Class Reference

A class for comparison between two variant data. More...

#include <KviKvsVariant.h>

Public Types

enum  Result { FirstGreater = -1, Equal = 0, SecondGreater = 1 }
 Holds the result of the comparison. More...
 

Static Public Member Functions

static int compareArrayHash (const KviKvsVariant *pV1, const KviKvsVariant *pV2)
 Compares an array and a hash variant. More...
 
static int compareBoolArray (const KviKvsVariant *pV1, const KviKvsVariant *pV2)
 Compares a boolean and an array variant. More...
 
static int compareBoolHash (const KviKvsVariant *pV1, const KviKvsVariant *pV2)
 Compares a boolean and a hash variant. More...
 
static int compareBoolHObject (const KviKvsVariant *pV1, const KviKvsVariant *pV2)
 Compares a boolean and an object handle variant. More...
 
static int compareBoolString (const KviKvsVariant *pV1, const KviKvsVariant *pV2)
 Compares a boolean and a string variant. More...
 
static int compareHObjectArray (const KviKvsVariant *pV1, const KviKvsVariant *pV2)
 Compares an object handle and an array variant. More...
 
static int compareHObjectHash (const KviKvsVariant *pV1, const KviKvsVariant *pV2)
 Compares an object handle and a hash variant. More...
 
static int compareIntArray (const KviKvsVariant *pV1, const KviKvsVariant *pV2)
 Compares an integer and an array variant. More...
 
static int compareIntBool (const KviKvsVariant *pV1, const KviKvsVariant *pV2)
 Compares an integer and a boolean variant. More...
 
static int compareIntHash (const KviKvsVariant *pV1, const KviKvsVariant *pV2)
 Compares an integer and a hash variant. More...
 
static int compareIntHObject (const KviKvsVariant *pV1, const KviKvsVariant *pV2)
 Compares an integer and an object handle variant. More...
 
static int compareIntReal (const KviKvsVariant *pV1, const KviKvsVariant *pV2)
 Compares an integer and a double floating point variant. More...
 
static int compareIntString (const KviKvsVariant *pV1, const KviKvsVariant *pV2)
 Compares an integer and a string variant. More...
 
static int compareRealArray (const KviKvsVariant *pV1, const KviKvsVariant *pV2)
 Compares a double floating point and an array variant. More...
 
static int compareRealBool (const KviKvsVariant *pV1, const KviKvsVariant *pV2)
 Compares a double floating point and a boolean variant. More...
 
static int compareRealHash (const KviKvsVariant *pV1, const KviKvsVariant *pV2)
 Compares a double floating point and a hash variant. More...
 
static int compareRealHObject (const KviKvsVariant *pV1, const KviKvsVariant *pV2)
 Compares a double floating point and an object handle variant. More...
 
static int compareRealString (const KviKvsVariant *pV1, const KviKvsVariant *pV2)
 Compares a double floating point and a string variant. More...
 
static int compareStringArray (const KviKvsVariant *pV1, const KviKvsVariant *pV2)
 Compares a string and an array variant. More...
 
static int compareStringHash (const KviKvsVariant *pV1, const KviKvsVariant *pV2)
 Compares a string and a hash variant. More...
 
static int compareStringHObject (const KviKvsVariant *pV1, const KviKvsVariant *pV2)
 Compares a string and an object handle variant. More...
 

Detailed Description

A class for comparison between two variant data.

Member Enumeration Documentation

Holds the result of the comparison.

Enumerator
FirstGreater 

the first variant is greater than the second

Equal 

the two variants are equal

SecondGreater 

the second variant is greater than the first

Member Function Documentation

int KviKvsVariantComparison::compareArrayHash ( const KviKvsVariant pV1,
const KviKvsVariant pV2 
)
inlinestatic

Compares an array and a hash variant.

Parameters
pV1The first variant to compare
pV2The second variant to compare
Returns
int

References Equal, FirstGreater, KviKvsVariant::m_pData, KviKvsVariantData::m_u, KviKvsVariantData::DataType::pArray, KviKvsVariantData::DataType::pHash, SecondGreater, KviKvsHash::size(), and KviKvsArray::size().

Referenced by KviKvsVariant::compare().

int KviKvsVariantComparison::compareBoolArray ( const KviKvsVariant pV1,
const KviKvsVariant pV2 
)
inlinestatic

Compares a boolean and an array variant.

Parameters
pV1The first variant to compare
pV2The second variant to compare
Returns
int

References KviKvsVariantData::DataType::bBoolean, Equal, FirstGreater, KviKvsArray::isEmpty(), KviKvsVariant::m_pData, KviKvsVariantData::m_u, KviKvsVariantData::DataType::pArray, and SecondGreater.

Referenced by KviKvsVariant::compare().

int KviKvsVariantComparison::compareBoolHash ( const KviKvsVariant pV1,
const KviKvsVariant pV2 
)
inlinestatic

Compares a boolean and a hash variant.

Parameters
pV1The first variant to compare
pV2The second variant to compare
Returns
int

References KviKvsVariantData::DataType::bBoolean, Equal, FirstGreater, KviKvsHash::isEmpty(), KviKvsVariant::m_pData, KviKvsVariantData::m_u, KviKvsVariantData::DataType::pHash, and SecondGreater.

Referenced by KviKvsVariant::compare().

int KviKvsVariantComparison::compareBoolHObject ( const KviKvsVariant pV1,
const KviKvsVariant pV2 
)
inlinestatic

Compares a boolean and an object handle variant.

Parameters
pV1The first variant to compare
pV2The second variant to compare
Returns
int

References KviKvsVariantData::DataType::bBoolean, Equal, FirstGreater, KviKvsVariantData::DataType::hObject, KviKvsVariant::m_pData, KviKvsVariantData::m_u, and SecondGreater.

Referenced by KviKvsVariant::compare().

int KviKvsVariantComparison::compareBoolString ( const KviKvsVariant pV1,
const KviKvsVariant pV2 
)
inlinestatic

Compares a boolean and a string variant.

Parameters
pV1The first variant to compare
pV2The second variant to compare
Returns
int

References KviKvsVariantData::DataType::bBoolean, Equal, FirstGreater, KviKvsVariant::isEqualToNothing(), KviKvsVariant::m_pData, and KviKvsVariantData::m_u.

Referenced by KviKvsVariant::compare().

int KviKvsVariantComparison::compareHObjectArray ( const KviKvsVariant pV1,
const KviKvsVariant pV2 
)
inlinestatic

Compares an object handle and an array variant.

Parameters
pV1The first variant to compare
pV2The second variant to compare
Returns
int

References Equal, FirstGreater, KviKvsVariantData::DataType::hObject, KviKvsArray::isEmpty(), KviKvsVariant::m_pData, KviKvsVariantData::m_u, KviKvsVariantData::DataType::pArray, and SecondGreater.

Referenced by KviKvsVariant::compare().

int KviKvsVariantComparison::compareHObjectHash ( const KviKvsVariant pV1,
const KviKvsVariant pV2 
)
inlinestatic

Compares an object handle and a hash variant.

Parameters
pV1The first variant to compare
pV2The second variant to compare
Returns
int

References Equal, FirstGreater, KviKvsVariantData::DataType::hObject, KviKvsHash::isEmpty(), KviKvsVariant::m_pData, KviKvsVariantData::m_u, KviKvsVariantData::DataType::pHash, and SecondGreater.

Referenced by KviKvsVariant::compare().

int KviKvsVariantComparison::compareIntArray ( const KviKvsVariant pV1,
const KviKvsVariant pV2 
)
inlinestatic

Compares an integer and an array variant.

Parameters
pV1The first variant to compare
pV2The second variant to compare
Returns
int

References Equal, FirstGreater, KviKvsVariantData::DataType::iInt, KviKvsArray::isEmpty(), KviKvsVariant::m_pData, KviKvsVariantData::m_u, KviKvsVariantData::DataType::pArray, and SecondGreater.

Referenced by KviKvsVariant::compare().

int KviKvsVariantComparison::compareIntBool ( const KviKvsVariant pV1,
const KviKvsVariant pV2 
)
inlinestatic

Compares an integer and a boolean variant.

Parameters
pV1The first variant to compare
pV2The second variant to compare
Returns
int

References KviKvsVariantData::DataType::bBoolean, Equal, FirstGreater, KviKvsVariantData::DataType::iInt, KviKvsVariant::m_pData, KviKvsVariantData::m_u, and SecondGreater.

Referenced by KviKvsVariant::compare().

int KviKvsVariantComparison::compareIntHash ( const KviKvsVariant pV1,
const KviKvsVariant pV2 
)
inlinestatic

Compares an integer and a hash variant.

Parameters
pV1The first variant to compare
pV2The second variant to compare
Returns
int

References Equal, FirstGreater, KviKvsVariantData::DataType::iInt, KviKvsHash::isEmpty(), KviKvsVariant::m_pData, KviKvsVariantData::m_u, KviKvsVariantData::DataType::pHash, and SecondGreater.

Referenced by KviKvsVariant::compare().

int KviKvsVariantComparison::compareIntHObject ( const KviKvsVariant pV1,
const KviKvsVariant pV2 
)
inlinestatic

Compares an integer and an object handle variant.

Parameters
pV1The first variant to compare
pV2The second variant to compare
Returns
int

References Equal, FirstGreater, KviKvsVariantData::DataType::hObject, KviKvsVariantData::DataType::iInt, KviKvsVariant::m_pData, KviKvsVariantData::m_u, and SecondGreater.

Referenced by KviKvsVariant::compare().

int KviKvsVariantComparison::compareIntReal ( const KviKvsVariant pV1,
const KviKvsVariant pV2 
)
inlinestatic

Compares an integer and a double floating point variant.

Parameters
pV1The first variant to compare
pV2The second variant to compare
Returns
int

References Equal, FirstGreater, KviKvsVariantData::DataType::iInt, KviKvsVariant::m_pData, KviKvsVariantData::m_u, KviKvsVariantData::DataType::pReal, and SecondGreater.

Referenced by KviKvsVariant::compare().

int KviKvsVariantComparison::compareIntString ( const KviKvsVariant pV1,
const KviKvsVariant pV2 
)
inlinestatic

Compares an integer and a string variant.

Parameters
pV1The first variant to compare
pV2The second variant to compare
Returns
int

References KviKvsVariant::asReal(), KviKvsVariant::asString(), Equal, FirstGreater, KviKvsVariantData::DataType::iInt, KviKvsVariant::m_pData, KviKvsVariantData::m_u, KviKvsVariantData::DataType::pString, and SecondGreater.

Referenced by KviKvsVariant::compare().

int KviKvsVariantComparison::compareRealArray ( const KviKvsVariant pV1,
const KviKvsVariant pV2 
)
inlinestatic

Compares a double floating point and an array variant.

Parameters
pV1The first variant to compare
pV2The second variant to compare
Returns
int

References Equal, FirstGreater, KviKvsArray::isEmpty(), KviKvsVariant::m_pData, KviKvsVariantData::m_u, KviKvsVariantData::DataType::pArray, KviKvsVariantData::DataType::pReal, and SecondGreater.

Referenced by KviKvsVariant::compare().

int KviKvsVariantComparison::compareRealBool ( const KviKvsVariant pV1,
const KviKvsVariant pV2 
)
inlinestatic

Compares a double floating point and a boolean variant.

Parameters
pV1The first variant to compare
pV2The second variant to compare
Returns
int

References KviKvsVariantData::DataType::bBoolean, Equal, FirstGreater, KviKvsVariant::m_pData, KviKvsVariantData::m_u, KviKvsVariantData::DataType::pReal, and SecondGreater.

Referenced by KviKvsVariant::compare().

int KviKvsVariantComparison::compareRealHash ( const KviKvsVariant pV1,
const KviKvsVariant pV2 
)
inlinestatic

Compares a double floating point and a hash variant.

Parameters
pV1The first variant to compare
pV2The second variant to compare
Returns
int

References Equal, FirstGreater, KviKvsHash::isEmpty(), KviKvsVariant::m_pData, KviKvsVariantData::m_u, KviKvsVariantData::DataType::pHash, KviKvsVariantData::DataType::pReal, and SecondGreater.

Referenced by KviKvsVariant::compare().

int KviKvsVariantComparison::compareRealHObject ( const KviKvsVariant pV1,
const KviKvsVariant pV2 
)
inlinestatic

Compares a double floating point and an object handle variant.

Parameters
pV1The first variant to compare
pV2The second variant to compare
Returns
int

References Equal, FirstGreater, KviKvsVariantData::DataType::hObject, KviKvsVariant::m_pData, KviKvsVariantData::m_u, KviKvsVariantData::DataType::pReal, and SecondGreater.

Referenced by KviKvsVariant::compare().

int KviKvsVariantComparison::compareRealString ( const KviKvsVariant pV1,
const KviKvsVariant pV2 
)
inlinestatic

Compares a double floating point and a string variant.

Parameters
pV1The first variant to compare
pV2The second variant to compare
Returns
int

References KviKvsVariant::asReal(), KviKvsVariant::asString(), Equal, FirstGreater, KviKvsVariant::m_pData, KviKvsVariantData::m_u, KviKvsVariantData::DataType::pReal, KviKvsVariantData::DataType::pString, and SecondGreater.

Referenced by KviKvsVariant::compare().

int KviKvsVariantComparison::compareStringArray ( const KviKvsVariant pV1,
const KviKvsVariant pV2 
)
inlinestatic

Compares a string and an array variant.

Parameters
pV1The first variant to compare
pV2The second variant to compare
Returns
int

References Equal, FirstGreater, KviKvsArray::isEmpty(), KviKvsVariant::m_pData, KviKvsVariantData::m_u, KviKvsVariantData::DataType::pArray, KviKvsVariantData::DataType::pString, and SecondGreater.

Referenced by KviKvsVariant::compare().

int KviKvsVariantComparison::compareStringHash ( const KviKvsVariant pV1,
const KviKvsVariant pV2 
)
inlinestatic

Compares a string and a hash variant.

Parameters
pV1The first variant to compare
pV2The second variant to compare
Returns
int

References Equal, FirstGreater, KviKvsHash::isEmpty(), KviKvsVariant::m_pData, KviKvsVariantData::m_u, KviKvsVariantData::DataType::pHash, KviKvsVariantData::DataType::pString, and SecondGreater.

Referenced by KviKvsVariant::compare().

int KviKvsVariantComparison::compareStringHObject ( const KviKvsVariant pV1,
const KviKvsVariant pV2 
)
inlinestatic

Compares a string and an object handle variant.

Parameters
pV1The first variant to compare
pV2The second variant to compare
Returns
int

References KviKvsVariant::asReal(), Equal, FirstGreater, KviKvsVariantData::DataType::hObject, KviKvsVariant::m_pData, KviKvsVariantData::m_u, and KviKvsVariantData::DataType::pString.

Referenced by KviKvsVariant::compare().


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