Public Member Functions | Public Attributes | List of all members
Triplet< T > Class Template Reference

A collection of 3 items of the same type. More...

#include <triplet.hpp>

Public Member Functions

 Triplet (const T &first_i, const T &second_i, const T &third_i)
 Class constructor. More...
 
 Triplet (const TripleConstRef< int > &tcr)
 Class constructor. More...
 
void set (const T &first_i, const T &second_i, const T &third_i)
 Changle all items. More...
 
const T & operator[] (size_t i) const
 Random access operator. More...
 
T & operator[] (size_t i)
 Random access operator. More...
 

Public Attributes

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

Detailed Description

template<class T>
class Triplet< T >

A collection of 3 items of the same type.

Definition at line 39 of file triplet.hpp.

Constructor & Destructor Documentation

◆ Triplet() [1/2]

template<class T>
Triplet< T >::Triplet ( const T &  first_i,
const T &  second_i,
const T &  third_i 
)
inline

Class constructor.

Parameters
first_iFirst item
second_iSecond item
third_iThird item

Definition at line 57 of file triplet.hpp.

◆ Triplet() [2/2]

template<class T>
Triplet< T >::Triplet ( const TripleConstRef< int > &  tcr)
inlineexplicit

Class constructor.

Parameters
tcrReferences to three items

Definition at line 67 of file triplet.hpp.

Member Function Documentation

◆ operator[]() [1/2]

template<class T>
const T& Triplet< T >::operator[] ( size_t  i) const
inline

Random access operator.

Parameters
iindex
Returns
Reference to appropriate item

Definition at line 90 of file triplet.hpp.

◆ operator[]() [2/2]

template<class T>
T& Triplet< T >::operator[] ( size_t  i)
inline

Random access operator.

Parameters
iindex
Returns
Reference to appropriate item

Definition at line 103 of file triplet.hpp.

◆ set()

template<class T>
void Triplet< T >::set ( const T &  first_i,
const T &  second_i,
const T &  third_i 
)
inline

Changle all items.

Parameters
first_iFirst item
second_iSecond item
third_iThird item

Definition at line 77 of file triplet.hpp.

Here is the caller graph for this function:

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