MamdaOrderBookEntryManager is a class that provides a global order book lookup service, matching entry IDs that are unique across a set of order books. More...
#include <MamdaOrderBookEntryManager.h>
Public Member Functions | |
MamdaOrderBookEntryManager (mama_u32_t approxCount) | |
Default constructor. More... | |
~MamdaOrderBookEntryManager () | |
Destructor. More... | |
void | clear () |
Clear all entries from the manager. More... | |
void | clear (const char *symbol) |
Clear all entries for a particular symbol from the manager. More... | |
void | addEntry (MamdaOrderBookEntry *entry) |
Add an entry to the manager. More... | |
void | addEntry (MamdaOrderBookEntry *entry, const char *entryId) |
Add an entry to the manager using a specific entry ID, which may be different from the entry's entry ID. More... | |
MamdaOrderBookEntry * | findEntry (const char *entryId, bool mustExist) |
Find an entry in the manager. More... | |
void | removeEntry (const char *entryId) |
Remove an entry from the manager. More... | |
void | removeEntry (MamdaOrderBookEntry *entry) |
Remove an entry from the manager. More... | |
void | dump (std::ostream &output) const |
Dump (print) all of the entries in this manager to the output stream. More... | |
MamdaOrderBookEntryManager is a class that provides a global order book lookup service, matching entry IDs that are unique across a set of order books.
Some data sources do not provide a symbol when sending updated or deletions for order book entries. The primary purpose of this class is to return access to the actual order book entry represented by a unique entry ID and, therefore, also (indirectly, via methods available from the book entry object) the the order book itself.
Wombat::MamdaOrderBookEntryManager::MamdaOrderBookEntryManager | ( | mama_u32_t | approxCount) |
Default constructor.
Create an empty order book entry manager.
Wombat::MamdaOrderBookEntryManager::~MamdaOrderBookEntryManager | ( | ) |
Destructor.
void Wombat::MamdaOrderBookEntryManager::clear | ( | ) |
Clear all entries from the manager.
void Wombat::MamdaOrderBookEntryManager::clear | ( | const char * | symbol) |
Clear all entries for a particular symbol from the manager.
void Wombat::MamdaOrderBookEntryManager::addEntry | ( | MamdaOrderBookEntry * | entry) |
Add an entry to the manager.
This method may throw a MamdaOrderBookDuplicateEntry exception.
void Wombat::MamdaOrderBookEntryManager::addEntry | ( | MamdaOrderBookEntry * | entry, |
const char * | entryId | ||
) |
Add an entry to the manager using a specific entry ID, which may be different from the entry's entry ID.
This method may throw a MamdaOrderBookDuplicateEntry exception.
MamdaOrderBookEntry* Wombat::MamdaOrderBookEntryManager::findEntry | ( | const char * | entryId, |
bool | mustExist | ||
) |
Find an entry in the manager.
If no entry matches the unique entry ID and "mustExist" is true then a MamdaOrderBookMissingEntry exception is thrown, otherwise it returns NULL.
void Wombat::MamdaOrderBookEntryManager::removeEntry | ( | const char * | entryId) |
Remove an entry from the manager.
This method does not actually delete the MamdaOrderBookEntry object itself.
void Wombat::MamdaOrderBookEntryManager::removeEntry | ( | MamdaOrderBookEntry * | entry) |
Remove an entry from the manager.
This method does not actually delete the MamdaOrderBookEntry object itself.
void Wombat::MamdaOrderBookEntryManager::dump | ( | std::ostream & | output) | const |
Dump (print) all of the entries in this manager to the output stream.