Intrusive_List_Node.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file Intrusive_List_Node.h
00006  *
00007  *  Intrusive_List_Node.h,v 4.4 2005/10/28 16:14:52 ossama Exp
00008  *
00009  *  @author Carlos O'Ryan <coryan@uci.edu>
00010  */
00011 //=============================================================================
00012 
00013 #ifndef ACE_INTRUSIVE_LIST_NODE_H
00014 #define ACE_INTRUSIVE_LIST_NODE_H
00015 #include /**/ "ace/pre.h"
00016 
00017 #include "ace/config-all.h"
00018 
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 # pragma once
00021 #endif /* ACE_LACKS_PRAGMA_ONCE */
00022 
00023 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00024 
00025 /**
00026  * @class ACE_Intrusive_List_Node
00027  *
00028  * @brief Implement the requirements for ACE_Intrusive_List
00029  *
00030  * The class should be used as follows:
00031  *
00032  * class My_Object : public ACE_Intrusive_List_Node<My_Object> {<BR>
00033  * ....<BR>
00034  * };<BR>
00035  *
00036  * However, ACE is supported on platforms that would surely get
00037  * confused using such templates, the class is provided as a helper
00038  * for our lucky users that only need portability to modern C++
00039  * compilers.
00040  *
00041  */
00042 template <class T>
00043 class ACE_Intrusive_List_Node
00044 {
00045 public:
00046   /** @name Accesors and modifiers to the next and previous pointers
00047    *
00048    */
00049   //@{
00050   T *prev (void) const;
00051   void prev (T *);
00052   T *next (void) const;
00053   void next (T *);
00054   //@}
00055 
00056 protected:
00057   /// Constructor
00058   /**
00059    * The constructor is protected, because only derived classes should
00060    * be instantiated.
00061    */
00062   ACE_Intrusive_List_Node (void);
00063 
00064 private:
00065   /// Head and tail of the list
00066   T *prev_;
00067   T *next_;
00068 };
00069 
00070 ACE_END_VERSIONED_NAMESPACE_DECL
00071 
00072 #if defined (__ACE_INLINE__)
00073 #include "ace/Intrusive_List_Node.inl"
00074 #endif /* __ACE_INLINE__ */
00075 
00076 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00077 #include "ace/Intrusive_List_Node.cpp"
00078 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
00079 
00080 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00081 #pragma implementation ("Intrusive_List_Node.cpp")
00082 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00083 
00084 #include /**/ "ace/post.h"
00085 #endif /* ACE_INTRUSIVE_LIST_NODE_H */

Generated on Thu Nov 9 09:41:52 2006 for ACE by doxygen 1.3.6