Function

A struct capturing all the properties of a function.

Members

Functions

argumentMixture
string argumentMixture()

Return the argument list as a string.

argumentMixtureArray
const(string)[] argumentMixtureArray()

Return the argument list as an array of strings.

attributeMixture
string attributeMixture()

Return the attribute list as a string.

attributeMixtureArray
string[] attributeMixtureArray()

Return the attribute list as an array of strings.

mixture
string mixture()

Return a string representing the entire function definition or declaration.

parameterListMixtureArray
string[] parameterListMixtureArray()
Undocumented in source. Be warned that the author may not have intended to support it.
setAttributes
Function setAttributes(uint value)

Set attributes. Return this.

setBody
Function setBody(string value)

Set the function body.

setName
Function setName(string value)

Set the function name.

setParameters
Function setParameters(Parameter[] value)

Set the parameter list.

setReturnType
Function setReturnType(string value)

Set the return type.

setStatic
Function setStatic(bool value)

Set the static_ attribute. Return this.

setUdas
Function setUdas(string[] value)

Set the udas attribute. Return this.

Variables

attributes
ulong attributes;

Function attributes. Initial value: __traits(getAttributes, fun).

body_
string body_;

Function body. Initial value: ;.

localSymbol
string localSymbol;

A string that evaluates to a function symbol.

name
string name;

Function name. Initial value: __traits(identifier, fun).

parameters
Parameter[] parameters;

Function parameters. Initial value: from the refracted function.

returnType
string returnType;

Return type. Initial value: std.traits.ReturnType!fun.

static_
bool static_;

If true, prefix generated function with static. Initial value: true if the refracted function is a static *member* function.

udas
string[] udas;

User defined attributes. Initial value: bolts.experimental.refraction.ParameterAttribute!(fun, parameterIndex..., attributeIndex...).

Meta