ddc
|
Functions | |
const char * | DDCVersionString () |
void | ddc_parse_format_version (const char *s, DDCVersionT &version, DDCVersionT &version_min) |
void | ddc_format_version_check (const char *s, const char *label) |
const char* DDCVersionString | ( | ) |
current DDC Version as a string
References PACKAGE_VERSION.
Referenced by DDCVersionT::fromString(), and CDDCServer::SetOptions().
void ddc_parse_format_version | ( | const char * | s, |
DDCVersionT & | version, | ||
DDCVersionT & | version_min | ||
) |
parse a file version string of one of the following forms:
"... Format FORMAT_VERSION ... min-compat FORMAT_VERSION_MIN ..."
"... Format FORMAT_VERSION ..."
"... Version FORMAT_VERSION ... min-compat FORMAT_VERSION_MIN ..."
"... Version FORMAT_VERSION ..."
In the second and fourth cases, FORMAT_VERSION_MIN is set to FORMAT_VERSION. If parse fails, version and version_min are set to 0 (zero).
version | on completion contains FORMAT_VERSION parsed from s, or 0 |
version_min | on completion contains FORMAT_VERSION_MIN parsed from s, or 0 |
References DDCVersionT::clear(), DDCVersionT::empty(), DDCVersionT::fromString(), and stringSplit().
Referenced by ddc_format_version_check(), and DDCVersionT::fromString().
void ddc_format_version_check | ( | const char * | s, |
const char * | label = NULL |
||
) |
check a stored format version string s for compatibility with the running ddc; otherwise throws a CExpc(errLogic). label is used for the exception message; it defaults to s.
References ddc_parse_format_version(), DDCVersion(), DDCVersionMinR(), DDCVersionT::empty(), errLogic, and DDCVersionT::str().
Referenced by DDCVersionT::fromString(), and CConcordance::LoadCorpusFiles().