OpenMAMA
MamdaOptionContract.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 MamdaOptionContractH
23 #define MamdaOptionContractH
24 
26 #include <mamda/MamdaOptionTypes.h>
27 #include <mama/mamacpp.h>
28 #include <vector>
29 
30 namespace Wombat
31 {
32 
33  class MamdaTradeHandler;
34  class MamdaQuoteHandler;
35  class MamdaFundamentalHandler;
36  class MamdaTradeRecap;
37  class MamdaQuoteRecap;
38  class MamdaFundamentals;
39  class MamdaMsgListener;
40  class MamdaTradeListener;
41  class MamdaQuoteListener;
42  class MamdaFundamentalListener;
43  class MamaDateTime;
44 
60  class MAMDAOPTExpDLL MamdaOptionContract
61  {
62  // No default constructor:
64 
65  public:
66 
77  MamdaOptionContract (const char* symbol,
78  const char* exchange,
79  const MamaDateTime& expireDate,
80  double strikePrice,
81  MamdaOptionPutCall putCall);
82 
90  MamdaOptionContract (const char* symbol,
91  const char* exchange);
92 
96  ~MamdaOptionContract ();
97 
103  void setExpireDate (const MamaDateTime& expireDate);
104 
110  void setStrikePrice (double strikePrice);
111 
117  void setPutCall (MamdaOptionPutCall putCall);
118 
124  void setOpenInterest (uint32_t openInterest);
125 
131  void setExerciseStyle (MamdaOptionExerciseStyle exerciseStyle);
132 
139  void setRecapRequired(bool recapRequired);
140 
146  const char* getSymbol () const;
147 
153  const char* getExchange () const;
154 
160  const MamaDateTime& getExpireDate () const;
161 
167  const char* getExpireDateStr () const;
168 
174  bool gotExpireDate() const;
175 
181  double getStrikePrice () const;
182 
188  bool gotStrikePrice() const;
189 
195  MamdaOptionPutCall getPutCall () const;
196 
202  bool gotPutCall() const;
203 
209  uint32_t getOpenInterest () const;
210 
217  bool gotOpenInterest() const;
218 
224  MamdaOptionExerciseStyle getExerciseStyle () const;
225 
232  bool gotExerciseStyle() const;
233 
240  bool getRecapRequired() const;
241 
247  void addMsgListener (MamdaMsgListener* listener);
248 
255  void addTradeHandler (MamdaTradeHandler* handler);
256 
263  void addQuoteHandler (MamdaQuoteHandler* handler);
264 
270  void addFundamentalHandler (MamdaFundamentalHandler* handler);
271 
278  void setCustomObject (void* object);
279 
285  MamdaTradeRecap& getTradeInfo () const;
286 
292  MamdaQuoteRecap& getQuoteInfo () const;
293 
299  MamdaFundamentals& getFundamentalsInfo () const;
300 
306  void* getCustomObject () const;
307 
313  std::vector<MamdaMsgListener*>& getMsgListeners ();
314 
320  MamdaTradeListener& getTradeListener ();
321 
327  MamdaQuoteListener& getQuoteListener ();
328 
334  MamdaFundamentalListener& getFundamentalListener ();
335 
345  void setInView (bool inView);
346 
356  bool getInView ();
357 
358  /*
359  * MLS Temporary hack until this is moved to mama
360  */
361  int64_t getSeqNum ();
362  void setSeqNum (int64_t num);
363 
364  private:
365  struct MamdaOptionContractImpl;
366  MamdaOptionContractImpl& mImpl;
367  };
368 
369 } // namespace
370 
371 #endif // MamdaOptionContractH
MamdaFundamentals is an interface that provides access to the fundamental equity pricing/analysis att...
Definition: MamdaFundamentals.h:37
MamdaOptionExerciseStyle
Enumeration for indicating the style of an individual option contract.
Definition: MamdaOptionTypes.h:42
MamdaTradeHandler is an interface for applications that want to have an easy way to handle trade upda...
Definition: MamdaTradeHandler.h:38
MamdaTradeRecap is an interface that provides access to trade related fields.
Definition: MamdaTradeRecap.h:38
MamdaOrderImbalanceUpdate is an interface that provides access to order imbalance related fields...
Definition: MamdaAuctionFields.h:29
MamdaQuoteListener is a class that specializes in handling quote updates.
Definition: MamdaQuoteListener.h:58
MamdaFundamentalHandler is an interface for applications that want to have an easy way to access fund...
Definition: MamdaFundamentalHandler.h:39
MamdaFundamentalListener is a class that specializes in handling fundamental equity pricing/analysis ...
Definition: MamdaFundamentalListener.h:56
MamdaQuoteRecap is an interface that provides access to quote related fields.
Definition: MamdaQuoteRecap.h:37
A class that represents a single option contract.
Definition: MamdaOptionContract.h:60
MamdaQuoteHandler is an interface for applications that want to have an easy way to handle quote upda...
Definition: MamdaQuoteHandler.h:39
MamdaTradeListener is a class that specializes in handling trade updates.
Definition: MamdaTradeListener.h:67
MamdaMsgListener defines an interface for handling MAMA messages for a MamdaSubscription.
Definition: MamdaMsgListener.h:38
MamdaOptionPutCall
Enumeration for indicating whether an option contract is a put or a call.
Definition: MamdaOptionTypes.h:32


© 2012 Linux Foundation