SUNENGINE 0.0.2
A simple and bright C++ game engine.
 
Loading...
Searching...
No Matches
AlarmableAttorney.h
1#ifndef AlarmableAttorney_H
2#define AlarmableAttorney_H
3
4#include "Alarmable.h"
5
14{
15 public:
21 {
22 friend class AlarmableManager;
23
30
37 static AlarmableManager::StorageMapRef& GetRef(Alarmable* p, AlarmableManager::ALARM_ID i) { return p->RegData[static_cast<int>(i)].pMyDeleteRef; };
38 };
39 public:
45 {
46 friend class AlarmRegistrationCommand;
47 friend class AlarmDeregistrationCommand;
48
49 private:
63 };
64};
65
66#endif
Provides access to the game loop related functions of Alarmable.
Definition AlarmableAttorney.h:21
static AlarmableManager::StorageMapRef & GetRef(Alarmable *p, AlarmableManager::ALARM_ID i)
Retrieves the storage map reference of the Alarmable object.
Definition AlarmableAttorney.h:37
static void Trigger(Alarmable *p, AlarmableManager::ALARM_ID i)
Triggers the alarm for the Alarmable object.
Definition AlarmableAttorney.h:29
Provides access to the registration related functions of Alarmable.
Definition AlarmableAttorney.h:45
static void AlarmRegistration(Alarmable *p, AlarmableManager::ALARM_ID i, float t)
Registers the Alarmable object for alarms in the scene.
Definition AlarmableAttorney.h:56
static void AlarmDeregistration(Alarmable *p, AlarmableManager::ALARM_ID i)
Deregisters the Alarmable object from alarms in the scene.
Definition AlarmableAttorney.h:62
Provides controlled access to the Alarmable class for specific classes.
Definition AlarmableAttorney.h:14
Base class for objects that can have alarms triggered in the game loop.
Definition Alarmable.h:19
void TriggerAlarm(AlarmableManager::ALARM_ID id)
Triggers the alarm for the GameObject.
Definition Alarmable.cpp:59
RegistrationData RegData[AlarmableManager::ALARM_NUMBER]
Array to hold registration data for all alarms.
Definition Alarmable.h:63
void AlarmDeregistration(AlarmableManager::ALARM_ID id)
Deregisters the GameObject from alarms in the scene.
Definition Alarmable.cpp:52
void AlarmRegistration(AlarmableManager::ALARM_ID id, float t)
Registers the GameObject for alarms in the scene.
Definition Alarmable.cpp:45
ALARM_ID
Enum class representing the alarm IDs.
Definition AlarmableManager.h:22
TimeLineMap::iterator StorageMapRef
Type alias for the storage map iterator.
Definition AlarmableManager.h:74