Main Page   Class Hierarchy   Data Structures   File List   Data Fields  

stockmarket.h

00001 /***************************************************************************
00002                           stockmarket.h  -  description
00003                              -------------------
00004     begin                : Fri Jan 14 2003
00005     copyright            : (C) 2002 by Michael Otto
00006     email                : Michael.Otto@saskathex.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 
00019 #ifndef _STOCKMARKET_H_
00020 #define _STOCKMARKET_H_
00021 
00022 #include <string>
00023 #include <iostream>
00024 #include <deque>
00025 #include "config.h"
00026 #include "Subject.h"
00027 
00028 class StockContainer;
00029 class Stock;
00030 
00031 using namespace std;
00032 
00036 class StockMarket : public Subject{
00037 
00038   private:
00039     string marketName;
00040     deque <StockContainer *> stocks;
00041               
00042   public:
00043     StockMarket(string marketName);
00044     StockMarket();
00045     ~StockMarket();
00046 
00047     int getNumberOfStockContainer() const;
00048     StockContainer *getStockContainer(int number) const;
00049     string getMarketName() const;
00050     void setMarketName(string marketName);
00051     bool removeStock(Stock *stock);
00052     void addStockContainer(StockContainer *stockContainer);
00053     void addStock(const Stock & stock);
00054     void sortStockMarket();
00055     
00056    
00057     friend int operator==(const StockMarket &x, const StockMarket &y);
00058 };
00059 
00060 
00061 #endif

Generated on Tue May 27 21:24:02 2003 for gstockcalc by doxygen1.3-rc3