carl  24.04
Computer ARithmetic Library
carl::settings::metric_quantity Struct Reference

Helper type to parse quantities with SI-style suffixes. More...

#include <settings_utils.h>

Public Member Functions

constexpr metric_quantity ()=default
 
constexpr metric_quantity (std::size_t n)
 
constexpr auto n () const
 
constexpr auto kilo () const
 
constexpr auto mega () const
 
constexpr auto giga () const
 
constexpr auto tera () const
 
constexpr auto peta () const
 
constexpr auto exa () const
 

Private Attributes

std::size_t mN = 0
 

Detailed Description

Helper type to parse quantities with SI-style suffixes.

Intended usage:

  • use boost to parse values as quantity
  • access values with q.mega()

Definition at line 123 of file settings_utils.h.

Constructor & Destructor Documentation

◆ metric_quantity() [1/2]

constexpr carl::settings::metric_quantity::metric_quantity ( )
constexprdefault

◆ metric_quantity() [2/2]

constexpr carl::settings::metric_quantity::metric_quantity ( std::size_t  n)
inlineexplicitconstexpr

Definition at line 128 of file settings_utils.h.

Member Function Documentation

◆ exa()

constexpr auto carl::settings::metric_quantity::exa ( ) const
inlineconstexpr

Definition at line 135 of file settings_utils.h.

◆ giga()

constexpr auto carl::settings::metric_quantity::giga ( ) const
inlineconstexpr

Definition at line 132 of file settings_utils.h.

◆ kilo()

constexpr auto carl::settings::metric_quantity::kilo ( ) const
inlineconstexpr

Definition at line 130 of file settings_utils.h.

◆ mega()

constexpr auto carl::settings::metric_quantity::mega ( ) const
inlineconstexpr

Definition at line 131 of file settings_utils.h.

◆ n()

constexpr auto carl::settings::metric_quantity::n ( ) const
inlineconstexpr

Definition at line 129 of file settings_utils.h.

Here is the caller graph for this function:

◆ peta()

constexpr auto carl::settings::metric_quantity::peta ( ) const
inlineconstexpr

Definition at line 134 of file settings_utils.h.

◆ tera()

constexpr auto carl::settings::metric_quantity::tera ( ) const
inlineconstexpr

Definition at line 133 of file settings_utils.h.

Field Documentation

◆ mN

std::size_t carl::settings::metric_quantity::mN = 0
private

Definition at line 125 of file settings_utils.h.


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