Class: TGUIToolCommandBinding

Declaration: GUICompoundDocumentToolSupport.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TDocumentComponentCommandBinding, MGUIDocumentComponentCommandBinding

Inherited By:

None.

Purpose:

TGUIToolCommandBinding implements a concrete that wraps a TToolCommandBinding and can be used as an MGUIDocumentComponentCommandBinding.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

No special rule. A derived class can specialize any of the HandleXXX member functions.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TGUIToolCommandBinding::TGUIToolCommandBinding

  1. TGUIToolCommandBinding (TToolCommandBinding *, const TGUIBundle &)
  2. TGUIToolCommandBinding (const TGUIToolCommandBinding &)
  3. TGUIToolCommandBinding ()

Interface Category:

API.

Purpose:

  1. Creates a new TGUIToolCommandBinding that wraps the specified TToolCommandBinding and has the specified GUI bundle.
  2. Copy constructor.
  3. Default constructor.

Calling Context:

  1. You can call this function directly.
  2. Called to copy an object.
  3. Called by the stream-in operators.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIToolCommandBinding::~TGUIToolCommandBinding

virtual ~ TGUIToolCommandBinding ()

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: TGUIToolCommandBinding::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 the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIToolCommandBinding::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 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.

Member Function: TGUIToolCommandBinding::IsThisIncrementRequired

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:

Always returns true.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIToolCommandBinding::StreamOutIncrementDelta

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.

Member Function: TGUIToolCommandBinding::StreamInIncrementDelta

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.

Member Function: TGUIToolCommandBinding::AdoptToolCommandBinding

void AdoptToolCommandBinding (TToolCommandBinding *)

Interface Category:

API.

Purpose:

Adopts the specified TToolCommandBinding. This function changes the tool command binding wrapped by this object.

Calling Context:

You can call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIToolCommandBinding::OrphanToolCommandBinding

TToolCommandBinding * OrphanToolCommandBinding ()

Interface Category:

API.

Purpose:

Orphans this object's wrapped TToolCommandBinding. The caller is responsible for the returned object's destruction.

Calling Context:

You can call this function directly.

Parameters:

Return Value:

Returns the orphaned object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIToolCommandBinding::operator=

TGUIToolCommandBinding & operator =(const TGUIToolCommandBinding &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Call this function by using the operator in an assignment statement.

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:

None.

Member Function: TGUIToolCommandBinding::HandleDo

virtual void HandleDo ()

Interface Category:

API.

Purpose:

Performs the command. This function delegates to the wrapped TToolCommandBinding.

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.

Member Function: TGUIToolCommandBinding::HandleDoBegin

virtual void HandleDoBegin ()

Interface Category:

API.

Purpose:

Starts command execution. This function delegates to the wrapped TToolCommandBinding.

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.

Member Function: TGUIToolCommandBinding::HandleDoIncrement

virtual void HandleDoIncrement ()

Interface Category:

API.

Purpose:

Performs incremental command functionality. This function delegates to the wrapped TToolCommandBinding.

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.

Member Function: TGUIToolCommandBinding::HandleDoEnd

virtual void HandleDoEnd ()

Interface Category:

API.

Purpose:

Cleans up after command execution. This function delegates to the wrapped TToolCommandBinding.

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.

Member Function: TGUIToolCommandBinding::HandleUndo

virtual void HandleUndo ()

Interface Category:

API.

Purpose:

Undoes the effect of a reversible command. This function delegates to the wrapped TToolCommandBinding.

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.

Member Function: TGUIToolCommandBinding::HandleRedo

virtual void HandleRedo ()

Interface Category:

API.

Purpose:

Restores the effect of an undone command. This function delegates to the wrapped TToolCommandBinding.

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.

Member Function: TGUIToolCommandBinding::HandleCommit

virtual void HandleCommit ()

Interface Category:

API.

Purpose:

Commits a command that is in the done state. This function delegates to the wrapped TToolCommandBinding.

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.

Member Function: TGUIToolCommandBinding::HandleCanDo

virtual bool HandleCanDo () const

Interface Category:

API.

Purpose:

Returns whether or not the command is currently able to be executed. This function delegates to the wrapped TToolCommandBinding.

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.

Member Function: TGUIToolCommandBinding::HandleCanUndo

virtual bool HandleCanUndo () const

Interface Category:

API.

Purpose:

Returns whether or not the effects of the command is currently able to be reversed. This function delegates to the wrapped TToolCommandBinding.

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.

Member Function: TGUIToolCommandBinding::HandleCanRedo

virtual bool HandleCanRedo () const

Interface Category:

API.

Purpose:

Returns whether or not the effects of an undone command can currently be restored. This function delegates to the wrapped TToolCommandBinding.

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.

Member Function: TGUIToolCommandBinding::HandleFixupDataBeforeDo

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. This function does nothing.

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.

Member Function: TGUIToolCommandBinding::HandleGetModelSelection

  1. virtual TModelSelection * HandleGetModelSelection ()
  2. virtual const TModelSelection * HandleGetModelSelection () const

Interface Category:

API.

Purpose:

  1. Returns the model selection if one is bound to this object's wrapped TToolCommandBinding. If the wrapped object is bound to an anchor, the anchor's selection is returned.
  2. Returns a const pointer to the model selection if one is bound to this object's wrapped TToolCommandBinding. If the wrapped object is bound to an anchor, the anchor's selection is returned.

Calling Context:

  1. Called only from derived classes.
  2. Called only from derived classes.

Parameters:

Return Value:

Returns the model selection bound to this object's wrapped TToolCommandBinding. This function returns NIL if no model selection or model anchor is bound.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIToolCommandBinding::HandleGetPresenterStateSelection

  1. virtual TPresenterStateSelection * HandleGetPresenterStateSelection ()
  2. virtual const TPresenterStateSelection * HandleGetPresenterStateSelection () const

Interface Category:

API.

Purpose:

  1. Returns the presenter state selection, if one is bound to this command's wrapped TToolCommandBinding object.
  2. Returns a const pointer to the presenter state selection, if one is bound to this command's wrapped TToolCommandBinding object.

Calling Context:

  1. Called only from derived classes.
  2. Called only from derived classes.

Parameters:

Return Value:

  1. Returns the presenter state selection, if one is bound to this command's wrapped TToolCommandBinding object. Returns NIL if no presenter state selection is bound.
  2. Returns a const pointer to the presenter state selection, if one is bound to this command's wrapped TToolCommandBinding object. Returns NIL if no presenter state selection is bound.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIToolCommandBinding::InternalGetPresenterStateSelection

  1. TPresenterStateSelection * InternalGetPresenterStateSelection ()
  2. const TPresenterStateSelection * InternalGetPresenterStateSelection () const

Interface Category:

API.

Purpose:

  1. Return the bound presenter state selection.
  2. Return the count bound presenter state selection.

Calling Context:

  1. Called by TGUIToolCommandBinding.
  2. Called by TGUIToolCommandBinding.

Parameters:

Return Value:

TPresenterStateSelection * -The bound presenter state selection.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIToolCommandBinding::InternalGetModelSelection

  1. TModelSelection * InternalGetModelSelection ()
  2. const TModelSelection * InternalGetModelSelection () const

Purpose:

  1. Return the bound model selection.
  2. Return the count bound model selection.

Calling Context:

  1. Called by TGUIToolCommandBinding.
  2. Called by TGUIToolCommandBinding.

Parameters:

Return Value:

TModelSelection * -The bound model selection.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGUIToolCommandBinding::HandleGetUndoType

virtual TCommonCommand :: UndoType HandleGetUndoType () const

Interface Category:

API.

Purpose:

Returns the undo type for the bound command.

Calling Context:

Called by TAbstractDocumentComponentCommandBinding.

Parameters:

Return Value:

TCommonCommand :: UndoType -The 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.