Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Recyclable.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file   Recyclable.h
00006  *
00007  *  $Id: Recyclable.h,v 1.1.1.1 2003/02/21 18:36:32 chad 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 
00023 /// States of a recyclable object.
00024 enum ACE_Recyclable_State
00025 {
00026   /// Idle and can be purged.
00027   ACE_RECYCLABLE_IDLE_AND_PURGABLE,
00028 
00029   /// Idle but cannot be purged.
00030   ACE_RECYCLABLE_IDLE_BUT_NOT_PURGABLE,
00031 
00032   /// Can be purged, but is not idle (mostly for debugging).
00033   ACE_RECYCLABLE_PURGABLE_BUT_NOT_IDLE,
00034 
00035   /// Busy (i.e., cannot be recycled or purged).
00036   ACE_RECYCLABLE_BUSY,
00037 
00038   /// Closed.
00039   ACE_RECYCLABLE_CLOSED,
00040 
00041   /// Unknown state.
00042   ACE_RECYCLABLE_UNKNOWN
00043 };
00044 
00045 /**
00046  * @class ACE_Recyclable
00047  *
00048  * @brief
00049  *
00050  *
00051  */
00052 class ACE_Export ACE_Recyclable
00053 {
00054 public:
00055   /// Destructor.
00056   virtual ~ACE_Recyclable (void);
00057 
00058   /// Get the recyclable bit
00059   ACE_Recyclable_State recycle_state (void) const;
00060 
00061   /// Set the recyclable bit
00062   void recycle_state (ACE_Recyclable_State new_state);
00063 
00064 protected:
00065   /// Protected constructor.
00066   ACE_Recyclable (ACE_Recyclable_State initial_state);
00067 
00068   /// Our state.
00069   ACE_Recyclable_State recycle_state_;
00070 };
00071 
00072 
00073 #if defined (__ACE_INLINE__)
00074 #include "ace/Recyclable.inl"
00075 #endif /* __ACE_INLINE __ */
00076 
00077 #include "ace/post.h"
00078 #endif /*ACE_RECYCLABLE_STATE_H*/

Generated on Mon Jun 16 11:21:02 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002