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

Replaces the account-wide realized-PnL accumulator. More...

Public Member Functions

 AccountPnlOperation (param::Pnl pnl)
 
 AccountPnlOperation (PnlHaltReason reason)
 
const std::variant< param::Pnl, PnlHaltReason > & Get () const noexcept
 Returns the replacement PnL or its explicit halt reason. More...
 
OpenPitAccountAdjustmentAccountPnlOperation Raw () const noexcept
 

Static Public Member Functions

static AccountPnlOperation FromRaw (const OpenPitAccountAdjustmentAccountPnlOperation &raw)
 

Detailed Description

Replaces the account-wide realized-PnL accumulator.

Constructor & Destructor Documentation

◆ AccountPnlOperation() [1/2]

openpit::accountadjustment::AccountPnlOperation::AccountPnlOperation ( param::Pnl  pnl)
inlineexplicit

◆ AccountPnlOperation() [2/2]

openpit::accountadjustment::AccountPnlOperation::AccountPnlOperation ( PnlHaltReason  reason)
inlineexplicit

Member Function Documentation

◆ FromRaw()

static AccountPnlOperation openpit::accountadjustment::AccountPnlOperation::FromRaw ( const OpenPitAccountAdjustmentAccountPnlOperation &  raw)
inlinestatic

◆ Get()

const std::variant<param::Pnl, PnlHaltReason>& openpit::accountadjustment::AccountPnlOperation::Get ( ) const
inlinenoexcept

Returns the replacement PnL or its explicit halt reason.

◆ Raw()

OpenPitAccountAdjustmentAccountPnlOperation openpit::accountadjustment::AccountPnlOperation::Raw ( ) const
inlinenoexcept