3 //=============================================================================
9 //=============================================================================
10 #ifndef ACE_RECYCLABLE_H
11 #define ACE_RECYCLABLE_H
12 #include /**/ "ace/pre.h"
14 #include /**/ "ace/ACE_export.h"
16 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 #endif /* ACE_LACKS_PRAGMA_ONCE */
20 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
22 /// States of a recyclable object.
23 enum ACE_Recyclable_State
25 /// Idle and can be purged.
26 ACE_RECYCLABLE_IDLE_AND_PURGABLE
,
28 /// Idle but cannot be purged.
29 ACE_RECYCLABLE_IDLE_BUT_NOT_PURGABLE
,
31 /// Can be purged, but is not idle (mostly for debugging).
32 ACE_RECYCLABLE_PURGABLE_BUT_NOT_IDLE
,
34 /// Busy (i.e., cannot be recycled or purged).
38 ACE_RECYCLABLE_CLOSED
,
41 ACE_RECYCLABLE_UNKNOWN
45 * @class ACE_Recyclable
47 class ACE_Export ACE_Recyclable
51 virtual ~ACE_Recyclable () = default;
53 /// Get the recyclable bit
54 ACE_Recyclable_State
recycle_state () const;
56 /// Set the recyclable bit
57 void recycle_state (ACE_Recyclable_State new_state
);
61 ACE_Recyclable (ACE_Recyclable_State initial_state
);
64 ACE_Recyclable_State recycle_state_
;
67 ACE_END_VERSIONED_NAMESPACE_DECL
69 #if defined (__ACE_INLINE__)
70 #include "ace/Recyclable.inl"
71 #endif /* __ACE_INLINE __ */
73 #include /**/ "ace/post.h"
74 #endif /*ACE_RECYCLABLE_STATE_H*/