SUNENGINE 0.0.2
A simple and bright C++ game engine.
 
Loading...
Searching...
No Matches
ScreenLogCommandPool.h
1#ifndef ScreenLogCommandPool_H
2#define ScreenLogCommandPool_H
3
4#include <queue>
5
6class SpriteFont;
8
16class ScreenLogCommandPool
17{
18public:
19 ScreenLogCommandPool() = default;
20 ScreenLogCommandPool(const ScreenLogCommandPool&) = delete;
21 ScreenLogCommandPool& operator=(const ScreenLogCommandPool&) = delete;
22 ~ScreenLogCommandPool();
23
28 ScreenLogCommand* GetCommand(std::string str, SpriteFont* font, int x, int y);
29
35
36private:
40 std::queue<ScreenLogCommand*> commandPool;
41};
42
43#endif
Definition ScreenLogCommand.h:10
ScreenLogCommand * GetCommand(std::string str, SpriteFont *font, int x, int y)
Retrieves a command from the pool or creates a new one if the pool is empty.
Definition ScreenLogCommandPool.cpp:15
void ReturnCommand(ScreenLogCommand *cmd)
Returns a ScreenLogCommand to the pool.
Definition ScreenLogCommandPool.cpp:31
std::queue< ScreenLogCommand * > commandPool
Queue of available ScreenLogCommand objects for reuse.
Definition ScreenLogCommandPool.h:40
Represents a font in the SUNENGINE.
Definition SpriteFont.h:19