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

#include <fastmm/strategies/state_codec.hpp>

Public Member Functions

 StateReader (std::string_view bytes) noexcept
 
template<class T >
requires std::is_trivially_copyable_v<T>
bool get (T &v) noexcept
 
template<class T >
requires std::is_trivially_copyable_v<T>
bool get_array (T *out, std::size_t cap, std::size_t &n) noexcept
 What put_array wrote, into out[0, cap): false when it holds more than cap elements.
 
bool get_bytes (void *p, std::size_t n) noexcept
 
bool ok () const noexcept
 
bool done () const noexcept
 Every byte was read, and every read fitted.
 

Constructor & Destructor Documentation

◆ StateReader()

fastmm::StateReader::StateReader ( std::string_view  bytes)
inlineexplicitnoexcept

Member Function Documentation

◆ get()

template<class T >
requires std::is_trivially_copyable_v<T>
bool fastmm::StateReader::get ( T &  v)
inlinenoexcept

◆ get_array()

template<class T >
requires std::is_trivially_copyable_v<T>
bool fastmm::StateReader::get_array ( T *  out,
std::size_t  cap,
std::size_t &  n 
)
inlinenoexcept

What put_array wrote, into out[0, cap): false when it holds more than cap elements.

n is the count read.

◆ get_bytes()

bool fastmm::StateReader::get_bytes ( void *  p,
std::size_t  n 
)
inlinenoexcept

◆ ok()

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

◆ done()

bool fastmm::StateReader::done ( ) const
inlinenoexcept

Every byte was read, and every read fitted.