// $Revision: 1.4 $ // Copyright (C) 1995 Taligent, Inc. All rights reserved. #if 0 --------------------------------------------------------------------------- > Class: | TSetGraphConstructorCommand > Taxonomy Category: | Documented Samples | Stock Browser > Interface Category: | Sample. > Inherits From: | TCommandOn > Inherited By: | None. > Purpose: | This command class installs a new graph constructor object in the target presenter state. The command can be undone and redone. You must use this command to set the presenter state's graph constructor in order for notification to reach interested objects, because this command sends the notification. > 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: TSetGraphConstructorCommand::TSetGraphConstructorCommand ; | 1. TSetGraphConstructorCommand (const TSetGraphConstructorCommand & source) | 2. TSetGraphConstructorCommand (TStockGraphConstructor * adoptedNewConstructor) | 3. TSetGraphConstructorCommand () > Interface Category: | Sample. > Purpose: | 1. Copy constructor. | 2. Standard constructor. | 3. Default constructor. > Calling Context: | 1. Called to copy an object. | 2. Called to construct an object. | 3. Called by the stream-in operators and derived classes. > Parameters: = 1. const TSetGraphConstructorCommand & source -The object to copy. = 2. TStockGraphConstructor * adoptedNewConstructor -A pointer to a TStockGraphConstructor object to adopt. = 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: TSetGraphConstructorCommand::~ TSetGraphConstructorCommand ; | virtual ~ TSetGraphConstructorCommand () > 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: TSetGraphConstructorCommand::operator =; | TSetGraphConstructorCommand & operator =(const TSetGraphConstructorCommand & source) > Interface Category: | Sample. > Purpose: | Assignment operator. > Calling Context: | Called when an object is assigned to another compatible object. > Parameters: = const TSetGraphConstructorCommand & 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: TSetGraphConstructorCommand::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: TSetGraphConstructorCommand::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: TSetGraphConstructorCommand::HandleDoBegin ; | virtual void HandleDoBegin (TPresenterStateSelection & target) > Interface Category: | Sample. > Purpose: | Performs the action of this command object. > Calling Context: | Called by the base class' Do function in order to execute the command. > Parameters: = TPresenterStateSelection & target -The target of the command. The presenter state selection is used to install a copy of this object's adopted graph constructor into the presenter state. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | This function sets the internal state in such a way that calling HandleDoBegin repeatedly toggles between the old graph constructor and the new one. Undo/redo support is implemented by simply calling HandleDoBegin. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TSetGraphConstructorCommand::HandleUndo ; | virtual void HandleUndo (TPresenterStateSelection & target) > Interface Category: | Sample. > Purpose: | Restores the presenter state to its previous condition, before the command was executed. > Calling Context: | Called by the base class' Undo function in order to undo the command. > Parameters: = TPresenterStateSelection & target -The target of the command. See the description of HandleDoBegin. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | HandleUndo must not be called twice in a row without an intervening call to HandleDoBegin or HandleRedo, because of the way undo/redo support is implemented. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TSetGraphConstructorCommand::HandleRedo ; | virtual void HandleRedo (TPresenterStateSelection & target) > Interface Category: | Sample. > Purpose: | Redoes the action of the command. > Calling Context: | Called by the base class' Redo function in order to re-execute the command. > Parameters: = TPresenterStateSelection & target -The target of the command. See the description of HandleDoBegin. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | This function must not be called except if HandleUndo was the last TSetGraphConstructorCommand function called before it, because of the way undo/redo support is implemented. --------------------------------------------------------------------------- #endif