ocean.core.Traits

Useful functions & templates.

More of the kind of thing you'd find in ocean.core.Traits...

Members

Aliases

toDg
deprecated alias toDg = ocean.core.TypeConvert.toDg
Undocumented in source.

Functions

GetField
deprecated FieldType!(T, i)* GetField(T* t)

Gets a pointer to the ith member of a struct/class.

GetField
deprecated M* GetField(T* t)

Gets a pointer to the ith member of a struct/class.

copyClassFields
deprecated void copyClassFields(T dst, T src)
Undocumented in source. Be warned that the author may not have intended to support it.
copyFields
deprecated void copyFields(T dst, T src)
Undocumented in source. Be warned that the author may not have intended to support it.
ctfe_i2a
deprecated istring ctfe_i2a(int i)
Undocumented in source. Be warned that the author may not have intended to support it.
ctfe_i2a
deprecated istring ctfe_i2a(long i)
Undocumented in source. Be warned that the author may not have intended to support it.
ctfe_i2a
deprecated istring ctfe_i2a(uint i)
Undocumented in source. Be warned that the author may not have intended to support it.
ctfe_i2a
deprecated istring ctfe_i2a(ulong i)
Undocumented in source. Be warned that the author may not have intended to support it.

Templates

AAType
deprecated template AAType(T : V[K], V, K)
Undocumented in source.
BaseTypeOfArrays
deprecated template BaseTypeOfArrays(T)
Undocumented in source.
ContainsDynamicArray
deprecated template ContainsDynamicArray(T...)
Undocumented in source.
ElementTypeOfArray
deprecated template ElementTypeOfArray(T : T[])
Undocumented in source.
FieldName
deprecated template FieldName(size_t i, T)

Template to get the name of the ith member of a struct / class.

FieldType
deprecated template FieldType(T, size_t i)
Undocumented in source.
ParameterTupleOf
deprecated template ParameterTupleOf(Fn)
Undocumented in source.
ParameterTupleOf
deprecated template ParameterTupleOf(alias fn)
Undocumented in source.
ReturnAndArgumentTypesOf
deprecated template ReturnAndArgumentTypesOf(T)

Evaluates, if T is callable (function, delegate, a class/interface/struct/ union implementing opCall() as a member or static method or a typedef of these), to a type tuple with the return type as the first element, followed by the argument types. Evaluates to an empty tuple if T is not callable.

ReturnTypeOf
deprecated template ReturnTypeOf(Fn)
Undocumented in source.
ReturnTypeOf
deprecated template ReturnTypeOf(alias fn)
Undocumented in source.
SizeofTuple
deprecated template SizeofTuple(Tuple...)
Undocumented in source.
StripEnum
deprecated template StripEnum(T)

If T is enum, aliases to its base type. Otherwise aliases to T.

StripTypedef
deprecated template StripTypedef(T)
Undocumented in source.
TemplateInstanceArgs
deprecated template TemplateInstanceArgs(alias Template, Type : Template!(TA), TA...)
Undocumented in source.
TypeTuple
deprecated template TypeTuple(T)
Undocumented in source.
hasIndirections
deprecated template hasIndirections(T...)

Evaluates to true if a variable of any type in T is a reference type or has members or elements of reference types. References are - dynamic and associative arrays, - pointers (including function pointers) and delegates, - classes.

hasMember
deprecated template hasMember(T, istring name)
Undocumented in source.
hasMethod
deprecated template hasMethod(T, istring name, Dg)
Undocumented in source.
hasMultiDimensionalDynamicArrays
deprecated template hasMultiDimensionalDynamicArrays(T)
Undocumented in source.
identifier
deprecated template identifier(alias Sym)
Undocumented in source.
isArrayType
deprecated template isArrayType(T)
Undocumented in source.
isAssocArrayType
deprecated template isAssocArrayType(T)
Undocumented in source.
isCallableType
deprecated template isCallableType(T)
Undocumented in source.
isCharType
deprecated template isCharType(T)
Undocumented in source.
isComplexType
deprecated template isComplexType(T)
Undocumented in source.
isCompoundType
deprecated template isCompoundType(T)
Undocumented in source.
isDynamicArrayType
deprecated template isDynamicArrayType(T)
Undocumented in source.
isFloatingPointType
deprecated template isFloatingPointType(T)
Undocumented in source.
isImaginaryType
deprecated template isImaginaryType(T)
Undocumented in source.
isIntegerType
deprecated template isIntegerType(T)
Undocumented in source.
isPointerType
deprecated template isPointerType(T)
Undocumented in source.
isPointerType
deprecated template isPointerType(T : T*)
Undocumented in source.
isPrimitiveType
deprecated template isPrimitiveType(T)

Evaluates to true if T is a primitive type or false otherwise. Primitive types are the types from which one or multiple other types cannot be derived from using the `is()` expression or corresponding template type parameter specialisation. The following types are not primitive: - arrays (static, dynamic and associative) and pointers, - classes structs and unions, - delegates, function pointers and functions (function pointer base types), - enums and typedefs.

isRealType
deprecated template isRealType(T)
Undocumented in source.
isReferenceType
deprecated template isReferenceType(T)
Undocumented in source.
isSignedIntegerType
deprecated template isSignedIntegerType(T)
Undocumented in source.
isStaticArrayType
deprecated template isStaticArrayType(T : T[U], size_t U)
Undocumented in source.
isStaticArrayType
deprecated template isStaticArrayType(T)
Undocumented in source.
isStringType
deprecated template isStringType(T)
Undocumented in source.
isTypedef
deprecated template isTypedef(T)
Undocumented in source.
isUnsignedIntegerType
deprecated template isUnsignedIntegerType(T)
Undocumented in source.
rankOfArray
deprecated template rankOfArray(T)
Undocumented in source.

Meta

License

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

Authors

Sean Kelly, Fawzi Mohamed, Abscissa