// $Revision: 1.12 $ //------------------------------------------------------------------------------ // // Copyright (C) 1994, 1995 Taligent, Inc. All rights reserved. // // Project: StockBrowser // File: StockDatabase.h // Build/Version: 1.0.0 // // Description: MStockDatabase defines the protocol for objects which // maintain and export stock data. // // TStockDatabase is an abstract base class for stock // database objects that must be able to stream. // //------------------------------------------------------------------------------ #ifndef TaligentSamples_STOCKDATABASE #define TaligentSamples_STOCKDATABASE class MStockDatabase; class TStockDatabase; #ifndef TaligentSamples_STOCKTYPES #include #endif class TStockData; class TStockDay; class TCollectionOf; class TCollectionOf; class TCollectionOf; //============================================================================== // MStockDatabase class MStockDatabase { public: MStockDatabase(); virtual ~MStockDatabase(); virtual void CopyAvailableNames(TCollectionOf& collectionToFill) = 0; virtual void CopyAllStocks(TCollectionOf& collectionToFill) = 0; virtual TStockData* CopyStock(const TStandardText& stockName) = 0; virtual bool CopyStockData(const TStandardText& stockName, TCollectionOf& collectionToFill, const TRangeOfDays& range = TRangeOfDays::kAllDays) = 0; virtual TPseudoTimeStamp GetTimeStamp() = 0; protected: MStockDatabase(const MStockDatabase& source); MStockDatabase& operator=(const MStockDatabase& source); }; //============================================================================== // TStockDatabase class TStockDatabase : public MStockDatabase { public: TaligentTypeExtensionDeclarationsMacro_Abstract(TStockDatabase) public: TStockDatabase(); virtual ~TStockDatabase(); virtual TStream& operator>>=(TStream& toStream) const; virtual TStream& operator<<=(TStream& fromStream); protected: TStockDatabase(const TStockDatabase& source); TStockDatabase& operator=(const TStockDatabase& source); private: enum {kOriginalVersion}; }; #endif