ACE 8.0.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
TSS_Cleanup_Instance Class Reference
Collaboration diagram for TSS_Cleanup_Instance:
Collaboration graph
[legend]

Public Types

enum  Purpose { CREATE , USE , DESTROY }
 

Public Member Functions

 TSS_Cleanup_Instance (Purpose purpose=USE)
 
 ~TSS_Cleanup_Instance ()
 
bool valid ()
 
ACE_TSS_Cleanupoperator-> ()
 

Private Types

enum  { FLAG_DELETING = 1 , FLAG_VALID_CHECKED = 2 }
 

Private Member Functions

ACE_TSS_Cleanupoperator* ()
 

Private Attributes

ACE_TSS_Cleanupptr_
 
unsigned short flags_
 

Static Private Attributes

static unsigned int reference_count_ = 0
 
static ACE_TSS_Cleanupinstance_ = 0
 
static ACE_Thread_Mutexmutex_ = 0
 
static ACE_Condition_Thread_Mutexcondition_ = 0
 

Detailed Description

@A class to manage an instance pointer to ACE_TSS_Cleanup. Note: that the double checked locking pattern doesn't allow safe deletion. Callers who wish to access the singleton ACE_TSS_Cleanup must do so by instantiating a TSS_Cleanup_Instance, calling the valid method to be sure the ACE_TSS_Cleanup is available, then using the TSS_Cleanup_Instance as a pointer to the instance. Construction argument to the TSS_Cleanup_Instance determines how it is to be used: CREATE means allow this call to create an ACE_TSS_Cleanup if necessary. USE means use the existing ACE_TSS_Cleanup, but do not create a new one. DESTROY means provide exclusive access to the ACE_TSS_Cleanup, then delete it when the TSS_Cleanup_Instance goes out of scope.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
FLAG_DELETING 
FLAG_VALID_CHECKED 

◆ Purpose

Enumerator
CREATE 
USE 
DESTROY 

Constructor & Destructor Documentation

◆ TSS_Cleanup_Instance()

TSS_Cleanup_Instance::TSS_Cleanup_Instance ( Purpose purpose = USE)
explicit

◆ ~TSS_Cleanup_Instance()

TSS_Cleanup_Instance::~TSS_Cleanup_Instance ( )

Member Function Documentation

◆ operator*()

ACE_TSS_Cleanup * TSS_Cleanup_Instance::operator* ( )
private

◆ operator->()

ACE_TSS_Cleanup * TSS_Cleanup_Instance::operator-> ( )

◆ valid()

bool TSS_Cleanup_Instance::valid ( )

Member Data Documentation

◆ condition_

ACE_Condition_Thread_Mutex * TSS_Cleanup_Instance::condition_ = 0
staticprivate

◆ flags_

unsigned short TSS_Cleanup_Instance::flags_
private

◆ instance_

ACE_TSS_Cleanup * TSS_Cleanup_Instance::instance_ = 0
staticprivate

◆ mutex_

ACE_Thread_Mutex * TSS_Cleanup_Instance::mutex_ = 0
staticprivate

◆ ptr_

ACE_TSS_Cleanup* TSS_Cleanup_Instance::ptr_
private

◆ reference_count_

unsigned int TSS_Cleanup_Instance::reference_count_ = 0
staticprivate

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