Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / Recyclable.h
blobda2dad0e3d31b14d1a0c6d36409420175bd48aec
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Recyclable.h
7 * @author Doug Schmidt
8 */
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)
17 # 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).
35 ACE_RECYCLABLE_BUSY,
37 /// Closed.
38 ACE_RECYCLABLE_CLOSED,
40 /// Unknown state.
41 ACE_RECYCLABLE_UNKNOWN
44 /**
45 * @class ACE_Recyclable
47 class ACE_Export ACE_Recyclable
49 public:
50 /// Destructor.
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);
59 protected:
60 /// Constructor.
61 ACE_Recyclable (ACE_Recyclable_State initial_state);
63 /// Our 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*/