ddc
|
Go to the source code of this file.
Classes | |
class | DDCVersionT |
Functions | |
const DDCVersionT | DDCVersion (2, 2, 8) |
const char * | DDCVersionString () |
const DDCVersionT | DDCVersionMinR (2, 0, 0) |
const DDCVersionT | DDCVersionMinW (2, 1, 13) |
void | ddc_parse_format_version (const char *s, DDCVersionT &version, DDCVersionT &version_min) |
void | ddc_format_version_check (const char *s, const char *label=NULL) |
const DDCVersionT DDCVersion | ( | 2 | , |
2 | , | ||
8 | |||
) |
returns current DDC Version as a DDCVersionT (caveat: not useable in global initializers!)
Referenced by ddc_format_version_check(), DDCVersionT::fromString(), and CRunQueryData::IsPruneQuery().
const char* DDCVersionString | ( | ) |
current DDC Version as a string
References PACKAGE_VERSION.
Referenced by DDCVersionT::fromString(), and CDDCServer::SetOptions().
const DDCVersionT DDCVersionMinR | ( | 2 | , |
0 | , | ||
0 | |||
) |
Minimum index version this DDC can read
Referenced by ddc_format_version_check(), and DDCVersionT::fromString().
const DDCVersionT DDCVersionMinW | ( | 2 | , |
1 | , | ||
13 | |||
) |
Minimum DDC version which can read files written by us
Referenced by DDCVersionT::fromString(), and CConcIndexator::SaveCorpusFileList().
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().