chronon::observe::FormatRegistry
Thread-safe global registry for format strings.
#include <FormatRegistry.hpp>
Public Functions
| Name | |
|---|---|
| size_t | size() const |
| FormatId | registerFormat(std::string_view fmt, std::string_view file, uint32_t line, std::initializer_list< ArgType > arg_types, bool is_log =false, LogLevel level =LogLevel::Info) Register a format string and return its unique ID. |
| FormatRegistry & | instance() |
| const FormatInfo & | getFormat(FormatId id) const |
| template <typename Fn > void | forEach(Fn && fn) const |
Public Attributes
| Name | |
|---|---|
| size_t | MAX_FORMATS |
Public Functions Documentation
function size
inline size_t size() const
function registerFormat
inline FormatId registerFormat(
std::string_view fmt,
std::string_view file,
uint32_t line,
std::initializer_list< ArgType > arg_types,
bool is_log =false,
LogLevel level =LogLevel::Info
)
Register a format string and return its unique ID.
Return: Format ID, or INVALID_FORMAT_ID on overflow.
function instance
static inline FormatRegistry & instance()
function getFormat
inline const FormatInfo & getFormat(
FormatId id
) const
function forEach
template <typename Fn >
inline void forEach(
Fn && fn
) const
Public Attributes Documentation
variable MAX_FORMATS
static size_t MAX_FORMATS = 4096;
Updated on 2026-05-26 at 05:42:33 +0000