microfmt
Zero-allocation C++ formatting for constrained environments
Loading...
Searching...
No Matches
Public Member Functions | List of all members
microfmt::metadata_map Class Reference

Type-erased, non-owning metadata map view driven by a sequential next callback. More...

#include <metadata_map.hpp>

Public Member Functions

constexpr metadata_map (void *ctx RELOCO_LIFETIMEBOUND RELOCO_LIFETIME_CAPTURE_BY_THIS, metadata_next_fn_t next_fn) noexcept
 Constructs a metadata_map view over an iteration context and a next function.
 
constexpr bool get_next (property_entry &out) const noexcept
 Fetches the next property entry, advancing the internal generator state.
 

Detailed Description

Type-erased, non-owning metadata map view driven by a sequential next callback.

Designed for extreme low-stack environments by avoiding heavy C++ iterator state machines in favor of a direct generator pattern (get_next).

Constructor & Destructor Documentation

◆ metadata_map()

constexpr microfmt::metadata_map::metadata_map ( void *ctx RELOCO_LIFETIMEBOUND  RELOCO_LIFETIME_CAPTURE_BY_THIS,
metadata_next_fn_t  next_fn 
)
inlineconstexprnoexcept

Constructs a metadata_map view over an iteration context and a next function.

Parameters
ctxMutable pointer to caller-owned stack state.
next_fnFunction pointer that populates the next property and advances state.

Member Function Documentation

◆ get_next()

constexpr bool microfmt::metadata_map::get_next ( property_entry &  out) const
inlineconstexprnoexcept

Fetches the next property entry, advancing the internal generator state.

Parameters
outReference to populate with the next property_entry.
Returns
true if an entry was populated, false when iteration ends.

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