Raven Engine v0.1
Loading...
Searching...
No Matches

Core components of the Raven engine. More...

Files

file  Concepts.h
 Provides various type concepts for the Raven engine.
file  Types.h
 Fundamental type definitions and alignment utilities for Raven Engine.
file  Raven.h
 Centralized access to core subsystems of the Raven Engine.

Classes

struct  Raven::Buffer
 A simple container for a raw memory buffer. More...
struct  Raven::ScopedBuffer
 A wrapper around Buffer that ensures automatic release of memory when it goes out of scope. More...
class  Raven::Castable< Derived >
 CRTP base class enabling self-casting in derived types. More...
struct  Raven::Hardware::Capabilities
 Instruction-set capabilities. More...
struct  Raven::Hardware::HardwareInfo
 Overall hardware info: CPU, cores, RAM, caps. More...
struct  Raven::SystemVTable
 A static vtable holding function pointers for system operations. More...
struct  Raven::SystemHolder
 Holds all necessary data for managing a system instance. More...
class  Raven::SystemManager
 Manages the registration, update, and shutdown of systems. More...
struct  Raven::TimerData
 Holds the name, elapsed time, and threshold for a timer. More...
class  Raven::Timer
 A high-resolution timer class. More...
class  Raven::ScopedTimer
 A scoped timer class for automatic timing. More...
class  Raven::Timestep
 A class representing a time step. More...
class  Raven::UUID
 A class representing a Universally Unique Identifier (UUID). More...
struct  Raven::WindowProps
 Struct to hold window properties. More...
class  Raven::Window
 Class representing a window. More...
class  Raven::DeferredDeletionQueue
 Manages deferred execution of destruction callbacks. More...
class  Raven::FixedFunction< Signature, StorageSize >
 Type-erased callable wrapper with small buffer optimization (SBO). More...

Macros

#define RV_BIND_EVENT_FN(fn)
 Generates a lambda that binds a member function to this instance, forwarding all arguments.

Functions

template<typename To, typename From>
To Raven::CastHelper (From *ptr)
 Safe casting function between types.
Capabilities Raven::Hardware::QueryCapabilities () noexcept
 Query the CPU for instruction-set support.
HardwareInfo Raven::Hardware::QueryHardwareInfo () noexcept
 Query overall hardware: brand string, cores, RAM, caps.
void Raven::Hardware::LogHardwareInfo () noexcept
 Log out the hardware info at Info level.
void Raven::Hardware::CheckRequiredCapabilities () noexcept
 Verifies that all required caps are present.
template<typename T>
const SystemVTableRaven::GetSystemVTable ()
 Retrieves a static vtable for the specified system type T.

Detailed Description

Core components of the Raven engine.

Macro Definition Documentation

◆ RV_BIND_EVENT_FN

#define RV_BIND_EVENT_FN ( fn)
Value:
[this](auto&&... args) -> decltype(auto) { return this->fn(std::forward<decltype(args)>(args)...); }

Generates a lambda that binds a member function to this instance, forwarding all arguments.

Expands to a generic lambda which captures this and invokes the member function fn on the current object, perfectly forwarding any parameters.

Typical usage: someEventDispatcher.Bind(RV_BIND_EVENT_FN(OnEvent));

Parameters
fnThe member function name to bind (must exist on this class).

Function Documentation

◆ CastHelper()

template<typename To, typename From>
To Raven::CastHelper ( From * ptr)
inline

Safe casting function between types.

This function is used to perform safe casting between types using either dynamic_cast in debug mode for safety checks or static_cast in release mode.

Template Parameters
ToThe target type for casting.
FromThe source type for casting.
Parameters
ptrThe pointer to be casted.
Returns
The casted pointer of type To.
Note
This function performs runtime checks in debug mode and falls back to a static cast in release mode.

◆ CheckRequiredCapabilities()

void Raven::Hardware::CheckRequiredCapabilities ( )
noexcept

Verifies that all required caps are present.

Required: SSE4.1, FMA3, AVX, AVX2. Logs a critical error if any are missing.

◆ GetSystemVTable()

template<typename T>
const SystemVTable * Raven::GetSystemVTable ( )

Retrieves a static vtable for the specified system type T.

This templated function generates a static SystemVTable instance for type T. The returned vtable contains lambda functions that cast a void pointer to T and invoke its OnInit, OnUpdate, and OnShutdown methods.

Template Parameters
TThe system type.
Returns
const SystemVTable* Pointer to the system's static vtable.

◆ LogHardwareInfo()

void Raven::Hardware::LogHardwareInfo ( )
noexcept

Log out the hardware info at Info level.

Note
Calls QueryHardwareInfo() internally.

◆ QueryCapabilities()

Capabilities Raven::Hardware::QueryCapabilities ( )
noexcept

Query the CPU for instruction-set support.

Returns
A Capabilities struct with flags indicating support.

◆ QueryHardwareInfo()

HardwareInfo Raven::Hardware::QueryHardwareInfo ( )
noexcept

Query overall hardware: brand string, cores, RAM, caps.

Returns
A HardwareInfo struct filled in.