6 #ifndef UTILS_TRIPLET_H 7 #define UTILS_TRIPLET_H 9 #include <Utils/ExtSTD.h> 15 template <
typename Type>
22 Triplet(Type val_1, Type val_2, Type val_3)
24 Set(val_1, val_2, val_3);
28 virtual void Set(Type val_1, Type val_2, Type val_3)
30 data_ = { val_1, val_2, val_3 };
90 for (
const auto &val : this->data_)
109 for (
auto &data : this->data_)
119 for (
auto &data : this->data_)
127 std::array<Type, 3> data_;
void SetSecond(Type value)
Sets the second value.
Definition: Triplet.h:70
Type GetFirst() const
Returns the first value.
Definition: Triplet.h:52
bool Contains(const std::string &substring, const std::string &text)
Checks if the text contains substring.
Definition: ExtSTD.h:327
virtual void Set(Type val_1, Type val_2, Type val_3)
Sets values.
Definition: Triplet.h:28
Type GetThird() const
Returns the third value.
Definition: Triplet.h:76
Type GetSecond() const
Returns the second value.
Definition: Triplet.h:64
Structure which holds three variables of same type.
Definition: Triplet.h:16
void SetThird(Type value)
Sets the third value.
Definition: Triplet.h:82
Triplet & operator*=(const Type val)
Multiples all values with a specific value.
Definition: Triplet.h:117
void SetFirst(Type value)
Sets the first value.
Definition: Triplet.h:58
virtual bool operator!=(const Triplet< Type > &obj) const
Compares two triplets. The order of values is not important.
Definition: Triplet.h:101
virtual Type & operator[](size_t idx)
Returns reference to the value by a specified index.
Definition: Triplet.h:40
virtual bool operator==(const Triplet< Type > &obj) const
Compares two triplets. The order of values is not important.
Definition: Triplet.h:88
Triplet & operator+=(const Type val)
Increases all values by a specific amount.
Definition: Triplet.h:107
General namespace for utilities.
Definition: BulletConversions.h:9
virtual bool Contains(const Type value) const
Checks if at least one of the three is equal to the value.
Definition: Triplet.h:34