Utilities
Utilities header only library
utils::Couple< Type > Class Template Reference

Structure holding two variables of the same type. More...

Public Member Functions

 Couple (Type val_1, Type val_2)
 
void Set (Type val_1, Type val_2)
 Sets values.
 
bool Contains (const Type value) const
 Checks if at least one of the two is equal to the value.
 
Type & operator[] (size_t idx)
 Returns reference to the value by a specified index.
 
const Type & GetFirst () const
 Returns the first value.
 
void SetFirst (Type value)
 Sets the first value.
 
const Type & GetSecond () const
 Returns the second value.
 
void SetSecond (Type value)
 Sets the second value.
 
bool operator== (const Couple< Type > &other)
 Compares two couples. The order of values is not important.
 
bool operator!= (const Couple< Type > &other)
 Compares two couples. The order of values is not important.
 
Couple & operator+= (const Type val)
 Increases both values by a specific amount.
 
Couple & operator*= (const Type val)
 Multiples both values with a specific value.
 

Detailed Description

template<typename Type>
class utils::Couple< Type >

Structure holding two variables of the same type.