SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Multithread-safe implementation of RWTEscrowImp<Redeemable>. More...
#include <rw/thread/RWTThreadEscrowImp.h>
Public Types | |
typedef Redeemable | RedeemableType |
Public Member Functions | |
virtual | ~RWTThreadEscrowImp () |
Static Public Member Functions | |
static RWTEscrowHandle < Redeemable > | make () |
static RWTEscrowHandle < Redeemable > | make (const Redeemable &immediateValue) |
Protected Member Functions | |
RWTThreadEscrowImp () | |
Private Member Functions | |
RWTThreadEscrowImp (const RWTThreadEscrowImp &second) | |
RWTThreadEscrowImp & | operator= (const RWTThreadEscrowImp &second) |
This is a concrete implementation of the RWTEscrowImp<Redeemable> class. It is multithread-safe and uses condition variables to communicate between threads.
This class should not be used directly. It is intended to be used through the RWTIOUResult<Redeemable> and RWTIOUEscrow<Redeemable> interfaces. However, you may wish to use the static make() functions provided by this class, instead of the global rwtMakeThreadIOU() helper functions, to construct an escrow instance.
#include <rw/thread/RWTThreadEscrowImp.h> // for // RWTThreadEscrowImp #include <rw/itc/RWTIOUResult.h> // for RWTIOUResult #include <rw/itc/RWTIOUEscrow.h> // for RWTIOUEscrow // Create a new RWTThreadEscrowImp<int> impl., // and use it to initialize RWTIOUResult<int>. RWTIOUResult<int> intRes = RWTThreadEscrowImp<int>::make(); // Make an RWTIOUEscrow<int> handle that points // to same RWTThreadEscrowImp<int> as intRes. RWTIOUEscrow<int> intEsc = intRes; // Create a new RWTThreadEscrowImp<RWCString>, and // use it to initialize an RWTIOUEscrow<RWCString> RWTIOUEscrow<RWCString> strEsc = RWTThreadEscrowImp<RWCString>::make(); // Just for the sake of demonstration, make an // RWTIOUResult<RWCString> that points to same // RWTThreadEscrowImp<RWCString> as strEsc. RWTIOUResult<int> strRes = strEsc;
typedef Redeemable RWTThreadEscrowImp< Redeemable >::RedeemableType |
Public typedef.
Reimplemented from RWTEscrowImp< Redeemable >.
virtual RWTThreadEscrowImp< Redeemable >::~RWTThreadEscrowImp | ( | ) | [virtual] |
Virtual destructor.
RWTThreadEscrowImp< Redeemable >::RWTThreadEscrowImp | ( | ) | [protected] |
The constructor for this class is protected. You must use the static make() members to create instances.
RWTThreadEscrowImp< Redeemable >::RWTThreadEscrowImp | ( | const RWTThreadEscrowImp< Redeemable > & | second | ) | [private] |
Copy construction prohibited.
static RWTEscrowHandle<Redeemable> RWTThreadEscrowImp< Redeemable >::make | ( | const Redeemable & | immediateValue | ) | [static] |
Creates an RWTThreadEscrowImp<Redeemable> and assigns it to an RWTEscrowHandle<Redeemable> . The escrow is closed immediately with immediateValue. The returned RWTEscrowHandle<Redeemable> can be used to initialize an RWTIOUEscrow<Redeemable> or RWTIOUResult<Redeemable> . Once the escrow is created it is immediately redeemable.
static RWTEscrowHandle<Redeemable> RWTThreadEscrowImp< Redeemable >::make | ( | ) | [static] |
Creates a new RWTThreadEscrowImp<Redeemable> . Returns an RWTEscrowHandle<Redeemable> handle that can be used to create an RWTIOUResult<Redeemable> or RWTIOUEscrow<Redeemable> handle to the newly-created escrow implementation.
RWTThreadEscrowImp& RWTThreadEscrowImp< Redeemable >::operator= | ( | const RWTThreadEscrowImp< Redeemable > & | second | ) | [private] |
Assignment prohibited.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.