-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLayerStack.h
41 lines (31 loc) · 1.11 KB
/
LayerStack.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef LAYERSTACK_H
#define LAYERSTACK_H
#pragma once
#include "Layers.h"
#include <vector>
#include <algorithm>
namespace CC
{
class LayerStack
{
public:
LayerStack();
~LayerStack();
void PushLayer(Layers* layers);
void PushOverlay(Layers* layers);
void PopLayer(Layers* layers);
void PopOverlay(Layers* layers);
std::vector<Layers*>::iterator begin(){ return m_Layers.begin();}
std::vector<Layers*>::iterator end(){ return m_Layers.end();}
std::vector<Layers*>::reverse_iterator rbegin() { return m_Layers.rbegin(); }
std::vector<Layers*>::reverse_iterator rend() { return m_Layers.rend(); }
std::vector<Layers*>::const_iterator begin() const { return m_Layers.begin(); }
std::vector<Layers*>::const_iterator end() const { return m_Layers.end(); }
std::vector<Layers*>::const_reverse_iterator rbegin() const { return m_Layers.rbegin(); }
std::vector<Layers*>::const_reverse_iterator rend() const { return m_Layers.rend(); }
private:
std::vector<Layers*> m_Layers;
unsigned int m_LayerInsertIndex = 0;
};
}
#endif