NCBI C++ ToolKit
Classes | Macros | Typedefs | Enumerations | Enumerator | Functions | Variables
Versioning
+ Collaboration diagram for Versioning:

Classes

class  CComponentVersionInfo
 
class  CVersion
 
struct  SBuildInfo
 This class allows to add build info (date and tag) to application version. More...
 
class  CVersionInfo
 CVersionInfo –. More...
 
class  CComponentVersionInfoAPI
 
class  CVersionAPI
 

Macros

#define NCBI_BUILD_TIME   __DATE__ " " __TIME__
 
#define NCBI_BUILD_TAG_PROXY   ""
 
#define NCBI_TEAMCITY_PROJECT_NAME_SBUILDINFO    .Extra(SBuildInfo::eTeamCityProjectName, NCBI_TEAMCITY_PROJECT_NAME_PROXY)
 
#define NCBI_TEAMCITY_BUILDCONF_NAME_SBUILDINFO    .Extra(SBuildInfo::eTeamCityBuildConf, NCBI_TEAMCITY_BUILDCONF_NAME_PROXY)
 
#define NCBI_TEAMCITY_BUILD_NUMBER_SBUILDINFO    .Extra(SBuildInfo::eTeamCityBuildNumber, NCBI_TEAMCITY_BUILD_NUMBER_PROXY)
 
#define NCBI_SUBVERSION_REVISION_SBUILDINFO    .Extra(SBuildInfo::eSubversionRevision, NCBI_SUBVERSION_REVISION_PROXY)
 
#define NCBI_SC_VERSION_SBUILDINFO    .Extra(SBuildInfo::eStableComponentsVersion, NCBI_SC_VERSION_PROXY)
 
#define NCBI_SRCTREE_VER_SBUILDINFO   /* empty */
 
#define NCBI_BUILT_AS_SBUILDINFO   /* empty */
 
#define NCBI_BUILD_ID_SBUILDINFO   /* empty */
 
#define NCBI_SBUILDINFO_DEFAULT_IMPL()
 
#define NCBI_SBUILDINFO_DEFAULT()   NCBI_SBUILDINFO_DEFAULT_IMPL()
 
#define NCBI_APP_SBUILDINFO_DEFAULT()   NCBI_SBUILDINFO_DEFAULT_IMPL()
 
#define NCBI_SBUILDINFO_DEFAULT_INSTANCE()   SBuildInfo(NCBI_BUILD_TIME, NCBI_BUILD_TAG_PROXY)
 
#define NCBI_SBUILDINFO_DEFAULT_INSTANCE()   SBuildInfo()
 
#define CVersion   CVersionAPI
 
#define CComponentVersionInfo   CComponentVersionInfoAPI
 
#define MDB_VERSION_MAJOR   0
 Library major version. More...
 
#define MDB_VERSION_MAJOR   0
 Library major version. More...
 
#define MDB_VERSION_MINOR   9
 Library minor version. More...
 
#define MDB_VERSION_MINOR   9
 Library minor version. More...
 
#define MDB_VERSION_PATCH   24
 Library patch version. More...
 
#define MDB_VERSION_PATCH   24
 Library patch version. More...
 
#define MDB_VERINT(a, b, c)   (((a) << 24) | ((b) << 16) | (c))
 Combine args a,b,c into a single integer for easy version comparisons. More...
 
#define MDB_VERINT(a, b, c)   (((a) << 24) | ((b) << 16) | (c))
 Combine args a,b,c into a single integer for easy version comparisons. More...
 
#define MDB_VERSION_FULL    MDB_VERINT(MDB_VERSION_MAJOR,MDB_VERSION_MINOR,MDB_VERSION_PATCH)
 The full library version as a single integer. More...
 
#define MDB_VERSION_FULL    MDB_VERINT(MDB_VERSION_MAJOR,MDB_VERSION_MINOR,MDB_VERSION_PATCH)
 The full library version as a single integer. More...
 
#define MDB_VERSION_DATE   "July 24, 2019"
 The release date of this library version. More...
 
#define MDB_VERSION_DATE   "July 24, 2019"
 The release date of this library version. More...
 
#define MDB_VERSTR(a, b, c, d)   "LMDB " #a "." #b "." #c ": (" d ")"
 A stringifier for the version info. More...
 
#define MDB_VERSTR(a, b, c, d)   "LMDB " #a "." #b "." #c ": (" d ")"
 A stringifier for the version info. More...
 
#define MDB_VERFOO(a, b, c, d)   MDB_VERSTR(a,b,c,d)
 A helper for the stringifier macro. More...
 
#define MDB_VERFOO(a, b, c, d)   MDB_VERSTR(a,b,c,d)
 A helper for the stringifier macro. More...
 
#define MDB_VERSION_STRING    MDB_VERFOO(MDB_VERSION_MAJOR,MDB_VERSION_MINOR,MDB_VERSION_PATCH,MDB_VERSION_DATE)
 The full library version as a C string. More...
 
#define MDB_VERSION_STRING    MDB_VERFOO(MDB_VERSION_MAJOR,MDB_VERSION_MINOR,MDB_VERSION_PATCH,MDB_VERSION_DATE)
 The full library version as a C string. More...
 

Typedefs

typedef int CVersionAPI::TPrintFlags
 Binary OR of EPrintFlags. More...
 

Enumerations

enum  SBuildInfo::EExtra {
  SBuildInfo::eBuildDate , SBuildInfo::eBuildTag , SBuildInfo::eTeamCityProjectName , SBuildInfo::eTeamCityBuildConf ,
  SBuildInfo::eTeamCityBuildNumber , SBuildInfo::eBuildID , SBuildInfo::eSubversionRevision , SBuildInfo::eStableComponentsVersion ,
  SBuildInfo::eDevelopmentVersion , SBuildInfo::eProductionVersion , SBuildInfo::eBuiltAs , SBuildInfo::eRevision ,
  SBuildInfo::eGitBranch
}
 
enum  CVersionInfo::EVersionFlags { CVersionInfo::kAny = 0 , CVersionInfo::kLatest }
 
enum  CVersionInfo::EMatch { CVersionInfo::eNonCompatible , CVersionInfo::eConditionallyCompatible , CVersionInfo::eBackwardCompatible , CVersionInfo::eFullyCompatible }
 Version comparison result. More...
 
enum  CVersionAPI::EPrintFlags {
  CVersionAPI::fVersionInfo = 0x01 , CVersionAPI::fComponents = 0x02 , CVersionAPI::fPackageShort = 0x04 , CVersionAPI::fPackageFull = 0x08 ,
  CVersionAPI::fBuildInfo = 0x10 , CVersionAPI::fBuildSignature = 0x20 , CVersionAPI::fGI64bit = 0x40 , CVersionAPI::fTCBuildNumber = 0x0 ,
  CVersionAPI::fPrintAll = 0xFF
}
 

Functions

 CComponentVersionInfo::CComponentVersionInfo (const string &component_name, int ver_major, int ver_minor, int patch_level=0, const string &ver_name=kEmptyStr, const SBuildInfo &build_info=SBuildInfo(__DATE__ " " __TIME__, "") .Extra(SBuildInfo::eTeamCityProjectName, NCBI_TEAMCITY_PROJECT_NAME_PROXY) .Extra(SBuildInfo::eTeamCityBuildConf, NCBI_TEAMCITY_BUILDCONF_NAME_PROXY) .Extra(SBuildInfo::eTeamCityBuildNumber, NCBI_TEAMCITY_BUILD_NUMBER_PROXY) NCBI_GIT_BRANCH_SBUILDINFO NCBI_REVISION_SBUILDINFO .Extra(SBuildInfo::eSubversionRevision, NCBI_SUBVERSION_REVISION_PROXY) .Extra(SBuildInfo::eStableComponentsVersion, NCBI_SC_VERSION_PROXY))
 Constructor. More...
 
 CComponentVersionInfo::CComponentVersionInfo (const string &component_name, const string &version, const string &ver_name=kEmptyStr, const SBuildInfo &build_info=SBuildInfo(__DATE__ " " __TIME__, "") .Extra(SBuildInfo::eTeamCityProjectName, NCBI_TEAMCITY_PROJECT_NAME_PROXY) .Extra(SBuildInfo::eTeamCityBuildConf, NCBI_TEAMCITY_BUILDCONF_NAME_PROXY) .Extra(SBuildInfo::eTeamCityBuildNumber, NCBI_TEAMCITY_BUILD_NUMBER_PROXY) NCBI_GIT_BRANCH_SBUILDINFO NCBI_REVISION_SBUILDINFO .Extra(SBuildInfo::eSubversionRevision, NCBI_SUBVERSION_REVISION_PROXY) .Extra(SBuildInfo::eStableComponentsVersion, NCBI_SC_VERSION_PROXY))
 Constructor. More...
 
 CVersion::CVersion (const SBuildInfo &build_info=SBuildInfo(__DATE__ " " __TIME__, "") .Extra(SBuildInfo::eTeamCityProjectName, NCBI_TEAMCITY_PROJECT_NAME_PROXY) .Extra(SBuildInfo::eTeamCityBuildConf, NCBI_TEAMCITY_BUILDCONF_NAME_PROXY) .Extra(SBuildInfo::eTeamCityBuildNumber, NCBI_TEAMCITY_BUILD_NUMBER_PROXY) NCBI_GIT_BRANCH_SBUILDINFO NCBI_REVISION_SBUILDINFO .Extra(SBuildInfo::eSubversionRevision, NCBI_SUBVERSION_REVISION_PROXY) .Extra(SBuildInfo::eStableComponentsVersion, NCBI_SC_VERSION_PROXY))
 
 CVersion::CVersion (const CVersionInfo &version, const SBuildInfo &build_info=SBuildInfo(__DATE__ " " __TIME__, "") .Extra(SBuildInfo::eTeamCityProjectName, NCBI_TEAMCITY_PROJECT_NAME_PROXY) .Extra(SBuildInfo::eTeamCityBuildConf, NCBI_TEAMCITY_BUILDCONF_NAME_PROXY) .Extra(SBuildInfo::eTeamCityBuildNumber, NCBI_TEAMCITY_BUILD_NUMBER_PROXY) NCBI_GIT_BRANCH_SBUILDINFO NCBI_REVISION_SBUILDINFO .Extra(SBuildInfo::eSubversionRevision, NCBI_SUBVERSION_REVISION_PROXY) .Extra(SBuildInfo::eStableComponentsVersion, NCBI_SC_VERSION_PROXY))
 
 CVersion::CVersion (const CVersion &version)
 
void CVersion::AddComponentVersion (const string &component_name, int ver_major, int ver_minor, int patch_level=0, const string &ver_name=kEmptyStr, const SBuildInfo &build_info=SBuildInfo(__DATE__ " " __TIME__, "") .Extra(SBuildInfo::eTeamCityProjectName, NCBI_TEAMCITY_PROJECT_NAME_PROXY) .Extra(SBuildInfo::eTeamCityBuildConf, NCBI_TEAMCITY_BUILDCONF_NAME_PROXY) .Extra(SBuildInfo::eTeamCityBuildNumber, NCBI_TEAMCITY_BUILD_NUMBER_PROXY) NCBI_GIT_BRANCH_SBUILDINFO NCBI_REVISION_SBUILDINFO .Extra(SBuildInfo::eSubversionRevision, NCBI_SUBVERSION_REVISION_PROXY) .Extra(SBuildInfo::eStableComponentsVersion, NCBI_SC_VERSION_PROXY))
 Add component version information. More...
 
 SBuildInfo::SBuildInfo (void)
 
 SBuildInfo::SBuildInfo (const string &d, const string &t=kEmptyStr)
 
SBuildInfoSBuildInfo::Extra (EExtra key, const string &value)
 
SBuildInfoSBuildInfo::Extra (EExtra key, int value)
 
string SBuildInfo::GetExtraValue (EExtra key, const string &default_value=kEmptyStr) const
 
static string SBuildInfo::ExtraName (EExtra key)
 
static string SBuildInfo::ExtraNameXml (EExtra key)
 
static string SBuildInfo::ExtraNameJson (EExtra key)
 
static string SBuildInfo::ExtraNameAppLog (EExtra key)
 
CTime SBuildInfo::GetBuildTime (void) const
 Converts 'date' parameter to CTime. More...
 
string SBuildInfo::Print (size_t offset=0) const
 
string SBuildInfo::PrintXml (void) const
 
string SBuildInfo::PrintJson (void) const
 
 CVersionInfo::CVersionInfo (int ver_major, int ver_minor, int patch_level=0, const string &name=kEmptyStr)
 Constructor. More...
 
 CVersionInfo::CVersionInfo (const string &version, const string &name=kEmptyStr)
 
 CVersionInfo::CVersionInfo (EVersionFlags flags=kLatest)
 
virtual CVersionInfo::~CVersionInfo ()
 Destructor. More...
 
void CVersionInfo::FromStr (const string &version)
 Take version info from string. More...
 
void CVersionInfo::SetVersion (int ver_major, int ver_minor, int patch_level=0)
 
virtual string CVersionInfo::Print (void) const
 Print version information. More...
 
virtual string CVersionInfo::PrintXml (void) const
 Print version information as XML (see ncbi_version.xsd) More...
 
virtual string CVersionInfo::PrintJson (void) const
 Print version information as JSON. More...
 
int CVersionInfo::GetMajor (void) const
 Major version. More...
 
int CVersionInfo::GetMinor (void) const
 Minor version. More...
 
int CVersionInfo::GetPatchLevel (void) const
 Patch level. More...
 
const stringCVersionInfo::GetName (void) const
 
EMatch CVersionInfo::Match (const CVersionInfo &version_info) const
 Check if version matches another version. More...
 
bool CVersionInfo::IsAny () const
 Check if version is all zero (major, minor, patch) Convention is that all-zero version used in requests as "get me anything". More...
 
bool CVersionInfo::IsLatest () const
 Check if version is all -1 (major, minor, patch) Convention is that -1 version used in requests as "get me the latest version". More...
 
bool CVersionInfo::IsUpCompatible (const CVersionInfo &cinfo) const
 Check if this version info is more contemporary version than parameter cinfo (or the same version) More...
 
 CComponentVersionInfoAPI::CComponentVersionInfoAPI (const string &component_name, int ver_major, int ver_minor, int patch_level, const string &ver_name, const SBuildInfo &build_info)
 Constructor. More...
 
 CComponentVersionInfoAPI::CComponentVersionInfoAPI (const string &component_name, const string &version, const string &ver_name, const SBuildInfo &build_info)
 Constructor. More...
 
const stringCComponentVersionInfoAPI::GetComponentName (void) const
 Get component name. More...
 
virtual string CComponentVersionInfoAPI::Print (void) const
 Print version information. More...
 
virtual string CComponentVersionInfoAPI::PrintXml (void) const
 Print version information ax XML. More...
 
virtual string CComponentVersionInfoAPI::PrintJson (void) const
 Print version information as JSON. More...
 
 CVersionAPI::CVersionAPI (const SBuildInfo &build_info=SBuildInfo())
 
 CVersionAPI::CVersionAPI (const CVersionInfo &version, const SBuildInfo &build_info=SBuildInfo())
 
 CVersionAPI::CVersionAPI (const CVersionAPI &version)
 
 CVersionAPI::CVersionAPI (CVersionAPI &&version)=default
 
CVersionAPICVersionAPI::operator= (const CVersionAPI &version)
 
CVersionAPICVersionAPI::operator= (CVersionAPI &&version)=default
 
void CVersionAPI::SetVersionInfo (int ver_major, int ver_minor, int patch_level=0, const string &ver_name=kEmptyStr)
 Set version information. More...
 
void CVersionAPI::SetVersionInfo (int ver_major, int ver_minor, int patch_level, const string &ver_name, const SBuildInfo &build_info)
 
void CVersionAPI::SetVersionInfo (CVersionInfo *version)
 Set version information. More...
 
void CVersionAPI::SetVersionInfo (CVersionInfo *version, const SBuildInfo &build_info)
 
const CVersionInfoCVersionAPI::GetVersionInfo () const
 Get version information. More...
 
void CVersionAPI::AddComponentVersion (const string &component_name, int ver_major, int ver_minor, int patch_level, const string &ver_name, const SBuildInfo &build_info)
 Add component version information. More...
 
void CVersionAPI::AddComponentVersion (CComponentVersionInfoAPI *component)
 Add component version information. More...
 
const SBuildInfoCVersionAPI::GetBuildInfo () const
 Get build info (date and tag, if set) More...
 
static string CVersionAPI::GetPackageName (void)
 
static CVersionInfo CVersionAPI::GetPackageVersion (void)
 
static string CVersionAPI::GetPackageConfig (void)
 
string CVersionAPI::Print (const string &appname, TPrintFlags flags=fPrintAll) const
 Print version data, plain text. More...
 
string CVersionAPI::PrintXml (const string &appname, TPrintFlags flags=fPrintAll) const
 Print version data, XML. More...
 
string CVersionAPI::PrintJson (const string &appname, TPrintFlags flags=fPrintAll) const
 Print version data, JSON. More...
 
static void CVersionAPI::x_Copy (CVersionAPI &to, const CVersionAPI &from)
 
bool IsBetterVersion (const CVersionInfo &info, const CVersionInfo &cinfo, int &best_major, int &best_minor, int &best_patch_level)
 Return true if one version info is matches another better than the best variant. More...
 
bool operator== (const CVersionInfo &v1, const CVersionInfo &v2)
 
bool operator< (const CVersionInfo &v1, const CVersionInfo &v2)
 
ostream & operator<< (ostream &strm, const CVersionInfo &v)
 
template<class It >
It FindVersion (It first, It last, const CVersionInfo &info)
 Algorithm function to find version in the container. More...
 
template<class TClass >
TClass::const_iterator FindVersion (const TClass &cont, const CVersionInfo &info)
 Algorithm function to find version in the container. More...
 
void ParseVersionString (const string &vstr, string *program_name, CVersionInfo *ver)
 Parse string, extract version info and program name (case insensitive) More...
 

Variables

string SBuildInfo::date
 
string SBuildInfo::tag
 
vector< pair< EExtra, string > > SBuildInfo::m_extra
 
int CVersionInfo::m_Major
 Major number. More...
 
int CVersionInfo::m_Minor
 Minor number. More...
 
int CVersionInfo::m_PatchLevel
 Patch level. More...
 
string CVersionInfo::m_Name
 Name. More...
 
string CComponentVersionInfoAPI::m_ComponentName
 
SBuildInfo CComponentVersionInfoAPI::m_BuildInfo
 
unique_ptr< CVersionInfoCVersionAPI::m_VersionInfo
 
vector< unique_ptr< CComponentVersionInfoAPI > > CVersionAPI::m_Components
 
SBuildInfo CVersionAPI::m_BuildInfo
 

Detailed Description

Macro Definition Documentation

◆ CComponentVersionInfo

Definition at line 465 of file version_api.hpp.

◆ CVersion

#define CVersion   CVersionAPI

Definition at line 464 of file version_api.hpp.

◆ MDB_VERFOO [1/2]

#define MDB_VERFOO (   a,
  b,
  c,
 
)    MDB_VERSTR(a,b,c,d)

A helper for the stringifier macro.

Definition at line 219 of file lmdb.h.

◆ MDB_VERFOO [2/2]

#define MDB_VERFOO (   a,
  b,
  c,
 
)    MDB_VERSTR(a,b,c,d)

A helper for the stringifier macro.

Definition at line 219 of file lmdb.h.

◆ MDB_VERINT [1/2]

#define MDB_VERINT (   a,
  b,
 
)    (((a) << 24) | ((b) << 16) | (c))

Combine args a,b,c into a single integer for easy version comparisons.

Definition at line 206 of file lmdb.h.

◆ MDB_VERINT [2/2]

#define MDB_VERINT (   a,
  b,
 
)    (((a) << 24) | ((b) << 16) | (c))

Combine args a,b,c into a single integer for easy version comparisons.

Definition at line 206 of file lmdb.h.

◆ MDB_VERSION_DATE [1/2]

#define MDB_VERSION_DATE   "July 24, 2019"

The release date of this library version.

Definition at line 213 of file lmdb.h.

◆ MDB_VERSION_DATE [2/2]

#define MDB_VERSION_DATE   "July 24, 2019"

The release date of this library version.

Definition at line 213 of file lmdb.h.

◆ MDB_VERSION_FULL [1/2]

The full library version as a single integer.

Definition at line 209 of file lmdb.h.

◆ MDB_VERSION_FULL [2/2]

The full library version as a single integer.

Definition at line 209 of file lmdb.h.

◆ MDB_VERSION_MAJOR [1/2]

#define MDB_VERSION_MAJOR   0

Library major version.

Definition at line 199 of file lmdb.h.

◆ MDB_VERSION_MAJOR [2/2]

#define MDB_VERSION_MAJOR   0

Library major version.

Definition at line 199 of file lmdb.h.

◆ MDB_VERSION_MINOR [1/2]

#define MDB_VERSION_MINOR   9

Library minor version.

Definition at line 201 of file lmdb.h.

◆ MDB_VERSION_MINOR [2/2]

#define MDB_VERSION_MINOR   9

Library minor version.

Definition at line 201 of file lmdb.h.

◆ MDB_VERSION_PATCH [1/2]

#define MDB_VERSION_PATCH   24

Library patch version.

Definition at line 203 of file lmdb.h.

◆ MDB_VERSION_PATCH [2/2]

#define MDB_VERSION_PATCH   24

Library patch version.

Definition at line 203 of file lmdb.h.

◆ MDB_VERSION_STRING [1/2]

The full library version as a C string.

Definition at line 222 of file lmdb.h.

◆ MDB_VERSION_STRING [2/2]

The full library version as a C string.

Definition at line 222 of file lmdb.h.

◆ MDB_VERSTR [1/2]

#define MDB_VERSTR (   a,
  b,
  c,
 
)    "LMDB " #a "." #b "." #c ": (" d ")"

A stringifier for the version info.

Definition at line 216 of file lmdb.h.

◆ MDB_VERSTR [2/2]

#define MDB_VERSTR (   a,
  b,
  c,
 
)    "LMDB " #a "." #b "." #c ": (" d ")"

A stringifier for the version info.

Definition at line 216 of file lmdb.h.

◆ NCBI_APP_SBUILDINFO_DEFAULT

#define NCBI_APP_SBUILDINFO_DEFAULT ( )    NCBI_SBUILDINFO_DEFAULT_IMPL()

Definition at line 121 of file version.hpp.

◆ NCBI_BUILD_ID_SBUILDINFO

#define NCBI_BUILD_ID_SBUILDINFO   /* empty */

Definition at line 100 of file version.hpp.

◆ NCBI_BUILD_TAG_PROXY

#define NCBI_BUILD_TAG_PROXY   ""

Definition at line 58 of file version.hpp.

◆ NCBI_BUILD_TIME

#define NCBI_BUILD_TIME   __DATE__ " " __TIME__

Definition at line 52 of file version.hpp.

◆ NCBI_BUILT_AS_SBUILDINFO

#define NCBI_BUILT_AS_SBUILDINFO   /* empty */

Definition at line 89 of file version.hpp.

◆ NCBI_SBUILDINFO_DEFAULT

#define NCBI_SBUILDINFO_DEFAULT ( )    NCBI_SBUILDINFO_DEFAULT_IMPL()

Definition at line 119 of file version.hpp.

◆ NCBI_SBUILDINFO_DEFAULT_IMPL

#define NCBI_SBUILDINFO_DEFAULT_IMPL ( )
Value:
NCBI_TEAMCITY_PROJECT_NAME_SBUILDINFO \
NCBI_TEAMCITY_BUILDCONF_NAME_SBUILDINFO \
NCBI_TEAMCITY_BUILD_NUMBER_SBUILDINFO \
NCBI_BUILD_ID_SBUILDINFO \
NCBI_GIT_BRANCH_SBUILDINFO \
NCBI_REVISION_SBUILDINFO \
NCBI_SUBVERSION_REVISION_SBUILDINFO \
NCBI_SC_VERSION_SBUILDINFO \
NCBI_SRCTREE_VER_SBUILDINFO \
NCBI_BUILT_AS_SBUILDINFO
#define NCBI_SBUILDINFO_DEFAULT_INSTANCE()
Definition: version.hpp:126

Definition at line 103 of file version.hpp.

◆ NCBI_SBUILDINFO_DEFAULT_INSTANCE [1/2]

#define NCBI_SBUILDINFO_DEFAULT_INSTANCE ( )    SBuildInfo(NCBI_BUILD_TIME, NCBI_BUILD_TAG_PROXY)

Definition at line 126 of file version.hpp.

◆ NCBI_SBUILDINFO_DEFAULT_INSTANCE [2/2]

#define NCBI_SBUILDINFO_DEFAULT_INSTANCE ( )    SBuildInfo()

Definition at line 107 of file version_api.hpp.

◆ NCBI_SC_VERSION_SBUILDINFO

#define NCBI_SC_VERSION_SBUILDINFO    .Extra(SBuildInfo::eStableComponentsVersion, NCBI_SC_VERSION_PROXY)

Definition at line 71 of file version.hpp.

◆ NCBI_SRCTREE_VER_SBUILDINFO

#define NCBI_SRCTREE_VER_SBUILDINFO   /* empty */

Definition at line 81 of file version.hpp.

◆ NCBI_SUBVERSION_REVISION_SBUILDINFO

#define NCBI_SUBVERSION_REVISION_SBUILDINFO    .Extra(SBuildInfo::eSubversionRevision, NCBI_SUBVERSION_REVISION_PROXY)

Definition at line 69 of file version.hpp.

◆ NCBI_TEAMCITY_BUILD_NUMBER_SBUILDINFO

#define NCBI_TEAMCITY_BUILD_NUMBER_SBUILDINFO    .Extra(SBuildInfo::eTeamCityBuildNumber, NCBI_TEAMCITY_BUILD_NUMBER_PROXY)

Definition at line 67 of file version.hpp.

◆ NCBI_TEAMCITY_BUILDCONF_NAME_SBUILDINFO

#define NCBI_TEAMCITY_BUILDCONF_NAME_SBUILDINFO    .Extra(SBuildInfo::eTeamCityBuildConf, NCBI_TEAMCITY_BUILDCONF_NAME_PROXY)

Definition at line 65 of file version.hpp.

◆ NCBI_TEAMCITY_PROJECT_NAME_SBUILDINFO

#define NCBI_TEAMCITY_PROJECT_NAME_SBUILDINFO    .Extra(SBuildInfo::eTeamCityProjectName, NCBI_TEAMCITY_PROJECT_NAME_PROXY)

Definition at line 63 of file version.hpp.

Typedef Documentation

◆ TPrintFlags

Binary OR of EPrintFlags.

Definition at line 330 of file version_api.hpp.

Enumeration Type Documentation

◆ EExtra

Enumerator
eBuildDate 
eBuildTag 
eTeamCityProjectName 
eTeamCityBuildConf 
eTeamCityBuildNumber 
eBuildID 
eSubversionRevision 

Numeric if present.

eStableComponentsVersion 
eDevelopmentVersion 
eProductionVersion 
eBuiltAs 
eRevision 

Not necessarily numeric.

eGitBranch 

Definition at line 63 of file version_api.hpp.

◆ EMatch

Version comparison result.

See also
Match
Enumerator
eNonCompatible 

major, minor does not match

eConditionallyCompatible 

patch level incompatibility

eBackwardCompatible 

patch level is newer

eFullyCompatible 

exactly the same version

Definition at line 174 of file version_api.hpp.

◆ EPrintFlags

Enumerator
fVersionInfo 

Print version info.

fComponents 

Print components version info.

fPackageShort 

Print package info, if available.

fPackageFull 

Print package info, if available.

fBuildInfo 

Print build info (date and tag)

fBuildSignature 

Print build signature, if available.

fGI64bit 

Print info about GI size.

fTCBuildNumber 

obsolete, has no effect

fPrintAll 

Print all version data.

Definition at line 319 of file version_api.hpp.

◆ EVersionFlags

Enumerator
kAny 
kLatest 

Definition at line 131 of file version_api.hpp.

Function Documentation

◆ AddComponentVersion() [1/3]

void CVersionAPI::AddComponentVersion ( CComponentVersionInfoAPI component)

Add component version information.

Note
Takes the ownership over the passed VersionInfo object

Definition at line 690 of file version.cpp.

References CVersionAPI::m_Components.

◆ AddComponentVersion() [2/3]

void CVersionAPI::AddComponentVersion ( const string component_name,
int  ver_major,
int  ver_minor,
int  patch_level,
const string ver_name,
const SBuildInfo build_info 
)

Add component version information.

Definition at line 681 of file version.cpp.

References CVersionAPI::m_Components.

Referenced by CVersion::AddComponentVersion(), and CNcbiApplicationAPI::CNcbiApplicationAPI().

◆ AddComponentVersion() [3/3]

Add component version information.

Definition at line 192 of file version.hpp.

References CVersionAPI::AddComponentVersion().

◆ CComponentVersionInfo() [1/2]

Constructor.

Parameters
component_namecomponent name
versionversion string (eg, 1.2.4)
ver_nameversion name

Definition at line 157 of file version.hpp.

◆ CComponentVersionInfo() [2/2]

Constructor.

Definition at line 139 of file version.hpp.

◆ CComponentVersionInfoAPI() [1/2]

CComponentVersionInfoAPI::CComponentVersionInfoAPI ( const string component_name,
const string version,
const string ver_name,
const SBuildInfo build_info 
)

Constructor.

Parameters
component_namecomponent name
versionversion string (eg, 1.2.4)
ver_nameversion name

Definition at line 406 of file version.cpp.

◆ CComponentVersionInfoAPI() [2/2]

CComponentVersionInfoAPI::CComponentVersionInfoAPI ( const string component_name,
int  ver_major,
int  ver_minor,
int  patch_level,
const string ver_name,
const SBuildInfo build_info 
)

Constructor.

Definition at line 396 of file version.cpp.

◆ CVersion() [1/3]

CVersion::CVersion ( const CVersion version)
inline

Definition at line 184 of file version.hpp.

◆ CVersion() [2/3]

Definition at line 178 of file version.hpp.

◆ CVersion() [3/3]

Definition at line 172 of file version.hpp.

◆ CVersionAPI() [1/4]

CVersionAPI::CVersionAPI ( const CVersionAPI version)

Definition at line 635 of file version.cpp.

References version, and CVersionAPI::x_Copy().

◆ CVersionAPI() [2/4]

CVersionAPI::CVersionAPI ( const CVersionInfo version,
const SBuildInfo build_info = SBuildInfo() 
)
explicit

Definition at line 619 of file version.cpp.

◆ CVersionAPI() [3/4]

CVersionAPI::CVersionAPI ( const SBuildInfo build_info = SBuildInfo())
explicit

◆ CVersionAPI() [4/4]

CVersionAPI::CVersionAPI ( CVersionAPI &&  version)
default

◆ CVersionInfo() [1/3]

CVersionInfo::CVersionInfo ( const string version,
const string name = kEmptyStr 
)
Parameters
versionversion string in rcs format (like 1.2.4)

Definition at line 57 of file version.cpp.

References CVersionInfo::FromStr(), CVersionInfo::m_Name, and version.

◆ CVersionInfo() [2/3]

CVersionInfo::CVersionInfo ( EVersionFlags  flags = kLatest)

◆ CVersionInfo() [3/3]

CVersionInfo::CVersionInfo ( int  ver_major,
int  ver_minor,
int  patch_level = 0,
const string name = kEmptyStr 
)

Constructor.

Definition at line 44 of file version.cpp.

◆ Extra() [1/2]

SBuildInfo & SBuildInfo::Extra ( EExtra  key,
const string value 
)

◆ Extra() [2/2]

SBuildInfo & SBuildInfo::Extra ( EExtra  key,
int  value 
)

◆ ExtraName()

string SBuildInfo::ExtraName ( EExtra  key)
static

◆ ExtraNameAppLog()

string SBuildInfo::ExtraNameAppLog ( EExtra  key)
static

◆ ExtraNameJson()

string SBuildInfo::ExtraNameJson ( EExtra  key)
static

◆ ExtraNameXml()

string SBuildInfo::ExtraNameXml ( EExtra  key)
static

◆ FindVersion() [1/2]

template<class TClass >
TClass::const_iterator FindVersion ( const TClass &  cont,
const CVersionInfo info 
)

Algorithm function to find version in the container.

Scans the provided container for version with the same major and minor version and the newest patch level.

Parameters
containercontainer object to search in
Returns
iterator on the best fit version (last if no version found)

Definition at line 438 of file version_api.hpp.

References FindVersion(), and info.

◆ FindVersion() [2/2]

template<class It >
It FindVersion ( It  first,
It  last,
const CVersionInfo info 
)

Algorithm function to find version in the container.

Scans the provided iterator for version with the same major and minor version and the newest patch level.

Parameters
firstfirst iterator to start search
lastending iterator (typically returned by end() function of an STL container)
Returns
iterator on the best version or last

Definition at line 407 of file version_api.hpp.

References first(), info, IsBetterVersion(), and last().

Referenced by FindVersion().

◆ FromStr()

void CVersionInfo::FromStr ( const string version)

Take version info from string.

Definition at line 114 of file version.cpp.

References s_ConvertVersionInfo(), and version.

Referenced by CVersionInfo::CVersionInfo().

◆ GetBuildInfo()

const SBuildInfo & CVersionAPI::GetBuildInfo ( ) const

◆ GetBuildTime()

CTime SBuildInfo::GetBuildTime ( void  ) const

Converts 'date' parameter to CTime.

Returns empty CTime object if unable to do an conversion or build date/time is unknown, so check CTime::IsEmpty().

Definition at line 596 of file version.cpp.

References SBuildInfo::date.

Referenced by CAsn2FastaApp::Run(), and CAsn2FlatApp::Run().

◆ GetComponentName()

const string& CComponentVersionInfoAPI::GetComponentName ( void  ) const
inline

◆ GetExtraValue()

string SBuildInfo::GetExtraValue ( EExtra  key,
const string default_value = kEmptyStr 
) const

◆ GetMajor()

int CVersionInfo::GetMajor ( void  ) const
inline

◆ GetMinor()

int CVersionInfo::GetMinor ( void  ) const
inline

◆ GetName()

const string& CVersionInfo::GetName ( void  ) const
inline

Definition at line 170 of file version_api.hpp.

References CVersionInfo::m_Name.

◆ GetPackageConfig()

string CVersionAPI::GetPackageConfig ( void  )
static

Definition at line 712 of file version.cpp.

References NCBI_PACKAGE_CONFIG.

Referenced by CVersionAPI::Print(), CVersionAPI::PrintJson(), and CVersionAPI::PrintXml().

◆ GetPackageName()

string CVersionAPI::GetPackageName ( void  )
static

◆ GetPackageVersion()

CVersionInfo CVersionAPI::GetPackageVersion ( void  )
static

◆ GetPatchLevel()

int CVersionInfo::GetPatchLevel ( void  ) const
inline

◆ GetVersionInfo()

const CVersionInfo & CVersionAPI::GetVersionInfo ( void  ) const

◆ IsAny()

bool CVersionInfo::IsAny ( ) const
inline

Check if version is all zero (major, minor, patch) Convention is that all-zero version used in requests as "get me anything".

See also
kAny

Definition at line 190 of file version_api.hpp.

References CVersionInfo::m_Major, CVersionInfo::m_Minor, and CVersionInfo::m_PatchLevel.

Referenced by CNcbiApplicationAPI::CNcbiApplicationAPI().

◆ IsBetterVersion()

bool IsBetterVersion ( const CVersionInfo info,
const CVersionInfo cinfo,
int best_major,
int best_minor,
int best_patch_level 
)

Return true if one version info is matches another better than the best variant.

When condition satisfies, return true and the former best values are getting updated

Parameters
infoVersion info to search
cinfoComparison candidate
best_majorBest major version found (reference)
best_minorBest minor version found (reference)
best_patch_levelBest patch levelfound (reference)

Definition at line 215 of file version.cpp.

References CVersionInfo::GetMajor(), CVersionInfo::GetMinor(), CVersionInfo::GetPatchLevel(), and info.

Referenced by CPluginManager< TClass >::FindClassFactory(), and FindVersion().

◆ IsLatest()

bool CVersionInfo::IsLatest ( ) const
inline

Check if version is all -1 (major, minor, patch) Convention is that -1 version used in requests as "get me the latest version".

See also
kLatest

Definition at line 197 of file version_api.hpp.

References CVersionInfo::m_Major, CVersionInfo::m_Minor, and CVersionInfo::m_PatchLevel.

◆ IsUpCompatible()

bool CVersionInfo::IsUpCompatible ( const CVersionInfo cinfo) const
inline

Check if this version info is more contemporary version than parameter cinfo (or the same version)

Parameters
cinfoVersion checked (all components must be <= than this)

Definition at line 206 of file version_api.hpp.

References CVersionInfo::m_Major, CVersionInfo::m_Minor, and CVersionInfo::m_PatchLevel.

Referenced by CQueueClientInfoList::IsMatchingClient().

◆ Match()

CVersionInfo::EMatch CVersionInfo::Match ( const CVersionInfo version_info) const

◆ operator<()

bool operator< ( const CVersionInfo v1,
const CVersionInfo v2 
)
inline

◆ operator<<()

ostream& operator<< ( ostream &  strm,
const CVersionInfo v 
)
inline

◆ operator=() [1/2]

CVersionAPI & CVersionAPI::operator= ( const CVersionAPI version)

Definition at line 641 of file version.cpp.

References CObject::operator=(), version, and CVersionAPI::x_Copy().

◆ operator=() [2/2]

CVersionAPI& CVersionAPI::operator= ( CVersionAPI &&  version)
default

◆ operator==()

bool operator== ( const CVersionInfo v1,
const CVersionInfo v2 
)
inline

◆ ParseVersionString()

void ParseVersionString ( const string vstr,
string program_name,
CVersionInfo ver 
)

Parse string, extract version info and program name (case insensitive)

Examples: MyProgram 1.2.3 MyProgram version 1.2.3 MyProgram v. 1.2.3 MyProgram ver. 1.2.3 version 1.2.3

Definition at line 271 of file version.cpp.

References _ASSERT, NCBI_THROW2, and NStr::ToLower().

Referenced by CQueueClientInfoList::AddClientInfo(), CQueueDataBase::CreateDynamicQueue(), and CQueue::IsProgramAllowed().

◆ Print() [1/4]

string CVersionAPI::Print ( const string appname,
TPrintFlags  flags = fPrintAll 
) const

◆ Print() [2/4]

string SBuildInfo::Print ( size_t  offset = 0) const

◆ Print() [3/4]

string CVersionInfo::Print ( void  ) const
virtual

◆ Print() [4/4]

string CComponentVersionInfoAPI::Print ( void  ) const
virtual

Print version information.

Reimplemented from CVersionInfo.

Reimplemented in CSeqMaskerVersion.

Definition at line 415 of file version.cpp.

References CComponentVersionInfoAPI::GetComponentName(), CComponentVersionInfoAPI::m_BuildInfo, SBuildInfo::Print(), and CVersionInfo::Print().

◆ PrintJson() [1/4]

string CVersionAPI::PrintJson ( const string appname,
TPrintFlags  flags = fPrintAll 
) const

◆ PrintJson() [2/4]

string SBuildInfo::PrintJson ( void  ) const

◆ PrintJson() [3/4]

string CVersionInfo::PrintJson ( void  ) const
virtual

◆ PrintJson() [4/4]

string CComponentVersionInfoAPI::PrintJson ( void  ) const
virtual

◆ PrintXml() [1/4]

string CVersionAPI::PrintXml ( const string appname,
TPrintFlags  flags = fPrintAll 
) const

◆ PrintXml() [2/4]

string SBuildInfo::PrintXml ( void  ) const

◆ PrintXml() [3/4]

string CVersionInfo::PrintXml ( void  ) const
virtual

Print version information as XML (see ncbi_version.xsd)

Reimplemented in CComponentVersionInfoAPI.

Definition at line 137 of file version.cpp.

References CVersionInfo::m_Major, CVersionInfo::m_Minor, CVersionInfo::m_Name, CVersionInfo::m_PatchLevel, and NStr::XmlEncode().

Referenced by CVersionAPI::PrintXml(), and CComponentVersionInfoAPI::PrintXml().

◆ PrintXml() [4/4]

string CComponentVersionInfoAPI::PrintXml ( void  ) const
virtual

◆ SBuildInfo() [1/2]

SBuildInfo::SBuildInfo ( const string d,
const string t = kEmptyStr 
)
inlineexplicit

Definition at line 85 of file version_api.hpp.

◆ SBuildInfo() [2/2]

SBuildInfo::SBuildInfo ( void  )

Definition at line 444 of file version.cpp.

◆ SetVersion()

void CVersionInfo::SetVersion ( int  ver_major,
int  ver_minor,
int  patch_level = 0 
)

◆ SetVersionInfo() [1/4]

void CVersionAPI::SetVersionInfo ( CVersionInfo version)

Set version information.

Note
Takes the ownership over the passed VersionInfo object

Definition at line 664 of file version.cpp.

References CVersionAPI::m_VersionInfo, and version.

◆ SetVersionInfo() [2/4]

void CVersionAPI::SetVersionInfo ( CVersionInfo version,
const SBuildInfo build_info 
)

Definition at line 669 of file version.cpp.

References CVersionAPI::m_BuildInfo, CVersionAPI::m_VersionInfo, and version.

◆ SetVersionInfo() [3/4]

void CVersionAPI::SetVersionInfo ( int  ver_major,
int  ver_minor,
int  patch_level,
const string ver_name,
const SBuildInfo build_info 
)

Definition at line 655 of file version.cpp.

References CVersionAPI::m_BuildInfo, and CVersionAPI::m_VersionInfo.

◆ SetVersionInfo() [4/4]

void CVersionAPI::SetVersionInfo ( int  ver_major,
int  ver_minor,
int  patch_level = 0,
const string ver_name = kEmptyStr 
)

◆ x_Copy()

void CVersionAPI::x_Copy ( CVersionAPI to,
const CVersionAPI from 
)
staticprivate

◆ ~CVersionInfo()

virtual CVersionInfo::~CVersionInfo ( )
inlinevirtual

Destructor.

Definition at line 138 of file version_api.hpp.

Variable Documentation

◆ date

string SBuildInfo::date

◆ m_BuildInfo [1/2]

SBuildInfo CComponentVersionInfoAPI::m_BuildInfo
private

◆ m_BuildInfo [2/2]

SBuildInfo CVersionAPI::m_BuildInfo
private

◆ m_ComponentName

string CComponentVersionInfoAPI::m_ComponentName
private

Definition at line 262 of file version_api.hpp.

Referenced by CComponentVersionInfoAPI::GetComponentName().

◆ m_Components

vector<unique_ptr<CComponentVersionInfoAPI> > CVersionAPI::m_Components
private

◆ m_extra

vector< pair<EExtra,string> > SBuildInfo::m_extra

◆ m_Major

int CVersionInfo::m_Major
protected

◆ m_Minor

int CVersionInfo::m_Minor
protected

◆ m_Name

string CVersionInfo::m_Name
protected

◆ m_PatchLevel

int CVersionInfo::m_PatchLevel
protected

◆ m_VersionInfo

unique_ptr<CVersionInfo> CVersionAPI::m_VersionInfo
private

◆ tag

string SBuildInfo::tag
Modified on Mon May 20 05:05:36 2024 by modify_doxy.py rev. 669887