00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Side Effects Software Inc 00008 * 477 Richmond Street West 00009 * Toronto, Ontario 00010 * Canada M5V 3E7 00011 * 416-504-9876 00012 * 00013 * NAME: UT_Pair.h ( UT Library, C++) 00014 * 00015 * COMMENTS: Simple templated pair of variables. 00016 */ 00017 00018 #ifndef __UT_Pair__ 00019 #define __UT_Pair__ 00020 00021 #ifdef WIN32 00022 #pragma warning(disable:4251) 00023 #pragma warning(disable:4275) 00024 #endif 00025 00026 template <class T1, class T2> 00027 class UT_Pair { 00028 public: 00029 UT_Pair() 00030 : myFirst(T1()), mySecond(T2()) { } 00031 UT_Pair(T1 v1, T2 v2) 00032 : myFirst(v1), mySecond(v2) { } 00033 UT_Pair(const UT_Pair<T1, T2> &p) 00034 : myFirst(p.myFirst), mySecond(p.mySecond) { } 00035 00036 int operator==(const UT_Pair<T1, T2> &p) 00037 { 00038 return ((myFirst == p.myFirst) && 00039 (mySecond == p.mySecond)); 00040 } 00041 00042 T1 myFirst; 00043 T2 mySecond; 00044 }; 00045 00046 /// Common types 00047 typedef UT_Pair<int,int> UT_IntPair; 00048 00049 #endif 00050
1.5.9