OpenMAMA
MamdaQuoteListener.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 MamdaQuoteListenerH
23 #define MamdaQuoteListenerH
24 
25 #include <mamda/MamdaConfig.h>
26 #include <mamda/MamdaMsgListener.h>
27 #include <mamda/MamdaQuoteRecap.h>
28 #include <mamda/MamdaQuoteUpdate.h>
29 #include <mamda/MamdaQuoteGap.h>
33 #include <mamda/MamdaFieldState.h>
34 
35 namespace Wombat
36 {
37 
38  class MamdaQuoteHandler;
39 
58  class MAMDAExpDLL MamdaQuoteListener
59  : public MamdaMsgListener
60  , public MamdaQuoteRecap
61  , public MamdaQuoteUpdate
62  , public MamdaQuoteGap
63  , public MamdaQuoteClosing
66  {
67  public:
69  virtual ~MamdaQuoteListener ();
70 
71  void addHandler (MamdaQuoteHandler* handler);
72 
73  void processPosDupAndOutOfSeqAsTransient (bool tf);
74  void resolvePossiblyDuplicate (bool tf);
75  void usePosDupAndOutOfSeqHandlers (bool tf);
76 
77  const char* getSymbol () const;
78  const char* getPartId () const;
79  const MamaDateTime& getSrcTime () const;
80  const MamaDateTime& getActivityTime () const;
81  const MamaDateTime& getLineTime () const;
82  const MamaDateTime& getSendTime () const;
83  const MamaMsgQual& getMsgQual () const;
84  const char* getPubId () const;
85  const MamaPrice& getBidPrice () const;
86  mama_quantity_t getBidSize () const;
87  mama_quantity_t getBidDepth () const;
88  const char* getBidPartId () const;
89  const MamaPrice& getBidClosePrice () const;
90  const MamaDateTime& getBidCloseDate () const;
91  const MamaPrice& getBidPrevClosePrice () const;
92  const MamaDateTime& getBidPrevCloseDate () const;
93  const MamaPrice& getBidHigh () const;
94  const MamaPrice& getBidLow () const;
95  const MamaPrice& getAskPrice () const;
96  mama_quantity_t getAskSize () const;
97  mama_quantity_t getAskDepth () const;
98  const char* getAskPartId () const;
99  const MamaPrice& getAskClosePrice () const;
100  const MamaDateTime& getAskCloseDate () const;
101  const MamaPrice& getAskPrevClosePrice () const;
102  const MamaDateTime& getAskPrevCloseDate () const;
103  const MamaPrice& getAskHigh () const;
104  const MamaPrice& getAskLow () const;
105  const MamaPrice& getQuoteMidPrice () const;
106  mama_u32_t getQuoteCount () const;
107  const char* getQuoteQualStr () const;
108  const char* getQuoteQualNative () const;
109  mama_seqnum_t getEventSeqNum () const;
110  const MamaDateTime& getEventTime () const;
111  const MamaDateTime& getQuoteDate () const;
112  mama_seqnum_t getBeginGapSeqNum () const;
113  mama_seqnum_t getEndGapSeqNum () const;
114  char getShortSaleBidTick () const;
115 
116  const MamaDateTime& getAskTime () const;
117  const MamaDateTime& getBidTime () const;
118  const char* getAskIndicator () const;
119  const char* getBidIndicator () const;
120  mama_u32_t getAskUpdateCount () const;
121  mama_u32_t getBidUpdateCount () const;
122  double getAskYield () const;
123  double getBidYield () const;
124  const char* getAskSizesList () const;
125  const char* getBidSizesList () const;
126  char getShortSaleCircuitBreaker () const;
127 
128  /* IsModified Accessors */
129  MamdaFieldState getSymbolFieldState () const;
130  MamdaFieldState getBidPriceFieldState () const;
131  MamdaFieldState getBidSizeFieldState () const;
132  MamdaFieldState getPartIdFieldState () const;
133  MamdaFieldState getSrcTimeFieldState () const;
134  MamdaFieldState getActivityTimeFieldState () const;
135  MamdaFieldState getLineTimeFieldState () const;
136  MamdaFieldState getSendTimeFieldState () const;
137  MamdaFieldState getPubIdFieldState () const;
138  MamdaFieldState getMsgQualFieldState () const;
139  MamdaFieldState getPubIdModified () const;
140  MamdaFieldState getBidDepthFieldState () const;
141  MamdaFieldState getBidPartIdFieldState () const;
142  MamdaFieldState getBidClosePriceFieldState () const;
143  MamdaFieldState getBidCloseDateFieldState () const;
144  MamdaFieldState getBidPrevClosePriceFieldState () const;
145  MamdaFieldState getBidPrevCloseDateFieldState () const;
146  MamdaFieldState getBidHighFieldState () const;
147  MamdaFieldState getBidLowFieldState () const;
148  MamdaFieldState getAskPriceFieldState () const;
149  MamdaFieldState getAskSizeFieldState () const;
150  MamdaFieldState getAskDepthFieldState () const;
151  MamdaFieldState getAskPartIdFieldState () const;
152  MamdaFieldState getAskClosePriceFieldState () const;
153  MamdaFieldState getAskCloseDateFieldState () const;
154  MamdaFieldState getAskPrevClosePriceFieldState () const;
155  MamdaFieldState getAskPrevCloseDateFieldState () const;
156  MamdaFieldState getAskHighFieldState () const;
157  MamdaFieldState getAskLowFieldState () const;
158  MamdaFieldState getQuoteMidPriceFieldState () const;
159  MamdaFieldState getQuoteCountFieldState () const;
160  MamdaFieldState getQuoteQualStrFieldState () const;
161  MamdaFieldState getQuoteQualNativeFieldState () const;
162  MamdaFieldState getEventSeqNumFieldState () const;
163  MamdaFieldState getEventTimeFieldState () const;
164  MamdaFieldState getQuoteDateFieldState () const;
165  MamdaFieldState getBeginGapSeqNumFieldState () const;
166  MamdaFieldState getEndGapSeqNumFieldState () const;
167  MamdaFieldState getShortSaleBidTickFieldState () const;
168 
169  MamdaFieldState getAskTimeFieldState () const;
170  MamdaFieldState getBidTimeFieldState () const;
171  MamdaFieldState getAskIndicatorFieldState () const;
172  MamdaFieldState getBidIndicatorFieldState () const;
173  MamdaFieldState getAskUpdateCountFieldState () const;
174  MamdaFieldState getBidUpdateCountFieldState () const;
175  MamdaFieldState getAskYieldFieldState () const;
176  MamdaFieldState getBidYieldFieldState () const;
177  MamdaFieldState getAskSizesListFieldState () const;
178  MamdaFieldState getBidSizesListFieldState () const;
179  MamdaFieldState getShortSaleCircuitBreakerFieldState () const;
180 
184  virtual void onMsg (MamdaSubscription* subscription,
185  const MamaMsg& msg,
186  short msgType);
187 
188  void assertEqual (MamdaQuoteListener* listener);
189 
190  struct MamdaQuoteListenerImpl;
191 
192  private:
193  MamdaQuoteListenerImpl& mImpl;
194  };
195 
196 }
197 
198 #endif // MamdaQuoteListenerH


© 2012 Linux Foundation