3
//=============================================================================
5
* @file Refcounted_ObjectKey.h
7
* Refcounted_ObjectKey.h,v 1.3 2003/10/28 18:29:19 bala Exp
9
* @author Balachandran Natarajan <bala@dre.vanderbilt.edu>
11
//=============================================================================
13
#ifndef TAO_REFCOUNTED_OBJECTKEY_H
14
#define TAO_REFCOUNTED_OBJECTKEY_H
16
#include /**/ "ace/pre.h"
18
#include "tao/Object_KeyC.h"
20
#if !defined (ACE_LACKS_PRAGMA_ONCE)
22
#endif /* ACE_LACKS_PRAGMA_ONCE */
27
* @class Refcounted_ObjectKey
29
* @brief A wrapper class that ties together a refcount to an
32
* The refounts in this class is manipulated within the context of
33
* the lock in the TAO::ObjectKey_Table. Manipulating the refcounts
34
* from anywhere else is strictly forbidden.
36
class TAO_Export Refcounted_ObjectKey
40
Refcounted_ObjectKey (const ObjectKey &ref);
42
/// Accessor for the underlying ObjectKey.
43
const ObjectKey &object_key (void) const;
46
friend class ObjectKey_Table;
48
/// Protected destructor
49
~Refcounted_ObjectKey (void);
51
/// Methods for incrementing and decrementing refcounts.
52
long incr_refcount (void);
53
long decr_refcount (void);
57
ObjectKey object_key_;
59
/// The refcount on the object key..
64
#if defined (__ACE_INLINE__)
65
#include "Refcounted_ObjectKey.inl"
66
#endif /* defined INLINE */
68
#include /**/ "ace/post.h"
70
#endif /*TAO_REFCOUNTED_OBJECTKEY_H*/