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

Free-form section used by the sim / backtest libraries: dotted keys -> stringified value. More...

#include <fastmm/config/config.hpp>

Public Member Functions

bool has (std::string_view key) const
 
std::string get_string (std::string_view key, std::string_view def="") const
 
std::int64_t get_int (std::string_view key, std::int64_t def=0) const
 
double get_double (std::string_view key, double def=0.0) const
 
bool get_bool (std::string_view key, bool def=false) const
 

Public Attributes

std::map< std::string, std::string > values
 
std::map< std::string, int > lines
 key -> line in the file; absent for keys set in code
 

Detailed Description

Free-form section used by the sim / backtest libraries: dotted keys -> stringified value.

Member Function Documentation

◆ has()

bool fastmm::GenericSection::has ( std::string_view  key) const
inline

◆ get_string()

std::string fastmm::GenericSection::get_string ( std::string_view  key,
std::string_view  def = "" 
) const

◆ get_int()

std::int64_t fastmm::GenericSection::get_int ( std::string_view  key,
std::int64_t  def = 0 
) const

◆ get_double()

double fastmm::GenericSection::get_double ( std::string_view  key,
double  def = 0.0 
) const

◆ get_bool()

bool fastmm::GenericSection::get_bool ( std::string_view  key,
bool  def = false 
) const

Member Data Documentation

◆ values

std::map<std::string, std::string> fastmm::GenericSection::values

◆ lines

std::map<std::string, int> fastmm::GenericSection::lines

key -> line in the file; absent for keys set in code