#include <Version.h>
Public Member Functions | |
Version (uint16_t minor, uint16_t major=MAJOR_DEFAULT_VERSION) | |
Version (uint32_t v=DEFAULT_VERSION) | |
uint16_t | major2 (void) const |
uint16_t | minor2 (void) const |
uint32_t | code (void) const |
std::string | human_major (void) const |
std::string | human_minor (void) const |
std::string | human (void) const |
Private Attributes | |
uint16_t | m_minor |
The minor part of the version number. | |
uint16_t | m_major |
The major part of the version number. |
Definition at line 41 of file Version.h.
eformat::helper::Version::Version | ( | uint16_t | minor, | |
uint16_t | major = MAJOR_DEFAULT_VERSION | |||
) | [inline] |
eformat::helper::Version::Version | ( | uint32_t | v = DEFAULT_VERSION |
) |
Constructor. Takes the version to understand the components from.
v | The version number, fully built. |
Definition at line 16 of file Version.cxx.
uint32_t eformat::helper::Version::code | ( | void | ) | const |
std::string eformat::helper::Version::human | ( | void | ) | const |
Returns a string representation of the version number
Definition at line 43 of file Version.cxx.
References human_major(), human_minor(), and deljobs::string.
00044 { 00045 std::string retval = human_major(); 00046 retval += "-"; 00047 retval += human_minor(); 00048 return retval; 00049 }
std::string eformat::helper::Version::human_major | ( | void | ) | const |
Returns a string representation of the major version number
Definition at line 29 of file Version.cxx.
References major2().
Referenced by human().
00030 { 00031 std::ostringstream oss; 00032 oss << (major2() >> 8) << "." << (major2() & 0xff); 00033 return oss.str(); 00034 }
std::string eformat::helper::Version::human_minor | ( | void | ) | const |
Returns a string representation of the minor version number
Definition at line 36 of file Version.cxx.
References minor2().
Referenced by human().
00037 { 00038 std::ostringstream oss; 00039 oss << (minor2() >> 8) << "." << (minor2() & 0xff); 00040 return oss.str(); 00041 }
uint16_t eformat::helper::Version::major2 | ( | void | ) | const [inline] |
Extracts the major version part of this version
Definition at line 65 of file Version.h.
References m_major.
Referenced by eformat::old::convert(), and human_major().
00065 { return m_major; }
uint16_t eformat::helper::Version::minor2 | ( | void | ) | const [inline] |
Extracts the minor version part of this version
Definition at line 70 of file Version.h.
References m_minor.
Referenced by eformat::old::convert(), and human_minor().
00070 { return m_minor; }
uint16_t eformat::helper::Version::m_major [private] |
uint16_t eformat::helper::Version::m_minor [private] |