#include <OTC/collctn/pair.hh> template<class T1, class T2> class OTC_Pair : public OTC_MPObject {
public:
static os_typespec* get_os_typespec();
inline OTC_Pair(T1 const& theFirst, T2 const& theSecond);
inline OTC_Pair(OTC_Pair<T1,T2> const& thePair);
inline OTC_Pair<T1,T2>& operator=(OTC_Pair<T1,T2> const& thePair);
inline T1 const& first() const;
inline T1& first();
inline T2 const& second() const;
inline T2& second();
};
OTC_Pair
class can be used to encapsulate a pair of simple
values. This facilitates returning of a pair of values from a
function. The class also allows allocation of a pair of objects
in the common memory pool.
inline OTC_Pair(T1 const& theFirst, T2 const& theSecond);
theFirst
and theSecond
.
inline OTC_Pair(OTC_Pair<T1,T2> const& thePair);
thePair
.
inline OTC_Pair<T1,T2>& operator=(OTC_Pair<T1,T2> const& thePair);
thePair
.
inline T1 const& first() const;
inline T1& first();
inline T2 const& second() const;
inline T2& second();
OTC_Single
, OTC_Triple