3 //=============================================================================
5 * @file Intrusive_Ref_Count_Object_T.h
7 * @authors Yan Dai <dai_y@ociweb.com>
9 //=============================================================================
11 #ifndef TAO_INTRUSIVE_REF_COUNT_OBJECT_T_H
12 #define TAO_INTRUSIVE_REF_COUNT_OBJECT_T_H
14 #include /**/ "ace/pre.h"
16 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 #endif /* ACE_LACKS_PRAGMA_ONCE */
20 #include /**/ "tao/Versioned_Namespace.h"
21 #include /**/ "tao/Intrusive_Ref_Count_Base_T.h"
23 #include "ace/Atomic_Op.h"
25 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
28 * @class TAO_Intrusive_Ref_Count_Object<ACE_LOCK>
30 * @brief Template class as wrapper of a non reference counted data type but provide
31 * intrusive reference-counting feature by inherited from TAO_Intrusive_Ref_Count_Base.
32 * This makes the parameterized type data be smart pointer by using a
33 * TAO_Intrusive_Ref_Count_Handle<X> to an this wrapper object.
35 template <class OBJ
, class ACE_LOCK
>
36 class TAO_Intrusive_Ref_Count_Object
: public TAO_Intrusive_Ref_Count_Base
<ACE_LOCK
>
39 /// take ownership of obj.
40 TAO_Intrusive_Ref_Count_Object (OBJ
* obj
);
41 virtual ~TAO_Intrusive_Ref_Count_Object ();
46 // Prevent default constructor used.
47 TAO_Intrusive_Ref_Count_Object ();
49 // Prevent copying/assignment.
50 TAO_Intrusive_Ref_Count_Object (const TAO_Intrusive_Ref_Count_Object
&);
51 TAO_Intrusive_Ref_Count_Object
& operator= (const TAO_Intrusive_Ref_Count_Object
&);
56 TAO_END_VERSIONED_NAMESPACE_DECL
58 #if defined (__ACE_INLINE__)
59 #include "tao/Intrusive_Ref_Count_Object_T.inl"
60 #endif /* __ACE_INLINE__ */
62 #include "tao/Intrusive_Ref_Count_Object_T.cpp"
64 #include /**/ "ace/post.h"
66 #endif /* TAO_INTRUSIVE_REF_COUNT_OBJECT_T_H */