3 //=============================================================================
7 * $Id: Pair_T.h 80826 2008-03-04 14:51:23Z wotte $
9 * @author Irfan Pyarali <irfan@cs.wustl.edu>
11 //=============================================================================
16 #include /**/ "ace/pre.h"
18 #include /**/ "ace/config-all.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
29 * @brief Defines a pair.
31 * Similar to the STL pair.
33 template <class T1
, class T2
>
39 typedef T1 first_type
;
40 typedef T2 second_type
;
42 // = Initialization and termination methods.
44 ACE_Pair (const T1
&t1
,
47 /// Default constructor.
52 const T1
&first (void) const;
55 void first (const T1
&t1
);
59 const T2
&second (void) const;
62 void second (const T2
&t2
);
65 bool operator== (const ACE_Pair
<T1
, T2
> &rhs
) const;
76 * @class ACE_Reference_Pair
78 * @brief Defines a pair that only hold references.
80 * Similar to the STL pair (but restricted to holding references
83 template <class T1
, class T2
>
84 class ACE_Reference_Pair
89 typedef T1 first_type
;
90 typedef T2 second_type
;
92 // = Initialization and termination methods.
94 ACE_Reference_Pair (T1
&t1
,
98 T1
&first (void) const;
101 T2
&second (void) const;
104 bool operator== (const ACE_Reference_Pair
<T1
, T2
> &rhs
) const;
114 ACE_END_VERSIONED_NAMESPACE_DECL
116 #if defined (__ACE_INLINE__)
117 #include "ace/Pair_T.inl"
118 #endif /* __ACE_INLINE__ */
120 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
121 #include "ace/Pair_T.cpp"
122 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
124 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
125 #pragma implementation ("Pair_T.cpp")
126 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
128 #include /**/ "ace/post.h"
129 #endif /* ACE_PAIR_T_H */