diff options
author | bala <balanatarajan@users.noreply.github.com> | 2001-12-10 21:48:59 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2001-12-10 21:48:59 +0000 |
commit | f01d9f24020077a7851ba3b9e379907a0fa32347 (patch) | |
tree | 4f00fe99639595a8bf15b1f637b532caa8bed86a /ace/Recyclable.h | |
parent | e75c6cfa29c521009305159a3148794369d4d975 (diff) | |
download | ATCD-f01d9f24020077a7851ba3b9e379907a0fa32347.tar.gz |
ChangeLogTag: Mon Dec 10 15:39:22 2001 Balachandran Natarajan <bala@cs.wustl.edu>
Diffstat (limited to 'ace/Recyclable.h')
-rw-r--r-- | ace/Recyclable.h | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/ace/Recyclable.h b/ace/Recyclable.h new file mode 100644 index 00000000000..4e69f1f9196 --- /dev/null +++ b/ace/Recyclable.h @@ -0,0 +1,78 @@ +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file Strategies.h + * + * $Id$ + * + * @author Doug Schmidt + */ +//============================================================================= +#ifndef ACE_RECYCLABLE_H +#define ACE_RECYCLABLE_H +#include "ace/pre.h" +#include "ace/config-all.h" + + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + + + +/// States of a recyclable object. +enum ACE_Recyclable_State +{ + /// Idle and can be purged. + ACE_RECYCLABLE_IDLE_AND_PURGABLE, + + /// Idle but cannot be purged. + ACE_RECYCLABLE_IDLE_BUT_NOT_PURGABLE, + + /// Can be purged, but is not idle (mostly for debugging). + ACE_RECYCLABLE_PURGABLE_BUT_NOT_IDLE, + + /// Busy (i.e., cannot be recycled or purged). + ACE_RECYCLABLE_BUSY, + + /// Closed. + ACE_RECYCLABLE_CLOSED, + + /// Unknown state. + ACE_RECYCLABLE_UNKNOWN +}; + +/** + * @class ACE_Recyclable + * + * @brief + * + * + */ + +class ACE_Export ACE_Recyclable +{ +public: + /// Destructor. + virtual ~ACE_Recyclable (void); + + // = Set/Get the recyclable bit + ACE_Recyclable_State recycle_state (void) const; + void recycle_state (ACE_Recyclable_State new_state); + +protected: + /// Protected constructor. + ACE_Recyclable (ACE_Recyclable_State initial_state); + + /// Our state. + ACE_Recyclable_State recycle_state_; +}; + + +#if defined (__ACE_INLINE__) +#include "ace/Recyclable.inl" +#endif /* __ACE_INLINE __ */ + +#include "ace/post.h" +#endif /*ACE_RECYCLABLE_STATE_H*/ |