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

Specialization of fmt::formatter for Engine::Entity to allow it to be formatted as a string using the fmt library. The format will be the same as the underlying EntityId, which will result in a human-readable representation of the entity's identifier. More...

#include <Entity.hpp>

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

Public Member Functions

template<typename FormatContext>
auto format (const Engine::Entity &entity, FormatContext &ctx) const
 Format an Entity for output using the fmt library. It formats the Entity by formatting its underlying EntityId, which will result in a human-readable representation of the entity's identifier.
Public Member Functions inherited from fmt::formatter< Engine::EntityId >
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::Entity to allow it to be formatted as a string using the fmt library. The format will be the same as the underlying EntityId, which will result in a human-readable representation of the entity's identifier.

Member Function Documentation

◆ format()

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

Format an Entity for output using the fmt library. It formats the Entity by formatting its underlying EntityId, which will result in a human-readable representation of the entity's identifier.

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

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