00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 #ifndef ACE_PAIR_T_H
00015 #define ACE_PAIR_T_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 
00023 
00024 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 template <class T1, class T2>
00034 class ACE_Pair
00035 {
00036 public:
00037 
00038   
00039   typedef T1 first_type;
00040   typedef T2 second_type;
00041 
00042   
00043 
00044   ACE_Pair (const T1 &t1,
00045             const T2 &t2);
00046 
00047 
00048   ACE_Pair (void);
00049 
00050 
00051   T1 &first (void);
00052   const T1 &first (void) const;
00053 
00054 
00055   void first (const T1 &t1);
00056 
00057 
00058   T2 &second (void);
00059   const T2 &second (void) const;
00060 
00061 
00062   void second (const T2 &t2);
00063 
00064   
00065   bool operator== (const ACE_Pair<T1, T2> &rhs) const;
00066 
00067 protected:
00068 
00069   T1 first_;
00070 
00071 
00072   T2 second_;
00073 };
00074 
00075 
00076 
00077 
00078 
00079 
00080 
00081 
00082 
00083 template <class T1, class T2>
00084 class ACE_Reference_Pair
00085 {
00086 public:
00087 
00088   
00089   typedef T1 first_type;
00090   typedef T2 second_type;
00091 
00092   
00093 
00094   ACE_Reference_Pair (T1 &t1,
00095                       T2 &t2);
00096 
00097 
00098   T1 &first (void) const;
00099 
00100 
00101   T2 &second (void) const;
00102 
00103   
00104   bool operator== (const ACE_Reference_Pair<T1, T2> &rhs) const;
00105 
00106 protected:
00107 
00108   T1 &first_;
00109 
00110 
00111   T2 &second_;
00112 };
00113 
00114 ACE_END_VERSIONED_NAMESPACE_DECL
00115 
00116 #if defined (__ACE_INLINE__)
00117 #include "ace/Pair_T.inl"
00118 #endif 
00119 
00120 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00121 #include "ace/Pair_T.cpp"
00122 #endif 
00123 
00124 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00125 #pragma implementation ("Pair_T.cpp")
00126 #endif 
00127 
00128 #include  "ace/post.h"
00129 #endif