Files
TCPlayerbotCore/dep/ACE_wrappers/ace/Recyclable.h
T

81 lines
1.6 KiB
C++
Raw Normal View History

// -*- C++ -*-
2009-10-17 15:51:44 -07:00
//=============================================================================
/**
* @file Recyclable.h
*
* $Id: Recyclable.h 80826 2008-03-04 14:51:23Z wotte $
*
* @author Doug Schmidt
*/
//=============================================================================
#ifndef ACE_RECYCLABLE_H
#define ACE_RECYCLABLE_H
#include /**/ "ace/pre.h"
2009-10-17 15:51:44 -07:00
#include /**/ "ace/ACE_export.h"
2009-10-17 15:51:44 -07:00
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
2009-10-17 15:51:44 -07:00
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
2009-10-17 15:51:44 -07:00
/// States of a recyclable object.
enum ACE_Recyclable_State
{
/// Idle and can be purged.
ACE_RECYCLABLE_IDLE_AND_PURGABLE,
2009-10-17 15:51:44 -07:00
/// Idle but cannot be purged.
ACE_RECYCLABLE_IDLE_BUT_NOT_PURGABLE,
2009-10-17 15:51:44 -07:00
/// Can be purged, but is not idle (mostly for debugging).
ACE_RECYCLABLE_PURGABLE_BUT_NOT_IDLE,
2009-10-17 15:51:44 -07:00
/// Busy (i.e., cannot be recycled or purged).
ACE_RECYCLABLE_BUSY,
2009-10-17 15:51:44 -07:00
/// Closed.
ACE_RECYCLABLE_CLOSED,
2009-10-17 15:51:44 -07:00
/// Unknown state.
ACE_RECYCLABLE_UNKNOWN
};
2009-10-17 15:51:44 -07:00
/**
* @class ACE_Recyclable
*/
class ACE_Export ACE_Recyclable
{
public:
/// Destructor.
virtual ~ACE_Recyclable (void);
2009-10-17 15:51:44 -07:00
/// Get the recyclable bit
ACE_Recyclable_State recycle_state (void) const;
2009-10-17 15:51:44 -07:00
/// Set the recyclable bit
void recycle_state (ACE_Recyclable_State new_state);
2009-10-17 15:51:44 -07:00
protected:
2009-10-17 15:51:44 -07:00
/// Constructor.
ACE_Recyclable (ACE_Recyclable_State initial_state);
2009-10-17 15:51:44 -07:00
protected:
2009-10-17 15:51:44 -07:00
/// Our state.
ACE_Recyclable_State recycle_state_;
};
2009-10-17 15:51:44 -07:00
ACE_END_VERSIONED_NAMESPACE_DECL
2009-10-17 15:51:44 -07:00
#if defined (__ACE_INLINE__)
#include "ace/Recyclable.inl"
#endif /* __ACE_INLINE __ */
2009-10-17 15:51:44 -07:00
#include /**/ "ace/post.h"
#endif /*ACE_RECYCLABLE_STATE_H*/
2009-02-17 20:07:49 -06:00