ddc
Classes | Functions
ddcVersion.h File Reference
#include "ddcConfig.h"
#include "utilit.h"
#include "DDCInternalError.h"
#include <sstream>
Include dependency graph for ddcVersion.h:
This graph shows which files directly or indirectly include this file:

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)
 

Function Documentation

◆ DDCVersion()

const DDCVersionT DDCVersion ( ,
,
 
)

returns current DDC Version as a DDCVersionT (caveat: not useable in global initializers!)

Referenced by ddc_format_version_check(), DDCVersionT::fromString(), and CRunQueryData::IsPruneQuery().

Here is the caller graph for this function:

◆ 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:

◆ DDCVersionMinR()

const DDCVersionT DDCVersionMinR ( ,
,
 
)

Minimum index version this DDC can read

Referenced by ddc_format_version_check(), and DDCVersionT::fromString().

Here is the caller graph for this function:

◆ DDCVersionMinW()

const DDCVersionT DDCVersionMinW ( ,
,
13   
)

Minimum DDC version which can read files written by us

Referenced by DDCVersionT::fromString(), and CConcIndexator::SaveCorpusFileList().

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: