Class: TViewRequest

Declaration: ViewRequest.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TRequest

Inherited By:

None.

Purpose:

TViewRequest derives from TRequest. It holds a TViewHandle for ensuring safe access to the view. It also provides a GetView function when executing the Do function in the thread of the view.

Instantiation:

Always allocate on the heap. It will be adopted into a queue.

Deriving Classes:

Same as TRequest.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TViewRequest::TViewRequest

  1. TViewRequest (TViewHandle * toAdopt)
  2. TViewRequest ()
  3. TViewRequest (const TViewRequest &)

Interface Category:

API.

Purpose:

  1. Creates a new request instance with the specified parameter as the target of the request.
  2. Default constructor.
  3. Copy constructor.

Calling Context:

  1. Called when the target view already exists.
  2. Called to create a non-targeted instance, so that the target may be set later.
  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: TViewRequest::~TViewRequest

virtual ~ TViewRequest ()

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

TViewRequest & operator =(const TViewRequest &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

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

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: TViewRequest::SetTarget

virtual void SetTarget (TViewHandle * toAdopt)

Interface Category:

API.

Purpose:

Sets the target view handle for the request.

Calling Context:

The view handle will be adopted by the request object. This function can be called from any thread, although only one thread at a time should be holding on to the request.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TViewRequest::GetView

TView * GetView () const

Interface Category:

API.

Purpose:

Returns the view that this request is targeted for. This function returns NIL if the view has been deleted since the request was queued.

Calling Context:

Call only from the thread that owns the view. It is also assumed that this request is being executed in the owning thread.

Parameters:

Return Value:

Returns the view that is the target of the request, or NIL if the target has not been set yet, or if the view has been deleted.

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.