qi::Version¶
Summary¶
namespace qi::version
class qi::version::Version
Functions (class qi::version::Version)
Classes (namespace qi::version)
Functions (namespace qi::version)
Global Namespaces
Reference¶
qi::version::Version Class Reference¶
Public Functions¶
-
()Version
-
(const Version& other)Version
-
(const std::string& version)Version
-
(const char* version)Version
-
()~Version
-
Version&
(const Version& rhs)operator=
-
() conststring&
-
bool
(const Version& pi) constoperator<
-
bool
(const Version& pi) constoperator>
-
bool
(const Version& pi) constoperator==
-
bool
(const Version& pi) constoperator!=
-
bool
(const Version& pi) constoperator<=
-
bool
(const Version& pi) constoperator>=
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
qi::version Namespace Reference¶
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.