MamdaOrderBookBasicDeltaList is a class that saves information about an order book delta that involves multiple entries and/or price levels. More...
#include <MamdaOrderBookBasicDeltaList.h>
Classes | |
class | iterator |
The MamdaOrderBookBasicDeltaList's iterator provides access to the list of MamdaOrderBookBasicDelta objects that comprise it. More... | |
Public Types | |
enum | ModifiedSides { MOD_SIDES_NONE = 0, MOD_SIDES_BID = 1, MOD_SIDES_ASK = 2, MOD_SIDES_BID_AND_ASK = 3 } |
typedef const iterator | const_iterator |
Public Member Functions | |
MamdaOrderBookBasicDeltaList () | |
~MamdaOrderBookBasicDeltaList () | |
void | clear () |
Clear the delta. More... | |
void | setKeepBasicDeltas (bool keep) |
Set whether to actually keep the basic deltas. More... | |
ModifiedSides | getModifiedSides () const |
Get which side(s) of the book have been modified by this complex update. More... | |
void | add (MamdaOrderBookEntry *entry, MamdaOrderBookPriceLevel *level, mama_quantity_t plDeltaSize, MamdaOrderBookPriceLevel::Action plAction, MamdaOrderBookEntry::Action entryAction) |
Add a basic delta. More... | |
void | add (const MamdaOrderBookBasicDelta &delta) |
Add a basic delta. More... | |
void | setOrderBook (MamdaOrderBook *book) |
Set the MamdaOrderBook object to which this delta belongs. More... | |
MamdaOrderBook * | getOrderBook () const |
Get the MamdaOrderBook object to which this delta belongs. More... | |
mama_size_t | getSize () const |
Return the number of simple deltas in this complex delta. More... | |
void | fixPriceLevelActions () |
Fix up price level actions (temporary workaround for problem). More... | |
void | setConflateDeltas (bool conflate) |
Whether to conflate the order book deltas. More... | |
bool | getSendImmediately () |
Get sendImmediately. More... | |
void | setProcessEntries (bool processEntries) |
Set whether we are interested in "entry level" information at all. More... | |
void | dump (ostream &output) const |
Dump the complex update to the output stream. More... | |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
MamdaOrderBookBasicDeltaList is a class that saves information about an order book delta that involves multiple entries and/or price levels.
For example, a modified order may involve a price change that means moving an entry from one price level to another. A delta list is made up of several basic deltas, which can be iterated over by methods provided in the class.
typedef const iterator Wombat::MamdaOrderBookBasicDeltaList::const_iterator |
Wombat::MamdaOrderBookBasicDeltaList::MamdaOrderBookBasicDeltaList | ( | ) |
Wombat::MamdaOrderBookBasicDeltaList::~MamdaOrderBookBasicDeltaList | ( | ) |
void Wombat::MamdaOrderBookBasicDeltaList::clear | ( | ) |
Clear the delta.
void Wombat::MamdaOrderBookBasicDeltaList::setKeepBasicDeltas | ( | bool | keep | ) |
Set whether to actually keep the basic deltas.
Many applications don't need the basic deltas and will iterate over part or all of the full book (with the deltas already applied). If this is set to true and an attempt is made to iterate over the basic deltas (by calling begin() or end()) then a MamdaOrderBookException will be thrown.
ModifiedSides Wombat::MamdaOrderBookBasicDeltaList::getModifiedSides | ( | ) | const |
Get which side(s) of the book have been modified by this complex update.
This information may prevent the need for receivers of complex updates to iterate over one or other side of the book.
void Wombat::MamdaOrderBookBasicDeltaList::add | ( | MamdaOrderBookEntry * | entry, |
MamdaOrderBookPriceLevel * | level, | ||
mama_quantity_t | plDeltaSize, | ||
MamdaOrderBookPriceLevel::Action | plAction, | ||
MamdaOrderBookEntry::Action | entryAction | ||
) |
Add a basic delta.
This method adds a MamdaOrderBookBasicDelta to the list.
void Wombat::MamdaOrderBookBasicDeltaList::add | ( | const MamdaOrderBookBasicDelta & | delta | ) |
Add a basic delta.
This method adds a copy of the MamdaOrderBookBasicDelta to the list.
void Wombat::MamdaOrderBookBasicDeltaList::setOrderBook | ( | MamdaOrderBook * | book | ) |
Set the MamdaOrderBook object to which this delta belongs.
book | The order book related to this delta. |
MamdaOrderBook* Wombat::MamdaOrderBookBasicDeltaList::getOrderBook | ( | ) | const |
Get the MamdaOrderBook object to which this delta belongs.
mama_size_t Wombat::MamdaOrderBookBasicDeltaList::getSize | ( | ) | const |
Return the number of simple deltas in this complex delta.
void Wombat::MamdaOrderBookBasicDeltaList::fixPriceLevelActions | ( | ) |
Fix up price level actions (temporary workaround for problem).
This method ensures that all basic deltas for the same price level end up with the same price level action.
void Wombat::MamdaOrderBookBasicDeltaList::setConflateDeltas | ( | bool | conflate | ) |
Whether to conflate the order book deltas.
conflate | Whether to conflate order book deltas. |
bool Wombat::MamdaOrderBookBasicDeltaList::getSendImmediately | ( | ) |
Get sendImmediately.
void Wombat::MamdaOrderBookBasicDeltaList::setProcessEntries | ( | bool | processEntries | ) |
Set whether we are interested in "entry level" information at all.
process | Whether to process entries in books. |
void Wombat::MamdaOrderBookBasicDeltaList::dump | ( | ostream & | output | ) | const |
Dump the complex update to the output stream.
output | The ostream to write the update to. |
iterator Wombat::MamdaOrderBookBasicDeltaList::begin | ( | ) |
const_iterator Wombat::MamdaOrderBookBasicDeltaList::begin | ( | ) | const |
iterator Wombat::MamdaOrderBookBasicDeltaList::end | ( | ) |
const_iterator Wombat::MamdaOrderBookBasicDeltaList::end | ( | ) | const |