SUNENGINE 0.0.2
A simple and bright C++ game engine.
 
Loading...
Searching...
No Matches
DrawableManager.h
1#ifndef DrawableManager_H
2#define DrawableManager_H
3
4#include <list>
5
6class Drawable;
7
15class DrawableManager
16{
17private:
21 using StorageList = std::list<Drawable*>;
22
27
28public:
29 DrawableManager() = default;
30 DrawableManager(const DrawableManager&) = delete;
31 DrawableManager& operator=(const DrawableManager&) = delete;
32 ~DrawableManager();
33
38 void Register(Drawable* dr);
39
44 void Deregister(Drawable* dr);
45
49 void ProcessElements();
50
54 using StorageListRef = StorageList::iterator;
55};
56
57#endif
Base class for objects that can be drawn in the game loop.
Definition Drawable.h:19
std::list< Drawable * > StorageList
Type alias for the storage list of drawable GameObjects.
Definition DrawableManager.h:21
void Deregister(Drawable *dr)
Deregisters a drawable GameObject.
Definition DrawableManager.cpp:15
void Register(Drawable *dr)
Registers a drawable GameObject.
Definition DrawableManager.cpp:10
void ProcessElements()
Processes the drawing of all registered GameObjects.
Definition DrawableManager.cpp:20
StorageList storageList
The storage list of drawable GameObjects.
Definition DrawableManager.h:26
StorageList::iterator StorageListRef
Type alias for the storage list iterator.
Definition DrawableManager.h:54