|
OpenPit C++ SDK
C++17 SDK for the OpenPit pre-trade risk engine
|
Signed fee-style amount paired with the currency it is denominated in. More...
#include <param.hpp>
Public Member Functions | |
| Fee | Amount () const noexcept |
| Returns the signed amount. | |
| const std::string & | Currency () const noexcept |
| Returns the owned currency code. | |
| MonetaryAmount (Fee amount, std::string currency) | |
| Builds a monetary amount from a signed amount and currency. | |
| bool | operator!= (const MonetaryAmount &other) const |
| Reports whether either amount or currency differs. | |
| bool | operator== (const MonetaryAmount &other) const |
| Reports whether both amount and currency are equal. | |
| OpenPitParamMonetaryAmount | Raw () const noexcept |
| Rebuilds the native borrowed C view. | |
Static Public Member Functions | |
| static MonetaryAmount | FromRaw (const OpenPitParamMonetaryAmount &raw) |
| Adopts a native monetary amount view into owned C++ storage. | |
| static std::optional< MonetaryAmount > | FromRawOption (const MonetaryAmountOptional &raw) |
| Maps a native optional monetary amount to std::optional. | |
| static MonetaryAmountOptional | RawOption (const std::optional< MonetaryAmount > &value) noexcept |
| Lowers an optional monetary amount to the native optional C payload. | |
Signed fee-style amount paired with the currency it is denominated in.
The native runtime carries this as OpenPitParamMonetaryAmount: an exact Fee value plus a borrowed currency string. The C++ wrapper owns the currency string and rebuilds the borrowed C view only inside Raw().
|
inline |
Builds a monetary amount from a signed amount and currency.
|
inlinenodiscardnoexcept |
Returns the signed amount.
|
inlinenodiscardnoexcept |
Returns the owned currency code.
|
inlinestaticnodiscard |
Adopts a native monetary amount view into owned C++ storage.
|
inlinestaticnodiscard |
Maps a native optional monetary amount to std::optional.
|
inlinenodiscard |
Reports whether either amount or currency differs.
|
inlinenodiscard |
Reports whether both amount and currency are equal.
|
inlinenodiscardnoexcept |
Rebuilds the native borrowed C view.
|
inlinestaticnodiscardnoexcept |
Lowers an optional monetary amount to the native optional C payload.