OpenPit C++ SDK
C++17 SDK for the OpenPit pre-trade risk engine
openpit::param::Leverage Class Reference

Fixed-point leverage multiplier transport wrapper. More...

Public Member Functions

constexpr bool IsSet () const noexcept
 
constexpr Leverage () noexcept=default
 
constexpr bool operator!= (const Leverage &other) const noexcept
 
constexpr bool operator== (const Leverage &other) const noexcept
 
constexpr OpenPitParamLeverage Raw () const noexcept
 
std::string ToString () const
 
constexpr float Value () const noexcept
 

Static Public Member Functions

static Leverage FromFloat (float multiplier)
 
static constexpr Leverage FromRaw (OpenPitParamLeverage raw) noexcept
 
static constexpr std::optional< LeverageFromRawOption (OpenPitParamLeverage raw) noexcept
 
static constexpr Leverage FromUint16 (std::uint16_t multiplier) noexcept
 
static constexpr OpenPitParamLeverage RawOption (const std::optional< Leverage > &value) noexcept
 

Static Public Attributes

static constexpr std::uint16_t Max = OPENPIT_PARAM_LEVERAGE_MAX
 
static constexpr std::uint16_t Min = OPENPIT_PARAM_LEVERAGE_MIN
 
static constexpr OpenPitParamLeverage NotSet = OPENPIT_PARAM_LEVERAGE_NOT_SET
 
static constexpr OpenPitParamLeverage Scale = OPENPIT_PARAM_LEVERAGE_SCALE
 
static constexpr float Step = OPENPIT_PARAM_LEVERAGE_STEP
 

Detailed Description

Fixed-point leverage multiplier transport wrapper.

Constructor & Destructor Documentation

◆ Leverage()

constexpr openpit::param::Leverage::Leverage ( )
constexprdefaultnoexcept

Member Function Documentation

◆ FromFloat()

static Leverage openpit::param::Leverage::FromFloat ( float  multiplier)
inlinestatic

◆ FromRaw()

static constexpr Leverage openpit::param::Leverage::FromRaw ( OpenPitParamLeverage  raw)
inlinestaticconstexprnoexcept

◆ FromRawOption()

static constexpr std::optional<Leverage> openpit::param::Leverage::FromRawOption ( OpenPitParamLeverage  raw)
inlinestaticconstexprnoexcept

◆ FromUint16()

static constexpr Leverage openpit::param::Leverage::FromUint16 ( std::uint16_t  multiplier)
inlinestaticconstexprnoexcept

◆ IsSet()

constexpr bool openpit::param::Leverage::IsSet ( ) const
inlineconstexprnoexcept

◆ operator!=()

constexpr bool openpit::param::Leverage::operator!= ( const Leverage other) const
inlineconstexprnoexcept

◆ operator==()

constexpr bool openpit::param::Leverage::operator== ( const Leverage other) const
inlineconstexprnoexcept

◆ Raw()

constexpr OpenPitParamLeverage openpit::param::Leverage::Raw ( ) const
inlineconstexprnoexcept

◆ RawOption()

static constexpr OpenPitParamLeverage openpit::param::Leverage::RawOption ( const std::optional< Leverage > &  value)
inlinestaticconstexprnoexcept

◆ ToString()

std::string openpit::param::Leverage::ToString ( ) const
inline

◆ Value()

constexpr float openpit::param::Leverage::Value ( ) const
inlineconstexprnoexcept

Member Data Documentation

◆ Max

constexpr std::uint16_t openpit::param::Leverage::Max = OPENPIT_PARAM_LEVERAGE_MAX
staticconstexpr

◆ Min

constexpr std::uint16_t openpit::param::Leverage::Min = OPENPIT_PARAM_LEVERAGE_MIN
staticconstexpr

◆ NotSet

constexpr OpenPitParamLeverage openpit::param::Leverage::NotSet = OPENPIT_PARAM_LEVERAGE_NOT_SET
staticconstexpr

◆ Scale

constexpr OpenPitParamLeverage openpit::param::Leverage::Scale = OPENPIT_PARAM_LEVERAGE_SCALE
staticconstexpr

◆ Step

constexpr float openpit::param::Leverage::Step = OPENPIT_PARAM_LEVERAGE_STEP
staticconstexpr