utilities for ZFFramework More...
#include "ZFComparer.h"
Go to the source code of this file.
Macros | |
#define | ZFComparerForVersion |
default comparer for sub version compare, compared by string's integer value | |
#define | ZFVERSION_MAIN() |
pre-defined subVersionIndex for ZFVersionSet and ZFVersionGet | |
#define | ZFVERSION_SUB() |
see ZFVERSION_MAIN | |
#define | ZFVERSION_MINOR() |
see ZFVERSION_MAIN | |
#define | ZFVERSION_BUILD() |
see ZFVERSION_MAIN | |
Functions | |
void | ZFVersionGet (zfstring &ret, const zfchar *version, zfindex subVersionIndex) |
get sub version at subVersionIndex | |
zfstring | ZFVersionGet (const zfchar *version, zfindex subVersionIndex) |
see ZFVersionGet | |
void | ZFVersionGetInt (zfuint &ret, const zfchar *version, zfindex subVersionIndex) |
util method to get int version value of ZFVersionGet | |
zfuint | ZFVersionGetInt (const zfchar *version, zfindex subVersionIndex) |
see ZFVersionGetInt | |
void | ZFVersionSet (zfstring &version, zfindex subVersionIndex, const zfchar *subVersion, const zfchar *emptySubVersion="0") |
set sub version at subVersionIndex | |
void | ZFVersionSetInt (zfstring &version, zfindex subVersionIndex, zfuint subVersion, const zfchar *emptySubVersion="0") |
util method to set int version value of ZFVersionSet | |
ZFCompareResult | ZFVersionCompare (const zfchar *version0, const zfchar *version1, ZFComparer< const zfchar * >::Comparer subVersionComparer=_ZFP_ZFComparerForVersion) |
compare two version | |
utilities for ZFFramework
#define ZFComparerForVersion |
default comparer for sub version compare, compared by string's integer value
value is treated as 36 radix, so 'a' ~ 'z' letters can be compared normally, while 'a' and 'A' are treated the same (case insensitive)
#define ZFVERSION_MAIN | ( | ) |
pre-defined subVersionIndex for ZFVersionSet and ZFVersionGet
a typical version would looks like:
get sub version at subVersionIndex
e.g.
check 0 as subVersionIndex from "a.b.c" would result "a"
check 4 as subVersionIndex from "a.b.c" would result an empty string
|
extern |
set sub version at subVersionIndex
e.g.
set "c" to 0 as subVersionIndex to "a.b" would result "c.b"
set "d" to 4 as subVersionIndex to "a.b" would result "a.b.0.d"
|
extern |
compare two version
while comparing a version which has subversion, a version would always treated as smaller if it has no sub version