Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
Poco::ActiveResult< void > Class Reference

#include <ActiveResult.h>

+ Collaboration diagram for Poco::ActiveResult< void >:

Public Types

typedef ActiveResultHolder< void > ActiveResultHolderType
 

Public Member Functions

 ActiveResult (ActiveResultHolderType *pHolder)
 
 ActiveResult (const ActiveResult &result)
 Copy constructor.
 
 ~ActiveResult ()
 Destroys the result.
 
ActiveResultoperator= (const ActiveResult &result)
 Assignment operator.
 
void swap (ActiveResult &result)
 
void wait ()
 Pauses the caller until the result becomes available.
 
bool tryWait (long milliseconds)
 
void wait (long milliseconds)
 
bool available () const
 Returns true if a result is available.
 
bool failed () const
 
std::string error () const
 
Exceptionexception () const
 
void notify ()
 
void error (const std::string &msg)
 Sets the failed flag and the exception message.
 
void error (const Exception &exc)
 Sets the failed flag and the exception message.
 

Private Member Functions

 ActiveResult ()
 

Private Attributes

ActiveResultHolderType_pHolder
 

Detailed Description

This class holds the result of an asynchronous method invocation (see class ActiveMethod). It is used to pass the result from the execution thread back to the invocation thread.

Definition at line 374 of file ActiveResult.h.

Member Typedef Documentation

◆ ActiveResultHolderType

typedef ActiveResultHolder<void> Poco::ActiveResult< void >::ActiveResultHolderType

Definition at line 380 of file ActiveResult.h.

Constructor & Destructor Documentation

◆ ActiveResult() [1/3]

Poco::ActiveResult< void >::ActiveResult ( ActiveResultHolderType * pHolder)
inline

Definition at line 382 of file ActiveResult.h.

◆ ActiveResult() [2/3]

Poco::ActiveResult< void >::ActiveResult ( const ActiveResult< void > & result)
inline

Copy constructor.

Definition at line 389 of file ActiveResult.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~ActiveResult()

Poco::ActiveResult< void >::~ActiveResult ( )
inline

Destroys the result.

Definition at line 396 of file ActiveResult.h.

+ Here is the call graph for this function:

◆ ActiveResult() [3/3]

Poco::ActiveResult< void >::ActiveResult ( )
private

Member Function Documentation

◆ available()

bool Poco::ActiveResult< void >::available ( ) const
inline

Returns true if a result is available.

Definition at line 438 of file ActiveResult.h.

+ Here is the call graph for this function:

◆ error() [1/3]

std::string Poco::ActiveResult< void >::error ( ) const
inline

If the active method threw an exception, a textual representation of the exception is returned. An empty string is returned if the active method completed successfully.

Definition at line 451 of file ActiveResult.h.

+ Here is the call graph for this function:

◆ error() [2/3]

void Poco::ActiveResult< void >::error ( const Exception & exc)
inline

Sets the failed flag and the exception message.

Definition at line 479 of file ActiveResult.h.

+ Here is the call graph for this function:

◆ error() [3/3]

void Poco::ActiveResult< void >::error ( const std::string & msg)
inline

Sets the failed flag and the exception message.

Definition at line 473 of file ActiveResult.h.

◆ exception()

Exception * Poco::ActiveResult< void >::exception ( ) const
inline

If the active method threw an exception, a clone of the exception object is returned, otherwise null.

Definition at line 459 of file ActiveResult.h.

+ Here is the call graph for this function:

◆ failed()

bool Poco::ActiveResult< void >::failed ( ) const
inline

Returns true if the active method failed (and threw an exception). Information about the exception can be obtained by calling error().

Definition at line 444 of file ActiveResult.h.

+ Here is the call graph for this function:

◆ notify()

void Poco::ActiveResult< void >::notify ( )
inline

Notifies the invoking thread that the result became available. For internal use only.

Definition at line 466 of file ActiveResult.h.

+ Here is the call graph for this function:

◆ operator=()

ActiveResult & Poco::ActiveResult< void >::operator= ( const ActiveResult< void > & result)
inline

Assignment operator.

Definition at line 402 of file ActiveResult.h.

+ Here is the call graph for this function:

◆ swap()

void Poco::ActiveResult< void >::swap ( ActiveResult< void > & result)
inline

Definition at line 410 of file ActiveResult.h.

+ Here is the caller graph for this function:

◆ tryWait()

bool Poco::ActiveResult< void >::tryWait ( long milliseconds)
inline

Waits up to the specified interval for the result to become available. Returns true if the result became available, false otherwise.

Definition at line 422 of file ActiveResult.h.

+ Here is the call graph for this function:

◆ wait() [1/2]

void Poco::ActiveResult< void >::wait ( )
inline

Pauses the caller until the result becomes available.

Definition at line 416 of file ActiveResult.h.

+ Here is the call graph for this function:

◆ wait() [2/2]

void Poco::ActiveResult< void >::wait ( long milliseconds)
inline

Waits up to the specified interval for the result to become available. Throws a TimeoutException if the result did not became available.

Definition at line 430 of file ActiveResult.h.

+ Here is the call graph for this function:

Member Data Documentation

◆ _pHolder

ActiveResultHolderType* Poco::ActiveResult< void >::_pHolder
private

Definition at line 488 of file ActiveResult.h.


The documentation for this class was generated from the following file: