Compile-time checks against KOS's current version.
More...
|
#define | KOS_VERSION_ABOVE(major, minor, patch) |
| Compile-time check for being above a given KOS version.
|
|
#define | KOS_VERSION_MIN(major, minor, patch) |
| Compile-time check for a minimum KOS version.
|
|
#define | KOS_VERSION_IS(major, minor, patch) |
| Compile-time check for an exact KOS version.
|
|
#define | KOS_VERSION_MAX(major, minor, patch) |
| Compile-time check for a maximum KOS version.
|
|
#define | KOS_VERSION_BELOW(major, minor, patch) |
| Compile-time check for being below a given KOS version.
|
|
Compile-time checks against KOS's current version.
This API provides several utility macros to check for a particular exact, min, or max compile-time version for KOS.
They are meant to be used with the preprocessor like so:
#if KOS_VERSION_MIN(2, 0, 0)
#elif KOS_VERSION_BELOW(2, 5, 1)
#elif KOS_VERSION_IS(3, 1, 2)
#endif
◆ KOS_VERSION_ABOVE
#define KOS_VERSION_ABOVE |
( |
| major, |
|
|
| minor, |
|
|
| patch ) |
Value:
#define KOS_VERSION
KOS's current version as an integer ID.
Definition version.h:105
#define KOS_VERSION_MAKE_ABOVE(major, minor, patch, version)
Creates a check for being above a given version.
Definition version.h:307
Compile-time check for being above a given KOS version.
Checks to see whether the current KOS version is higher than the given version.
- Parameters
-
major | Major version component. |
minor | Minor version component. |
patch | Patch version component. |
- Return values
-
true | KOS's version is higher. |
false | KOS's version is the same or lower. |
◆ KOS_VERSION_BELOW
#define KOS_VERSION_BELOW |
( |
| major, |
|
|
| minor, |
|
|
| patch ) |
Value:
#define KOS_VERSION_MAKE_BELOW(major, minor, patch, version)
Creates a check for being below a given version.
Definition version.h:380
Compile-time check for being below a given KOS version.
Checks to see whether the current KOS version is lower than the given version.
- Parameters
-
major | Major version component. |
minor | Minor version component. |
patch | Patch version component. |
- Return values
-
true | KOS's version is lower. |
false | KOS's version is the same or higher. |
◆ KOS_VERSION_IS
#define KOS_VERSION_IS |
( |
| major, |
|
|
| minor, |
|
|
| patch ) |
Value:
#define KOS_VERSION_MAKE_IS(major, minor, patch, version)
Creates an exact version check.
Definition version.h:343
Compile-time check for an exact KOS version.
Checks to see whether the current KOS version matches the given version.
- Parameters
-
major | Major version component. |
minor | Minor version component. |
patch | Patch version component. |
- Return values
-
true | KOS's version is the same. |
false | KOS's version is different. |
◆ KOS_VERSION_MAX
#define KOS_VERSION_MAX |
( |
| major, |
|
|
| minor, |
|
|
| patch ) |
Value:
#define KOS_VERSION_MAKE_MAX(major, minor, patch, version)
Creates a maximum version check.
Definition version.h:362
Compile-time check for a maximum KOS version.
Checks to see whether the current KOS version is the same or lower than the given version.
- Parameters
-
major | Major version component. |
minor | Minor version component. |
patch | Patch version component. |
- Return values
-
true | KOS's version is the the same or lower. |
false | KOS's version is higher. |
◆ KOS_VERSION_MIN
#define KOS_VERSION_MIN |
( |
| major, |
|
|
| minor, |
|
|
| patch ) |
Value:
#define KOS_VERSION_MAKE_MIN(major, minor, patch, version)
Creates a minimum version check.
Definition version.h:325
Compile-time check for a minimum KOS version.
Checks to see whether the current KOS version is the same or higher than the given version.
- Parameters
-
major | Major version component. |
minor | Minor version component. |
patch | Patch version component. |
- Return values
-
true | KOS's version is the same or higher. |
false | KOS's version is lower. |