|
OpenPit C++ SDK
C++17 SDK for the OpenPit pre-trade risk engine
|
Public Member Functions | |
| Derived | CheckedAdd (const Derived &other) const |
Adds another value and throws openpit::Error on overflow. More... | |
| Derived | CheckedDivFloat (double divisor) const |
Divides by an imprecise boundary double. More... | |
| Derived | CheckedDivInt (std::int64_t divisor) const |
Divides by a signed integer and throws openpit::Error on failure. More... | |
| Derived | CheckedDivUint (std::uint64_t divisor) const |
Divides by an unsigned integer and throws openpit::Error on failure. More... | |
| Derived | CheckedMulFloat (double scalar) const |
Multiplies by an imprecise boundary double. More... | |
| Derived | CheckedMulInt (std::int64_t scalar) const |
Multiplies by a signed integer and throws openpit::Error on failure. More... | |
| Derived | CheckedMulUint (std::uint64_t scalar) const |
Multiplies by an unsigned integer and throws openpit::Error on failure. More... | |
| Derived | CheckedRemFloat (double divisor) const |
Computes the remainder for an imprecise boundary double divisor. More... | |
| Derived | CheckedRemInt (std::int64_t divisor) const |
| Computes the remainder for a signed integer divisor. More... | |
| Derived | CheckedRemUint (std::uint64_t divisor) const |
| Computes the remainder for an unsigned integer divisor. More... | |
| Derived | CheckedSubtract (const Derived &other) const |
Subtracts another value and throws openpit::Error on failure. More... | |
| int | Compare (const Derived &other) const |
| Compares this value with another value of the same domain type. More... | |
| ::openpit::param::Decimal | Decimal () const noexcept |
| Returns the lossless decimal representation. More... | |
| bool | IsZero () const |
| Returns whether the value is exactly zero. More... | |
| bool | operator!= (const Derived &other) const |
| bool | operator< (const Derived &other) const |
| bool | operator<= (const Derived &other) const |
| bool | operator== (const Derived &other) const |
| bool | operator> (const Derived &other) const |
| bool | operator>= (const Derived &other) const |
| double | ToDouble () const |
Converts to an imprecise boundary double. More... | |
| std::string | ToString () const |
| Formats the exact value as a decimal string. More... | |
Static Public Member Functions | |
| static Derived | FromDecimal (Decimal value) |
| Validates an exact decimal representation. More... | |
| static Derived | FromDecimalRounded (Decimal value, std::uint32_t scale, RoundingStrategy rounding) |
Rounds an exact decimal representation to scale digits. More... | |
| static Derived | FromDouble (double value) |
Creates a value from an imprecise boundary double. More... | |
| static Derived | FromDoubleRounded (double value, std::uint32_t scale, RoundingStrategy rounding) |
Converts and rounds an imprecise boundary double. More... | |
| static Derived | FromInt64 (std::int64_t value) |
| Creates a value from a signed integer. More... | |
| static Derived | FromString (std::string_view value) |
| Parses an exact decimal string. More... | |
| static Derived | FromStringRounded (std::string_view value, std::uint32_t scale, RoundingStrategy rounding) |
Parses and rounds an exact decimal string to scale digits. More... | |
| static Derived | FromUint64 (std::uint64_t value) |
| Creates a value from an unsigned integer. More... | |
|
inline |
Adds another value and throws openpit::Error on overflow.
|
inline |
Divides by an imprecise boundary double.
|
inline |
Divides by a signed integer and throws openpit::Error on failure.
|
inline |
Divides by an unsigned integer and throws openpit::Error on failure.
|
inline |
Multiplies by an imprecise boundary double.
|
inline |
Multiplies by a signed integer and throws openpit::Error on failure.
|
inline |
Multiplies by an unsigned integer and throws openpit::Error on failure.
|
inline |
Computes the remainder for an imprecise boundary double divisor.
|
inline |
Computes the remainder for a signed integer divisor.
|
inline |
Computes the remainder for an unsigned integer divisor.
|
inline |
Subtracts another value and throws openpit::Error on failure.
|
inline |
Compares this value with another value of the same domain type.
|
inlinenoexcept |
Returns the lossless decimal representation.
|
inlinestatic |
Validates an exact decimal representation.
|
inlinestatic |
Rounds an exact decimal representation to scale digits.
|
inlinestatic |
Creates a value from an imprecise boundary double.
Prefer FromString or FromDecimal for financial input.
|
inlinestatic |
Converts and rounds an imprecise boundary double.
|
inlinestatic |
Creates a value from a signed integer.
|
inlinestatic |
Parses an exact decimal string.
|
inlinestatic |
Parses and rounds an exact decimal string to scale digits.
|
inlinestatic |
Creates a value from an unsigned integer.
|
inline |
Returns whether the value is exactly zero.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Converts to an imprecise boundary double.
|
inline |
Formats the exact value as a decimal string.