Class: TBooleanControlAction

Declaration: StandardControlActions.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TViewAction

Inherited By:

None.

Purpose:

TBooleanControlAction derives from TViewAction. This action is generated by Boolean controls. It contains the current value of the control, so you don't have to ask the control specifically for it. TViewActions can be handled by the MBooleanControlActionHandler. The usual event type defined in a TBooleanControlAction is TStandardControlActions::kValueChanged.

Instantiation:

This class is usually allocated on the heap so that it can be posted in a request.

Deriving Classes:

Use TBooleanControlAction to derive classes that have additional information associated with them. Note that the Dispatch member function attempts to dispatch the action to an MBooleanControlActionHandler first, and if no MBooleanControlActionHandler exists, or it doesn't handle the action, then Dispatch tries to dispatch the action to an MViewActionHandler. This behavior is the same for classes derived from TBooleanControlAction. If you want to change this behavior, for example, if you have your own MXxxxActionHandler mixin, then you need to derive a class either directly from TViewAction (if you want to dispatch to your MXxxxActionHandler first, and then to MViewActionHandler), or from TBooleanControlAction (if you are also going to dispatch to MBooleanControlActionHandler).

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TBooleanControlAction::TBooleanControlAction

  1. TBooleanControlAction ()
  2. TBooleanControlAction (const TEventType & eventType, const TViewHandle & viewHandle, MBooleanControlState :: EBooleanState state, const TSemanticActionType & semanticMessage =TStandardActions :: kDefaultMessage)
  3. TBooleanControlAction (const TBooleanControlAction &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Creates a TBooleanControlAction initialized with the specified event, view, Boolean control state, and semantic message.
  3. Copy constructor.

Calling Context:

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

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBooleanControlAction::operator=

TBooleanControlAction & operator =(const TBooleanControlAction &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an 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: TBooleanControlAction::~TBooleanControlAction

virtual ~ TBooleanControlAction ()

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: TBooleanControlAction::GetState

MBooleanControlState :: EBooleanState GetState ()

Interface Category:

API.

Purpose:

Returns the current value of the Boolean control associated with this action.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The current value of the Boolean control.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBooleanControlAction::SetState

virtual void SetState (MBooleanControlState :: EBooleanState state)

Interface Category:

API.

Purpose:

Sets the current value of the Boolean control associated with this action.

Calling Context:

Called by the Boolean control that generated this action.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBooleanControlAction::operator>>=

TStream & operator >>=(TStream & toWhere) 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: TBooleanControlAction::operator<<=

TStream & operator <<= (TStream & fromWhere)

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 no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBooleanControlAction::Dispatch

virtual bool Dispatch (MActionTarget & target)

Interface Category:

API.

Purpose:

Dispatches the action to the specified target. First attempts to dynamically cast the target to an MBooleanControlActionHandler, and then dispatches the action to the MBooleanControlActionHandler. If no MBooleanControlActionHandler exists, or it doesn't handle the action, then Dispatch calls the inherited TViewAction Dispatch function, which tries to dispatch the action to an MViewActionHandler

Calling Context:

Called to dispatch this action.

Parameters:

Return Value:

Returns true if the action was successfully dispatched, false otherwise.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Overrides inherited TViewAction function.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.