Go to the documentation of this file.
21 #define VTK_AUTOINIT(M) VTK_AUTOINIT0(M,M##_AUTOINIT)
22 #define VTK_AUTOINIT0(M,T) VTK_AUTOINIT1(M,T)
23 #define VTK_AUTOINIT1(M,T) \
25 VTK_AUTOINIT_DECLARE_##T \
26 static struct M##_AutoInit { \
28 M##_AutoInit() { VTK_AUTOINIT_CONSTRUCT_##T } \
30 ~M##_AutoInit() { VTK_AUTOINIT_DESTRUCT_##T } \
31 } M##_AutoInit_Instance;
33 #define VTK_AUTOINIT_DECLARE_0()
34 #define VTK_AUTOINIT_DECLARE_1(t1) VTK_AUTOINIT_DECLARE_0() VTK_AUTOINIT_DECLARE(t1)
35 #define VTK_AUTOINIT_DECLARE_2(t1,t2) VTK_AUTOINIT_DECLARE_1(t1) VTK_AUTOINIT_DECLARE(t2)
36 #define VTK_AUTOINIT_DECLARE_3(t1,t2,t3) VTK_AUTOINIT_DECLARE_2(t1,t2) VTK_AUTOINIT_DECLARE(t3)
37 #define VTK_AUTOINIT_DECLARE_4(t1,t2,t3,t4) VTK_AUTOINIT_DECLARE_3(t1,t2,t3) VTK_AUTOINIT_DECLARE(t4)
38 #define VTK_AUTOINIT_DECLARE_5(t1,t2,t3,t4,t5) VTK_AUTOINIT_DECLARE_4(t1,t2,t3,t4) VTK_AUTOINIT_DECLARE(t5)
39 #define VTK_AUTOINIT_DECLARE_6(t1,t2,t3,t4,t5,t6) VTK_AUTOINIT_DECLARE_5(t1,t2,t3,t4,t5) VTK_AUTOINIT_DECLARE(t6)
40 #define VTK_AUTOINIT_DECLARE_7(t1,t2,t3,t4,t5,t6,t7) VTK_AUTOINIT_DECLARE_6(t1,t2,t3,t4,t5,t6) VTK_AUTOINIT_DECLARE(t7)
41 #define VTK_AUTOINIT_DECLARE_8(t1,t2,t3,t4,t5,t6,t7,t8) VTK_AUTOINIT_DECLARE_7(t1,t2,t3,t4,t5,t6,t7) VTK_AUTOINIT_DECLARE(t8)
42 #define VTK_AUTOINIT_DECLARE_9(t1,t2,t3,t4,t5,t6,t7,t8,t9) VTK_AUTOINIT_DECLARE_8(t1,t2,t3,t4,t5,t6,t7,t8) VTK_AUTOINIT_DECLARE(t9)
43 #define VTK_AUTOINIT_DECLARE(M) \
44 void M##_AutoInit_Construct(); \
45 void M##_AutoInit_Destruct();
47 #define VTK_AUTOINIT_CONSTRUCT_0()
48 #define VTK_AUTOINIT_CONSTRUCT_1(t1) VTK_AUTOINIT_CONSTRUCT_0() VTK_AUTOINIT_CONSTRUCT(t1)
49 #define VTK_AUTOINIT_CONSTRUCT_2(t1,t2) VTK_AUTOINIT_CONSTRUCT_1(t1) VTK_AUTOINIT_CONSTRUCT(t2)
50 #define VTK_AUTOINIT_CONSTRUCT_3(t1,t2,t3) VTK_AUTOINIT_CONSTRUCT_2(t1,t2) VTK_AUTOINIT_CONSTRUCT(t3)
51 #define VTK_AUTOINIT_CONSTRUCT_4(t1,t2,t3,t4) VTK_AUTOINIT_CONSTRUCT_3(t1,t2,t3) VTK_AUTOINIT_CONSTRUCT(t4)
52 #define VTK_AUTOINIT_CONSTRUCT_5(t1,t2,t3,t4,t5) VTK_AUTOINIT_CONSTRUCT_4(t1,t2,t3,t4) VTK_AUTOINIT_CONSTRUCT(t5)
53 #define VTK_AUTOINIT_CONSTRUCT_6(t1,t2,t3,t4,t5,t6) VTK_AUTOINIT_CONSTRUCT_5(t1,t2,t3,t4,t5) VTK_AUTOINIT_CONSTRUCT(t6)
54 #define VTK_AUTOINIT_CONSTRUCT_7(t1,t2,t3,t4,t5,t6,t7) VTK_AUTOINIT_CONSTRUCT_6(t1,t2,t3,t4,t5,t6) VTK_AUTOINIT_CONSTRUCT(t7)
55 #define VTK_AUTOINIT_CONSTRUCT_8(t1,t2,t3,t4,t5,t6,t7,t8) VTK_AUTOINIT_CONSTRUCT_7(t1,t2,t3,t4,t5,t6,t7) VTK_AUTOINIT_CONSTRUCT(t8)
56 #define VTK_AUTOINIT_CONSTRUCT_9(t1,t2,t3,t4,t5,t6,t7,t8,t9) VTK_AUTOINIT_CONSTRUCT_8(t1,t2,t3,t4,t5,t6,t7,t8) VTK_AUTOINIT_CONSTRUCT(t9)
57 #define VTK_AUTOINIT_CONSTRUCT(M) \
58 M##_AutoInit_Construct();
60 #define VTK_AUTOINIT_DESTRUCT_0()
61 #define VTK_AUTOINIT_DESTRUCT_1(t1) VTK_AUTOINIT_DESTRUCT_0() VTK_AUTOINIT_DESTRUCT(t1)
62 #define VTK_AUTOINIT_DESTRUCT_2(t1,t2) VTK_AUTOINIT_DESTRUCT_1(t1) VTK_AUTOINIT_DESTRUCT(t2)
63 #define VTK_AUTOINIT_DESTRUCT_3(t1,t2,t3) VTK_AUTOINIT_DESTRUCT_2(t1,t2) VTK_AUTOINIT_DESTRUCT(t3)
64 #define VTK_AUTOINIT_DESTRUCT_4(t1,t2,t3,t4) VTK_AUTOINIT_DESTRUCT_3(t1,t2,t3) VTK_AUTOINIT_DESTRUCT(t4)
65 #define VTK_AUTOINIT_DESTRUCT_5(t1,t2,t3,t4,t5) VTK_AUTOINIT_DESTRUCT_4(t1,t2,t3,t4) VTK_AUTOINIT_DESTRUCT(t5)
66 #define VTK_AUTOINIT_DESTRUCT_6(t1,t2,t3,t4,t5,t6) VTK_AUTOINIT_DESTRUCT_5(t1,t2,t3,t4,t5) VTK_AUTOINIT_DESTRUCT(t6)
67 #define VTK_AUTOINIT_DESTRUCT_7(t1,t2,t3,t4,t5,t6,t7) VTK_AUTOINIT_DESTRUCT_6(t1,t2,t3,t4,t5,t6) VTK_AUTOINIT_DESTRUCT(t7)
68 #define VTK_AUTOINIT_DESTRUCT_8(t1,t2,t3,t4,t5,t6,t7,t8) VTK_AUTOINIT_DESTRUCT_7(t1,t2,t3,t4,t5,t6,t7) VTK_AUTOINIT_DESTRUCT(t8)
69 #define VTK_AUTOINIT_DESTRUCT_9(t1,t2,t3,t4,t5,t6,t7,t8,t9) VTK_AUTOINIT_DESTRUCT_8(t1,t2,t3,t4,t5,t6,t7,t8) VTK_AUTOINIT_DESTRUCT(t9)
70 #define VTK_AUTOINIT_DESTRUCT(M) \
71 M##_AutoInit_Destruct();
86 #define VTK_MODULE_INIT(M) \
87 VTK_AUTOINIT_DECLARE(M) \
88 static struct M##_ModuleInit { \
90 M##_ModuleInit() { VTK_AUTOINIT_CONSTRUCT(M) } \
92 ~M##_ModuleInit() { VTK_AUTOINIT_DESTRUCT(M) } \
93 } M##_ModuleInit_Instance;