Aldebaran documentation What's new in NAOqi 2.4.3?

qi::Version

Reference

qi::version::Version Class Reference

Introduction

Compare version strings Simple class that allow comparing two version number. More...

Public Functions

Version()
Version(const Version& other)
Version(const std::string& version)
Version(const char* version)
~Version()
Version& operator=(const Version& rhs)
string&() const
bool operator<(const Version& pi) const
bool operator>(const Version& pi) const
bool operator==(const Version& pi) const
bool operator!=(const Version& pi) const
bool operator<=(const Version& pi) const
bool operator>=(const Version& pi) const

Detailed Description

Compare version strings Simple class that allow comparing two version number.

Function Documentation

qi::version::Version::Version()

These constructors are implicit by design.

qi::version::Version::Version(const Version& other)

Copy constructor.

qi::version::Version::Version(const std::string& version)

Constructor converting a string.

qi::version::Version::Version(const char* version)

Constructor converting a char*.

qi::version::Version::~Version()

Destructor.

Version& qi::version::Version::operator=(const Version& rhs)

Assignation opertator.

qi::version::Version::operator const std::string&() const

Converting the Version to a String.

bool qi::version::Version::operator<(const Version& pi) const

Brief: operator <

Parameters:
  • pi
Returns:

true if pi is superior

bool qi::version::Version::operator>(const Version& pi) const

Brief: operator >

Parameters:
  • pi
Returns:

true if pi is inferior

bool qi::version::Version::operator==(const Version& pi) const

Brief: operator ==

Parameters:
  • pi
Returns:

true if pi is equal

bool qi::version::Version::operator!=(const Version& pi) const

Brief: operator !=

Parameters:
  • pi
Returns:

true if pi is different

bool qi::version::Version::operator<=(const Version& pi) const

Brief: operator <=

Parameters:
  • pi
Returns:

true if pi is superior or equal

bool qi::version::Version::operator>=(const Version& pi) const

Brief: operator >=

Parameters:
  • pi
Returns:

true if pi is inferior or equal

qi::version Namespace Reference

Introduction

Version numbering API. qi/version.hpp . More...

Inner Definitions

Classes
Name Brief
qi::version::Version Compare version strings Simple class that allow comparing two version number.
Functions
Name Brief
qi::version::explode Explode a version string to an array of strings.
qi::version::compare Compare version numbers.
qi::version::extract Extract version number from string.

Detailed Description

Version numbering API. qi/version.hpp .

Functions

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

Brief: 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” }

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

Brief: 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::string qi::version::extract(const std::string& version)

Brief: Extract version number from string.

Parameters:
  • version – The string containing the version number.
Returns:

The version number, if any.