xrpld
Loading...
Searching...
No Matches
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::MantissaScale scale) noexcept
 ~NumberMantissaScaleGuard ()
 NumberMantissaScaleGuard (NumberMantissaScaleGuard const &)=delete
NumberMantissaScaleGuardoperator= (NumberMantissaScaleGuard const &)=delete

Private Attributes

MantissaRange::MantissaScale 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 919 of file Number.h.

Constructor & Destructor Documentation

◆ NumberMantissaScaleGuard() [1/2]

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

Definition at line 924 of file Number.h.

◆ ~NumberMantissaScaleGuard()

xrpl::NumberMantissaScaleGuard::~NumberMantissaScaleGuard ( )

Definition at line 930 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::MantissaScale const xrpl::NumberMantissaScaleGuard::saved_
private

Definition at line 921 of file Number.h.