The OpenD Programming Language

Tuple.Tuple

Undocumented in source.

Constructors

this
this(Types values)

Constructor taking one value for each field.

this
this(U[n] values)

Constructor taking a compatible array.

this
this(U another)

Constructor taking a compatible Tuple. Two Tuples are compatible iff they are both of the same length, and, for each type T on the left-hand side, the corresponding type U on the right-hand side can implicitly convert to T.

Alias This

_Tuple_super

Members

Aliases

Types
alias Types = staticMap!(extractType, fieldSpecs)

The types of the Tuple's components.

fieldNames
alias fieldNames = staticMap!(extractName, fieldSpecs)

The names of the Tuple's components. Unnamed fields have empty names.

Functions

opAssign
Tuple opAssign(R rhs)

Assignment from another Tuple.

opBinary
auto opBinary(T t)
opBinaryRight
auto opBinaryRight(T t)

Concatenate Tuples. Tuple concatenation is only allowed if all named fields are distinct (no named field of this tuple occurs in t and no named field of t occurs in this tuple).

opCmp
auto opCmp(R rhs)

Comparison for ordering.

opEquals
bool opEquals(R rhs)

Comparison for equality. Two Tuples are considered equal iff they fulfill the following criteria:

rename
ref rename()

Renames the elements of a Tuple.

rename
ref rename()

* Overload of _rename that takes an associative array * translate as a template parameter, where the keys are * either the names or indices of the members to be changed * and the new names are the corresponding values. * Every key in translate must be the name of a member of the * tuple. * The same rules for empty strings apply as for the variadic * template overload of _rename.

toHash
size_t toHash()

Creates a hash of this Tuple.

toString
string toString()

Converts to string.

toString
void toString(DG sink)
void toString(DG sink, FormatSpec!Char fmt)

Formats Tuple with either %s, %(inner%) or %(inner%|sep%).

Properties

slice
inout(Tuple!(sliceSpecs!(from, to))) slice [@property getter]

Takes a slice by-reference of this Tuple.

Variables

expand
Types expand;

Use t.expand for a Tuple t to expand it into its components. The result of expand acts as if the Tuple's components were listed as a list of values. (Ordinarily, a Tuple acts as a single value.)

Meta