Triple¶
| Spice | |
|---|---|
Triple<V1, V2, V3> struct¶
A triple in Spice is a commonly used data structure, which saves three values of arbitrary type together in a correlation
Constructors¶
ctor¶
| Spice | |
|---|---|
Construct a triple from three values
Parameters
| Name | Type | Description |
|---|---|---|
first |
V1 |
First value |
second |
V2 |
Second value |
third |
V3 |
Third value |
Methods¶
getFirst¶
| Spice | |
|---|---|
Retrieve the first value of the triple
Returns: V1& — Reference to the first value
getSecond¶
| Spice | |
|---|---|
Retrieve the second value of the triple
Returns: V2& — Reference to the second value
getThird¶
| Spice | |
|---|---|
Retrieve the third value of the triple
Returns: V3& — Reference to the third value
setFirst¶
| Spice | |
|---|---|
Set the first value of the triple
Parameters
| Name | Type | Description |
|---|---|---|
first |
V1& |
New first value |
setSecond¶
| Spice | |
|---|---|
Set the second value of the triple
Parameters
| Name | Type | Description |
|---|---|---|
second |
V2& |
New second value |
setThird¶
| Spice | |
|---|---|
Set the third value of the triple
Parameters
| Name | Type | Description |
|---|---|---|
third |
V3& |
New third value |
Operators¶
operator==¶
| Spice | |
|---|---|
Check if two triples are equal, i.e. all three of their values are equal
Parameters
| Name | Type | Description |
|---|---|---|
lhs |
const Triple<V1, V2, V3>& |
|
rhs |
const Triple<V1, V2, V3>& |
Returns: bool — Equal or not equal
operator!=¶
| Spice | |
|---|---|
Check if two triples are not equal
Parameters
| Name | Type | Description |
|---|---|---|
lhs |
const Triple<V1, V2, V3>& |
|
rhs |
const Triple<V1, V2, V3>& |
Returns: bool — Not equal or equal