mecca.lib.reflection

Various utilities for hacking the D type system

Public Imports

std.traits
public import std.traits;
std.meta
public import std.meta;

Members

Aliases

IOTA
alias IOTA(size_t end) = staticIota!(0, end)
Undocumented in source.
ParentType
alias ParentType(alias METHOD) = Alias!(__traits(parent, METHOD))
Undocumented in source.

Functions

abiSignatureOf
ulong abiSignatureOf()
Undocumented in source. Be warned that the author may not have intended to support it.
accessMember
auto ref accessMember(T obj)
Undocumented in source. Be warned that the author may not have intended to support it.
as
auto ref as(Func func)

Execute a given piece of code while casting it:

asBytes
ubyte[] asBytes(T val)
Undocumented in source. Be warned that the author may not have intended to support it.
bitEnumToString
string bitEnumToString(ulong val)

Convert a value to bitwise or of enum members

copyTo
void copyTo(T src, T dst)
Undocumented in source. Be warned that the author may not have intended to support it.
funcAttrToString
string funcAttrToString(FunctionAttribute attr)

Return a FunctionAttribute converted to a mixinable string

genMoveArgument
string genMoveArgument(size_t numArgs, string callString, string argumentString, string ret)

A CTFE function for generating a mixin string of a function call moving arguments

methodCall
auto methodCall(ParentType!METHOD* instance, ParameterTypeTuple!METHOD args)
Undocumented in source. Be warned that the author may not have intended to support it.
methodCall
auto methodCall(ParentType!METHOD instance, ParameterTypeTuple!METHOD args)
Undocumented in source. Be warned that the author may not have intended to support it.
setToInit
void setToInit(T val)
Undocumented in source. Be warned that the author may not have intended to support it.
setToInit
void setToInit(T* val)
Undocumented in source. Be warned that the author may not have intended to support it.
toFuncAttrs
FunctionAttribute toFuncAttrs(string attrs)
Undocumented in source. Be warned that the author may not have intended to support it.
traceDisableCompileTimeInstrumentation
void traceDisableCompileTimeInstrumentation()
Undocumented in source.

Manifest constants

isDebug
enum isDebug;
Undocumented in source.
isDebug
enum isDebug;
Undocumented in source.

Static functions

fxxx
int fxxx(int x, SSS s, SSS t)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

Closure
struct Closure

Non-GC postponed function call with arguments (closure)

SSS
struct SSS
Undocumented in source.
StructImplementation
struct StructImplementation(I)
Undocumented in source.
WWW
struct WWW
Undocumented in source.

Templates

CapacityType
template CapacityType(size_t n)

Return the smallest type large enough to hold the numbers 0..n

CopySignature
template CopySignature(alias srcFunc, int argumentsBegin = 0, int argumentsEnd = Parameters!srcFunc.length)

CTFE template for genering a string for mixin copying a function's signature along with its default values

ForeachTypeof
template ForeachTypeof(T)

Replace std.traits.ForeachType with one that works when the item is copyable or not

PromotedType
template PromotedType(Type)

Type, unless it is smaller than int, in which case it is promoted

StaticRegex
template StaticRegex(string exp, string flags = "")
Undocumented in source.
callableMembersOf
template callableMembersOf(T)
Undocumented in source.
isRefInputRange
template isRefInputRange(R)

Returns true if R is a pseudo input range with ref return.

isVersion
template isVersion(string NAME)
Undocumented in source.
staticIota
template staticIota(int beg, int end)
Undocumented in source.

Meta