Engine²
Open-source game engine written in C++.
Loading...
Searching...
No Matches
fmt::formatter< Engine::EntityId > Struct Reference

Specialization of fmt::formatter for Engine::EntityId to allow it to be formatted using the {fmt} library. More...

#include <EntityId.hpp>

Inheritance diagram for fmt::formatter< Engine::EntityId >:
fmt::formatter< Engine::Entity >

Public Member Functions

template<typename FormatContext>
auto format (const Engine::EntityId &entityId, FormatContext &ctx) const
 Formats an EntityId for output. If the EntityId is null, it will format as "null_entity". Otherwise, it will format using the Log::EntityToDebugString function to provide a human-readable representation of the EntityId.

Detailed Description

Specialization of fmt::formatter for Engine::EntityId to allow it to be formatted using the {fmt} library.

Member Function Documentation

◆ format()

template<typename FormatContext>
auto fmt::formatter< Engine::EntityId >::format ( const Engine::EntityId & entityId,
FormatContext & ctx ) const
inline

Formats an EntityId for output. If the EntityId is null, it will format as "null_entity". Otherwise, it will format using the Log::EntityToDebugString function to provide a human-readable representation of the EntityId.

Template Parameters
FormatContextThe type of the format context used by the {fmt} library.
Parameters
entityIdThe EntityId to format.
ctxThe format context used by the {fmt} library.
Returns
The formatted string representation of the EntityId.
Todo
put the implementation in the inl file

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