Zycore
1.2.0.0
|
Go to the source code of this file.
Macros | |
#define | ZYAN_DECLARE_EQUALITY_COMPARISON(name, type) |
#define | ZYAN_DECLARE_EQUALITY_COMPARISON_FOR_FIELD(name, type, field_name) |
#define | ZYAN_DECLARE_COMPARISON(name, type) |
#define | ZYAN_DECLARE_COMPARISON_FOR_FIELD(name, type, field_name) |
Typedefs | |
typedef ZyanBool(* | ZyanEqualityComparison) (const void *left, const void *right) |
typedef ZyanI32(* | ZyanComparison) (const void *left, const void *right) |
Functions | |
ZYAN_INLINE | ZYAN_DECLARE_EQUALITY_COMPARISON (ZyanEqualsPointer, void *const) ZYAN_INLINE ZYAN_DECLARE_EQUALITY_COMPARISON(ZyanEqualsBool |
ZYAN_INLINE ZyanBool ZYAN_INLINE | ZYAN_DECLARE_EQUALITY_COMPARISON (ZyanEqualsNumeric8, ZyanU8) ZYAN_INLINE ZYAN_DECLARE_EQUALITY_COMPARISON(ZyanEqualsNumeric16 |
ZYAN_INLINE ZyanBool ZYAN_INLINE ZyanU16 ZYAN_INLINE | ZYAN_DECLARE_EQUALITY_COMPARISON (ZyanEqualsNumeric32, ZyanU32) ZYAN_INLINE ZYAN_DECLARE_EQUALITY_COMPARISON(ZyanEqualsNumeric64 |
ZYAN_INLINE ZyanBool ZYAN_INLINE ZyanU16 ZYAN_INLINE ZyanU64 ZYAN_INLINE | ZYAN_DECLARE_COMPARISON (ZyanComparePointer, void *const) ZYAN_INLINE ZYAN_DECLARE_COMPARISON(ZyanCompareBool |
ZYAN_INLINE ZyanBool ZYAN_INLINE ZyanU16 ZYAN_INLINE ZyanU64 ZYAN_INLINE ZyanBool ZYAN_INLINE | ZYAN_DECLARE_COMPARISON (ZyanCompareNumeric8, ZyanU8) ZYAN_INLINE ZYAN_DECLARE_COMPARISON(ZyanCompareNumeric16 |
ZYAN_INLINE ZyanBool ZYAN_INLINE ZyanU16 ZYAN_INLINE ZyanU64 ZYAN_INLINE ZyanBool ZYAN_INLINE ZyanU16 ZYAN_INLINE | ZYAN_DECLARE_COMPARISON (ZyanCompareNumeric32, ZyanU32) ZYAN_INLINE ZYAN_DECLARE_COMPARISON(ZyanCompareNumeric64 |
Defines prototypes of general-purpose comparison functions.
#define ZYAN_DECLARE_COMPARISON | ( | name, | |
type | |||
) |
Declares a generic comparison function for an integral data-type.
name | The name of the function. |
type | The name of the integral data-type. |
#define ZYAN_DECLARE_COMPARISON_FOR_FIELD | ( | name, | |
type, | |||
field_name | |||
) |
Declares a generic comparison function that compares a single integral data-type field of a struct.
name | The name of the function. |
type | The name of the integral data-type. |
field_name | The name of the struct field. |
#define ZYAN_DECLARE_EQUALITY_COMPARISON | ( | name, | |
type | |||
) |
Declares a generic equality comparison function for an integral data-type.
name | The name of the function. |
type | The name of the integral data-type. |
#define ZYAN_DECLARE_EQUALITY_COMPARISON_FOR_FIELD | ( | name, | |
type, | |||
field_name | |||
) |
Declares a generic equality comparison function that compares a single integral data-type field of a struct.
name | The name of the function. |
type | The name of the integral data-type. |
field_name | The name of the struct field. |
typedef ZyanI32(* ZyanComparison) (const void *left, const void *right) |
Defines the ZyanComparison
function prototype.
left | A pointer to the first element. |
right | A pointer to the second element. |
left == right -> result == 0
left < right -> result < 0
left > right -> result > 0
typedef ZyanBool(* ZyanEqualityComparison) (const void *left, const void *right) |
Defines the ZyanEqualityComparison
function prototype.
left | A pointer to the first element. |
right | A pointer to the second element. |
ZYAN_TRUE
if the left
element equals the right
one or ZYAN_FALSE
, if not. ZYAN_INLINE ZyanBool ZYAN_INLINE ZyanU16 ZYAN_INLINE ZyanU64 ZYAN_INLINE ZyanBool ZYAN_INLINE ZyanU16 ZYAN_INLINE ZYAN_DECLARE_COMPARISON | ( | ZyanCompareNumeric32 | , |
ZyanU32 | |||
) |
Defines a default comparison function for 32-bit numeric values.
left | A pointer to the first value. |
right | A pointer to the second value. |
0
if the left
value equals the right
one, -1
if the left
value is less than the right
one, or 1
if the left
value is greater than the right
one. Defines a default comparison function for 64-bit numeric values.left | A pointer to the first value. |
right | A pointer to the second value. |
0
if the left
value equals the right
one, -1
if the left
value is less than the right
one, or 1
if the left
value is greater than the right
one. ZYAN_INLINE ZyanBool ZYAN_INLINE ZyanU16 ZYAN_INLINE ZyanU64 ZYAN_INLINE ZyanBool ZYAN_INLINE ZYAN_DECLARE_COMPARISON | ( | ZyanCompareNumeric8 | , |
ZyanU8 | |||
) |
Defines a default comparison function for 8-bit numeric values.
left | A pointer to the first value. |
right | A pointer to the second value. |
0
if the left
value equals the right
one, -1
if the left
value is less than the right
one, or 1
if the left
value is greater than the right
one. Defines a default comparison function for 16-bit numeric values.left | A pointer to the first value. |
right | A pointer to the second value. |
0
if the left
value equals the right
one, -1
if the left
value is less than the right
one, or 1
if the left
value is greater than the right
one. ZYAN_INLINE ZyanBool ZYAN_INLINE ZyanU16 ZYAN_INLINE ZyanU64 ZYAN_INLINE ZYAN_DECLARE_COMPARISON | ( | ZyanComparePointer | , |
void * const | |||
) |
Defines a default comparison function for pointer values.
left | A pointer to the first value. |
right | A pointer to the second value. |
0
if the left
value equals the right
one, -1
if the left
value is less than the right
one, or 1
if the left
value is greater than the right
one. Defines a default comparison function for ZyanBool
values.left | A pointer to the first value. |
right | A pointer to the second value. |
0
if the left
value equals the right
one, -1
if the left
value is less than the right
one, or 1
if the left
value is greater than the right
one. ZYAN_INLINE ZyanBool ZYAN_INLINE ZyanU16 ZYAN_INLINE ZYAN_DECLARE_EQUALITY_COMPARISON | ( | ZyanEqualsNumeric32 | , |
ZyanU32 | |||
) |
Defines a default equality comparison function for 32-bit numeric values.
left | A pointer to the first value. |
right | A pointer to the second value. |
ZYAN_TRUE
if the left
value equals the right
one or ZYAN_FALSE
, if not. Defines a default equality comparison function for 64-bit numeric values.left | A pointer to the first value. |
right | A pointer to the second value. |
ZYAN_TRUE
if the left
value equals the right
one or ZYAN_FALSE
, if not. ZYAN_INLINE ZyanBool ZYAN_INLINE ZYAN_DECLARE_EQUALITY_COMPARISON | ( | ZyanEqualsNumeric8 | , |
ZyanU8 | |||
) |
Defines a default equality comparison function for 8-bit numeric values.
left | A pointer to the first value. |
right | A pointer to the second value. |
ZYAN_TRUE
if the left
value equals the right
one or ZYAN_FALSE
, if not. Defines a default equality comparison function for 16-bit numeric values.left | A pointer to the first value. |
right | A pointer to the second value. |
ZYAN_TRUE
if the left
value equals the right
one or ZYAN_FALSE
, if not. ZYAN_INLINE ZYAN_DECLARE_EQUALITY_COMPARISON | ( | ZyanEqualsPointer | , |
void * const | |||
) |
Defines a default equality comparison function for pointer values.
left | A pointer to the first value. |
right | A pointer to the second value. |
ZYAN_TRUE
if the left
value equals the right
one or ZYAN_FALSE
, if not. Defines a default equality comparison function for ZyanBool
values.left | A pointer to the first value. |
right | A pointer to the second value. |
ZYAN_TRUE
if the left
value equals the right
one or ZYAN_FALSE
, if not.