Added headers
[tpot/pegasus/.git] / src / Pegasus / Common / Pair.h
1 //%/////////////////////////////////////////////////////////////////////////////\r
2 //\r
3 // Copyright (c) 2000, 2001 The Open group, BMC Software, Tivoli Systems, IBM\r
4 //\r
5 // Permission is hereby granted, free of charge, to any person obtaining a copy\r
6 // of this software and associated documentation files (the "Software"), to \r
7 // deal in the Software without restriction, including without limitation the \r
8 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or \r
9 // sell copies of the Software, and to permit persons to whom the Software is\r
10 // furnished to do so, subject to the following conditions:\r
11 // \r
12 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN \r
13 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED\r
14 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT\r
15 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR \r
16 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT \r
17 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN \r
18 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
19 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
20 //\r
21 //==============================================================================\r
22 //\r
23 // Author: Mike Brasher (mbrasher@bmc.com)\r
24 //\r
25 // Modified By:\r
26 //\r
27 //%/////////////////////////////////////////////////////////////////////////////\r
28 \r
29 #ifndef Pegasus_Pair_h\r
30 #define Pegasus_Pair_h\r
31 \r
32 #include <Pegasus/Common/Config.h>\r
33 \r
34 PEGASUS_NAMESPACE_BEGIN\r
35 \r
36 template<class T, class U>\r
37 struct Pair\r
38 {\r
39     T first;\r
40     U second;\r
41 \r
42     Pair() : first(), second()\r
43     { \r
44 \r
45     }\r
46 \r
47     Pair(const Pair<T,U>& x) : first(x.first), second(x.second)\r
48     { \r
49 \r
50     }\r
51 \r
52     Pair(const T& first_, const U& second_) : first(first_), second(second_)\r
53     {\r
54 \r
55     }\r
56 \r
57     Pair<T,U>& operator=(const Pair<T,U>& x)\r
58     {\r
59         first = x.first;\r
60         second = x.second;\r
61         return *this;\r
62     }\r
63 };\r
64 \r
65 PEGASUS_NAMESPACE_END\r
66 \r
67 #endif /* Pegasus_Pair_h */\r