ThreadEventMethods

Tがもつ,すべてのActorイベントハンドラをThreadEventMethod型にして返します.

template ThreadEventMethods (
T
) {}

Examples

1 static struct TestActor1 { @ThreadEvent void foo(string) {} }
2 
3 static assert(ThreadEventMethods!TestActor1.length == 1);
4 static assert(ThreadEventMethods!TestActor1[0].identifier == "foo");
5 static assert(is(ThreadEventMethods!TestActor1[0].Parameters[0] == string));
6 
7 
8 static struct TestActor2 { void foo(string) {} }
9 
10 static assert(ThreadEventMethods!TestActor2.length == 0);
11 
12 
13 static struct TestActor3
14 {
15     @ThreadEvent
16     void foo() {}
17 
18     @ThreadEvent
19     void bar(string) {}
20 
21     void hoge(int) {}
22 }
23 
24 
25 static assert(ThreadEventMethods!TestActor3.length == 2);

Meta