|
Robot Raconteur Core C++ Library
|
Robot Raconteur Version storage class. More...
#include <ServiceDefinition.h>
Public Member Functions | |
| RobotRaconteurVersion () | |
| Construct a new default RobotRaconteurVersion instance. | |
| RobotRaconteurVersion (uint32_t major, uint32_t minor, uint32_t patch=0, uint32_t tweak=0) | |
| Construct a new RobotRaconteurVersion instance with a given version. | |
| RobotRaconteurVersion (boost::string_ref v) | |
| Construct a new RobotRaconteurVersion instance with a version parsed from as string. | |
| std::string | ToString () const |
| Get the version as a string. | |
| void | FromString (boost::string_ref v, const ServiceDefinitionParseInfo *parse_info=NULL) |
| Parse a version string and update version fields. | |
| operator bool () const | |
| Boolean operator test if version is specified. | |
Public Attributes | |
| uint32_t | major |
| The major version. | |
| uint32_t | minor |
| The minor version. | |
| uint32_t | patch |
| The patch version. | |
| uint32_t | tweak |
| The tweak version. | |
| ServiceDefinitionParseInfo | ParseInfo |
| Parsing diagnostic information. | |
Friends | |
| bool | operator== (const RobotRaconteurVersion &v1, const RobotRaconteurVersion &v2) |
| Equality operator. | |
| bool | operator!= (const RobotRaconteurVersion &v1, const RobotRaconteurVersion &v2) |
| Inequality operator. | |
| bool | operator> (const RobotRaconteurVersion &v1, const RobotRaconteurVersion &v2) |
| Greater than operator. | |
| bool | operator>= (const RobotRaconteurVersion &v1, const RobotRaconteurVersion &v2) |
| Greater than or equal operator. | |
| bool | operator< (const RobotRaconteurVersion &v1, const RobotRaconteurVersion &v2) |
| Less than operator. | |
| bool | operator<= (const RobotRaconteurVersion &v1, const RobotRaconteurVersion &v2) |
| Less than or equal operator. | |
Robot Raconteur Version storage class.
Stores a semantic version:
MAJOR.MINOR.PATCH(.tweak)?
Versioning should follow the Semantic Versioning 2.0.0 standard (http://semver.org/)
| RobotRaconteur::RobotRaconteurVersion::RobotRaconteurVersion | ( | ) |
Construct a new default RobotRaconteurVersion instance.
Version will be set to 0.0.0
| RobotRaconteur::RobotRaconteurVersion::RobotRaconteurVersion | ( | uint32_t | major, |
| uint32_t | minor, | ||
| uint32_t | patch = 0, | ||
| uint32_t | tweak = 0 ) |
Construct a new RobotRaconteurVersion instance with a given version.
| major | Major version |
| minor | Minor version |
| patch | Patch version |
| tweak | Tweak version |
| RobotRaconteur::RobotRaconteurVersion::RobotRaconteurVersion | ( | boost::string_ref | v | ) |
Construct a new RobotRaconteurVersion instance with a version parsed from as string.
String must be in the form "MAJOR.MINOR.PATCH.TWEAK", ie "1.0.4"
PATCH and TWEAK are optional
| v | The version as a string |
| void RobotRaconteur::RobotRaconteurVersion::FromString | ( | boost::string_ref | v, |
| const ServiceDefinitionParseInfo * | parse_info = NULL ) |
Parse a version string and update version fields.
Fills major, minor, patch, and tweak fields from a string. String must be in the form "MAJOR.MINOR.PATCH.TWEAK", ie "1.0.4". PATCH and TWEAK are optional. Parse information may optionally be specified.
| v | The version string to parse |
| parse_info | Parsing diagnostic information |
| RobotRaconteur::RobotRaconteurVersion::operator bool | ( | ) | const |
Boolean operator test if version is specified.
The version is considered unspecified if version is all zeros
| std::string RobotRaconteur::RobotRaconteurVersion::ToString | ( | ) | const |
Get the version as a string.
Returns a string in the form "MAJOR.MINOR.PATCH.TWEAK". PATCH and TWEAK will be omitted if both are zero.