Ocean
Ocean::Triple< T1, T2, T3 > Class Template Reference

This class implements a triple object able to hold three individual elements. More...

Public Member Functions

 Triple ()
 Creates a new triple object with default values. More...
 
 Triple (const T1 &first, const T2 &second=T1(), const T3 &third=T3())
 Creates a new triple object with three elements. More...
 
const T1 & first () const
 Returns the first element of this triple object. More...
 
T1 & first ()
 Returns the first element of this triple object. More...
 
const T2 & second () const
 Returns the second element of this triple object. More...
 
T2 & second ()
 Returns the second element of this triple object. More...
 
const T3 & third () const
 Returns the third element of this triple object. More...
 
T3 & third ()
 Returns the third element of this triple object. More...
 
bool operator== (const Triple< T1, T2, T3 > &triple) const
 Returns whether two triples are equal. More...
 
bool operator!= (const Triple< T1, T2, T3 > &triple) const
 Returns whether two triples are not equal. More...
 
bool operator< (const Triple< T1, T2, T3 > &triple) const
 Returns whether this triple object is 'lesser' than a second triple object. More...
 

Private Attributes

T1 tripleFirst
 First element of this triple. More...
 
T2 tripleSecond
 Second element of this triple. More...
 
T3 tripleThird
 Third element of this triple. More...
 

Detailed Description

template<typename T1, typename T2, typename T3>
class Ocean::Triple< T1, T2, T3 >

This class implements a triple object able to hold three individual elements.

Template Parameters
T1Data type of the first element of the triple object
T2Data type of the second element of the triple object
T3Data type of the third element of the triple object

Constructor & Destructor Documentation

◆ Triple() [1/2]

template<typename T1 , typename T2 , typename T3 >
Ocean::Triple< T1, T2, T3 >::Triple
inline

Creates a new triple object with default values.

◆ Triple() [2/2]

template<typename T1 , typename T2 , typename T3 >
Ocean::Triple< T1, T2, T3 >::Triple ( const T1 &  first,
const T2 &  second = T1(),
const T3 &  third = T3() 
)
inlineexplicit

Creates a new triple object with three elements.

Parameters
firstFirst element
secondSecond element
thirdThird element

Member Function Documentation

◆ first() [1/2]

template<typename T1 , typename T2 , typename T3 >
T1 & Ocean::Triple< T1, T2, T3 >::first
inline

Returns the first element of this triple object.

Returns
First element

◆ first() [2/2]

template<typename T1 , typename T2 , typename T3 >
const T1 & Ocean::Triple< T1, T2, T3 >::first
inline

Returns the first element of this triple object.

Returns
First element

◆ operator!=()

template<typename T1 , typename T2 , typename T3 >
bool Ocean::Triple< T1, T2, T3 >::operator!= ( const Triple< T1, T2, T3 > &  triple) const
inline

Returns whether two triples are not equal.

Parameters
tripleSecond triple object
Returns
True, if so

◆ operator<()

template<typename T1 , typename T2 , typename T3 >
bool Ocean::Triple< T1, T2, T3 >::operator< ( const Triple< T1, T2, T3 > &  triple) const
inline

Returns whether this triple object is 'lesser' than a second triple object.

Parameters
tripleThe second triple object to be used for comparison
Returns
True, if so

◆ operator==()

template<typename T1 , typename T2 , typename T3 >
bool Ocean::Triple< T1, T2, T3 >::operator== ( const Triple< T1, T2, T3 > &  triple) const
inline

Returns whether two triples are equal.

Parameters
tripleSecond triple object
Returns
True, if so

◆ second() [1/2]

template<typename T1 , typename T2 , typename T3 >
T2 & Ocean::Triple< T1, T2, T3 >::second
inline

Returns the second element of this triple object.

Returns
Second element

◆ second() [2/2]

template<typename T1 , typename T2 , typename T3 >
const T2 & Ocean::Triple< T1, T2, T3 >::second
inline

Returns the second element of this triple object.

Returns
First element

◆ third() [1/2]

template<typename T1 , typename T2 , typename T3 >
T3 & Ocean::Triple< T1, T2, T3 >::third
inline

Returns the third element of this triple object.

Returns
Third element

◆ third() [2/2]

template<typename T1 , typename T2 , typename T3 >
const T3 & Ocean::Triple< T1, T2, T3 >::third
inline

Returns the third element of this triple object.

Returns
Third element

Field Documentation

◆ tripleFirst

template<typename T1 , typename T2 , typename T3 >
T1 Ocean::Triple< T1, T2, T3 >::tripleFirst
private

First element of this triple.

◆ tripleSecond

template<typename T1 , typename T2 , typename T3 >
T2 Ocean::Triple< T1, T2, T3 >::tripleSecond
private

Second element of this triple.

◆ tripleThird

template<typename T1 , typename T2 , typename T3 >
T3 Ocean::Triple< T1, T2, T3 >::tripleThird
private

Third element of this triple.


The documentation for this class was generated from the following file: