// $Revision: 1.8 $ //------------------------------------------------------------------------------ // // Copyright (C) 1994, 1995 Taligent, Inc. All rights reserved. // // Project: StockBrowser // File: StockDay.h // Build/Version: 1.0.0 // // Description: TStockDay's main purpose is to hold the price-and-volume // information of a specific stock on a specific day. Not // intended to be subclassed. // //------------------------------------------------------------------------------ #ifndef TaligentSamples_STOCKDAY #define TaligentSamples_STOCKDAY class TStockDay; #ifndef Taligent_CLOCK #include // Included for TDays. #endif typedef double StockValue; typedef unsigned long StockVolume; //============================================================================== // TStockDay class TStockDay { public: TStockDay(); // For streaming only TStockDay(const TDays& date, StockValue high, StockValue low, StockValue close, StockVolume volume); TStockDay(const TStockDay& source); /*virtual*/ ~TStockDay(); TStockDay& operator=(const TStockDay& source); TStream& operator>>=(TStream& toStream) const; TStream& operator<<=(TStream& fromStream); // Comparison and hash bool operator==(const TStockDay& other) const; long Hash() const; bool IsHoliday() const; const TDays& GetDate() const; StockValue GetHigh() const; StockValue GetLow() const; StockValue GetClose() const; StockVolume GetVolume() const; private: enum {kOriginalVersion}; TDays fDate; StockValue fHigh; StockValue fLow; StockValue fClose; StockVolume fVolume; }; #endif