Fixed typos
[ACE_TAO.git] / ACE / ace / Pair_T.h
blob6f60ed76ed7b60a69aa4f873b0a7220dff363dce
1 /* -*- C++ -*- */
3 //=============================================================================
4 /**
5 * @file Pair_T.h
7 * @author Irfan Pyarali <irfan@cs.wustl.edu>
8 */
9 //=============================================================================
12 #ifndef ACE_PAIR_T_H
13 #define ACE_PAIR_T_H
14 #include /**/ "ace/pre.h"
16 #include /**/ "ace/config-all.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
24 /**
25 * @class ACE_Reference_Pair
27 * @brief Defines a pair that only hold references.
29 * Similar to the STL pair (but restricted to holding references
30 * and not copies).
32 template <class T1, class T2>
33 class ACE_Reference_Pair
35 public:
36 // = Traits.
37 typedef T1 first_type;
38 typedef T2 second_type;
40 /// Constructor.
41 ACE_Reference_Pair (T1 &t1, T2 &t2);
43 /// Access first.
44 T1 &first (void) const;
46 /// Access second.
47 T2 &second (void) const;
49 // Compare pairs.
50 bool operator== (const ACE_Reference_Pair<T1, T2> &rhs) const;
52 protected:
53 /// First.
54 T1 &first_;
56 /// Second.
57 T2 &second_;
60 ACE_END_VERSIONED_NAMESPACE_DECL
62 #if defined (__ACE_INLINE__)
63 #include "ace/Pair_T.inl"
64 #endif /* __ACE_INLINE__ */
66 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
67 #include "ace/Pair_T.cpp"
68 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
70 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
71 #pragma implementation ("Pair_T.cpp")
72 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
74 #include /**/ "ace/post.h"
75 #endif /* ACE_PAIR_T_H */