Recyclable.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file   Recyclable.h
00006  *
00007  *  Recyclable.h,v 4.6 2005/10/28 16:14:55 ossama Exp
00008  *
00009  *  @author Doug Schmidt
00010  */
00011 //=============================================================================
00012 #ifndef ACE_RECYCLABLE_H
00013 #define ACE_RECYCLABLE_H
00014 #include /**/ "ace/pre.h"
00015 
00016 #include "ace/ACE_export.h"
00017 
00018 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00019 # pragma once
00020 #endif /* ACE_LACKS_PRAGMA_ONCE */
00021 
00022 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00023 
00024 /// States of a recyclable object.
00025 enum ACE_Recyclable_State
00026 {
00027   /// Idle and can be purged.
00028   ACE_RECYCLABLE_IDLE_AND_PURGABLE,
00029 
00030   /// Idle but cannot be purged.
00031   ACE_RECYCLABLE_IDLE_BUT_NOT_PURGABLE,
00032 
00033   /// Can be purged, but is not idle (mostly for debugging).
00034   ACE_RECYCLABLE_PURGABLE_BUT_NOT_IDLE,
00035 
00036   /// Busy (i.e., cannot be recycled or purged).
00037   ACE_RECYCLABLE_BUSY,
00038 
00039   /// Closed.
00040   ACE_RECYCLABLE_CLOSED,
00041 
00042   /// Unknown state.
00043   ACE_RECYCLABLE_UNKNOWN
00044 };
00045 
00046 /**
00047  * @class ACE_Recyclable
00048  *
00049  * @brief
00050  *
00051  *
00052  */
00053 class ACE_Export ACE_Recyclable
00054 {
00055 public:
00056   /// Destructor.
00057   virtual ~ACE_Recyclable (void);
00058 
00059   /// Get the recyclable bit
00060   ACE_Recyclable_State recycle_state (void) const;
00061 
00062   /// Set the recyclable bit
00063   void recycle_state (ACE_Recyclable_State new_state);
00064 
00065 protected:
00066 
00067   /// Constructor.
00068   ACE_Recyclable (ACE_Recyclable_State initial_state);
00069 
00070 protected:
00071 
00072   /// Our state.
00073   ACE_Recyclable_State recycle_state_;
00074 };
00075 
00076 ACE_END_VERSIONED_NAMESPACE_DECL
00077 
00078 #if defined (__ACE_INLINE__)
00079 #include "ace/Recyclable.inl"
00080 #endif /* __ACE_INLINE __ */
00081 
00082 #include /**/ "ace/post.h"
00083 #endif /*ACE_RECYCLABLE_STATE_H*/

Generated on Thu Nov 9 09:42:01 2006 for ACE by doxygen 1.3.6