GUIFramework 1.1.0
Framework for desktop GUI applications in C++.
Loading...
Searching...
No Matches
composite_forward_iterator.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace gui_framework
7{
8 namespace iterators
9 {
11 class GUI_FRAMEWORK_API composite_forward_iterator : public interfaces::IBaseForwardIterator<BaseComponent, composite_forward_iterator>
12 {
13 private:
14 BaseComponent* currentComponent;
15 std::stack<BaseComponent*> parents;
16 std::stack<size_t> indices;
17
18 public:
19 composite_forward_iterator(BaseComponent* component) noexcept;
20
21 BaseComponent* operator * () noexcept override;
22
23 const BaseComponent* operator * () const noexcept override;
24
25 BaseComponent* operator -> () noexcept override;
26
27 const BaseComponent* operator -> () const noexcept override;
28
29 IBaseConstForwardIterator<BaseComponent, composite_forward_iterator>& operator ++ () noexcept override;
30
31 composite_forward_iterator operator ++ (int) noexcept override;
32
33 bool operator == (const IBaseConstForwardIterator<BaseComponent, composite_forward_iterator>& composite_forward_iterator) const noexcept override;
34
35 bool operator != (const IBaseConstForwardIterator<BaseComponent, composite_forward_iterator>& composite_forward_iterator) const noexcept override;
36
38 };
39 }
40}
#define GUI_FRAMEWORK_API
Base class for all windows, controls, etc.
Base interface for forward iterators.
IBaseForwardIterator implementation for BaseComponent.