Iterator class for OrderedEnum
| 388 | |
| 389 | // Iterator class for OrderedEnum |
| 390 | class SiblingWindowIterator { |
| 391 | private: |
| 392 | Window m_currentWindow; |
| 393 | int m_direction; |
| 394 | |
| 395 | constexpr SiblingWindowIterator() noexcept : m_direction(0) { } |
| 396 | constexpr SiblingWindowIterator(Window start, int direction) noexcept : |
| 397 | m_currentWindow(start), |
| 398 | m_direction(direction) |
| 399 | { } |
| 400 | |
| 401 | friend class Window::OrderedEnum; |
| 402 | |
| 403 | public: |
| 404 | inline SiblingWindowIterator &operator ++() noexcept |
| 405 | { |
| 406 | m_currentWindow = m_currentWindow.get_sibling(m_direction); |
| 407 | |
| 408 | return *this; |
| 409 | } |
| 410 | |
| 411 | constexpr bool operator ==(const SiblingWindowIterator &right) const noexcept |
| 412 | { |
| 413 | return m_currentWindow == right.m_currentWindow; |
| 414 | } |
| 415 | |
| 416 | constexpr Window operator *() const noexcept |
| 417 | { |
| 418 | return m_currentWindow; |
| 419 | } |
| 420 | }; |
| 421 | |
| 422 | class Window::FindEnum { |
| 423 | private: |
nothing calls this directly
no test coverage detected