00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file Unbounded_Set.h 00006 * 00007 * $Id: Unbounded_Set.h 81642 2008-05-07 19:30:35Z shuston $ 00008 * 00009 * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> 00010 */ 00011 //============================================================================= 00012 00013 #ifndef ACE_UNBOUNDED_SET_H 00014 #define ACE_UNBOUNDED_SET_H 00015 #include /**/ "ace/pre.h" 00016 00017 #include "ace/Unbounded_Set_Ex.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 class ACE_Allocator; 00026 00027 /** 00028 * @struct ACE_Unbounded_Set_Default_Comparator 00029 * @brief Simple comparator that evaluates equality using == operator. 00030 */ 00031 template<typename T> 00032 struct ACE_Unbounded_Set_Default_Comparator 00033 { 00034 bool operator() (const T&lhs, const T&rhs) const; 00035 }; 00036 00037 template<typename T> 00038 class ACE_Unbounded_Set; 00039 00040 /** 00041 * @class ACE_Unbounded_Set_Iterator 00042 * @brief Compatibility wrapper for ACE_Unbounded_Set_Ex_Iterator. 00043 */ 00044 template <typename T> 00045 class ACE_Unbounded_Set_Iterator : public 00046 ACE_Unbounded_Set_Ex_Iterator<T, ACE_Unbounded_Set_Default_Comparator<T> > 00047 { 00048 public: 00049 typedef ACE_Unbounded_Set_Ex_Iterator<T, ACE_Unbounded_Set_Default_Comparator<T> > base_type; 00050 00051 // = Initialization method. 00052 ACE_Unbounded_Set_Iterator (ACE_Unbounded_Set<T> &s, bool end = false); 00053 00054 ACE_Unbounded_Set_Iterator (const base_type &s); 00055 }; 00056 00057 /** 00058 * @class ACE_Unbounded_Set_Const_Iterator 00059 * @brief Compatibility wrapper for ACE_Unbounded_Set_Ex_Const_Iterator. 00060 */ 00061 template <class T> 00062 class ACE_Unbounded_Set_Const_Iterator : public 00063 ACE_Unbounded_Set_Ex_Const_Iterator<T, ACE_Unbounded_Set_Default_Comparator<T> > 00064 { 00065 public: 00066 00067 typedef ACE_Unbounded_Set_Ex_Const_Iterator<T, ACE_Unbounded_Set_Default_Comparator<T> > base_type; 00068 00069 // = Initialization method. 00070 ACE_Unbounded_Set_Const_Iterator (const ACE_Unbounded_Set<T> &s, 00071 bool end = false); 00072 00073 ACE_Unbounded_Set_Const_Iterator (const base_type &s); 00074 }; 00075 00076 /** 00077 * @class ACE_Unbounded_Set 00078 * @brief Compatibility wrapper for ACE_Unbounded_Set_Ex. 00079 */ 00080 template<typename T> 00081 class ACE_Unbounded_Set : public 00082 ACE_Unbounded_Set_Ex<T, ACE_Unbounded_Set_Default_Comparator<T> > 00083 { 00084 public: 00085 ACE_Unbounded_Set (ACE_Allocator *alloc = 0); 00086 }; 00087 00088 ACE_END_VERSIONED_NAMESPACE_DECL 00089 00090 #if defined (__ACE_INLINE__) 00091 #include "ace/Unbounded_Set.inl" 00092 #endif /* __ACE_INLINE__ */ 00093 00094 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) 00095 #include "ace/Unbounded_Set.cpp" 00096 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ 00097 00098 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) 00099 #pragma implementation ("Unbounded_Set.cpp") 00100 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ 00101 00102 #include /**/ "ace/post.h" 00103 #endif /* ACE_UNBOUNDED_SET_H */