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

Node.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 
00003 //=============================================================================
00004 /**
00005  *  @file Node.h
00006  *
00007  *  $Id: Node.h,v 1.1.1.1 2001/12/04 14:33:04 chad 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 // Forward declarations.
00025 template <class T> class ACE_Unbounded_Set;
00026 template <class T> class ACE_Unbounded_Set_Iterator;
00027 template <class T> class ACE_Unbounded_Set_Const_Iterator;
00028 template <class T> class ACE_Unbounded_Queue;
00029 template <class T> class ACE_Unbounded_Queue_Iterator;
00030 template <class T> class ACE_Unbounded_Stack;
00031 template <class T> class ACE_Unbounded_Stack_Iterator;
00032 
00033 /**
00034  * @class ACE_Node
00035  *
00036  * @brief Implementation element in a Queue, Set, and Stack.
00037  */
00038 template<class T>
00039 class ACE_Node
00040 {
00041 public:
00042   friend class ACE_Unbounded_Queue<T>;
00043   friend class ACE_Unbounded_Queue_Iterator<T>;
00044   friend class ACE_Unbounded_Set<T>;
00045   friend class ACE_Unbounded_Set_Iterator<T>;
00046   friend class ACE_Unbounded_Set_Const_Iterator<T>;
00047   friend class ACE_Unbounded_Stack<T>;
00048   friend class ACE_Unbounded_Stack_Iterator<T>;
00049 
00050 # if ! defined (ACE_HAS_BROKEN_NOOP_DTORS)
00051   /// This isn't necessary, but it keeps some compilers happy.
00052   ~ACE_Node (void);
00053 # endif /* ! defined (ACE_HAS_BROKEN_NOOP_DTORS) */
00054 
00055 private:
00056   // = Initialization methods
00057   ACE_Node (const T &i, ACE_Node<T> *n);
00058   ACE_Node (ACE_Node<T> *n = 0, int = 0);
00059   ACE_Node (const ACE_Node<T> &n);
00060 
00061   /// Pointer to next element in the list of <ACE_Node>s.
00062   ACE_Node<T> *next_;
00063 
00064   /// Current value of the item in this node.
00065   T item_;
00066 };
00067 
00068 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00069 #include "ace/Node.cpp"
00070 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
00071 
00072 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00073 #pragma implementation ("Node.cpp")
00074 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00075 
00076 #include "ace/post.h"
00077 #endif /* ACE_NODE_H */

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