// $Revision: 1.7 $ // Copyright (C) 1995 Taligent, Inc. All rights reserved. #if 0 --------------------------------------------------------------------------- > Class: | TStockCaller > Taxonomy Category: | Documented Samples | Stock Browser:Stock Server > Interface Category: | Sample. > Inherits From: | TStockDatabase, MRemoteCaller > Inherited By: | None. > Purpose: | This is the sender (caller) side of an RPC caller-dispatcher pair. It makes remote procedure call requests to a TStockDispatcher object for each of the MStockDatabase functions overridden. > Instantiation: | Allocate on the heap or the stack. > Deriving Classes: | No special instructions. > Concurrency: | _Not_ multithread safe. > Resource Use: | No special requirements. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockCaller::CreateLocalServiceReference ; | static TLocalServiceReference * CreateLocalServiceReference () > Interface Category: | Sample. > Purpose: | Creates a TLocalServiceReference object for clients of the Stock Server. > Calling Context: | Call this function directly. > Parameters: = Takes no parameters. > Return Value: | A pointer to a new TLocalServiceReference object. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockCaller::CreateNetworkServiceReference ; | static TNetworkServiceReference * CreateNetworkServiceReference (const TNetworkName & netName) > Interface Category: | Sample. > Purpose: | Creates a TNetworkServiceReference object for clients of the Stock Server. > Calling Context: | Call this function directly. > Parameters: = const TNetworkName & netName -The network name identifier. > Return Value: | A pointer to a new TNetworkServiceReference object. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockCaller::TStockCaller ; | 1. TStockCaller (TServiceReference * adoptedReference) | 2. TStockCaller (const TStockCaller & source) | 3. TStockCaller () > Interface Category: | Sample. > Purpose: | 1. Constructor. | 2. Copy constructor. | 3. Default constructor. > Calling Context: | 1. Called to construct a valid object. | 2. Called to copy an object. | 3. Called by derived classes and to construct an object. > Parameters: = 1. TServiceReference * adoptedReference -A service reference to the Stock Server. = 2. const TStockCaller & source -The object to copy. = 3. 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: TStockCaller::~ TStockCaller ; | virtual ~ TStockCaller () > 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: TStockCaller::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: TStockCaller::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: | This function can only be called upon a TStockCaller object constructed with the default constructor, because this function tries to set a transport (see MRemoteCaller) and that can only be done once per object. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockCaller::CopyAvailableNames ; | virtual void CopyAvailableNames (TCollectionOf < TStandardText > & collectionToFill) > Interface Category: | Sample. > Purpose: | Makes a request to the TStockDispatcher to copy available stock names. This function begins the request, marshals function arguments into the argument stream, sends the request, unmarshals the results from the results stream, and ends the request. > Calling Context: | Call this function directly. > Parameters: = TCollectionOf < TStandardText > & collectionToFill -The collection to fill with stock names. > Return Value: | None. > Exceptions: | Catches TRemoteCallException and throws TStockException::kCouldNotComplete in its place, passes all other exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockCaller::CopyAllStocks ; | virtual void CopyAllStocks (TCollectionOf < TStockData > & collectionToFill) > Interface Category: | Sample. > Purpose: | Makes a request to the TStockDispatcher to copy all available stocks. This function begins the request, marshals function arguments into the argument stream, sends the request, unmarshals the results from the results stream, and ends the request. > Calling Context: | Call this function directly. > Parameters: = TCollectionOf < TStockData > & collectionToFill -The collection to fill with TStockData objects. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockCaller::CopyStock ; | virtual TStockData * CopyStock (const TStandardText & stockName) > Interface Category: | Sample. > Purpose: | Returns a TRemoteStockData object for the given stock. > Calling Context: | Call this function directly. > Parameters: = const TStandardText & stockName -The name of the stock to copy (create a TRemoteStockData for). > Return Value: | A new TRemoteStockData object. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockCaller::CopyStockData ; | virtual bool CopyStockData (const TStandardText & stockName, TCollectionOf < TStockDay > & collectionToFill, const TRangeOfDays & range =TRangeOfDays :: kAllDays) > Interface Category: | Sample. > Purpose: | Makes a request to the TStockDispatcher to copy data for a particular stock. This function begins the request, marshals function arguments into the argument stream, sends the request, unmarshals the results from the results stream, and ends the request. > Calling Context: | Call this function directly. > Parameters: = const TStandardText & stockName -The name of the stock to copy data for. = TCollectionOf < TStockDay > & collectionToFill -The collection to fill with stock data. = const TRangeOfDays & range =TRangeOfDays :: kAllDays -The range of time to copy data for. > Return Value: | Returns true if the function executed successfully and the given stock was a valid one, false if otherwise. > Exceptions: | Catches TRemoteCallException and throws TStockException::kCouldNotComplete in its place, passes all other exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockCaller::GetTimeStamp ; | virtual TPseudoTimeStamp GetTimeStamp () > Interface Category: | Sample. > Purpose: | Makes a request to the TStockDispatcher to return the time stamp of the set of available stocks. This function begins the request, marshals function arguments into the argument stream, sends the request, unmarshals the results from the results stream, and ends the request. > Calling Context: | Call this function directly. > Parameters: = Takes no parameters. > Return Value: | A TPseudoTimeStamp object. > Exceptions: | Catches TRemoteCallException and throws TStockException::kCouldNotComplete in its place, passes all other exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TStockCaller::Init ; | void Init (TServiceReference * adopted) > Interface Category: | Sample. > Purpose: | Adopts the service reference, creates a request sender stream and message streams transport using the service reference, and sets this object transport. > Calling Context: | Called by this class. > Parameters: = TServiceReference * adopted -The service reference this object adopts. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | This function can only be called once per object, because it calls MRemoteCaller::SetTransport. --------------------------------------------------------------------------- #endif