rippled
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
xrpl::Number::Guard Class Reference
Collaboration diagram for xrpl::Number::Guard:
Collaboration graph
[legend]

Public Member Functions

 Guard ()
 
void set_positive () noexcept
 
void set_negative () noexcept
 
bool is_negative () const noexcept
 
template<class T >
void push (T d) noexcept
 
unsigned pop () noexcept
 
int round () noexcept
 
template<UnsignedMantissa T>
void doRoundUp (bool &negative, T &mantissa, int &exponent, internalrep const &minMantissa, internalrep const &maxMantissa, std::string location)
 
template<UnsignedMantissa T>
void doRoundDown (bool &negative, T &mantissa, int &exponent, internalrep const &minMantissa)
 
void doRound (rep &drops, std::string location)
 

Private Member Functions

void doPush (unsigned d) noexcept
 
template<UnsignedMantissa T>
void bringIntoRange (bool &negative, T &mantissa, int &exponent, internalrep const &minMantissa)
 

Private Attributes

std::uint64_t digits_
 
std::uint8_t xbit_: 1
 
std::uint8_t sbit_: 1
 

Detailed Description

Definition at line 67 of file Number.cpp.

Constructor & Destructor Documentation

◆ Guard()

xrpl::Number::Guard::Guard ( )
explicit

Definition at line 74 of file Number.cpp.

Member Function Documentation

◆ set_positive()

void xrpl::Number::Guard::set_positive ( )
noexcept

Definition at line 131 of file Number.cpp.

◆ set_negative()

void xrpl::Number::Guard::set_negative ( )
noexcept

Definition at line 137 of file Number.cpp.

◆ is_negative()

bool xrpl::Number::Guard::is_negative ( ) const
noexcept

Definition at line 143 of file Number.cpp.

◆ push()

template<class T >
void xrpl::Number::Guard::push ( d)
noexcept

Definition at line 158 of file Number.cpp.

◆ pop()

unsigned xrpl::Number::Guard::pop ( )
noexcept

Definition at line 164 of file Number.cpp.

◆ round()

int xrpl::Number::Guard::round ( )
noexcept

Definition at line 176 of file Number.cpp.

◆ doRoundUp()

template<UnsignedMantissa T>
void xrpl::Number::Guard::doRoundUp ( bool &  negative,
T &  mantissa,
int &  exponent,
internalrep const &  minMantissa,
internalrep const &  maxMantissa,
std::string  location 
)

Definition at line 235 of file Number.cpp.

◆ doRoundDown()

template<UnsignedMantissa T>
void xrpl::Number::Guard::doRoundDown ( bool &  negative,
T &  mantissa,
int &  exponent,
internalrep const &  minMantissa 
)

Definition at line 262 of file Number.cpp.

◆ doRound()

void xrpl::Number::Guard::doRound ( rep drops,
std::string  location 
)

Definition at line 279 of file Number.cpp.

◆ doPush()

void xrpl::Number::Guard::doPush ( unsigned  d)
privatenoexcept

Definition at line 149 of file Number.cpp.

◆ bringIntoRange()

template<UnsignedMantissa T>
void xrpl::Number::Guard::bringIntoRange ( bool &  negative,
T &  mantissa,
int &  exponent,
internalrep const &  minMantissa 
)
private

Definition at line 214 of file Number.cpp.

Member Data Documentation

◆ digits_

std::uint64_t xrpl::Number::Guard::digits_
private

Definition at line 69 of file Number.cpp.

◆ xbit_

std::uint8_t xrpl::Number::Guard::xbit_
private

Definition at line 70 of file Number.cpp.

◆ sbit_

std::uint8_t xrpl::Number::Guard::sbit_
private

Definition at line 71 of file Number.cpp.