OpenMAMA
Wombat::MamdaOrderBookBasicDeltaList Class Reference

MamdaOrderBookBasicDeltaList is a class that saves information about an order book delta that involves multiple entries and/or price levels. More...

#include <MamdaOrderBookBasicDeltaList.h>

Inheritance diagram for Wombat::MamdaOrderBookBasicDeltaList:
Wombat::MamdaOrderBookComplexDelta Wombat::MamdaOrderBookConcreteComplexDelta

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...
 
MamdaOrderBookgetOrderBook () 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
 

Detailed Description

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.

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
MOD_SIDES_NONE 
MOD_SIDES_BID 
MOD_SIDES_ASK 
MOD_SIDES_BID_AND_ASK 
65  {
66  MOD_SIDES_NONE = 0,
67  MOD_SIDES_BID = 1,
68  MOD_SIDES_ASK = 2,
70  };
Definition: MamdaOrderBookBasicDeltaList.h:69
Definition: MamdaOrderBookBasicDeltaList.h:67
Definition: MamdaOrderBookBasicDeltaList.h:68
Definition: MamdaOrderBookBasicDeltaList.h:66

Constructor & Destructor Documentation

Wombat::MamdaOrderBookBasicDeltaList::MamdaOrderBookBasicDeltaList ( )
Wombat::MamdaOrderBookBasicDeltaList::~MamdaOrderBookBasicDeltaList ( )

Member Function Documentation

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.

Returns
The modified side(s).
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.

Parameters
bookThe order book related to this delta.
MamdaOrderBook* Wombat::MamdaOrderBookBasicDeltaList::getOrderBook ( ) const

Get the MamdaOrderBook object to which this delta belongs.

Returns
The order book related to this delta.
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.

Parameters
conflateWhether 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.

Parameters
processWhether to process entries in books.
void Wombat::MamdaOrderBookBasicDeltaList::dump ( ostream &  output) const

Dump the complex update to the output stream.

Parameters
outputThe 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

The documentation for this class was generated from the following file:


© 2012 Linux Foundation