|
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...
Public Member Functions | |
| Fee | Amount () const noexcept |
| Returns the signed amount. More... | |
| const Asset & | Currency () const noexcept |
| Returns the owned currency code. More... | |
| MonetaryAmount (Fee amount, Asset currency) | |
| Builds a monetary amount from a signed amount and currency. More... | |
| bool | operator!= (const MonetaryAmount &other) const |
| Reports whether either amount or currency differs. More... | |
| bool | operator== (const MonetaryAmount &other) const |
| Reports whether both amount and currency are equal. More... | |
| OpenPitParamMonetaryAmount | Raw () const noexcept |
| Rebuilds the native borrowed C view. More... | |
Static Public Member Functions | |
| static MonetaryAmount | FromRaw (const OpenPitParamMonetaryAmount &raw) |
| Adopts a native monetary amount view into owned C++ storage. More... | |
| static std::optional< MonetaryAmount > | FromRawOption (const MonetaryAmountOptional &raw) |
Maps a native optional monetary amount to std::optional. More... | |
| static MonetaryAmountOptional | RawOption (const std::optional< MonetaryAmount > &value) noexcept |
| Lowers an optional monetary amount to the native optional C payload. More... | |
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.
|
inlinenoexcept |
Returns the signed amount.
|
inlinenoexcept |
Returns the owned currency code.
|
inlinestatic |
Adopts a native monetary amount view into owned C++ storage.
|
inlinestatic |
Maps a native optional monetary amount to std::optional.
|
inline |
Reports whether either amount or currency differs.
|
inline |
Reports whether both amount and currency are equal.
|
inlinenoexcept |
Rebuilds the native borrowed C view.
|
inlinestaticnoexcept |
Lowers an optional monetary amount to the native optional C payload.