Loading...
Searching...
No Matches
BALL::Triple< T1, T2, T3 > Class Template Reference
Foundation Classes » General datastructures » Miscellaneous

`#include <BALL/DATATYPE/triple.h>`

## Public Member Functions

Constructors and Destructors
| Triple ()
| Triple (const Triple &triple, bool deep=true)
| Triple (const T1 &new_first, const T2 &new_second, const T3 &new_third)
virtual | ~Triple ()
virtual void | clear ()
Assignment
const Triple & | operator= (const Triple &triple)
void | set (const T1 &t1, const T2 &t2, const T3 &t3)
void | get (T1 &first, T2 &second, T3 &third) const
Predicates
bool | operator== (const Triple &triple) const
bool | operator!= (const Triple &triple) const
bool | operator< (const Triple &triple) const
bool | operator<= (const Triple &triple) const
bool | operator>= (const Triple &triple) const
bool | operator> (const Triple &triple) const

## Public Attributes

Attributes
T1 | first
T2 | second
T3 | third

## Detailed Description

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

Triple Class. This template class is used to represent triples of arbitrary types (like the STL type pair).

See also
  Quadruple

Definition at line 24 of file triple.h.

## Constructor & Destructor Documentation

## Triple() [1/3]

template<typename T1, typename T2, typename T3>

BALL::Triple< T1, T2, T3 >::Triple | ( |  | ) |

Default constructor. Creates a new Triple object.

Definition at line 137 of file triple.h.

## Triple() [2/3]

template<typename T1, typename T2, typename T3>

BALL::Triple< T1, T2, T3 >::Triple | ( | const Triple< T1, T2, T3 > & | triple,
|  | bool | deep = true )

Copy constructor. Creates a new Triple object from another.

Parameters

  triple | the Triple object to be copied
  deep | not used (needed for a consistent interface only)

Definition at line 142 of file triple.h.

## Triple() [3/3]

template<typename T1, typename T2, typename T3>

BALL::Triple< T1, T2, T3 >::Triple | ( | const T1 & | new_first,
|  | const T2 & | new_second,
|  | const T3 & | new_third )

Detailed constructor. Creates a new Triple object from the triple's three members.

Parameters

  new_first | the first triple member
  new_second | the second triple member
  new_third | the third triple member

Definition at line 150 of file triple.h.

## ~Triple()

template<typename T1, typename T2, typename T3>

BALL::Triple< T1, T2, T3 >::~Triple | ( |  | ) |

virtual

Destructor. Destructs the Triple object.

Definition at line 159 of file triple.h.

## Member Function Documentation

## clear()

template<typename T1, typename T2, typename T3>

BALL_INLINE void BALL::Triple< T1, T2, T3 >::clear | ( |  | ) |

virtual

Clear method.

Definition at line 216 of file triple.h.

## get()

template<typename T1, typename T2, typename T3>

BALL_INLINE void BALL::Triple< T1, T2, T3 >::get | ( | T1 & | first,
|  | T2 & | second,
|  | T3 & | third ) const

Definition at line 186 of file triple.h.

## operator!=()

template<typename T1, typename T2, typename T3>

BALL_INLINE bool BALL::Triple< T1, T2, T3 >::operator!= | ( | const Triple< T1, T2, T3 > & | triple | ) | const

Inequality operator

Definition at line 206 of file triple.h.

## operator<()

template<typename T1, typename T2, typename T3>

BALL_INLINE bool BALL::Triple< T1, T2, T3 >::operator< | ( | const Triple< T1, T2, T3 > & | triple | ) | const

Lesser than operator. One instance is lesser than an other if all members from first to third are equal or less than the members of the other instance and at least threeth is less.

Definition at line 225 of file triple.h.

## operator<=()

template<typename T1, typename T2, typename T3>

BALL_INLINE bool BALL::Triple< T1, T2, T3 >::operator<= | ( | const Triple< T1, T2, T3 > & | triple | ) | const

Lesser or equal than operator.

Definition at line 235 of file triple.h.

## operator=()

template<typename T1, typename T2, typename T3>

BALL_INLINE const Triple< T1, T2, T3 > & BALL::Triple< T1, T2, T3 >::operator= | ( | const Triple< T1, T2, T3 > & | triple | ) |

Assignment operator. Assigns the contents of a triple to another.

Parameters

  triple | the triple to be copied

Definition at line 174 of file triple.h.

## operator==()

template<typename T1, typename T2, typename T3>

BALL_INLINE bool BALL::Triple< T1, T2, T3 >::operator== | ( | const Triple< T1, T2, T3 > & | triple | ) | const

Equality operator Two instances are equal if they have the same members.

Definition at line 196 of file triple.h.

## operator>()

template<typename T1, typename T2, typename T3>

BALL_INLINE bool BALL::Triple< T1, T2, T3 >::operator> | ( | const Triple< T1, T2, T3 > & | triple | ) | const

Greater than operator.

Definition at line 257 of file triple.h.

## operator>=()

template<typename T1, typename T2, typename T3>

BALL_INLINE bool BALL::Triple< T1, T2, T3 >::operator>= | ( | const Triple< T1, T2, T3 > & | triple | ) | const

Greater or equal than operator.

Definition at line 246 of file triple.h.

## set()

template<typename T1, typename T2, typename T3>

BALL_INLINE void BALL::Triple< T1, T2, T3 >::set | ( | const T1 & | t1,
|  | const T2 & | t2,
|  | const T3 & | t3 )

Definition at line 165 of file triple.h.

## Member Data Documentation

## first

template<typename T1, typename T2, typename T3>

T1 BALL::Triple< T1, T2, T3 >::first

The first triple member

Definition at line 124 of file triple.h.

## second

template<typename T1, typename T2, typename T3>

T2 BALL::Triple< T1, T2, T3 >::second

The second triple member

Definition at line 128 of file triple.h.

## third

template<typename T1, typename T2, typename T3>

T3 BALL::Triple< T1, T2, T3 >::third

The third triple member

Definition at line 132 of file triple.h.