Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

# TAO::PICurrent_Guard Class Reference

Class used to make copying between request scope current and thread scope current exception-safe. More...

`#include <PICurrent_Guard.h>`

List of all members.

## Public Member Functions
| PICurrent_Guard (TAO_ServerRequest &server_request, bool tsc_to_rsc)
| Constructor.
| ~PICurrent_Guard (void)
| Destructor.
## Private Attributes
PICurrent_Impl * | src_
| The PICurrent implementation whose slot table will be copied.
PICurrent_Impl * | dest_
PICurrent_Copy_Callback * | copy_callback_
const bool | tsc_to_rsc_
| Flag that indicates if the TSC is to be copied to the RSC.

## Detailed Description

Class used to make copying between request scope current and thread scope current exception-safe.

Since copies between the request scope current and thread scope current must also occur if an exception is thrown, e.g. made available to the send_exception() interception points, the "guard" idiom is used to make this action exception-safe.

Note:
  This Guard class is only used on the server side.

## Constructor & Destructor Documentation

TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO::PICurrent_Guard::PICurrent_Guard | ( | TAO_ServerRequest & | server_request,
|  | bool | tsc_to_rsc
| ) |

  | Constructor. This constructor sets up this guard to copy the data held in a given PICurrent when transitioning from that PICurrent's scope to another scope (e.g. request scope to thread scope transition immediately following receive_request_service_contexts() on server side). Parameters:
  | tsc_to_rsc | true when copying TSC slot table to RSC slot table, i.e. after target operation completes.

TAO::PICurrent_Guard::~PICurrent_Guard | ( | void |  | ) |

| Destructor. The destructor copies (a logical copy whenever possible) data held in a given PICurrent when transitioning from one PICurrent scope to another immediately before any ending interception points are invoked, and after the starting and intermediate (if any) interception points are invoked.

## Member Data Documentation

PICurrent_Copy_Callback* TAO::PICurrent_Guard::copy_callback_`[private]`

| Callback object responsible for performing deep copies of a PICurrent's slot table.

PICurrent_Impl* TAO::PICurrent_Guard::dest_`[private]`

| The PICurrent implementation whose slot table will be filled with the contents of another PICurrent's slot table.

PICurrent_Impl* TAO::PICurrent_Guard::src_`[private]`

| The PICurrent implementation whose slot table will be copied.

const bool TAO::PICurrent_Guard::tsc_to_rsc_`[private]`

| Flag that indicates if the TSC is to be copied to the RSC. If false, then the RSC must be deep copied upon leaving the request scope and entering the thread scope. This is necessary since the RSC slot table is no longer available upon leaving the thread scope, meaning that a logical copy is not enough.

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

- PICurrent_Guard.h
- PICurrent_Guard.cpp