NAME
OTC_Triple -
Template class for encapsulating three values.
SYNOPSIS
#include <OTC/collctn/triple.hh>
template<class T1, class T2, class T3>
class OTC_Triple : public OTC_MPObject
{
public:
static os_typespec* get_os_typespec();
inline OTC_Triple(
T1 const& theFirst,
T2 const& theSecond,
T3 const& theThird
);
inline OTC_Triple(OTC_Triple<T1,T2,T3> const& theTriple);
inline OTC_Triple<T1,T2,T3>& operator=(
OTC_Triple<T1,T2,T3> const& theTriple
);
inline T1 const& first() const;
inline T1& first();
inline T2 const& second() const;
inline T2& second();
inline T3 const& third() const;
inline T3& third();
};
CLASS TYPE
Concrete
DESCRIPTION
The OTC_Triple class can be used to encapsulate three values.
This facilitates returning of three values from a function.
The class also allows the allocation of triples in the common
memory pool.
INITIALISATION
inline OTC_Triple(
T1 const& theFirst,
T2 const& theSecond,
T3 const& theThird
);
Sets the value of this triple to
theFirst, theSecond and theThird.
inline OTC_Triple(OTC_Triple<T1,T2,T3> const& theTriple);
Sets the value of this triple to that
of theTriple.
ASSIGNMENT
inline OTC_Triple<T1,T2,T3>& operator=(
OTC_Triple<T1,T2,T3> const& theTriple
);
Sets the value of this triple to that
of theTriple.
ACCESS
inline T1 const& first() const;
Returns the first value in this triple.
inline T1& first();
Returns the first value in this triple.
inline T2 const& second() const;
Returns the second value in this triple.
inline T2& second();
Returns the second value in this triple.
inline T3 const& third() const;
Returns the third value in this triple.
inline T3& third();
Returns the third value in this triple.
SEE ALSO
OTC_Single, OTC_Pair
LIBRARY
OTC
AUTHOR(S)
Graham Dumpleton
COPYRIGHT
Copyright 1993 TELSTRA CORPORATION LIMITED