Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TAbstractDocumentComponentCommandBinding
Inherited By:
TDocumentComponentCommandBindingTo
TDocumentComponentToolCommandBinding
TGUIToolCommandBinding
Purpose:
Provides a binding for commands applied to data contained in a document component and compatible targets. Targets may be a TModelSelection, TPresenterStateSelection, or a TCommandBindingReference.
Instantiation:
Always allocate on the heap. Ownership of the command binding is handed off to the document for execution.
Deriving Classes:
Do not derive from this class. Derive from TDocumentComponentCommandBindingTo instead.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Invariants:
The command and target bound to the binding is never replaced.
virtual ~ TDocumentComponentCommandBinding ()
Interface Category:
API.
Purpose:
Destructor.
Calling Context:
Called to destroy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TStream & operator >>=(TStream &) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & -The stream to which the object streams itself out.
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.
virtual TStream & operator <<= (TStream &)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & -The stream from which the object streams itself in.
Return Value:
Returns a reference to the stream the object streams itself in from.
Exceptions:
Throws a TInvalidVersionError if the version of the object on the stream is unknown to the version of the shared library installed.
Concurrency:
Not multithread safe.
Other Considerations:
None.
- TDocumentComponentCommandBinding (TCommonCommand * adoptCommand, const TModelAnchorReference &, EAnchorUse =kUseSelection)
- TDocumentComponentCommandBinding (TCommonCommand * adoptCommand)
- TDocumentComponentCommandBinding ()
- TDocumentComponentCommandBinding (const TDocumentComponentCommandBinding &)
Interface Category:
API.
Purpose:
- Creates a binding bound the specified command, whose target is the specified anchor.
- Creates a binding bound the specified command.
- Default constructor.
- Copy constructor.
Calling Context:
- Call this function directly.
- Call this function directly.
- Only for internal use by Resurrect. Developers should treat as protected.
- Called to copy an object. Only for internal use by Resurrect. Developers should treat as protected.
Parameters:
- TCommonCommand* adoptCommand -The command to which the new binding is bound.
- const TModelAnchorReference & -The target on which the command will operate.
- EAnchorUse =kUseSelection -Indicates whether or not to operate directly on the target anchor, or on a copy of it.
- TCommonCommand * adoptCommand -The command to which the new binding is bound.
- Takes no parameters.
- const TDocumentComponentCommandBinding & -The object to copy.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
All the constructors for this class are protected.
TDocumentComponentCommandBinding & operator =(const TDocumentComponentCommandBinding &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
Parameters:
Return Value:
Returns a const reference to the left-hand side object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This operator is protected.
- TPresenterStateSelection * GetPresenterSelection ()
- const TPresenterStateSelection * GetPresenterSelection () const
Interface Category:
API.
Purpose:
- Returns the presenter state selection, if one is bound to this command.
- Returns a const pointer to the presenter state selection, if one is bound to this command.
Calling Context:
- Called only from derived classes.
- Called only from derived classes.
Parameters:
- Takes no parameters.
- Takes no parameters.
Return Value:
- Returns the presenter state selection, if one is bound to this command. Returns NIL if no presenter state selection is bound to this object.
- Returns a const pointer to the presenter state selection, if one is bound to this command. Returns NIL if no presenter state selection is bound to this object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
- TCommonCommand * GetCommonCommand ()
- const TCommonCommand * GetCommonCommand () const
Interface Category:
API.
Purpose:
- Returns a pointer to the command to which this object is bound.
- Returns a const pointer to the command to which this object is bound.
Calling Context:
- Derived classes can call this function directly.
- Derived classes can call this function directly.
Parameters:
- Takes no parameters.
- Takes no parameters.
Return Value:
Returns a pointer to the command to which this object is bound.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
- void * GetVoidTarget ()
- const void * GetVoidTarget () const
Interface Category:
API.
Purpose:
- Returns a pointer to the command's target.
- Returns a const pointer to the command's target.
Calling Context:
- Derived classes can call this function directly.
- Derived classes can call this function directly.
Parameters:
- Takes no parameters.
- Takes no parameters.
Return Value:
Returns a pointer to the command's target.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Postconditions:
Assertion(theTarget != NIL)
void BindTo (const TModelAnchorReference &, EAnchorUse =kUseSelection)
Interface Category:
API.
Purpose:
Binds this object to the specified anchor reference.
Calling Context:
Derived classes can call this function directly.
Parameters:
- const TModelAnchorReference & -The new anchor to bind to.
- EAnchorUse =kUseSelection -Indicates how the command will operate on the target.
Return Value:
None.
Exceptions:
Throws TCompoundDocumentException::kUndefinedAnchorID if the input parameter is NIL.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
void AdoptAndBindToTarget (void * theTarget)
Interface Category:
API.
Purpose:
Adopts and binds to this command to the specified target.
Calling Context:
Derived classes can call this function directly.
Parameters:
- void * theTarget -The target to adopt and bind to.
Return Value:
None.
Exceptions:
Throws TCompoundDocumentException:: kNILSelection if the input parameter is NIL.
Throws TCompoundDocumentException::kTargetNotAcceptable if the input parameter is of the wrong type.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
virtual void HandleFixupDataBeforeDo ()
Interface Category:
API.
Purpose:
Fixes up the data before executing the command. This is used by commands that use model data that must be fixed up prior to passing the data to a target selection.
Calling Context:
Called only by FixupDataBeforeDo.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
virtual bool HandleCanRedo () const
Interface Category:
API.
Purpose:
Returns whether or not the effects of an undone command can currently be restored.
Calling Context:
Called by CanRedo after the state of the command has been verified.
Parameters:
Return Value:
Returns true if the command can be restored; false otherwise.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
virtual bool HandleCanUndo () const
Interface Category:
API.
Purpose:
Returns whether or not the effects of the command is currently able to be reversed.
Calling Context:
Called by CanUndo after the state of the command has been verified.
Parameters:
Return Value:
Returns true if the command can be reversed; false otherwise.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
virtual bool HandleCanDo () const
Interface Category:
API.
Purpose:
Returns whether or not the command is currently able to be executed.
Calling Context:
Called by CanDo after the state of the command has been verified.
Parameters:
Return Value:
Returns true if the command can be executed; false otherwise.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
virtual void HandleCommit ()
Interface Category:
API.
Purpose:
Commits a command that is in the done state.
Calling Context:
Called by Commit after the command state is determined to be Done.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
virtual void HandleRedo ()
Interface Category:
API.
Purpose:
Restores the effect of an undone command.
Calling Context:
Called by Redo after command state has been verified.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
virtual void HandleUndo ()
Interface Category:
API.
Purpose:
Undoes the effect of a reversible command.
Calling Context:
Called by Undo after command state has been verified.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
virtual void HandleDoEnd ()
Interface Category:
API.
Purpose:
Cleans up after command execution.
Calling Context:
Called by DoEnd after command state has been verified.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
virtual void HandleDoIncrement ()
Interface Category:
API.
Purpose:
Performs incremental command functionality.
Calling Context:
Called by DoIncrement after command state has been verified.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
virtual void HandleDoBegin ()
Interface Category:
API.
Purpose:
Starts command execution.
Calling Context:
Called by DoBegin after command state has been verified.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
virtual void HandleDo ()
Interface Category:
API.
Purpose:
Performs the command.
Calling Context:
Called only from Do.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
virtual void StreamInIncrementDelta (TStream &)
Interface Category:
API.
Purpose:
Restores the effect of a DoIncrement from a stream.
Calling Context:
Called to stream in an incremental delta from a command log.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void StreamOutIncrementDelta (TStream &) const
Interface Category:
API.
Purpose:
Streams the change from a DoIncrement.
Calling Context:
Called to log the effects of an incremental command
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual bool IsThisIncrementRequired () const
Interface Category:
API.
Purpose:
Indicates if the value of this increment of the command is necessary for reconstructing the command's execution.
Calling Context:
Called to determine if the command increment needs to be streamed to the command log.
Parameters:
Return Value:
Returns true if HandleIsThisIncrementRequired returns true.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
- TModelSelection * GetModelSelection ()
- const TModelSelection * GetModelSelection () const
Interface Category:
API.
Purpose:
- Returns the bound model selection.
- Returns the const bound model selection.
Calling Context:
- Called by derived classes.
- Called by derived classes.
Parameters:
- Takes no parameters.
- Takes no parameters.
Return Value:
TModelSelection * -The bound model selection. Returns NIL if the command is bound to a TPresentatorStateSelection.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TCommonCommand :: UndoType HandleGetUndoType () const
Interface Category:
API.
Purpose:
Return the undo type of the command contained in this binding. Must be overridden by derived classes.
Calling Context:
Called by GetUndoType.
Parameters:
Return Value:
TCommonCommand :: UndoType -The command's undo type.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.