Extra constructor.

This commit is contained in:
JoelKatz
2013-02-18 12:06:18 -08:00
parent ea00a06dba
commit 9f3f86fe4e

View File

@@ -21,10 +21,14 @@ class OrderBook
//SerializedLedgerEntry::pointer mLedgerEntry;
OrderBook(SerializedLedgerEntry::ref ledgerEntry); // For accounts in a ledger
public:
typedef boost::shared_ptr<OrderBook> pointer;
typedef const boost::shared_ptr<OrderBook>& ref;
OrderBook(const uint256& index, const uint160& ci, const uint160& co, const uint160& ii, const uint160& io) :
mBookBase(index), mCurrencyIn(ci), mCurrencyOut(co), mIssuerIn(ii), mIssuerOut(io) { ; }
// returns NULL if ledgerEntry doesn't point to an order
// if ledgerEntry is an Order it creates the OrderBook this order would live in
static OrderBook::pointer newOrderBook(SerializedLedgerEntry::ref ledgerEntry);