Changeset 36761 in vbox
- Timestamp:
- Apr 20, 2011 4:51:50 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/types.h
r35410 r36761 264 264 265 265 /** Getter that VBOXSTRICTRC_VAL can use. */ 266 int32_t getValue() const { return m_rc; }266 int32_t getValue() const { return m_rc; } 267 267 268 268 /** @name Comparison operators 269 269 * @{ */ 270 bool operator==(int32_t rc) const { return m_rc == rc; } 271 bool operator!=(int32_t rc) const { return m_rc != rc; } 272 bool operator<=(int32_t rc) const { return m_rc <= rc; } 273 bool operator>=(int32_t rc) const { return m_rc >= rc; } 274 bool operator<(int32_t rc) const { return m_rc < rc; } 275 bool operator>(int32_t rc) const { return m_rc > rc; } 270 bool operator==(int32_t rc) const { return m_rc == rc; } 271 bool operator!=(int32_t rc) const { return m_rc != rc; } 272 bool operator<=(int32_t rc) const { return m_rc <= rc; } 273 bool operator>=(int32_t rc) const { return m_rc >= rc; } 274 bool operator<(int32_t rc) const { return m_rc < rc; } 275 bool operator>(int32_t rc) const { return m_rc > rc; } 276 277 bool operator==(const VBOXSTRICTRC &rRc) const { return m_rc == rRc.m_rc; } 278 bool operator!=(const VBOXSTRICTRC &rRc) const { return m_rc != rRc.m_rc; } 279 bool operator<=(const VBOXSTRICTRC &rRc) const { return m_rc <= rRc.m_rc; } 280 bool operator>=(const VBOXSTRICTRC &rRc) const { return m_rc >= rRc.m_rc; } 281 bool operator<(const VBOXSTRICTRC &rRc) const { return m_rc < rRc.m_rc; } 282 bool operator>(const VBOXSTRICTRC &rRc) const { return m_rc > rRc.m_rc; } 276 283 /** @} */ 277 284 278 285 /** Special automatic cast for RT_SUCCESS_NP. */ 279 operator RTErrStrictType2() const { return RTErrStrictType2(m_rc); }286 operator RTErrStrictType2() const { return RTErrStrictType2(m_rc); } 280 287 281 288 private: 282 289 /** @name Constructors that will prevent some of the bad types. 283 290 * @{ */ 284 VBOXSTRICTRC(uint8_t rc) : m_rc(-999) { NOREF(rc); }285 VBOXSTRICTRC(uint16_t rc) : m_rc(-999) { NOREF(rc); }286 VBOXSTRICTRC(uint32_t rc) : m_rc(-999) { NOREF(rc); }287 VBOXSTRICTRC(uint64_t rc) : m_rc(-999) { NOREF(rc); }288 289 VBOXSTRICTRC(int8_t rc) : m_rc(-999) { NOREF(rc); }290 VBOXSTRICTRC(int16_t rc) : m_rc(-999) { NOREF(rc); }291 VBOXSTRICTRC(int64_t rc) : m_rc(-999) { NOREF(rc); }291 VBOXSTRICTRC(uint8_t rc) : m_rc(-999) { NOREF(rc); } 292 VBOXSTRICTRC(uint16_t rc) : m_rc(-999) { NOREF(rc); } 293 VBOXSTRICTRC(uint32_t rc) : m_rc(-999) { NOREF(rc); } 294 VBOXSTRICTRC(uint64_t rc) : m_rc(-999) { NOREF(rc); } 295 296 VBOXSTRICTRC(int8_t rc) : m_rc(-999) { NOREF(rc); } 297 VBOXSTRICTRC(int16_t rc) : m_rc(-999) { NOREF(rc); } 298 VBOXSTRICTRC(int64_t rc) : m_rc(-999) { NOREF(rc); } 292 299 /** @} */ 293 300 };
Note:
See TracChangeset
for help on using the changeset viewer.