Changeset 70826 in vbox
- Timestamp:
- Jan 31, 2018 12:17:13 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 120631
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIVersion.h
r70824 r70826 19 19 #define ___UIVersion_h___ 20 20 21 /** 22 * Represents VirtualBox version wrapper 23 */ 21 /** Represents VirtualBox version wrapper. */ 24 22 class UIVersion 25 23 { 26 24 public: 27 25 26 /** Constructs default object. */ 28 27 UIVersion() : m_x(-1), m_y(-1), m_z(-1) {} 29 28 29 /** Constructs object based on parsed @a strVersion. */ 30 30 UIVersion(const QString &strVersion) 31 31 : m_x(-1), m_y(-1), m_z(-1) … … 40 40 } 41 41 42 /** Assigns this object with value of @a other. */ 42 43 UIVersion& operator=(const UIVersion &other) { m_x = other.x(); m_y = other.y(); m_z = other.z(); return *this; } 43 44 45 /** Returns whether this object is valid. */ 44 46 bool isValid() const { return m_x != -1 && m_y != -1 && m_z != -1; } 45 47 48 /** Returns whether this object is equal to @a other. */ 46 49 bool equal(const UIVersion &other) const { return (m_x == other.m_x) && (m_y == other.m_y) && (m_z == other.m_z); } 50 /** Checks whether this object is equal to @a other. */ 47 51 bool operator==(const UIVersion &other) const { return equal(other); } 52 /** Checks whether this object is NOT equal to @a other. */ 48 53 bool operator!=(const UIVersion &other) const { return !equal(other); } 49 54 55 /** Checks whether this object is lass than @a other. */ 50 56 bool operator<(const UIVersion &other) const 51 57 { … … 54 60 (m_x == other.m_x && m_y == other.m_y && m_z < other.m_z); 55 61 } 62 /** Checks whether this object is more than @a other. */ 56 63 bool operator>(const UIVersion &other) const 57 64 { … … 61 68 } 62 69 70 /** Returns object string representation. */ 63 71 QString toString() const 64 72 { … … 66 74 } 67 75 76 /** Returns the object X value. */ 68 77 int x() const { return m_x; } 78 /** Returns the object Y value. */ 69 79 int y() const { return m_y; } 80 /** Returns the object Z value. */ 70 81 int z() const { return m_z; } 71 82 72 83 private: 73 84 85 /** Holds the object X value. */ 74 86 int m_x; 87 /** Holds the object Y value. */ 75 88 int m_y; 89 /** Holds the object Z value. */ 76 90 int m_z; 77 91 };
Note:
See TracChangeset
for help on using the changeset viewer.