Class: TToolCommandBindingTo

Declaration: CursorTools.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TToolCommandBinding

Inherited By:

None.

Purpose:

TToolCommandBindingTo is a base class for template-based tool command bindings. TToolCommandBindingTo allows you to access the target as an object of class MToolTarget.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Do not derive any classes from TToolCommandBindingTo.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TToolCommandBindingTo::TToolCommandBindingTo

  1. TToolCommandBindingTo (TCommandOn < ATarget > *, ATarget *)
  2. TToolCommandBindingTo (const TToolCommandBindingTo < ATarget > &)
  3. TToolCommandBindingTo ()

Interface Category:

API.

Purpose:

  1. Creates a TToolCommandBindingTo which binds the specified command to the specified target.
  2. Copy constructor.
  3. Default constructor.

Calling Context:

  1. Called to create a binding between a command and a target.
  2. Called to copy an object.
  3. Called to create an object suitable for streaming into.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TToolCommandBindingTo::~TToolCommandBindingTo

virtual ~ TToolCommandBindingTo ()

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.

Member Function: TToolCommandBindingTo::operator=

TToolCommandBindingTo < ATarget > & operator =(const TToolCommandBindingTo < ATarget > &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when one object is assigned to another, compatible object.

Parameters:

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.

Member Function: TToolCommandBindingTo::operator>>=

virtual TStream & operator >>=(TStream &) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

Returns a reference to the stream to which the object streams itself.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TToolCommandBindingTo::operator<<=

virtual TStream & operator <<= (TStream &)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream from which the object streams itself.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TToolCommandBindingTo::Do

virtual void Do ()

Interface Category:

API.

Purpose:

Applies the command to the target.

Calling Context:

Called to change the target. Called by Document Framework.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TToolCommandBindingTo::DoBegin

virtual void DoBegin ()

Interface Category:

API.

Purpose:

Begins an incremental command on the target.

Calling Context:

Called to begin an incremental command on the target. Called by Document Framework.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TToolCommandBindingTo::DoIncrement

virtual void DoIncrement ()

Interface Category:

API.

Purpose:

Executes the commands created by the tool against a document.

Calling Context:

Called to executes the command created by the tool against a document. Called by Document Framework.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TToolCommandBindingTo::DoEnd

virtual void DoEnd ()

Interface Category:

API.

Purpose:

Completes a sequence of commands created by a tool for a document.

Calling Context:

Called to finish a sequence of commands created by a tool for a document, usually when a mouse-up event occurs. Called by Document Framework.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TToolCommandBindingTo::Undo

virtual void Undo ()

Interface Category:

API.

Purpose:

Undoes the last step that was done to the target.

Calling Context:

Called to undo the last command. Called by Document Framework.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TToolCommandBindingTo::Redo

virtual void Redo ()

Interface Category:

API.

Purpose:

Redoes the command that was previously undone.

Calling Context:

Called to redo a command that was previously undone. Called by Document Framework.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TToolCommandBindingTo::Commit

virtual void Commit ()

Interface Category:

API.

Purpose:

Commits the command, thereby ending an incremental command.

Calling Context:

Called to commit a command. Called by Document Framework.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TToolCommandBindingTo::CanDo

virtual bool CanDo () const

Interface Category:

API.

Purpose:

Detects if the prerequisites for a command have been satisfied.

Calling Context:

Called to determine if a command can be done. Called by Document Framework.

Parameters:

Return Value:

Returns true if the command can be done.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TToolCommandBindingTo::CanUndo

virtual bool CanUndo () const

Interface Category:

API.

Purpose:

Detects if there is a command which can be undone.

Calling Context:

Called to see if there is anything that can be undone. Called by Document Framework.

Parameters:

Return Value:

Returns true if there is a command which can be undone.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TToolCommandBindingTo::CanRedo

virtual bool CanRedo () const

Interface Category:

API.

Purpose:

Detects if there is a command which can be redone.

Calling Context:

Called to see if there is anything that can be redone. Called by Document Framework.

Parameters:

Return Value:

Returns true if there is a command which can be redone.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TToolCommandBindingTo::GetTarget

  1. ATarget * GetTarget ()
  2. const ATarget * GetTarget () const

Interface Category:

API.

Purpose:

  1. Returns a reference to the target.
  2. Returns an unmodifiable reference to the target.

Calling Context:

  1. Called to obtain a modifiable reference to the target. Called by the derived template class, TToolCommandBindingTo<>.
  2. Called to obtain an unmodifiable reference to the target.

Parameters:

Return Value:

Returns a reference to the command bindings target.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TToolCommandBindingTo::GetUndoType

virtual TCommonCommand :: UndoType GetUndoType () const

Interface Category:

API.

Purpose:

Returns the undo type for the command. The undo type may be the last command or a sequence of previous commands.

Calling Context:

Called to determine undo type for the command. Called by Document Framework.

Parameters:

Return Value:

Returns the undo type for the command.

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.