OpenPit C++ SDK
C++17 SDK for the OpenPit pre-trade risk engine
Loading...
Searching...
No Matches
openpit::param::Leverage Class Reference

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

#include <param.hpp>

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()

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

Member Function Documentation

◆ FromFloat()

Leverage openpit::param::Leverage::FromFloat ( float multiplier)
inlinestaticnodiscard

◆ FromRaw()

constexpr Leverage openpit::param::Leverage::FromRaw ( OpenPitParamLeverage raw)
inlinestaticnodiscardconstexprnoexcept

◆ FromRawOption()

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

◆ FromUint16()

constexpr Leverage openpit::param::Leverage::FromUint16 ( std::uint16_t multiplier)
inlinestaticnodiscardconstexprnoexcept

◆ IsSet()

bool openpit::param::Leverage::IsSet ( ) const
inlinenodiscardconstexprnoexcept

◆ operator!=()

bool openpit::param::Leverage::operator!= ( const Leverage & other) const
inlinenodiscardconstexprnoexcept

◆ operator==()

bool openpit::param::Leverage::operator== ( const Leverage & other) const
inlinenodiscardconstexprnoexcept

◆ Raw()

OpenPitParamLeverage openpit::param::Leverage::Raw ( ) const
inlinenodiscardconstexprnoexcept

◆ RawOption()

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

◆ ToString()

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

◆ Value()

float openpit::param::Leverage::Value ( ) const
inlinenodiscardconstexprnoexcept

Member Data Documentation

◆ Max

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

◆ Min

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

◆ NotSet

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

◆ Scale

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

◆ Step

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