// $Revision: 1.5 $ // Copyright (C) 1995 Taligent, Inc. All rights reserved. #if 0 --------------------------------------------------------------------------- > Class: | TStockDay > Taxonomy Category: | Documented Samples | Stock Browser > Interface Category: | Sample. > Inherits From: | None. > Inherited By: | None. > Purpose: | Represents the information for an individual day of trading for a particular stock. It contains a date; the high, low, and closing prices; and the volume traded for that date. > Instantiation: | Allocate on the heap or the stack. > Deriving Classes: | Do not derive from this class. > Concurrency: | _Not_ multithread safe. > Resource Use: | No special requirements. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockDay::TStockDay ; | 1. TStockDay () | 2. TStockDay (const TDays & date, StockValue high, StockValue low, StockValue close, StockVolume volume) | 3. TStockDay (const TStockDay & source) > Interface Category: | Sample. > Purpose: | 1. Default constructor. | 2. Standard constructor. | 3. Copy constructor. > Calling Context: | 1. Called by the stream-in operators. | 2. Called to construct an object. | 3. Called to copy an object. > Parameters: = 1. Takes no parameters. = 2. const TDays & date -The date of trading represented by this object. = 2. StockValue high -The high price on that date. = 2. StockValue low -The low price on that date. = 2. StockValue close -The closing price on that date. = 2. StockVolume volume -The volume of this stock traded on that date. = 3. const TStockDay & source -The object to copy. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockDay::~ TStockDay ; | ~ TStockDay () > Interface Category: | Sample. > Purpose: | Destructor. > Calling Context: | Called to destroy an object. > Parameters: = Takes no parameters. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockDay::operator =; | TStockDay & operator =(const TStockDay & source) > Interface Category: | Sample. > Purpose: | Assignment operator. > Calling Context: | Called when an object is assigned to another compatible object. > Parameters: = const TStockDay & source -The object to copy. > Return Value: | A non-const reference to the left-hand side object. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockDay::operator >>=; | TStream & operator >>=(TStream & toStream) const > Interface Category: | Sample. > Purpose: | Stream-out operator. > Calling Context: | Called to stream out data. > Parameters: = TStream & toStream -The stream the object streams itself out to. > Return Value: | Returns a reference to the stream the object streams itself out to. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockDay::operator <<= ; | TStream & operator <<= (TStream & fromStream) > Interface Category: | Sample. > Purpose: | Stream-in operator. > Calling Context: | Called to stream in data. > Parameters: = TStream & fromStream -The stream the object streams itself in from. > Return Value: | Returns a reference to the stream the object streams itself in from. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockDay::operator ==; | bool operator ==(const TStockDay & other) const > Interface Category: | Sample. > Purpose: | Tests the equality of two objects. > Calling Context: | Called to compare one object to another. > Parameters: = const TStockDay & other -The object to compare this one with. > Return Value: | A Boolean value indicating whether this object is equal to another. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockDay::Hash ; | long Hash () const > Interface Category: | Sample. > Purpose: | Returns a hash value for the object. > Calling Context: | Called by a comparator object to determine the object's hash value. > Parameters: = Takes no parameters. > Return Value: | The object's hash value, of type long. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockDay::IsHoliday ; | bool IsHoliday () const > Interface Category: | Sample. > Purpose: | Finds out whether any trading occurred on the date of trading. > Calling Context: | Called to determine if the date of trading for this TStockDay was a stock exchange holiday. > Parameters: = Takes no parameters. > Return Value: | A Boolean value of true if no trading occurred that day, false if trading did take place. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockDay::GetDate ; | const TDays & GetDate () const > Interface Category: | Sample. > Purpose: | Returns the date of trading for this object. > Calling Context: | Called to get the date of trading. > Parameters: = Takes no parameters. > Return Value: | A TDays object representing the date of trading. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockDay::GetHigh ; | StockValue GetHigh () const > Interface Category: | Sample. > Purpose: | Returns the highest price of the stock on the date of trading. > Calling Context: | Called to get the highest price of the stock on the date of trading. > Parameters: = Takes no parameters. > Return Value: | A StockValue value containing the high price. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockDay::GetLow ; | StockValue GetLow () const > Interface Category: | Sample. > Purpose: | Returns the lowest price of the stock on the date of trading. > Calling Context: | Called to get the lowest price of the stock on the date of trading. > Parameters: = Takes no parameters. > Return Value: | A StockValue value containing the low price. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockDay::GetClose ; | StockValue GetClose () const > Interface Category: | Sample. > Purpose: | Returns the closing price of the stock on the date of trading. > Calling Context: | Called to get the closing price of the stock on the date of trading. > Parameters: = Takes no parameters. > Return Value: | A StockValue value containing the closing price. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockDay::GetVolume ; | StockVolume GetVolume () const > Interface Category: | Sample. > Purpose: | Returns the volume of stock traded on the date of trading. > Calling Context: | Called to get the volume of stock traded on the date of trading. > Parameters: = Takes no parameters. > Return Value: | A StockVolume value containing the volume of stock traded. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Typedef: | typedef double StockValue > Taxonomy Category: | Documented Samples | Stock Browser > Interface Category: | Sample. > Purpose: | A more descriptive name for the primitive type double. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Typedef: | typedef unsigned long StockVolume > Taxonomy Category: | Documented Samples | Stock Browser > Interface Category: | Sample. > Purpose: | A more descriptive name for the primitive type double. > Other Considerations: | None. --------------------------------------------------------------------------- #endif