Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TEventHandlerCast
Inherited By:
TBooleanControlGroup
TDialogView
TGUIPresenter
TMediaView
TScrollbar
TScrollingView
Purpose:
MActionTarget is a mixin class that allows derived classes to receive actions. MActionTarget provides support for adopting before and after handlers.
Instantiation:
MActionTarget is a mixin class and cannot be instantiated.
Deriving Classes:
Classes that need to be capable of receiving actions should be derived from MActionTarget.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
- MActionTarget ()
- MActionTarget (const MActionTarget &)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
Calling Context:
- Called to create an MActionTarget that can be streamed into.
- Called to copy an object. Usually called by derived class' copy constructors.
Parameters:
- Takes no parameters.
- const MActionTarget & -The object to be copied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ MActionTarget ()
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: MActionTarget::HandleActionDispatch
virtual bool HandleActionDispatch (TAction & action)
Interface Category:
API.
Purpose:
Override this member function to ignore certain actions or to do specific processing before or after the dispatching of an action.
Calling Context:
Called by DispatchAction after the Before targets have been invoked and before the After targets are invoked.
Parameters:
- TAction & action -The action to be dispatched.
Return Value:
Returns true once dispatching has stopped.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: MActionTarget::AddBeforeTargetFirst
void AddBeforeTargetFirst (MActionTarget * target)
Interface Category:
API.
Purpose:
Adds the specified target to the beginning of the list of Before handlers.
Calling Context:
Called to add the specified target to the beginning of the list of Before handlers. Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Before lists allow you to change the path by which an action will be distributed at runtime.
Member Function: MActionTarget::AddBeforeTargetLast
void AddBeforeTargetLast (MActionTarget * target)
Interface Category:
API.
Purpose:
Adds the specified target to the end of the list of Before handlers.
Calling Context:
Called to add the specified target to the end of the list of Before handlers. Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Before lists allow you to change the path by which an action will be distributed at runtime.
Member Function: MActionTarget::AddBeforeTargetBefore
void AddBeforeTargetBefore (const MActionTarget & before, MActionTarget * target)
Interface Category:
API.
Purpose:
Adds the specified target to the list of Before handlers before the specified element in the list.
Calling Context:
Called to add the specified target to the list of Before handlers. Call this function directly.
Parameters:
- const MActionTarget & before -The list element before which the specified element is to be added.
- MActionTarget * target -The target to add to the list.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Before lists allow you to change the path by which an action will be distributed at runtime.
Member Function: MActionTarget::AddBeforeTargetAfter
void AddBeforeTargetAfter (const MActionTarget & after, MActionTarget * target)
Interface Category:
API.
Purpose:
Adds the specified target to the list of Before handlers after the specified element in the list.
Calling Context:
Called to add the specified target the list of Before handlers. Call this function directly.
Parameters:
- const MActionTarget & after -The list element after which the specified element is to be added.
- MActionTarget * target -The target to add to the list.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Before lists allow you to change the path by which an action will be distributed at runtime.
Member Function: MActionTarget::RemoveBeforeTarget
MActionTarget * RemoveBeforeTarget (const MActionTarget & target)
Interface Category:
API.
Purpose:
Removes the specified target from the Before list.
Calling Context:
Called to remove a target from the Before list. Call this function directly.
Parameters:
Return Value:
A reference to the target removed from the list.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Before lists allow you to change the path by which an action will be distributed at runtime.
Member Function: MActionTarget::AddAfterTargetFirst
void AddAfterTargetFirst (MActionTarget * target)
Interface Category:
API.
Purpose:
Adds the specified target to the beginning of the list of After handlers.
Calling Context:
Called to add the specified target to the beginning of the list of After handlers. Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
After lists allow you to change the path by which an action will be distributed at runtime.
Member Function: MActionTarget::AddAfterTargetLast
void AddAfterTargetLast (MActionTarget * target)
Interface Category:
API.
Purpose:
Adds the specified target to the end of the list of After handlers.
Calling Context:
Called to add the specified target to the end of the list of After handlers. Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
After lists allow you to change the path by which an action will be distributed at runtime.
Member Function: MActionTarget::AddAfterTargetBefore
void AddAfterTargetBefore (const MActionTarget & before, MActionTarget * target)
Interface Category:
API.
Purpose:
Adds the specified target to the list of After handlers before the specified element in the list.
Calling Context:
Called to add the specified target to the list of After handlers. Call this function directly.
Parameters:
- const MActionTarget & before -The list element before which the specified element is to be added.
- MActionTarget * target -The target to add to the list.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
After lists allow you to change the path by which an action will be distributed at runtime.
Member Function: MActionTarget::AddAfterTargetAfter
void AddAfterTargetAfter (const MActionTarget & after, MActionTarget * target)
Interface Category:
API.
Purpose:
Adds the specified target to the list of After handlers after the specified element in the list.
Calling Context:
Called to add the specified target the list of After handlers. Call this function directly.
Parameters:
- const MActionTarget & after -The list element after which the specified element is to be added.
- MActionTarget * target -The target to add to the list.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
After lists allow you to change the path by which an action will be distributed at runtime.
Member Function: MActionTarget::RemoveAfterTarget
MActionTarget * RemoveAfterTarget (const MActionTarget & target)
Interface Category:
API.
Purpose:
Removes the specified target from the After list.
Calling Context:
Called to remove a target from the After list. Call this function directly.
Parameters:
Return Value:
A reference to the target removed from the list.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
After lists allow you to change the path by which an action will be distributed at runtime.
Member Function: MActionTarget::operator=
MActionTarget & operator =(const MActionTarget &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object. Usually called by derived class' assignment operators.
Parameters:
Return Value:
A reference to the left-hand side object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: MActionTarget::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:
- TStream & toWhere -The destination stream.
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: MActionTarget::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:
- TStream & fromWhere -The source stream.
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: MActionTarget::DispatchAction
bool DispatchAction (TAction & action)
Interface Category:
API.
Purpose:
Dispatches an action to all available before targets until one of those handlers returns true. If none of the before targets return true, HandleActionDispatch is called. If HandleActionDispatch returns false, the action is dispatched to all available after targets until one of those handlers returns true.
Calling Context:
Called to dispatch an action. Called from action distributor ::Do member function and from parent MActionTarget::DispatchAction.
Parameters:
- TAction & action -The action to be dispatched.
Return Value:
Returns true if the action was handled. False is returned if the action was not handled.
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.