Class: TViewAction

Declaration: Action.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TAction

Inherited By:

TBooleanControlAction TFloatControlAction TGUIDialogControllerViewAction TMenuAction TTextControlAction

Purpose:

TViewAction is a class that represents specific actions on a view.

Instantiation:

Allocate on the stack or on the heap.

Deriving Classes:

Derive classes from TViewAction to add your own information to the provided event type, view handle, and semantic action.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TViewAction::TViewAction

  1. TViewAction ()
  2. TViewAction (const TEventType & eventType, const TViewHandle & viewHandle, const TSemanticActionType & semanticMessage =TStandardActions :: kDefaultMessage)
  3. TViewAction (const TViewAction &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Creates a TViewAction initialized with the specified event, view, and message.
  3. Copy constructor.

Calling Context:

  1. Called by the stream-in operators.
  2. Called to create a TViewAction initialized with the passed parameters. Call this directly.
  3. Called to copy an object. Call this directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TViewAction::operator=

TViewAction & operator =(const TViewAction &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object. Call this directly.

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: TViewAction::~TViewAction

virtual ~ TViewAction ()

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: TViewAction::operator<<=

TStream & operator <<= (TStream & fromWhere)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data. Can be called by derived class'operator <<=, ::Resurrect, or directly.

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: TViewAction::GetEventType

const TEventType & GetEventType () const

Interface Category:

API.

Purpose:

Returns the event type associated with this action.

Calling Context:

Called to return the event type associated with this action. Call this directly.

Parameters:

Return Value:

Returns the event type associated with this action.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TViewAction::SetEventType

virtual void SetEventType (const TEventType & eventType)

Interface Category:

API.

Purpose:

Sets the event type associated with this action.

Calling Context:

Called to set the event type associated with this action. Call this directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TViewAction::GetSender

TViewHandle GetSender () const

Interface Category:

API.

Purpose:

Returns a view handle to the sender of the action.

Calling Context:

Called to obtain a view handle for the sender of the action. Call this directly.

Parameters:

Return Value:

Returns a view handle to the sender of the action.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TViewAction::SetSender

virtual void SetSender (TViewHandle sender)

Interface Category:

API.

Purpose:

Sets the view handle to the sender of the action. This allows the creator of this object to associate it with another object.

Calling Context:

Called to set the view handle for the sender of the action. Call this directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TViewAction::GetMessage

const TSemanticActionType & GetMessage () const

Interface Category:

API.

Purpose:

Returns the message associated with the action.

Calling Context:

Called to obtain the message associated with the action. Call this directly.

Parameters:

Return Value:

Returns a reference to the message associated with the action.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TViewAction::SetMessage

virtual void SetMessage (const TSemanticActionType & message)

Interface Category:

API.

Purpose:

Sets the message associated with the action.

Calling Context:

Called to set the message associated with the action. Call this directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TViewAction::Dispatch

virtual bool Dispatch (MActionTarget & target)

Interface Category:

API.

Purpose:

Dispatches the action to the specified target if the target can be dynamically cast to a MViewActionHandler. If MViewActionHandler::HandleViewAction returns false or if the target cannot be cast to an MViewActionHandler, TAction::Dispatch is called.

Calling Context:

Called to dispatch this action. Usually called from action target HandleActionDispatch or action derived class Dispatch.

Parameters:

Return Value:

Returns the value, true or false, returned by the either HandleViewAction or Dispatch.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TViewAction::operator>>=

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

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data. Can be called by derived class' operator >>=, ::Flatten, or directly.

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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.