algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
Loading...
Searching...
No Matches
algotradelib::data_only Namespace Reference

Placeholder types and the refusal used by DataOnlyTraits. More...

Classes

struct  NoAccount
 The (empty) account a data-only session binds. More...
struct  NoAck
 Placeholder order acknowledgement; never produced. More...
struct  NoAmendment
 Placeholder amendment; never produced. More...
struct  NoHistoryQuery
 Placeholder history query; never produced. More...
struct  NoWorkingOrders
 Placeholder working-order listing; never produced. More...

Functions

BrokerError refusal ()
 Returns the error every account-side member of DataOnlyTraits answers with.
template<typename Out, typename Handler>
void post_refusal (Handler &&handler)
 Completes an asynchronous call with refusal(), posted through the handler's associated executor.

Detailed Description

Placeholder types and the refusal used by DataOnlyTraits.

No value of the placeholder types is ever produced: every member that would produce one refuses.

Function Documentation

◆ post_refusal()

template<typename Out, typename Handler>
void algotradelib::data_only::post_refusal ( Handler && handler)

Completes an asynchronous call with refusal(), posted through the handler's associated executor.

Never invoked inside the initiating call (though on a multi-threaded executor it may run before that call returns); the handler is moved once and called once, so it may be move-only. A handler bound to a strand completes on that strand.

Template Parameters
OutThe result type of the call.
HandlerThe completion handler type.
Parameters
handlerThe handler, called with Result<Out>(refusal()).

Definition at line 90 of file data_only_traits.hpp.

Referenced by algotradelib::DataOnlyTraits< Tag >::cancel_order(), algotradelib::DataOnlyTraits< Tag >::holdings(), algotradelib::DataOnlyTraits< Tag >::order_history(), algotradelib::DataOnlyTraits< Tag >::place_order(), post_refusal(), and algotradelib::DataOnlyTraits< Tag >::replace_order().

◆ refusal()