sptk2 logo
SPTK Home Page
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
sptk::MoneyData Class Reference

#include <VariantData.h>

Public Member Functions

 MoneyData (int64_t quantity, uint8_t scale)
 
 operator double () const
 
 operator int64_t () const
 
 operator int32_t () const
 
 operator bool () const
 

Public Attributes

int64_t quantity
 Integer value.
 
uint8_t scale
 Scale.
 

Static Public Attributes

static std::array< int64_t, 16 > dividers
 Dividers that help formatting money data.
 

Detailed Description

Money data (internal).

A combination of integer quantity and scale - positive integer presenting power of ten for divider. A money value is quantity / 10^(scale)

Constructor & Destructor Documentation

◆ MoneyData()

sptk::MoneyData::MoneyData ( int64_t  quantity,
uint8_t  scale 
)
inline

Constructor

Parameters
quantityMoney value
scaleMoney value scale (signs after decimal point)

Member Function Documentation

◆ operator bool()

sptk::MoneyData::operator bool ( ) const
explicit

Convert to bool value

◆ operator double()

sptk::MoneyData::operator double ( ) const
explicit

Convert to double value

◆ operator int32_t()

sptk::MoneyData::operator int32_t ( ) const
explicit

Convert to integer value

◆ operator int64_t()

sptk::MoneyData::operator int64_t ( ) const
explicit

Convert to integer value


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

Fri Oct 14 2022 09:58:43: SPTK 5.4.1