SUNENGINE 0.0.2
A simple and bright C++ game engine.
 
Loading...
Searching...
No Matches
Updatable.h
1#ifndef Updatable_H
2#define Updatable_H
3
5#include "UpdatableManager.h"
6
9
18class Updatable
19{
20protected:
21 Updatable();
22 Updatable(const Updatable&) = delete;
23 Updatable& operator=(const Updatable&) = delete;
24 virtual ~Updatable();
25
30
35
36private:
37 friend class UpdatableAttorney;
38
43
48
53
58
62 virtual void Update() {};
63
67 void SceneRegistration();
68
73};
74
75#endif
Defines the registration states for GameObjects.
RegistrationState
Enum class representing the registration states of GameObjects.
Definition RegistrationState.h:19
void SceneRegistration()
Registers the GameObject for updates in the scene.
Definition Updatable.cpp:36
void SubmitUpdateDeregistration()
Submits the update deregistration for the GameObject.
Definition Updatable.cpp:27
UpdateDeregistrationCommand * ptrUpdateDeregistrationCmd
Pointer to the update deregistration command for the GameObject.
Definition Updatable.h:52
void SceneDeregistration()
Deregisters the GameObject from updates in the scene.
Definition Updatable.cpp:43
RegistrationState RegStateCurr
The current registration state of the GameObject.
Definition Updatable.h:42
void SubmitUpdateRegistration()
Submits the update registration for the GameObject.
Definition Updatable.cpp:18
UpdatableManager::StorageListRef pMyDeleteRef
Reference to the storage list iterator for the GameObject.
Definition Updatable.h:57
UpdateRegistrationCommand * ptrUpdateRegistrationCmd
Pointer to the update registration command for the GameObject.
Definition Updatable.h:47
virtual void Update()
Virtual method to be implemented by derived classes for update functionality.
Definition Updatable.h:62
StorageList::iterator StorageListRef
Type alias for the storage list iterator.
Definition UpdatableManager.h:56
Command to deregister an updatable object from updates.
Definition UpdateDeregistrationCommand.h:17
Command to register an updatable object for updates.
Definition UpdateRegistrationCommand.h:17