OpenMAMA
MamdaOrderBookBasicDelta.h
Go to the documentation of this file.
1 /* $Id$
2  *
3  * OpenMAMA: The open middleware agnostic messaging API
4  * Copyright (C) 2011 NYSE Technologies, Inc.
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  * 02110-1301 USA
20  */
21 
22 #ifndef MamdaOrderBookBasicDeltaH
23 #define MamdaOrderBookBasicDeltaH
24 
26 #include <mamda/MamdaBasicEvent.h>
29 #include <iosfwd>
30 
31 using std::ostream;
32 
33 namespace Wombat
34 {
35 
36  class MamdaOrderBookPriceLevel;
37  class MamdaOrderBookEntry;
38 
45  class MAMDAOPTExpDLL MamdaOrderBookBasicDelta
46  {
47  public:
49  { clear(); }
52 
56  virtual void clear ();
57 
61  virtual void set (MamdaOrderBookEntry* entry,
63  mama_quantity_t plDeltaSize,
65  MamdaOrderBookEntry::Action entryAction);
66 
75  { mPriceLevel = level; }
76 
83  { mPlAction = action; }
84 
90  void setPlDeltaSize (mama_quantity_t size)
91  { mPlDeltaSize = size; }
92 
93 
100  void applyPlDeltaSize (mama_quantity_t size)
101  { mPlDeltaSize += size; }
102 
109  { return mPriceLevel; }
110 
117  { return mEntry; }
118 
124  mama_quantity_t getPlDeltaSize () const
125  { return mPlDeltaSize; }
126 
133  { return mPlAction; }
134 
141  { return mEntryAction; }
142 
148  { mEntryAction = action; }
149 
155  virtual const MamdaOrderBook* getOrderBook() const;
156 
162  void dump(ostream& output) const;
163 
164  protected:
167  mama_quantity_t mPlDeltaSize;
170 
171  private:
172  // No copy constructor nor assignment operator.
174  };
175 
176 } // namespace
177 
178 #endif // MamdaOrderBookBasicDeltaH


© 2012 Linux Foundation