Raven Engine v0.1
A modern 3D Game Engine
Loading...
Searching...
No Matches
Raven::Event Struct Reference

Base event data container. More...

#include <Event.h>

Inherited by Raven::KeyPressedEvent, Raven::KeyReleasedEvent, Raven::MouseButtonPressedEvent, Raven::MouseButtonReleasedEvent, Raven::MouseMovedEvent, Raven::MouseScrolledEvent, Raven::WindowCloseEvent, and Raven::WindowResizeEvent.

Public Member Functions

constexpr bool IsInCategory (EventCategory cat) const noexcept
 Checks whether this event belongs to a given category.

Public Attributes

EventType Type = EventType::None
 Concrete event type.
EventCategory Category = EventCategory::None
 Event category bitmask.

Detailed Description

Base event data container.

This struct represents the minimal interface shared by all event types. Each derived event sets its static type and category bitmask in its constructor.

Member Function Documentation

◆ IsInCategory()

bool Raven::Event::IsInCategory ( EventCategory cat) const
inlinenodiscardconstexprnoexcept

Checks whether this event belongs to a given category.

Parameters
catThe category to test.
Returns
True if the event’s category includes the given flag.

Member Data Documentation

◆ Category

EventCategory Raven::Event::Category = EventCategory::None

Event category bitmask.

◆ Type

EventType Raven::Event::Type = EventType::None

Concrete event type.


The documentation for this struct was generated from the following file: