Nullable Variant Type (aka Algebraic Type).
Type set for tagged Variants self-referencing.
Tagged Variant Type (aka Tagged Algebraic Type).
Variant Type (aka Algebraic Type).
Behaves as getMember but doesn't enforce at compile time that all types can be handled by the member visitor.
Behaves as match but doesn't enforce at compile time that all types can be handled by the visiting functions.
Behaves as matchMember but doesn't enforce at compile time that all types can be handled by the member visitor.
Behaves as visit but doesn't enforce at compile time that all types can be handled by the visiting functions.
Applies a member handler to the given Variant depending on the held type, ensuring that all types are handled by the visiting handler.
Gets TaggedType underlying type.
Applies a delegate or function to the given arguments depending on the held type, ensuring that all types are handled by the visiting functions.
Applies a member handler to the given Variant depending on the held type, ensuring that all types are handled by the visiting handler.
Behaves as getMember but doesn't enforce at compile time that all types can be handled by the member visitor.
Behaves as match but doesn't enforce at compile time that all types can be handled by the visiting functions.
Behaves as matchMember but doesn't enforce at compile time that all types can be handled by the member visitor.
Behaves as visit but doesn't enforce at compile time that all types can be handled by the visiting functions.
Behaves as getMember but doesn't enforce at compile time that all types can be handled by the member visitor.
Behaves as match but doesn't enforce at compile time that all types can be handled by the visiting functions.
Behaves as matchMember but doesn't enforce at compile time that all types can be handled by the member visitor.
Behaves as visit but doesn't enforce at compile time that all types can be handled by the visiting functions.
Applies a delegate or function to the given Variant depending on the held type, ensuring that all types are handled by the visiting functions.
Gets TaggedType tag name.
Checks if T is TaggedType instance.
Dummy type used to associate tags with a type.
Tagged Variant Type (aka Tagged Algebraic Type).
Type set resolution template used to construct Algebraic .
Checks if the type is instance of tagged Algebraic.
Checks if the type list is TypeSet.
Checks if the type is instance of Algebraic.
.
Variant and Nullable types
This module implements a discriminated union type (a.k.a. tagged union, algebraic type). Such types are useful for type-uniform binary interfaces, interfacing with scripting languages, and comfortable exploratory programming.
The module defines generic Algebraic type that contains a payload. The allowed types of the paylad are defined by the unordered TypeSet.
Algebraic template accepts two arguments: self type set id and a list of type sets.
Algebraic Aliases
Visitor Handlers
$(TR $(TDNW $(LREF visit)) $(TD Yes) $(TD N/A) $(TD No) $(TD No) $(TD 1+) $(TD Yes) $(TD No)) $(TR $(TDNW $(LREF optionalVisit)) $(TD No) $(TD No) $(TD Yes) $(TD No) $(TD 1+) $(TD Yes) $(TD No)) $(TR $(TDNW $(LREF autoVisit)) $(TD No) $(TD No) $(TD auto) $(TD No) $(TD 1+) $(TD Yes) $(TD No)) $(TR $(TDNW $(LREF tryVisit)) $(TD No) $(TD Yes) $(TD No) $(TD No) $(TD 1+) $(TD Yes) $(TD No))
$(TR $(TDNW $(LREF match)) $(TD Yes) $(TD N/A) $(TD No) $(TD Yes) $(TD 0+) $(TD auto) $(TD Yes)) $(TR $(TDNW $(LREF optionalMatch)) $(TD No) $(TD No) $(TD Yes) $(TD Yes) $(TD 0+) $(TD auto) $(TD Yes)) $(TR $(TDNW $(LREF autoMatch)) $(TD No) $(TD No) $(TD auto) $(TD Yes) $(TD 0+) $(TD auto) $(TD Yes)) $(TR $(TDNW $(LREF tryMatch)) $(TD No) $(TD Yes) $(TD No) $(TD Yes) $(TD 0+) $(TD auto) $(TD Yes))
$(TR $(TDNW $(LREF getMember)) $(TD Yes) $(TD N/A) $(TD No) $(TD No) $(TD 1+) $(TD Yes) $(TD No)) $(TR $(TDNW $(LREF optionalGetMember)) $(TD No) $(TD No) $(TD Yes) $(TD No) $(TD 1+) $(TD Yes) $(TD No)) $(TR $(TDNW $(LREF autoGetMember)) $(TD No) $(TD No) $(TD auto) $(TD No) $(TD 1+) $(TD Yes) $(TD No)) $(TR $(TDNW $(LREF tryGetMember)) $(TD No) $(TD Yes) $(TD No) $(TD No) $(TD 1+) $(TD Yes) $(TD No))
$(TR $(TDNW $(LREF matchMember)) $(TD Yes) $(TD N/A) $(TD No) $(TD No) $(TD 1+) $(TD Yes) $(TD Yes)) $(TR $(TDNW $(LREF optionalMatchMember)) $(TD No) $(TD No) $(TD Yes) $(TD No) $(TD 1+) $(TD Yes) $(TD Yes)) $(TR $(TDNW $(LREF autoMatchMember)) $(TD No) $(TD No) $(TD auto) $(TD No) $(TD 1+) $(TD Yes) $(TD Yes)) $(TR $(TDNW $(LREF tryMatchMember)) $(TD No) $(TD Yes) $(TD No) $(TD No) $(TD 1+) $(TD Yes) $(TD Yes))
Special Types
$(TR $(TDNW <tt class="inline-code">void</tt>) $(TD It is usefull to indicate a possible return type of the visitor. Can't be accesed by reference.)) $(TR $(TDNW <tt class="inline-code">typeof(null)</tt>) $(TD It is usefull for nullable types. Also, it is used to indicate that a visitor can't match the current value of the algebraic. Can't be accesed by reference.))
$(TR $(TDNW <a class="xref" href="SetAlias.html">SetAlias</a><tt class="inline-code">!setId</tt>) $(TD Dummy structure that is used to construct cyclic-referencing lists of algebraic types.))
Algebraic Traits
method.