代码拉取完成,页面将自动刷新
#include <vector>
#include <boost/noncopyable.hpp>
#include <boost/intrusive/slist.hpp>
#include <boost/intrusive/list.hpp>
#include "types.h"
namespace OB {
class OrderBook : public boost::noncopyable {
public:
static OrderBook& get();
void initialize();
void shutdown();
// TODO: take by value?
t_orderid limit(t_order& order);
void cancel(t_orderid orderid);
private:
OrderBook() {}
struct OrderBookEntry : public boost::intrusive::slist_base_hook<> {
t_size size{0}; /* Order size * */
Field trader{};
};
// pricePoint: describes a single price point in the limit order book.
typedef boost::intrusive::slist<
OrderBookEntry, boost::intrusive::cache_last<true> > PricePoint;
// An array of pricePoint structures representing the entire limit order book
std::vector<OrderBookEntry> arenaBookEntries;
std::vector<PricePoint> pricePoints;
// Monotonically-increasing orderID
t_orderid curOrderID;
// Minimum Ask price
t_price askMin;
// Maximum Bid price
t_price bidMax;
};
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。