BetaTrader
A HFT Eco-System
Loading...
Searching...
No Matches
trading_core::NewOrder Class Reference

A command to submit a new order to the trading engine. More...

#include <NewOrder.h>

Inheritance diagram for trading_core::NewOrder:
Inheritance graph
Collaboration diagram for trading_core::NewOrder:
Collaboration graph

Public Member Functions

 NewOrder (const common::ClientID &clientId, const common::Timestamp timestamp, std::unique_ptr< common::Order > order)
 Constructs a new NewOrder command.
 
common::ClientID getClientId () const
 Gets the client's identifier.
 
common::OrdergetOrder () const
 Gets the order associated with this command.
 
common::Timestamp getTimestamp () const
 Gets the command's timestamp.
 
CommandType getType () const
 Gets the type of the command.
 
std::unique_ptr< common::OrderreleaseOrder ()
 Releases ownership of the order.
 

Private Attributes

common::ClientID mClientId
 
std::unique_ptr< common::OrdermOrder
 A unique pointer to the new order.
 
common::Timestamp mTimestamp
 The timestamp of when the command was created.
 
CommandType mType
 The type of the command.
 

Detailed Description

A command to submit a new order to the trading engine.

This class derives from the base Command class and encapsulates the data required to create a new order, including the client ID, timestamp, and a unique pointer to the Order object.

Constructor & Destructor Documentation

◆ NewOrder()

trading_core::NewOrder::NewOrder ( const common::ClientID clientId,
const common::Timestamp  timestamp,
std::unique_ptr< common::Order order 
)
inlineexplicit

Constructs a new NewOrder command.

Parameters
clientIdThe identifier of the client submitting the order.
timestampThe time at which the command was created.
orderA unique pointer to the common::Order object being submitted.

Member Function Documentation

◆ getClientId()

common::ClientID trading_core::Command::getClientId ( ) const
inlineinherited

Gets the client's identifier.

Here is the caller graph for this function:

◆ getOrder()

common::Order * trading_core::NewOrder::getOrder ( ) const
inline

Gets the order associated with this command.

Returns
A raw pointer to the common::Order object.
Here is the caller graph for this function:

◆ getTimestamp()

common::Timestamp trading_core::Command::getTimestamp ( ) const
inlineinherited

Gets the command's timestamp.

◆ getType()

CommandType trading_core::Command::getType ( ) const
inlineinherited

Gets the type of the command.

◆ releaseOrder()

std::unique_ptr< common::Order > trading_core::NewOrder::releaseOrder ( )
inline

Releases ownership of the order.

Returns
A unique pointer to the common::Order object.
Here is the caller graph for this function:

Member Data Documentation

◆ mClientId

common::ClientID trading_core::Command::mClientId
privateinherited

The identifier of the client sending the command.

◆ mOrder

std::unique_ptr<common::Order> trading_core::NewOrder::mOrder
private

A unique pointer to the new order.

◆ mTimestamp

common::Timestamp trading_core::Command::mTimestamp
privateinherited

The timestamp of when the command was created.

◆ mType

CommandType trading_core::Command::mType
privateinherited

The type of the command.


The documentation for this class was generated from the following file: