#include <Version.h>
Public Member Functions | |
uint32_t | code (void) const |
uint32_t | code (void) const |
std::string | human (void) const |
std::string | human (void) const |
std::string | human_major (void) const |
std::string | human_major (void) const |
std::string | human_minor (void) const |
std::string | human_minor (void) const |
uint16_t | major2 (void) const |
uint16_t | major2 (void) const |
uint16_t | minor2 (void) const |
uint16_t | minor2 (void) const |
Version (uint32_t v=DEFAULT_VERSION) | |
Version (uint16_t minor, uint16_t major=MAJOR_DEFAULT_VERSION) | |
Version (uint32_t v=DEFAULT_VERSION) | |
Version (uint16_t minor, uint16_t major=MAJOR_DEFAULT_VERSION) | |
Private Attributes | |
uint16_t | m_major |
The major part of the version number. | |
uint16_t | m_minor |
The minor part of the version number. |
|
Constructor. Takes the components to form a version
|
|
Constructor. Takes the version to understand the components from.
|
|
Constructor. Takes the components to form a version
|
|
Constructor. Takes the version to understand the components from.
|
|
Gets the full 32-bit number made by assembling the 2 numbers above. |
|
Gets the full 32-bit number made by assembling the 2 numbers above. 00022 {
00023 uint32_t retval = m_major;
00024 retval <<= 16;
00025 retval |= m_minor;
00026 return retval;
00027 }
|
|
Returns a string representation of the version number |
|
Returns a string representation of the version number 00044 { 00045 std::string retval = human_major(); 00046 retval += "-"; 00047 retval += human_minor(); 00048 return retval; 00049 }
|
|
Returns a string representation of the major version number |
|
Returns a string representation of the major version number 00030 { 00031 std::ostringstream oss; 00032 oss << (major2() >> 8) << "." << (major2() & 0xff); 00033 return oss.str(); 00034 }
|
|
Returns a string representation of the minor version number |
|
Returns a string representation of the minor version number 00037 { 00038 std::ostringstream oss; 00039 oss << (minor2() >> 8) << "." << (minor2() & 0xff); 00040 return oss.str(); 00041 }
|
|
Extracts the major version part of this version 00065 { return m_major; }
|
|
Extracts the major version part of this version 00065 { return m_major; }
|
|
Extracts the minor version part of this version 00070 { return m_minor; }
|
|
Extracts the minor version part of this version 00070 { return m_minor; }
|
|
The major part of the version number.
|
|
The minor part of the version number.
|