Re: Get superclasses at compile time

2016-01-06 Thread Straivers via Digitalmars-d-learn
Huh, alright. Thanks.

Re: Get superclasses at compile time

2016-01-04 Thread Rikki Cattermole via Digitalmars-d-learn
On 05/01/16 5:50 PM, Straivers wrote: On Tuesday, 5 January 2016 at 04:41:45 UTC, Rikki Cattermole wrote: On 05/01/16 5:37 PM, Straivers wrote: Hello, I'm working on an event system, and I want to be able to check if an event is a subclass of another event. How might I go about this? In essenc

Re: Get superclasses at compile time

2016-01-04 Thread Straivers via Digitalmars-d-learn
On Tuesday, 5 January 2016 at 04:41:45 UTC, Rikki Cattermole wrote: On 05/01/16 5:37 PM, Straivers wrote: Hello, I'm working on an event system, and I want to be able to check if an event is a subclass of another event. How might I go about this? In essence, I'm looking to compress this: st

Re: Get superclasses at compile time

2016-01-04 Thread Rikki Cattermole via Digitalmars-d-learn
On 05/01/16 5:37 PM, Straivers wrote: Hello, I'm working on an event system, and I want to be able to check if an event is a subclass of another event. How might I go about this? In essence, I'm looking to compress this: static if (E == UserInputEvent || E == MouseEvent || E == MouseButtonEvent

Get superclasses at compile time

2016-01-04 Thread Straivers via Digitalmars-d-learn
Hello, I'm working on an event system, and I want to be able to check if an event is a subclass of another event. How might I go about this? In essence, I'm looking to compress this: static if (E == UserInputEvent || E == MouseEvent || E == MouseButtonEvent || E == MouseReleasedEvent) {