Re: Iteration over structure fields and properties

2017-09-08 Thread Jacob Carlborg via Digitalmars-d
On 2017-09-07 09:22, Void-995 wrote: Would it work with: @property int propertyNameA() No, for that you need the traits getFunctionAttributes [1] (I think all functions are returned) and getFunctionAttributes [2]. And how to get key names then? As I remember tupleof return tuple of fields

Re: Iteration over structure fields and properties

2017-09-07 Thread Void-995 via Digitalmars-d
On Thursday, 7 September 2017 at 07:09:29 UTC, Jacob Carlborg wrote: On 2017-09-06 09:36, Void-995 wrote: I really appreciate traits and what they are introducing into the process. I'm curious how I can iterate over all fields of the structure (s.tupleof pretty much works for that) and propert

Re: Iteration over structure fields and properties

2017-09-07 Thread Jacob Carlborg via Digitalmars-d
On 2017-09-06 09:36, Void-995 wrote: I really appreciate traits and what they are introducing into the process. I'm curious how I can iterate over all fields of the structure (s.tupleof pretty much works for that) and properties while ignoring methods and sub data types that defined inside of s

Iteration over structure fields and properties

2017-09-06 Thread Void-995 via Digitalmars-d
I really appreciate traits and what they are introducing into the process. I'm curious how I can iterate over all fields of the structure (s.tupleof pretty much works for that) and properties while ignoring methods and sub data types that defined inside of structure (they defined only as type,