// $Revision: 1.5 $ // Copyright (C) 1995 Taligent, Inc. All rights reserved. #if 0 --------------------------------------------------------------------------- > Class: | TStockData > Taxonomy Category: | Documented Samples | Stock Browser > Interface Category: | Sample. > Inherits From: | None. > Inherited By: | TLocalStockData | TRemoteStockData > Purpose: | An abstract class to represent stocks. Users of this class can query the object for the name of the stock, and copy data from the object. > Instantiation: | Allocate on the heap or the stack. This class is abstract and can't be instantiated directly. > Deriving Classes: | Derived classes must override the CopyData function. > Concurrency: | _Not_ multithread safe. > Resource Use: | No special requirements. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockData::TStockData ; | 1. TStockData (const TStandardText & name) | 2. TStockData () | 3. TStockData (const TStockData & source) > Interface Category: | Sample. > Purpose: | 1. Standard constructor. | 2. Default constructor. | 3. Copy constructor. > Calling Context: | 1. Called to construct a new object. | 2. Called by the stream-in operators and derived classes. | 3. Called to copy an object. > Parameters: = 1. const TStandardText & name -The name of the stock. = 2. Takes no parameters. = 3. const TStockData & 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: TStockData::~ TStockData ; | virtual ~ TStockData () > 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: TStockData::operator =; | TStockData & operator =(const TStockData & source) > Interface Category: | Sample. > Purpose: | Assignment operator. > Calling Context: | Called when an object is assigned to another compatible object. > Parameters: = const TStockData & source -The object to copy data from. > 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: TStockData::operator >>=; | virtual 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: TStockData::operator <<= ; | virtual 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: TStockData::operator ==; | virtual bool operator ==(const TStockData & other) const > Interface Category: | Sample. > Purpose: | Tests the equality of two objects. > Calling Context: | Called when one object is compared to another. > Parameters: = const TStockData & other -The object to compare with this object. > Return Value: | A boolean value indicating the equality of the two objects. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockData::Hash ; | virtual 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: TStockData::GetName ; | const TStandardText & GetName () const > Interface Category: | Sample. > Purpose: | Returns the name of the stock. > Calling Context: | Called to get the name of the stock. > Parameters: = Takes no parameters. > Return Value: | A const TStandardText& to the TStockData object's internal data member that contains the stock's name. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockData::CopyData ; | virtual bool CopyData (TCollectionOf < TStockDay > & fillWithData, const TRangeOfDays & range =TRangeOfDays :: kAllDays) const > Interface Category: | Sample. > Purpose: | Retrieves a modifiable copy of the stock's data. > Calling Context: | Called to get stock information from this object. > Parameters: = TCollectionOf < TStockDay > & fillWithData -The collection to fill with a copy of the stock data. = const TRangeOfDays & range =TRangeOfDays :: kAllDays -The range of time to copy stock data for. > Return Value: | A boolean value indicating the success of the copy operation. A value of true means the operation was successful. In some cases, it is possible for the operation to succeed and the collection to still remain empty. In such a case, there was no data to retrieve. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Class: | TStockException > Taxonomy Category: | Documented Samples | Stock Browser > Interface Category: | Sample. > Inherits From: | TStandardException > Inherited By: | None. > Purpose: | An exception class used to signal an error during a stock-related operation. > Instantiation: | Always allocate on the stack. > Deriving Classes: | Derived classes should preserve the error codes defined in the base class. > Concurrency: | _Not_ multithread safe. > Resource Use: | No special requirements. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Enumeration: | TStockException :: EStockExceptionCode > Taxonomy Category: | Documented Samples | Stock Browser > Interface Category: | Sample. > Purpose: | Defines the error codes for stock-related exceptions. > Tags: = kCouldNotComplete -There was an error while retrieving stock data. This exception is thrown when the Stock Server can't be located, or when an error occurs while communicating with the server. = kDataInaccessible -An error occurred while trying to access the data. This exception is thrown by the Stock Server if it can't find the datastore. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockException::TStockException ; | 1. TStockException () | 2. TStockException (EStockExceptionCode errorCode) | 3. TStockException (const TStockException & source) > Interface Category: | Sample. > Purpose: | 1. Default constructor. | 2. Standard constructor. | 3. Copy constructor. > Calling Context: | 1. Called by the stream-in operators and derived classes. | 2. Called to construct a TStockException object. | 3. Called to copy an object. > Parameters: = 1. Takes no parameters. = 2. EStockExceptionCode errorCode -The error code to indicate the type of error. = 3. const TStockException & 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: TStockException::~ TStockException ; | virtual ~ TStockException () > 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: TStockException::operator =; | TStockException & operator =(const TStockException & source) > Interface Category: | Sample. > Purpose: | Assignment operator. > Calling Context: | Called when an object is assigned to another compatible object. > Parameters: = const TStockException & 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: TStockException::Throw ; | virtual void Throw () const > Interface Category: | Sample. > Purpose: | Throws this exception polymorphically. > Calling Context: | Called to throw the proper exception type. > Parameters: = Takes no parameters. > Return Value: | None. > Exceptions: | Throws itself. > Concurrency: | _Not_ multithread safe. > Other Considerations: | Casts away const before throwing itself. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockException::GetReason ; | EStockExceptionCode GetReason () const > Interface Category: | Sample. > Purpose: | Returns the error code for this object. > Calling Context: | Called to find out why the exception was thrown. > Parameters: = Takes no parameters. > Return Value: | An EStockExceptionCode value indicating the reason for the exception. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif