Node.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file Node.h
00006  *
00007  *  Node.h,v 4.11 2006/02/10 10:07:22 jwillemsen Exp
00008  *
00009  *  @author Doug Schmidt
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef ACE_NODE_H
00015 #define ACE_NODE_H
00016 #include /**/ "ace/pre.h"
00017 
00018 #include "ace/config-all.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00025 
00026 // Forward declarations.
00027 template <class T> class ACE_Unbounded_Set;
00028 template <class T> class ACE_Unbounded_Set_Iterator;
00029 template <class T> class ACE_Unbounded_Set_Const_Iterator;
00030 template <class T> class ACE_Unbounded_Queue;
00031 template <class T> class ACE_Unbounded_Queue_Iterator;
00032 template <class T> class ACE_Unbounded_Queue_Const_Iterator;
00033 template <class T> class ACE_Unbounded_Stack;
00034 template <class T> class ACE_Unbounded_Stack_Iterator;
00035 
00036 /**
00037  * @class ACE_Node
00038  *
00039  * @brief Implementation element in a Queue, Set, and Stack.
00040  */
00041 template<class T>
00042 class ACE_Node
00043 {
00044 public:
00045   friend class ACE_Unbounded_Queue<T>;
00046   friend class ACE_Unbounded_Queue_Iterator<T>;
00047   friend class ACE_Unbounded_Queue_Const_Iterator<T>;
00048   friend class ACE_Unbounded_Set<T>;
00049   friend class ACE_Unbounded_Set_Iterator<T>;
00050   friend class ACE_Unbounded_Set_Const_Iterator<T>;
00051   friend class ACE_Unbounded_Stack<T>;
00052   friend class ACE_Unbounded_Stack_Iterator<T>;
00053 
00054 # if ! defined (ACE_HAS_BROKEN_NOOP_DTORS)
00055   /// This isn't necessary, but it keeps some compilers happy.
00056   ~ACE_Node (void);
00057 # endif /* ! defined (ACE_HAS_BROKEN_NOOP_DTORS) */
00058 
00059 private:
00060   // = Initialization methods
00061   ACE_Node (const T &i, ACE_Node<T> *n);
00062   ACE_Node (ACE_Node<T> *n = 0, int = 0);
00063   ACE_Node (const ACE_Node<T> &n);
00064 private:
00065   /// Not possible
00066   void operator= (const ACE_Node<T> &);
00067 
00068 private:
00069   /// Pointer to next element in the list of <ACE_Node>s.
00070   ACE_Node<T> *next_;
00071 
00072   /// Current value of the item in this node.
00073   T item_;
00074 };
00075 
00076 ACE_END_VERSIONED_NAMESPACE_DECL
00077 
00078 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00079 #include "ace/Node.cpp"
00080 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
00081 
00082 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00083 #pragma implementation ("Node.cpp")
00084 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00085 
00086 #include /**/ "ace/post.h"
00087 #endif /* ACE_NODE_H */

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