Main Page
Namespaces
Classes
Files
File List
File Members
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
25
#include <
mamda/MamdaOptionalConfig.h
>
26
#include <
mamda/MamdaBasicEvent.h
>
27
#include <
mamda/MamdaOrderBookPriceLevel.h
>
28
#include <
mamda/MamdaOrderBookEntry.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
:
48
MamdaOrderBookBasicDelta
()
49
{ clear(); }
50
MamdaOrderBookBasicDelta
(
const
MamdaOrderBookBasicDelta
&);
51
virtual
~MamdaOrderBookBasicDelta
() {}
52
56
virtual
void
clear ();
57
61
virtual
void
set (
MamdaOrderBookEntry
* entry,
62
MamdaOrderBookPriceLevel
* level,
63
mama_quantity_t plDeltaSize,
64
MamdaOrderBookPriceLevel::Action
plAction,
65
MamdaOrderBookEntry::Action
entryAction);
66
74
void
setPriceLevel
(
MamdaOrderBookPriceLevel
* level)
75
{ mPriceLevel = level; }
76
82
void
setPlDeltaAction
(
MamdaOrderBookPriceLevel::Action
action)
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
108
MamdaOrderBookPriceLevel
*
getPriceLevel
()
const
109
{
return
mPriceLevel; }
110
116
MamdaOrderBookEntry
*
getEntry
()
const
117
{
return
mEntry; }
118
124
mama_quantity_t
getPlDeltaSize
()
const
125
{
return
mPlDeltaSize; }
126
132
MamdaOrderBookPriceLevel::Action
getPlDeltaAction
()
const
133
{
return
mPlAction; }
134
140
MamdaOrderBookEntry::Action
getEntryDeltaAction
()
const
141
{
return
mEntryAction; }
142
147
void
setEntryDeltaAction
(
MamdaOrderBookEntry::Action
action)
148
{ mEntryAction = action; }
149
155
virtual
const
MamdaOrderBook
* getOrderBook()
const
;
156
162
void
dump(ostream& output)
const
;
163
164
protected
:
165
MamdaOrderBookPriceLevel
*
mPriceLevel
;
166
MamdaOrderBookEntry
*
mEntry
;
167
mama_quantity_t
mPlDeltaSize
;
168
MamdaOrderBookPriceLevel::Action
mPlAction
;
169
MamdaOrderBookEntry::Action
mEntryAction
;
170
171
private
:
172
// No copy constructor nor assignment operator.
173
MamdaOrderBookBasicDelta
& operator= (
const
MamdaOrderBookBasicDelta
&);
174
};
175
176
}
// namespace
177
178
#endif // MamdaOrderBookBasicDeltaH
© 2012 Linux Foundation