Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
None.
Inherited By:
TViewRequestComputation
Purpose:
TRequestComputation is an abstract class that is to be derived to implement TRequestProcessor requests that are executed synchronously from the viewpoint of the client, e.g. to do a computation and return with a result only after it's done.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
Derive and override Do (similar to TRequest). Usage Example: If there is a derived class TMyRequestComputation, that, say, returns a computed integer, you use it like this: void Sample( TRequestProcessor& processor ) { TMyRequestComputation requestComputation; requestComputation.Execute(processor); // goes away until done int result =requestComputation.GetResult(); }
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
virtual ~ TRequestComputation ()
Interface Category:
API.
Purpose:
Destructor.
Calling Context:
Called to destroy an object. 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.
virtual void Execute (TRequestProcessor & requestProcessor)
Interface Category:
API.
Purpose:
Executes the request computation in the appropriate context (typically a specific thread).
Calling Context:
Called only by the the request processor.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void Do ()
Interface Category:
API.
Purpose:
Actually performs the request computation. It is called in the appropriate context (typically a specific thread). Derived classes override this member function to perform their specific operation.
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.
TRequestComputation ()
Interface Category:
API.
Purpose:
Default constructor.
Calling Context:
Called by derived classes
Parameters:
Return Value:
None.
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.