libqi-api  2.1.4.13
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Functions
qi::version Namespace Reference

Version numbering API. More...

Classes

struct  Version
 Struct representing a version number. More...
 

Functions

std::vector< std::string > explode (const std::string &version)
 Explode a version string to an array of strings. More...
 
int compare (const std::string &versionA, const std::string &versionB)
 Compare version numbers. More...
 
std::string extract (const std::string &version)
 Extract version number from string. More...
 

Detailed Description

Version numbering API.

Function Documentation

qi::version::compare ( const std::string &  versionA,
const std::string &  versionB 
)

Compare version numbers.

Parameters
versionAVersion number.
versionBVersion number.
Returns
1 if versionA is more recent than versionB, 0 otherwise, and -1 if error.
qi::version::explode ( const std::string &  version)

Explode a version string to an array of strings.

Parameters
versionThe string to explode.
Returns
An array of strings (including ".").
qi::version::extract ( const std::string &  version)

Extract version number from string.

Parameters
versionThe string containing the version number.
Returns
The version number, if any.