Helios Engine
A modular ECS based data-oriented C++23 game engine framework
Loading...
Searching...
No Matches
helios Namespace Reference

Namespaces

namespace  anonymous_namespace{assert.cpp}
namespace  app
namespace  async
namespace  container
namespace  details
namespace  ecs
namespace  log
namespace  mem
namespace  profile
namespace  utils

Classes

class  BasicCStringView
 A view of a null-terminated C string. More...
class  Delegate
 Type-erased callable wrapper for free and member functions. More...
class  Delegate< ReturnType(Args...)>
class  Stacktrace
 Captured and filtered stacktrace with string conversion support. More...
struct  StacktraceConfig
 Configuration for stacktrace capture and formatting. More...
class  Uuid
 A class representing a universally unique identifier (UUID). More...
class  UuidGenerator
 A class for generating random UUIDs using a specified random number generator. More...

Typedefs

using AssertionHandler
 Function signature for custom assertion handlers.
using CStringView = BasicCStringView<char>
 A view of a null-terminated C string.
using WCStringView = BasicCStringView<wchar_t>
 A view of a null-terminated wide C string.
using U8CStringView = BasicCStringView<char8_t>
 A view of a null-terminated UTF-8 C string.
using U16CStringView = BasicCStringView<char16_t>
 A view of a null-terminated UTF-16 C string.
using U32CStringView = BasicCStringView<char32_t>
 A view of a null-terminated UTF-32 C string.

Functions

void SetAssertionHandler (AssertionHandler handler) noexcept
 Sets a custom assertion handler.
AssertionHandler GetAssertionHandler () noexcept
 Gets the current custom assertion handler.
void AbortWithStacktrace (std::string_view message) noexcept
 Prints a message with stack trace and aborts the program execution.
template<typename CharT, typename Traits>
auto operator<< (std::basic_ostream< CharT, Traits > &os, const BasicCStringView< CharT, Traits > &str) -> std::basic_ostream< CharT, Traits > &
 Outputs a BasicCStringView to an output stream.
template<auto Func>
requires (!std::is_member_function_pointer_v<decltype(Func)>)
constexpr auto MakeDelegate () noexcept
 Helper to create delegate from free function pointer.
template<auto Func>
requires std::is_member_function_pointer_v<decltype(Func)>
constexpr auto MakeDelegate (typename details::MemberFunctionTraits< decltype(Func)>::Class &instance) noexcept
 Helper to create delegate from member function pointer.
constexpr void swap (Uuid &lhs, Uuid &rhs)

Variables

constexpr AssertionHandler kDefaultAssertionHandler = nullptr
 Default assertion handler (nullptr means use built-in default behavior).

Typedef Documentation

◆ AssertionHandler

Initial value:
void (*)(std::string_view condition,
const std::source_location& loc,
std::string_view message) noexcept

Function signature for custom assertion handlers.

Parameters
conditionThe failed condition as a string
locSource location of the assertion
messageAdditional message (may be empty)

Definition at line 27 of file assert.hpp.

◆ CStringView

A view of a null-terminated C string.

Definition at line 590 of file cstring_view.hpp.

◆ U16CStringView

A view of a null-terminated UTF-16 C string.

Definition at line 599 of file cstring_view.hpp.

◆ U32CStringView

A view of a null-terminated UTF-32 C string.

Definition at line 602 of file cstring_view.hpp.

◆ U8CStringView

A view of a null-terminated UTF-8 C string.

Definition at line 596 of file cstring_view.hpp.

◆ WCStringView

A view of a null-terminated wide C string.

Definition at line 593 of file cstring_view.hpp.

Function Documentation

◆ AbortWithStacktrace()

void helios::AbortWithStacktrace ( std::string_view message)
noexcept

Prints a message with stack trace and aborts the program execution.

Useful for placing in dead code branches or unreachable states.

Parameters
messageThe message to print before aborting

Definition at line 69 of file assert.cpp.

◆ GetAssertionHandler()

AssertionHandler helios::GetAssertionHandler ( )
inlinenodiscardnoexcept

Gets the current custom assertion handler.

Returns
The current custom handler, or nullptr if using default behavior

Definition at line 210 of file assert.hpp.

◆ MakeDelegate() [1/2]

template<auto Func>
requires (!std::is_member_function_pointer_v<decltype(Func)>)
auto helios::MakeDelegate ( )
constexprnoexcept

Helper to create delegate from free function pointer.

Template Parameters
FuncFree function pointer.
Returns
Delegate bound to the given free function.

Definition at line 503 of file delegate.hpp.

◆ MakeDelegate() [2/2]

template<auto Func>
requires std::is_member_function_pointer_v<decltype(Func)>
auto helios::MakeDelegate ( typename details::MemberFunctionTraits< decltype(Func)>::Class & instance)
constexprnoexcept

Helper to create delegate from member function pointer.

Template Parameters
FuncMember function pointer.
Parameters
instanceReference to the object instance used for invocation.
Returns
Delegate bound to the given member function and instance.

Definition at line 522 of file delegate.hpp.

◆ operator<<()

template<typename CharT, typename Traits>
auto helios::operator<< ( std::basic_ostream< CharT, Traits > & os,
const BasicCStringView< CharT, Traits > & str ) -> std::basic_ostream< CharT, Traits > &
inline

Outputs a BasicCStringView to an output stream.

Template Parameters
CharTCharacter type
TraitsCharacter traits
Parameters
osOutput stream
strString to output
Returns
Reference to the output stream

Definition at line 613 of file cstring_view.hpp.

◆ SetAssertionHandler()

void helios::SetAssertionHandler ( AssertionHandler handler)
inlinenoexcept

Sets a custom assertion handler.

When set, this handler is called for all assertion failures instead of the default behavior. Set to nullptr to restore default behavior.

Priority order for assertion handling:

  1. Custom handler (if set via this function)
  2. Log plugin handler (if log plugin is linked)
  3. Default handler (prints to stderr)
Parameters
handlerThe custom handler function, or nullptr to use default
// Set custom handler
[](std::string_view condition, const std::source_location& loc,
std::string_view message) noexcept {
// Your custom logging here
helios::log::Critical("Assert: {} | {} [{}:{}]", condition, message,
loc.file_name(), loc.line());
});
// Reset to default behavior
void Critical(std::string_view message) noexcept
Logs a critical message with the default logger.
Definition logger.hpp:624
constexpr AssertionHandler kDefaultAssertionHandler
Default assertion handler (nullptr means use built-in default behavior).
Definition assert.hpp:33
void SetAssertionHandler(AssertionHandler handler) noexcept
Sets a custom assertion handler.
Definition assert.hpp:202

Definition at line 202 of file assert.hpp.

◆ swap()

void helios::swap ( Uuid & lhs,
Uuid & rhs )
constexprnoexcept
Parameters
lhsThe first UUID
rhsThe second UUID

Definition at line 163 of file uuid.hpp.

Variable Documentation

◆ kDefaultAssertionHandler

AssertionHandler helios::kDefaultAssertionHandler = nullptr
inlineconstexpr

Default assertion handler (nullptr means use built-in default behavior).

Definition at line 33 of file assert.hpp.