GATE
Loading...
Searching...
No Matches
comparers.h File Reference

Generic type comparer functions for basic data types. More...

#include "gate/gate_core_api.h"
#include "gate/gatetypes.h"

Typedefs

typedef int(* gate_comparer_t) (void const *item1, void const *item2)
 Comparer function signature.
 

Functions

GATE_CORE_API int gate_compare_bool (void const *item1, void const *item2)
 
GATE_CORE_API int gate_compare_int8 (void const *item1, void const *item2)
 
GATE_CORE_API int gate_compare_uint8 (void const *item1, void const *item2)
 
GATE_CORE_API int gate_compare_int16 (void const *item1, void const *item2)
 
GATE_CORE_API int gate_compare_uint16 (void const *item1, void const *item2)
 
GATE_CORE_API int gate_compare_int32 (void const *item1, void const *item2)
 
GATE_CORE_API int gate_compare_uint32 (void const *item1, void const *item2)
 
GATE_CORE_API int gate_compare_int64 (void const *item1, void const *item2)
 
GATE_CORE_API int gate_compare_uint64 (void const *item1, void const *item2)
 
GATE_CORE_API int gate_compare_real32 (void const *item1, void const *item2)
 
GATE_CORE_API int gate_compare_real64 (void const *item1, void const *item2)
 
GATE_CORE_API int gate_compare_intptr (void const *item1, void const *item2)
 
GATE_CORE_API int gate_compare_uintptr (void const *item1, void const *item2)
 
GATE_CORE_API int gate_compare_cstring (void const *item1, void const *item2)
 
GATE_CORE_API int gate_compare_wstring (void const *item1, void const *item2)
 
GATE_CORE_API int gate_compare_string (void const *item1, void const *item2)
 
GATE_CORE_API int gate_compare_string_ic (void const *item1, void const *item2)
 
GATE_CORE_API int gate_compare_guid (void const *item1, void const *item2)
 
GATE_CORE_API int gate_compare_date (void const *item1, void const *item2)
 
GATE_CORE_API int gate_compare_daytime (void const *item1, void const *item2)
 
GATE_CORE_API int gate_compare_datetime (void const *item1, void const *item2)
 
GATE_CORE_API int gate_compare_time (void const *item1, void const *item2)
 
GATE_CORE_API int gate_compare_ptr (void const *item1, void const *item2)
 
GATE_CORE_API int gate_compare_types (void const *item1, void const *item2, gate_size_t size, gate_comparer_t comparer)
 Compares two type instances binary or by a supplied comparer function.
 

Detailed Description

Generic type comparer functions for basic data types.

Typedef Documentation

◆ gate_comparer_t

typedef int(* gate_comparer_t) (void const *item1, void const *item2)

Comparer function signature.

Returns 0 if both items are equal, returns a value < 0 if first item is less than the second one returns a value > 0 if first item is greater than the second one

Function Documentation

◆ gate_compare_bool()

GATE_CORE_API int gate_compare_bool ( void const * item1,
void const * item2 )

compares two gate_bool_t values

◆ gate_compare_int8()

GATE_CORE_API int gate_compare_int8 ( void const * item1,
void const * item2 )

compares two gate_int8_t values

◆ gate_compare_uint8()

GATE_CORE_API int gate_compare_uint8 ( void const * item1,
void const * item2 )

compares two gate_uint8_t values

◆ gate_compare_int16()

GATE_CORE_API int gate_compare_int16 ( void const * item1,
void const * item2 )

compares two gate_int16_t values

◆ gate_compare_uint16()

GATE_CORE_API int gate_compare_uint16 ( void const * item1,
void const * item2 )

compares two gate_uint16_t values

◆ gate_compare_int32()

GATE_CORE_API int gate_compare_int32 ( void const * item1,
void const * item2 )

compares two gate_int32_t values

◆ gate_compare_uint32()

GATE_CORE_API int gate_compare_uint32 ( void const * item1,
void const * item2 )

compares two gate_uint32_t values

◆ gate_compare_int64()

GATE_CORE_API int gate_compare_int64 ( void const * item1,
void const * item2 )

compares two gate_int64_t values

◆ gate_compare_uint64()

GATE_CORE_API int gate_compare_uint64 ( void const * item1,
void const * item2 )

compares two gate_uint64_t values

◆ gate_compare_real32()

GATE_CORE_API int gate_compare_real32 ( void const * item1,
void const * item2 )

compares two gate_real32_t values

◆ gate_compare_real64()

GATE_CORE_API int gate_compare_real64 ( void const * item1,
void const * item2 )

compares two gate_real64_t values

◆ gate_compare_intptr()

GATE_CORE_API int gate_compare_intptr ( void const * item1,
void const * item2 )

compares two gate_intptr_t values

◆ gate_compare_uintptr()

GATE_CORE_API int gate_compare_uintptr ( void const * item1,
void const * item2 )

compares two gate_uintptr_t values

◆ gate_compare_cstring()

GATE_CORE_API int gate_compare_cstring ( void const * item1,
void const * item2 )

compares two char const* values

◆ gate_compare_wstring()

GATE_CORE_API int gate_compare_wstring ( void const * item1,
void const * item2 )

compares two wchar_t const* values

◆ gate_compare_string()

GATE_CORE_API int gate_compare_string ( void const * item1,
void const * item2 )

compares two gate_string_t values

◆ gate_compare_string_ic()

GATE_CORE_API int gate_compare_string_ic ( void const * item1,
void const * item2 )

compares two gate_string_t values case insensitive

◆ gate_compare_guid()

GATE_CORE_API int gate_compare_guid ( void const * item1,
void const * item2 )

compares two gate_guid_t values

◆ gate_compare_date()

GATE_CORE_API int gate_compare_date ( void const * item1,
void const * item2 )

compares two gate_date_t values

◆ gate_compare_daytime()

GATE_CORE_API int gate_compare_daytime ( void const * item1,
void const * item2 )

compares two gate_daytime_t values

◆ gate_compare_datetime()

GATE_CORE_API int gate_compare_datetime ( void const * item1,
void const * item2 )

compares two gate_datetime_t values

◆ gate_compare_time()

GATE_CORE_API int gate_compare_time ( void const * item1,
void const * item2 )

compares two gate_time_t values

◆ gate_compare_ptr()

GATE_CORE_API int gate_compare_ptr ( void const * item1,
void const * item2 )

compares two void* values

◆ gate_compare_types()

GATE_CORE_API int gate_compare_types ( void const * item1,
void const * item2,
gate_size_t size,
gate_comparer_t comparer )

Compares two type instances binary or by a supplied comparer function.

Parameters
[in]item1pointer to first item
[in]item2pointer to second item
[in]sizesize of item type in bytes
[in]compareroptional compare function, if NULL items are compared byte by byte
Returns
0 on equality, < 0 if item1 < item2, > 0 if item1 > item2