TAO  2.1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
TAO_Cleanup_Func_Registry Class Reference

This is a helper class that is designed to perform cleanup on thread-specific objects registered in the ORB Core TSS resources by invoking the corresponding cleanup function on each object. Hence, there is a tight coupling between this class and the TAO ORB Core. More...

#include <Cleanup_Func_Registry.h>

Inheritance diagram for TAO_Cleanup_Func_Registry:
Inheritance graph
Collaboration diagram for TAO_Cleanup_Func_Registry:
Collaboration graph

Public Member Functions

 TAO_Cleanup_Func_Registry (void)
 Constructor.
 
size_t size (void) const
 Return the number of registered cleanup functions.
 

Protected Member Functions

int register_cleanup_function (ACE_CLEANUP_FUNC func, size_t &slot_id)
 
void cleanup (ACE_Array_Base< void * > &ts_objects)
 

Private Attributes

ACE_Array_Base< ACE_CLEANUP_FUNCcleanup_funcs_
 

Friends

class TAO_ORB_Core
 

Additional Inherited Members

- Private Member Functions inherited from ACE_Copy_Disabled
 ACE_Copy_Disabled (void)
 

Detailed Description

This is a helper class that is designed to perform cleanup on thread-specific objects registered in the ORB Core TSS resources by invoking the corresponding cleanup function on each object. Hence, there is a tight coupling between this class and the TAO ORB Core.

Constructor & Destructor Documentation

TAO_Cleanup_Func_Registry::TAO_Cleanup_Func_Registry ( void  )

Constructor.

Member Function Documentation

void TAO_Cleanup_Func_Registry::cleanup ( ACE_Array_Base< void * > &  ts_objects)
protected

Invoke the corresponding cleanup function on each thread-specific object.

Cleanup each TSS object.

int TAO_Cleanup_Func_Registry::register_cleanup_function ( ACE_CLEANUP_FUNC  func,
size_t &  slot_id 
)
protected

Register a cleanup function. The number of slot the cleanup function is placed is in will match the one reserved for the corresponding thread specific object in the ORB Core TSS resources. The slot_id is returned via the second reference argument. This method returns 0 on failure, and -1 on failure.

size_t TAO_Cleanup_Func_Registry::size ( void  ) const

Return the number of registered cleanup functions.

Friends And Related Function Documentation

friend class TAO_ORB_Core
friend

Member Data Documentation

ACE_Array_Base<ACE_CLEANUP_FUNC> TAO_Cleanup_Func_Registry::cleanup_funcs_
private

Array of registered cleanup functions. The number of registered cleanup functions should be the same as the number of registered thread-specific objects in the ORB Core TSS resources.


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