 |
Blamite Game Engine - Strings
00423.10.27.24.0533.blamite
A library containing general purpose utilities and classes for use in multiple projects.
|
Go to the documentation of this file.
9 #define STRINGS_API __declspec(dllexport)
11 #define STRINGS_API __declspec(dllimport)
42 std::vector<BlamEventType> subscribed_events;
46 std::string name =
"";
63 std::vector<BlamEventType> GetSubscribedEvents();
81 void SetPriority(
int new_priority);
virtual void OnMouseClickEvent(MouseClickEvent *event)
Called when the listener is subscribed to Mouse Click events, and a new MouseClickEvent is fired.
Definition: events.h:120
STRINGS_API std::vector< BlamEventListener * > GetListeners()
Retrieves a list of currently registered listeners.
Definition: events.cpp:198
virtual void OnEditorTickEvent(EditorTickEvent *event)
Called when the listener is subscribed to Editor Tick events, and a new EditorTickEvent is fired.
Definition: events.h:176
void notify_listener(BlamEvent *event, BlamEventListener *listener)
Notifies the specified listener about an event.
Definition: events.cpp:21
@ ConfigurationReload
Indicates the event is a configuration reload event. See ConfigurationReloadEvent for details.
std::recursive_mutex listener_list_lock
Lock to ensure that the listener list cannot be modified concurrently.
Definition: events.cpp:11
@ Tick
Indicates the event is a tick event. See TickEvent for details.
virtual void OnLogMessageEvent(LogMessageEvent *event)
Called when the listener is subscribed to Log Message events, and a new LogMessageEvent is fired.
Definition: events.h:160
Namespace for handling things related to Events.
Definition: events.h:190
virtual void OnObjectDeleteEvent(ObjectDeleteEvent *event)
Called when the listener is subscribed to Object Delete events, and a new ObjectDeleteEvent is fired.
Definition: events.h:168
Class representing a configuration reload event.
Definition: ConfigurationReloadEvent.h:19
virtual void OnKeyPressEvent(KeyPressEvent *event)
Called when the listener is subscribed to Key Press events, and a new KeyPressEvent is fired.
Definition: events.h:112
STRINGS_API void FireEvent(BlamEvent *event)
Fires an event.
Definition: events.cpp:104
STRINGS_API void LogEvent(BlamBasicLogMessage message)
Logs an event to the logger.
Definition: logger.cpp:41
@ CharacterInput
Indicates the event is a character input event. See CharacterInputEvent for details.
Class representing a virtual key press.
Definition: KeyPressEvent.h:18
bool compare_listener_priority(BlamEventListener *first, BlamEventListener *second)
Compares listener priority.
Definition: events.cpp:186
Class representing a generic event.
Definition: BlamEvent.h:35
@ EditorTick
Indicates the event is an editor tick event. See EditorTickEvent for details.
virtual void OnNewFrameEvent(NewFrameEvent *event)
Called when the listener is subscribed to New Frame events, and a new NewFrameEvent is fired.
Definition: events.h:152
virtual void OnCharacterInputEvent(CharacterInputEvent *event)
Called when the listener is subscribed to Character Input events, and a new CharacterInputEvent is fi...
Definition: events.h:96
Class representing an engine tick event.
Definition: TickEvent.h:18
STRINGS_API void ResortListeners(BlamEventListener *requesting_listener)
Re-sorts the list of registered listeners after a priority modification.
Definition: events.cpp:191
STRINGS_API void UnregisterListener(BlamEventListener *listener)
Unregisters a an event listener.
Definition: events.cpp:143
Class representing a mouse button release.
Definition: MouseUnclickEvent.h:18
Class representing a mouse movement event.
Definition: MouseMoveEvent.h:16
@ KeyPress
Indicates the event is a key press event. See KeyPressEvent for details.
std::string name
The name of the listener. Used for debugging purposes.
Definition: events.h:46
bool IsCancelled()
Determines whether or not the event has been cancelled.
Definition: BlamEvent.cpp:18
Class representing a mouse button press.
Definition: MouseClickEvent.h:18
Class representing a log message event.
Definition: LogMessage.h:18
BlamEventType
Enumerator listing all possible event types.
Definition: BlamEvent.h:12
virtual void OnEditorThemeChangeEvent(EditorThemeChangeEvent *event)
Called when the listener is subscribed to Editor Theme Change events, and a new EditorThemeChangeEven...
Definition: events.h:184
@ NewFrame
Indicates the event is a new frame event. See NewFrameEvent for details.
virtual void OnTickEvent(TickEvent *event)
Called when the listener is subscribed to Tick events, and a new TickEvent is fired.
Definition: events.h:144
STRINGS_API std::string BytesToString(void *bytes, int bytes_length, bool uppercase=false)
Converts a series of bytes to a string.
Definition: converters.cpp:214
@ MouseUnclick
Indicates the event is a mouse click event. See MouseClickEvent for details.
std::basic_string< CharT, Traits, Allocator > to_string(uuid const &id)
Definition: uuid.h:581
BlamEventType GetEventType()
Retrieves the type of the event.
Definition: BlamEvent.cpp:8
bool IsSubscribed(BlamEventType type)
Determines whether or not the listener is subscribed to the specified event type.
Definition: BlamEventListener.cpp:20
std::vector< BlamEventListener * > listeners
List of registered event listeners.
Definition: events.cpp:10
#define STRINGS_API
Definition: events.h:11
Class representing an object delete event.
Definition: ObjectDeleteEvent.h:21
STRINGS_API void RegisterListener(BlamEventListener *listener, std::string name)
Registers a an event listener.
Definition: events.cpp:134
Class representing an editor tick event.
Definition: EditorTickEvent.h:18
Class representing an editor theme change event.
Definition: EditorThemeChange.h:27
Class representing an Event Listener.
Definition: events.h:39
STRINGS_API void UnregisterListeners()
Unregisters all listeners.
Definition: events.cpp:161
virtual void OnMouseMoveEvent(MouseMoveEvent *event)
Called when the listener is subscribed to Mouse Move events, and a new MouseMoveEvent is fired.
Definition: events.h:136
@ MouseClick
Indicates the event is a mouse click event. See MouseClickEvent for details.
Class representing an engine frame event.
Definition: NewFrameEvent.h:19
virtual void OnConfigurationReloadEvent(ConfigurationReloadEvent *event)
Called when the listener is subscribed to configuration reload events, and a new ConfigurationReloadE...
Definition: events.h:104
int GetPriority()
Retrieves the priority of the listener.
Definition: BlamEventListener.cpp:40
@ LogMessage
Indicates the event is a log message event. See LogMessageEvent for details.
@ MouseMove
Indicates the event is a mouse move event. See MouseMoveEvent for details.
@ Warning
Indicates a warning message. Not something critical, but something that could cause unexpected behavi...
@ EditorThemeChange
Indicates the event is an editor theme change event. See EditorThemeChangeEvent for details.
virtual void OnMouseUnclickEvent(MouseUnclickEvent *event)
Called when the listener is subscribed to Mouse Unclick events, and a new MouseUnclickEvent is fired.
Definition: events.h:128
@ ObjectDelete
Indicates the event is an object deletion event. See ObjectDeleteEvent for details.