loop through specific class members
Trass3r
mrmocool at gmx.de
Tue Jan 20 11:30:42 PST 2009
Jarrett Billingsley schrieb:
> On Tue, Jan 20, 2009 at 2:13 PM, Trass3r <mrmocool at gmx.de> wrote:
>> Yeah, __traits works quite well to get the function names, but I still can't
>> manage to get the corresponding function object to pass it to
>> ParameterTypeTuple (for checking the parameters for correctness).
>
> Ah, that's what __traits(getMember) is for. You pass it an
> object/class and a string of the member name, and it gives you what it
> corresponds to.
>
OMG, I've already seen this function in the docs some time ago but
somehow I couldn't remember.
Many thanks!
More information about the Digitalmars-d-learn
mailing list