Spreader base
This commit is contained in:
1 parent
ba922bdb4f
commit
419e75205f
1 file changed
+15
-6
@@ -33,25 +33,34 @@ public:
|
||||
|
||||
class OrderTemplate ;
|
||||
|
||||
class SpreaderUpdate {};
|
||||
class SpreaderCreate {};
|
||||
|
||||
class SpreaderBase
|
||||
{
|
||||
public:
|
||||
// handlers
|
||||
virtual void on_md(api::Security const&s, Book const&b) = 0;
|
||||
virtual void on_child_order ( OrderState const&state, std::vector<ChildFill> const&fills) = 0;
|
||||
virtual void init (orderman::OrderKey my_key,SpreaderCreate const&) = 0;
|
||||
|
||||
virtual void on_disconnect() = 0;
|
||||
virtual void on_connect() = 0;
|
||||
|
||||
virtual void on_md(api::Security const&s, Book const&b) = 0;
|
||||
virtual void on_child_order ( OrderState const&state, std::vector<ChildFill> const&fills) = 0;
|
||||
|
||||
virtual void on_time(TimeStamp const&ts) = 0;
|
||||
|
||||
virtual void on_user_update (SpreaderUpdate const&) = 0;
|
||||
virtual void on_user_cancel () = 0;
|
||||
|
||||
protected:
|
||||
// provided
|
||||
void report_state(OrderState const&);
|
||||
void subscribe_md(std::vector<api::Security const*> const &securities);
|
||||
|
||||
|
||||
orderman::OrderKey create_order(OrderTemplate const&t, Price price, Quantity quantity);
|
||||
void update_order(orderman::OrderKey, Price price, Quantity quantity);
|
||||
void cancel_order(orderman::OrderKey);
|
||||
orderman::OrderKey create_child(OrderTemplate const&t, Price price, Quantity quantity);
|
||||
void update_child(orderman::OrderKey, Price price, Quantity quantity);
|
||||
void cancel_child(orderman::OrderKey);
|
||||
|
||||
OrderTemplate const& make_order_template(api::Security const&,
|
||||
AccountName const &,
|
||||
|
||||
Reference in new issue
Block a user