|
Muto 0.0.1
|
Manages an ordered stack of Layer pointers. Layers can be pushed or popped and the stack can be iterated in forward or reverse order. More...
#include <LayerStack.h>
Public Member Functions | |
| std::vector< Layer * >::iterator | begin () |
| Returns an iterator to the beginning of the layer stack. | |
| std::vector< Layer * >::iterator | end () |
| Returns an iterator to the end of the layer stack. | |
| LayerStack () | |
| void | PopLayer (Layer *layer) |
| Removes the specified layer from the stack. | |
| void | PopOverlay (Layer *overlay) |
| Removes the specified overlay layer from the stack. | |
| void | PushLayer (Layer *layer) |
| Adds the layer to the stack at the position before the first overlay. | |
| void | PushOverlay (Layer *overlay) |
| Pushes the overlay layer on top of all other layers. | |
| std::vector< Layer * >::reverse_iterator | rbegin () |
| Returns a reverse iterator to the beginning of the layer stack. | |
| std::vector< Layer * >::reverse_iterator | rend () |
| Returns a reverse iterator to the end of the layer stack. | |
| ~LayerStack () | |
Private Attributes | |
| unsigned int | m_LayerInsertIndex = 0 |
| Index indicating where to insert new layers (before overlays). | |
| std::vector< Layer * > | m_Layers |
| Vector holding pointers to the layers in the stack. | |
Manages an ordered stack of Layer pointers. Layers can be pushed or popped and the stack can be iterated in forward or reverse order.
| Muto::LayerStack::LayerStack | ( | ) |
| Muto::LayerStack::~LayerStack | ( | ) |
|
inline |
Returns an iterator to the beginning of the layer stack.
|
inline |
Returns an iterator to the end of the layer stack.
Removes the specified layer from the stack.
| layer | Pointer to the layer to be removed. |
References m_LayerInsertIndex.
Adds the layer to the stack at the position before the first overlay.
| layer | Pointer to the layer to be added. |
References m_LayerInsertIndex.
Pushes the overlay layer on top of all other layers.
| overlay | Pointer to the overlay layer to be added. |
|
inline |
Returns a reverse iterator to the beginning of the layer stack.
|
inline |
Returns a reverse iterator to the end of the layer stack.
Index indicating where to insert new layers (before overlays).
Referenced by PopLayer(), and PushLayer().
|
private |
Vector holding pointers to the layers in the stack.