40 if (
auto Iter = Layers.emplace((Layers.begin() + InsertIndex), Layer); Iter != Layers.end())
52 if (
auto Iter = Layers.emplace((Layers.begin() + InsertIndex), Layer); Iter != Layers.end())
64 if (Layers.emplace_back(Overlay))
75 auto Iter = std::find(Layers.begin(), Layers.begin() + InsertIndex, Layer);
76 if (Iter != (Layers.begin() + InsertIndex))
90 auto Iter = std::find(Layers.begin() + InsertIndex, Layers.end(), Overlay);
91 if (Iter != Layers.end())
101 LK_ASSERT((LayerIndex >= 0) && (LayerIndex < Layers.size()),
"Invalid layer index: {}", LayerIndex);
102 return Layers[LayerIndex];
105 FORCEINLINE TObjectPtr<LLayer> operator[](
const std::size_t LayerIndex)
const
107 LK_ASSERT((LayerIndex >= 0) && (LayerIndex < Layers.size()),
"Invalid layer index: {}", LayerIndex);
108 return Layers.at(LayerIndex);
116 return static_cast<int>(Layers.size());
119 std::vector<TObjectPtr<LLayer>>::iterator begin() {
return Layers.begin(); }
120 std::vector<TObjectPtr<LLayer>>::iterator end() {
return Layers.end(); }
127 std::vector<TObjectPtr<LLayer>> Layers{};
133 uint32_t InsertIndex = 0;
Definition LayerStack.h:25
FORCEINLINE void PushLayer(TObjectPtr< LLayer > Layer)
Push a layer to top of the layer stack.
Definition LayerStack.h:50
FORCEINLINE void PopLayer(TObjectPtr< LLayer > Layer)
Pop a layer from the stack.
Definition LayerStack.h:73
FORCEINLINE void PushLayer(LLayer *Layer)
Push a layer to top of the layer stack.
Definition LayerStack.h:38
void Destroy()
Destroy the layer stack, releasing all layers.
Definition LayerStack.cpp:15
FORCEINLINE void PushOverlay(TObjectPtr< LLayer > Overlay)
Push an overlay to top of the stack.
Definition LayerStack.h:62
FORCEINLINE void PopOverlay(TObjectPtr< LLayer > Overlay)
Pop an overlay from the stack.
Definition LayerStack.h:88
FORCEINLINE int Count() const
Get the count of layers.
Definition LayerStack.h:114
Definition ObjectPtr.h:102
#define LCLASS(Class)
Definition CoreMacros.h:226