FastMM documentation
FastMM C++ API 0.14.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
fastmm::StateWriter Class Reference

#include <fastmm/strategies/state_codec.hpp>

Public Member Functions

 StateWriter ()=default
 
 StateWriter (std::span< std::byte > buf) noexcept
 
template<class T >
requires std::is_trivially_copyable_v<T>
void put (const T &v) noexcept
 
template<class T >
requires std::is_trivially_copyable_v<T>
void put_array (std::span< const T > v) noexcept
 A count (u32) and the elements.
 
void put_bytes (const void *p, std::size_t n) noexcept
 
bool ok () const noexcept
 
std::size_t size () const noexcept
 
std::size_t capacity () const noexcept
 
std::string_view view () const noexcept
 What was written; empty after a write that did not fit.
 

Constructor & Destructor Documentation

◆ StateWriter() [1/2]

fastmm::StateWriter::StateWriter ( )
default

◆ StateWriter() [2/2]

fastmm::StateWriter::StateWriter ( std::span< std::byte >  buf)
inlineexplicitnoexcept

Member Function Documentation

◆ put()

template<class T >
requires std::is_trivially_copyable_v<T>
void fastmm::StateWriter::put ( const T &  v)
inlinenoexcept

◆ put_array()

template<class T >
requires std::is_trivially_copyable_v<T>
void fastmm::StateWriter::put_array ( std::span< const T >  v)
inlinenoexcept

A count (u32) and the elements.

◆ put_bytes()

void fastmm::StateWriter::put_bytes ( const void *  p,
std::size_t  n 
)
inlinenoexcept

◆ ok()

bool fastmm::StateWriter::ok ( ) const
inlinenoexcept

◆ size()

std::size_t fastmm::StateWriter::size ( ) const
inlinenoexcept

◆ capacity()

std::size_t fastmm::StateWriter::capacity ( ) const
inlinenoexcept

◆ view()

std::string_view fastmm::StateWriter::view ( ) const
inlinenoexcept

What was written; empty after a write that did not fit.