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
);
inline OTC_Triple(OTC_Triple<T1,T2,T3> const& theTriple);

ASSIGNMENT

inline OTC_Triple<T1,T2,T3>& operator=(
  OTC_Triple<T1,T2,T3> const& theTriple
);

ACCESS

inline T1 const& first() const;
inline T1& first();
inline T2 const& second() const;
inline T2& second();
inline T3 const& third() const;
inline T3& third();

SEE ALSO

OTC_Single, OTC_Pair

LIBRARY

OTC

AUTHOR(S)

Graham Dumpleton

COPYRIGHT

Copyright 1993 TELSTRA CORPORATION LIMITED