Base::QuantityFormat Struct Reference

#include <Quantity.h>

Public Types

enum  NumberFormat { Default = 0 , Fixed = 1 , Scientific = 2 }
 
enum  NumberOption { }
 
typedef int NumberOptions
 

Public Member Functions

int getDenominator () const
 
 QuantityFormat ()
 
 QuantityFormat (NumberFormat format, int decimals=-1)
 
void setDenominator (int denom)
 
char toFormat () const
 

Static Public Member Functions

static int getDefaultDenominator ()
 
static void setDefaultDenominator (int denom)
 
static NumberFormat toFormat (char c, bool *ok=nullptr)
 

Public Attributes

int denominator
 
NumberFormat format
 
NumberOptions option
 
int precision
 

Static Public Attributes

static int defaultDenominator = 8
 

Member Typedef Documentation

◆ NumberOptions

Member Enumeration Documentation

◆ NumberFormat

Enumerator
Default 
Fixed 
Scientific 

◆ NumberOption

Enumerator
OmitGroupSeparator 
RejectGroupSeparator 

Constructor & Destructor Documentation

◆ QuantityFormat() [1/2]

QuantityFormat::QuantityFormat ( )

◆ QuantityFormat() [2/2]

QuantityFormat::QuantityFormat ( QuantityFormat::NumberFormat  format,
int  decimals = -1 
)

Member Function Documentation

◆ getDefaultDenominator()

static int Base::QuantityFormat::getDefaultDenominator ( )
static

◆ getDenominator()

int Base::QuantityFormat::getDenominator ( ) const

◆ setDefaultDenominator()

static void Base::QuantityFormat::setDefaultDenominator ( int  denom)
static

◆ setDenominator()

void Base::QuantityFormat::setDenominator ( int  denom)

◆ toFormat() [1/2]

char Base::QuantityFormat::toFormat ( ) const

◆ toFormat() [2/2]

static NumberFormat Base::QuantityFormat::toFormat ( char  c,
bool ok = nullptr 
)
static

Member Data Documentation

◆ defaultDenominator

int QuantityFormat::defaultDenominator = 8
static

◆ denominator

int Base::QuantityFormat::denominator

◆ format

◆ option

◆ precision


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