Lugdunum  0.1.0
Stack.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <lug/System/Export.hpp>
5 
6 namespace lug {
7 namespace System {
8 namespace Memory {
9 namespace Area {
10 
11 template <size_t Size>
12 class Stack : public IArea {
13 public:
14  Stack() = default;
15  Stack(const Stack&) = delete;
16  Stack(Stack&&) = delete;
17 
18  Stack& operator=(const Stack&) = delete;
19  Stack& operator=(Stack&&) = delete;
20 
21  ~Stack() = default;
22 
23  Page* requestNextPage() override;
24 
25 private:
26  char _data[Size];
27 
28  Page _page{&_data[0], &_data[Size - 1], nullptr, nullptr};
29  bool _nextPage{true};
30 };
31 
33 
34 } // Area
35 } // Memory
36 } // System
37 } // lug
Stack & operator=(const Stack &)=delete
Page * requestNextPage() override
Definition: Stack.inl:2