Mantid
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Mantid::Triple< T > Class Template Reference

Triple of three identical types. More...

#include <Triple.h>

Public Member Functions

bool operator!= (const Triple< T > &) const
 Operator!= any component is not equal. More...
 
bool operator< (const Triple< T > &) const
 Operator< takes first to last precidence. More...
 
Triple< T > & operator= (const Triple< T > &)
 Standard Assignment Constructor. More...
 
bool operator== (const Triple< T > &) const
 Operator== all components must be equal. More...
 
bool operator> (const Triple< T > &) const
 Operator> takes first to last precidence. More...
 
T & operator[] (const int A)
 Accessor Reference Function. More...
 
operator[] (const int A) const
 Accessor Value Function. More...
 
 Triple ()
 Standard Constructor. More...
 
 Triple (const T &, const T &, const T &)
 Constructor from a 3 value input. More...
 
 Triple (const Triple< T > &)
 Standard Copy Constructor. More...
 
 ~Triple ()
 Standard Destructor. More...
 

Public Attributes

first
 First item. More...
 
second
 Second item. More...
 
third
 Third item. More...
 

Detailed Description

template<typename T>
class Mantid::Triple< T >

Triple of three identical types.

Author
S. Ansell
Date
April 2005
Version
1.0

Class maintians a type first/second/third triple similar to std::pair except all are identical

Definition at line 22 of file Triple.h.

Constructor & Destructor Documentation

◆ Triple() [1/3]

template<typename T >
Mantid::Triple< T >::Triple

Standard Constructor.

Definition at line 13 of file Triple.cpp.

◆ Triple() [2/3]

template<typename T >
Mantid::Triple< T >::Triple ( const Triple< T > &  A)

Standard Copy Constructor.

Parameters
A:: Triple Item to copy

Definition at line 21 of file Triple.cpp.

◆ Triple() [3/3]

template<typename T >
Mantid::Triple< T >::Triple ( const T &  A,
const T &  B,
const T &  C 
)

Constructor from a 3 value input.

Parameters
A:: first item
B:: second item
C:: third item

Definition at line 30 of file Triple.cpp.

◆ ~Triple()

template<typename T >
Mantid::Triple< T >::~Triple ( )
default

Standard Destructor.

References std::operator!=(), std::operator<(), std::operator==(), and std::operator>().

Member Function Documentation

◆ operator!=()

template<typename T >
bool Mantid::Triple< T >::operator!= ( const Triple< T > &  A) const

Operator!= any component is not equal.

Parameters
A:: Other object to compare
Returns
this!=A

Definition at line 73 of file Triple.cpp.

◆ operator<()

template<typename T >
bool Mantid::Triple< T >::operator< ( const Triple< T > &  A) const

Operator< takes first to last precidence.

Parameters
A:: Triple to compare
Returns
this < A

Definition at line 84 of file Triple.cpp.

◆ operator=()

template<typename T >
Triple< T > & Mantid::Triple< T >::operator= ( const Triple< T > &  A)

Standard Assignment Constructor.

Parameters
A:: Triple Item to copy
Returns
*this

Definition at line 41 of file Triple.cpp.

References Mantid::Triple< T >::first, Mantid::Triple< T >::second, and Mantid::Triple< T >::third.

◆ operator==()

template<typename T >
bool Mantid::Triple< T >::operator== ( const Triple< T > &  A) const

Operator== all components must be equal.

Definition at line 64 of file Triple.cpp.

◆ operator>()

template<typename T >
bool Mantid::Triple< T >::operator> ( const Triple< T > &  A) const

Operator> takes first to last precidence.

Uses operator< to obtain value. Note it does not uses 1-(A<this)

Parameters
A:: Triple to compare
Returns
this > A

Definition at line 105 of file Triple.cpp.

◆ operator[]() [1/2]

template<typename T >
T & Mantid::Triple< T >::operator[] ( const int  A)

Accessor Reference Function.

Parameters
A:: Index to item to get 0-2
Returns
Reference Item[A]

Definition at line 118 of file Triple.cpp.

◆ operator[]() [2/2]

template<typename T >
T Mantid::Triple< T >::operator[] ( const int  A) const

Accessor Value Function.

Parameters
A:: Index to item to get 0-2
Returns
Item[A]

Definition at line 138 of file Triple.cpp.

Member Data Documentation

◆ first

template<typename T >
T Mantid::Triple< T >::first

First item.

Definition at line 24 of file Triple.h.

Referenced by Mantid::Triple< T >::operator=().

◆ second

template<typename T >
T Mantid::Triple< T >::second

Second item.

Definition at line 25 of file Triple.h.

Referenced by Mantid::Triple< T >::operator=().

◆ third

template<typename T >
T Mantid::Triple< T >::third

Third item.

Definition at line 26 of file Triple.h.

Referenced by Mantid::Triple< T >::operator=().


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