algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
Loading...
Searching...
No Matches
algotradelib::backtest::QueueingExecutor< BrokerTag >::Queue Class Reference

Every outstanding order, oldest first: a view over the queue, valid until the queue changes. More...

#include <algotradelib/src/backtest/engine.hpp>

Classes

class  const_iterator
 Walks the outstanding orders, oldest first. More...

Public Member Functions

const_iterator begin () const noexcept
 Returns the oldest outstanding order's position.
const_iterator end () const noexcept
 Returns the position past the newest.
std::size_t size () const noexcept
 Returns how many orders are outstanding.
bool empty () const noexcept
 Returns whether no order is outstanding.
const QueuedOrder< BrokerTag > & front () const noexcept
 Returns the oldest outstanding order; the queue must not be empty.

Friends

class QueueingExecutor

Detailed Description

template<typename BrokerTag>
class algotradelib::backtest::QueueingExecutor< BrokerTag >::Queue

Every outstanding order, oldest first: a view over the queue, valid until the queue changes.

Iterated, counted (size, empty) and read from the front (front); it holds no copy of any order.

Definition at line 293 of file engine.hpp.

Member Function Documentation

◆ begin()

template<typename BrokerTag>
const_iterator algotradelib::backtest::QueueingExecutor< BrokerTag >::Queue::begin ( ) const
inlinenoexcept

Returns the oldest outstanding order's position.

Returns
The iterator.

Definition at line 380 of file engine.hpp.

Referenced by front().

◆ empty()

template<typename BrokerTag>
bool algotradelib::backtest::QueueingExecutor< BrokerTag >::Queue::empty ( ) const
inlinenoexcept

Returns whether no order is outstanding.

Returns
true if none is.

Definition at line 401 of file engine.hpp.

◆ end()

template<typename BrokerTag>
const_iterator algotradelib::backtest::QueueingExecutor< BrokerTag >::Queue::end ( ) const
inlinenoexcept

Returns the position past the newest.

Returns
The iterator.

Definition at line 387 of file engine.hpp.

◆ front()

template<typename BrokerTag>
const QueuedOrder< BrokerTag > & algotradelib::backtest::QueueingExecutor< BrokerTag >::Queue::front ( ) const
inlinenoexcept

Returns the oldest outstanding order; the queue must not be empty.

Returns
The order.

Definition at line 408 of file engine.hpp.

◆ size()

template<typename BrokerTag>
std::size_t algotradelib::backtest::QueueingExecutor< BrokerTag >::Queue::size ( ) const
inlinenoexcept

Returns how many orders are outstanding.

Returns
The count.

Definition at line 394 of file engine.hpp.

◆ QueueingExecutor

template<typename BrokerTag>
friend class QueueingExecutor
friend

Definition at line 413 of file engine.hpp.


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