lib/FuturesData.h

Go to the documentation of this file.
00001 /*
00002  *  Qtstalker stock charter
00003  * 
00004  *  Copyright (C) 2001-2007 Stefan S. Stratigakos
00005  * 
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 
00019  *  USA.
00020  */
00021 
00022 
00023 #ifndef FUTURESDATA_HPP
00024 #define FUTURESDATA_HPP
00025 
00026 #include <qstring.h>
00027 #include <qstringlist.h>
00028 #include <qdatetime.h>
00029 
00030 class FuturesData
00031 {
00032   public:
00033     enum FuturesSymbol
00034     {
00035       AD,
00036       BO,
00037       NB,
00038       BP,
00039       C,
00040       CC,
00041       CO,
00042       CD,
00043       CL,
00044       CR,
00045       CT,
00046       DJ,
00047       DX,
00048       EC,
00049       ED,
00050       ES,
00051       FC,
00052       GC,
00053       GI,
00054       HG,
00055       HO,
00056       HU,
00057       OJ,
00058       JO,
00059       JY,
00060       KC,
00061       LB,
00062       LC,
00063       LN,
00064       LH,
00065       ND,
00066       NG,
00067       NQ,
00068       O,
00069       PA,
00070       PB,
00071       PL,
00072       S,
00073       SB,
00074       SF,
00075       SI,
00076       SM,
00077       SP,
00078       TY,
00079       TYD,
00080       US,
00081       USD,
00082       W,
00083       YX,
00084       FW20
00085     };
00086 
00087     FuturesData ();
00088     ~FuturesData ();
00089     void getName (QString &);
00090     void getSymbol (QString &);
00091     void getExchange (QString &);
00092     void getContract(QString &);
00093     double getLimit ();
00094     double getRate ();
00095     int setSymbol (QString &);
00096     void getMonthList (QStringList &);
00097     void getMonths (QStringList &);
00098     void getSymbolList (QStringList &);
00099     void getCurrentContract (QDateTime &, QString &);
00100     int setSymbolPath (QString &);
00101     void getCMESymbolList (QStringList &);
00102 
00103   protected:
00104     QString name;
00105     QString symbol;
00106     QString exchange;
00107     QString month;
00108     float rate;
00109     float limit;
00110     QStringList monthList;
00111     QStringList symbolList;
00112     QString contract;
00113     QString cme;
00114     QString cbot;
00115     QString nymex;
00116     QString nybot;
00117     QString hmuz;
00118     QString hknuz;
00119     QString all;
00120 };
00121 
00122 #endif