- Aldebaran documentation |
- C++ Libraries |
- index

libqi-api 2.8.7.4

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- Namespace List
- Namespace Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Functions
qi::version Namespace Reference

Version numbering API. . More...

## Classes
class | Version
| Compare version strings Simple class that allow comparing two 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

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

Compare version numbers.

Parameters

  versionA | Version number.
  versionB | Version number.

Returns
  like strcmp, 0 if equal, -1 if a < b, 1 if a > b

std::vector<std::string> qi::version::explode | ( | const std::string & | version | ) |

Explode a version string to an array of strings.

Parameters

  version | The string to explode.

Returns
  An array of strings (including ".").

for example "1.2.3" become { "1", "2", "3" }

std::string qi::version::extract | ( | const std::string & | version | ) |

Extract version number from string.

Parameters

  version | The string containing the version number.

Returns
  The version number, if any.