MCPcopy Create free account
hub / github.com/TranslucentTB/TranslucentTB / SiblingWindowIterator

Class SiblingWindowIterator

TranslucentTB/windows/window.hpp:390–420  ·  view source on GitHub ↗

Iterator class for OrderedEnum

Source from the content-addressed store, hash-verified

388
389// Iterator class for OrderedEnum
390class SiblingWindowIterator {
391private:
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
403public:
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
422class Window::FindEnum {
423private:

Callers

nothing calls this directly

Calls 1

get_siblingMethod · 0.80

Tested by

no test coverage detected