FastMM documentation
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
fastmm::ParamDesc Struct Reference

#include <fastmm/strategies/params.hpp>

Public Attributes

const char * name
 
ParamType type
 
double def
 display only (listings, Python); range checks use the typed bounds
 
double min
 
double max
 
const char * doc
 
std::optional< std::string >(* parse )(void *obj, std::string_view value)
 Parses value exactly, checks it against the typed range and assigns the field.
 
std::string(* format )(const void *obj)
 The field's current value in a form parse() accepts ("0.01", "2.5", "true", "2000").
 
std::int64_t(* get_raw )(const void *obj) noexcept
 The field as the int64 a ParamUpdateMsg carries, and back (engine thread: no checks).
 
void(* set_raw )(void *obj, std::int64_t raw) noexcept
 

Member Data Documentation

◆ name

const char* fastmm::ParamDesc::name

◆ type

ParamType fastmm::ParamDesc::type

◆ def

double fastmm::ParamDesc::def

display only (listings, Python); range checks use the typed bounds

◆ min

double fastmm::ParamDesc::min

◆ max

double fastmm::ParamDesc::max

◆ doc

const char* fastmm::ParamDesc::doc

◆ parse

std::optional< std::string >(* fastmm::ParamDesc::parse) (void *obj, std::string_view value)

Parses value exactly, checks it against the typed range and assigns the field.

On failure the field is unchanged and the message (without the parameter name) is returned.

◆ format

std::string(* fastmm::ParamDesc::format) (const void *obj)

The field's current value in a form parse() accepts ("0.01", "2.5", "true", "2000").

◆ get_raw

std::int64_t(* fastmm::ParamDesc::get_raw) (const void *obj) noexcept
noexcept

The field as the int64 a ParamUpdateMsg carries, and back (engine thread: no checks).

Integers and bool as their value, Price, Qty, Notional and Ratio as raw fixed point, a Duration in ns and a floating-point field as the bits of the double.

◆ set_raw

void(* fastmm::ParamDesc::set_raw) (void *obj, std::int64_t raw) noexcept
noexcept