rippled
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
xrpl::NumberMantissaScaleGuard Class Reference

Sets the new scale and restores the old scale when it leaves scope. More...

#include <Number.h>

Public Member Functions

 NumberMantissaScaleGuard (MantissaRange::mantissa_scale scale) noexcept
 
 ~NumberMantissaScaleGuard ()
 
 NumberMantissaScaleGuard (NumberMantissaScaleGuard const &)=delete
 
NumberMantissaScaleGuardoperator= (NumberMantissaScaleGuard const &)=delete
 

Private Attributes

MantissaRange::mantissa_scale const saved_
 

Detailed Description

Sets the new scale and restores the old scale when it leaves scope.

If you think you need to use this class outside of unit tests, no you don't.

Definition at line 799 of file Number.h.

Constructor & Destructor Documentation

◆ NumberMantissaScaleGuard() [1/2]

xrpl::NumberMantissaScaleGuard::NumberMantissaScaleGuard ( MantissaRange::mantissa_scale  scale)
explicitnoexcept

Definition at line 804 of file Number.h.

◆ ~NumberMantissaScaleGuard()

xrpl::NumberMantissaScaleGuard::~NumberMantissaScaleGuard ( )

Definition at line 809 of file Number.h.

◆ NumberMantissaScaleGuard() [2/2]

xrpl::NumberMantissaScaleGuard::NumberMantissaScaleGuard ( NumberMantissaScaleGuard const &  )
delete

Member Function Documentation

◆ operator=()

NumberMantissaScaleGuard & xrpl::NumberMantissaScaleGuard::operator= ( NumberMantissaScaleGuard const &  )
delete

Member Data Documentation

◆ saved_

MantissaRange::mantissa_scale const xrpl::NumberMantissaScaleGuard::saved_
private

Definition at line 801 of file Number.h.