ocean.core.Tuple

The tuple module defines a template struct used for arbitrary data grouping.

Members

Templates

DerivedToFront
template DerivedToFront(TList...)

Returns a Tuple with the types sorted so that the most derived types are ordered before the remaining types.

IndexOf
template IndexOf(T, TList...)

Returns the index of the first occurrence of T in TList or Tlist.length if not found.

MostDerived
template MostDerived(T, TList...)

Returns the type from TList that is the most derived from T. If no such type is found then T will be returned.

Remove
template Remove(T, TList...)

Returns a Tuple with the first occurrence of T removed from TList.

RemoveAll
template RemoveAll(T, TList...)

Returns a Tuple with all occurrences of T removed from TList.

Replace
template Replace(T, U, TList...)

Returns a Tuple with the first offuccrence of T replaced with U.

ReplaceAll
template ReplaceAll(T, U, TList...)

Returns a Tuple with all occurrences of T replaced with U.

Reverse
template Reverse(TList...)

Returns a Tuple with the types from TList declared in reverse order.

Tuple
template Tuple(TList...)

A Tuple is a an aggregate of typed values. Tuples are useful for returning a set of values from a function or for passing a set of parameters to a function.

Unique
template Unique(TList...)

Returns a Tuple with all duplicate types removed.

Meta

License

Tango Dual License: 3-Clause BSD License / Academic Free License v3.0. See LICENSE_TANGO.txt for details.

Authors

Walter Bright, Sean Kelly