ddc
Functions
ddcVersion.cpp File Reference
#include "ddcVersion.h"
#include "utilit.h"
Include dependency graph for ddcVersion.cpp:

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)
 

Function Documentation

◆ DDCVersionString()

const char* DDCVersionString ( )

current DDC Version as a string

References PACKAGE_VERSION.

Referenced by DDCVersionT::fromString(), and CDDCServer::SetOptions().

Here is the caller graph for this function:

◆ ddc_parse_format_version()

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).

Parameters
versionon completion contains FORMAT_VERSION parsed from s, or 0
version_minon 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ddc_format_version_check()

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().

Here is the call graph for this function:
Here is the caller graph for this function: