diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2008-03-04 14:51:23 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2008-03-04 14:51:23 +0000 |
commit | 99aa8c60282c7b8072eb35eb9ac815702f5bf586 (patch) | |
tree | bda96bf8c3a4c2875a083d7b16720533c8ffeaf4 /ACE/ace/Node.h | |
parent | c4078c377d74290ebe4e66da0b4975da91732376 (diff) | |
download | ATCD-99aa8c60282c7b8072eb35eb9ac815702f5bf586.tar.gz |
undoing accidental deletion
Diffstat (limited to 'ACE/ace/Node.h')
-rw-r--r-- | ACE/ace/Node.h | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/ACE/ace/Node.h b/ACE/ace/Node.h new file mode 100644 index 00000000000..023086dbb91 --- /dev/null +++ b/ACE/ace/Node.h @@ -0,0 +1,85 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file Node.h + * + * $Id$ + * + * @author Doug Schmidt + */ +//============================================================================= + + +#ifndef ACE_NODE_H +#define ACE_NODE_H +#include /**/ "ace/pre.h" + +#include /**/ "ace/config-all.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +// Forward declarations. +template <class T> class ACE_Unbounded_Set; +template <class T> class ACE_Unbounded_Set_Iterator; +template <class T> class ACE_Unbounded_Set_Const_Iterator; +template <class T> class ACE_Unbounded_Queue; +template <class T> class ACE_Unbounded_Queue_Iterator; +template <class T> class ACE_Unbounded_Queue_Const_Iterator; +template <class T> class ACE_Unbounded_Stack; +template <class T> class ACE_Unbounded_Stack_Iterator; + +/** + * @class ACE_Node + * + * @brief Implementation element in a Queue, Set, and Stack. + */ +template<class T> +class ACE_Node +{ +public: + friend class ACE_Unbounded_Queue<T>; + friend class ACE_Unbounded_Queue_Iterator<T>; + friend class ACE_Unbounded_Queue_Const_Iterator<T>; + friend class ACE_Unbounded_Set<T>; + friend class ACE_Unbounded_Set_Iterator<T>; + friend class ACE_Unbounded_Set_Const_Iterator<T>; + friend class ACE_Unbounded_Stack<T>; + friend class ACE_Unbounded_Stack_Iterator<T>; + + /// This isn't necessary, but it keeps some compilers happy. + ~ACE_Node (void); + +private: + // = Initialization methods + ACE_Node (const T &i, ACE_Node<T> *n); + ACE_Node (ACE_Node<T> *n = 0, int = 0); + ACE_Node (const ACE_Node<T> &n); +private: + /// Not possible + void operator= (const ACE_Node<T> &); + +private: + /// Pointer to next element in the list of ACE_Nodes. + ACE_Node<T> *next_; + + /// Current value of the item in this node. + T item_; +}; + +ACE_END_VERSIONED_NAMESPACE_DECL + +#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) +#include "ace/Node.cpp" +#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ + +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) +#pragma implementation ("Node.cpp") +#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ + +#include /**/ "ace/post.h" +#endif /* ACE_NODE_H */ |