Node.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file Node.h
00006  *
00007  *  $Id: Node.h 81624 2008-05-06 17:14:57Z wotte $
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 C> class ACE_Unbounded_Set_Ex;
00028 template <class T, class C> class ACE_Unbounded_Set_Ex_Iterator;
00029 template <class T, class C> class ACE_Unbounded_Set_Ex_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, class C = void>
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_Ex<T, C>;
00049   friend class ACE_Unbounded_Set_Ex_Iterator<T, C>;
00050   friend class ACE_Unbounded_Set_Ex_Const_Iterator<T, C>;
00051   friend class ACE_Unbounded_Stack<T>;
00052   friend class ACE_Unbounded_Stack_Iterator<T>;
00053 
00054   /// This isn't necessary, but it keeps some compilers happy.
00055   ~ACE_Node (void);
00056 
00057 private:
00058   // = Initialization methods
00059   ACE_Node (const T &i, ACE_Node<T, C> *n);
00060   ACE_Node (ACE_Node<T, C> *n = 0, int = 0);
00061   ACE_Node (const ACE_Node<T, C> &n);
00062 private:
00063   /// Not possible
00064   void operator= (const ACE_Node<T, C> &);
00065 
00066 private:
00067   /// Pointer to next element in the list of ACE_Nodes.
00068   ACE_Node<T, C> *next_;
00069 
00070   /// Current value of the item in this node.
00071   T item_;
00072 };
00073 
00074 ACE_END_VERSIONED_NAMESPACE_DECL
00075 
00076 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00077 #include "ace/Node.cpp"
00078 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
00079 
00080 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00081 #pragma implementation ("Node.cpp")
00082 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00083 
00084 #include /**/ "ace/post.h"
00085 #endif /* ACE_NODE_H */

Generated on Tue Feb 2 17:18:41 2010 for ACE by  doxygen 1.4.7