00001
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef __pair__
00037 # define __pair__
00038
00039
00040 #include "Memory.hpp"
00041
00042
00043
00044
00045
00046 template <class C, class D, ClassID cid>
00047 class Pair
00048 # if DEBUG_PREPRO
00049 : public Memory <cid>
00050 # endif
00051 {
00052 public:
00053
00054
00055 inline
00056 Pair ( C left, D right )
00057 :
00058 _left ( left ),
00059 _right ( right ) {}
00060
00061 inline
00062 Pair () {}
00063
00064
00065 inline C left () const { return _left; }
00066 inline D right () const { return _right; }
00067
00068
00069 inline void left ( C lft ) { _left = lft; }
00070 inline void right ( D rht ) { _right = rht; }
00071
00072
00073 inline
00074 bool operator == ( Pair& rhs ) const
00075 { return left() == rhs.left() &&
00076 right() == rhs.right(); }
00077
00078 protected:
00079 C _left;
00080 D _right;
00081 };
00082
00083
00084
00085
00086
00087 #endif
00088
00089