Go to the documentation of this file.
10 #define FACTORY_TYPE_N0(_Module, _T)\
13 static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
14 Register(boost::function<_T *()> function) {\
15 _Module *obj = GetInstance();\
16 obj->make_ ## _T ## _ = function;\
19 static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
21 _Module *obj = GetInstance();\
22 return obj->make_ ## _T ## _();\
25 boost::function<_T *()> make_ ## _T ##_\
27 #define FACTORY_PARAM_TYPE_N0(_Module, _T, _P)\
29 template <class U, int UP>\
30 static typename boost::enable_if_c<\
31 boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
32 Register(boost::function<_T *()> function) {\
33 _Module *obj = GetInstance();\
34 obj->make_ ## _T ## _ ## _P ## _ = function;\
36 template <class U, int UP>\
37 static typename boost::enable_if_c<\
38 boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
40 _Module *obj = GetInstance();\
41 return obj->make_ ## _T ## _ ## _P ##_();\
44 boost::function<_T *()> make_ ## _T ## _ ## _P ## _\
46 #define FACTORY_TYPE_N1(_Module, _T, A0)\
49 static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
50 Register(boost::function<_T *(A0)> function) {\
51 _Module *obj = GetInstance();\
52 obj->make_ ## _T ## _ = function;\
55 static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
57 _Module *obj = GetInstance();\
58 return obj->make_ ## _T ## _(a0);\
61 boost::function<_T *(A0)> make_ ## _T ##_\
63 #define FACTORY_PARAM_TYPE_N1(_Module, _T, _P, A0)\
65 template <class U, int UP>\
66 static typename boost::enable_if_c<\
67 boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
68 Register(boost::function<_T *(A0)> function) {\
69 _Module *obj = GetInstance();\
70 obj->make_ ## _T ## _ ## _P ## _ = function;\
72 template <class U, int UP>\
73 static typename boost::enable_if_c<\
74 boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
76 _Module *obj = GetInstance();\
77 return obj->make_ ## _T ## _ ## _P ##_(a0);\
80 boost::function<_T *(A0)> make_ ## _T ## _ ## _P ## _\
82 #define FACTORY_TYPE_N2(_Module, _T, A0, A1)\
85 static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
86 Register(boost::function<_T *(A0, A1)> function) {\
87 _Module *obj = GetInstance();\
88 obj->make_ ## _T ## _ = function;\
91 static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
92 Create(A0 a0, A1 a1) {\
93 _Module *obj = GetInstance();\
94 return obj->make_ ## _T ## _(a0, a1);\
97 boost::function<_T *(A0, A1)> make_ ## _T ##_\
99 #define FACTORY_PARAM_TYPE_N2(_Module, _T, _P, A0, A1)\
101 template <class U, int UP>\
102 static typename boost::enable_if_c<\
103 boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
104 Register(boost::function<_T *(A0, A1)> function) {\
105 _Module *obj = GetInstance();\
106 obj->make_ ## _T ## _ ## _P ## _ = function;\
108 template <class U, int UP>\
109 static typename boost::enable_if_c<\
110 boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
111 Create(A0 a0, A1 a1) {\
112 _Module *obj = GetInstance();\
113 return obj->make_ ## _T ## _ ## _P ##_(a0, a1);\
116 boost::function<_T *(A0, A1)> make_ ## _T ## _ ## _P ## _\
118 #define FACTORY_TYPE_N3(_Module, _T, A0, A1, A2)\
121 static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
122 Register(boost::function<_T *(A0, A1, A2)> function) {\
123 _Module *obj = GetInstance();\
124 obj->make_ ## _T ## _ = function;\
127 static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
128 Create(A0 a0, A1 a1, A2 a2) {\
129 _Module *obj = GetInstance();\
130 return obj->make_ ## _T ## _(a0, a1, a2);\
133 boost::function<_T *(A0, A1, A2)> make_ ## _T ##_\
135 #define FACTORY_PARAM_TYPE_N3(_Module, _T, _P, A0, A1, A2)\
137 template <class U, int UP>\
138 static typename boost::enable_if_c<\
139 boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
140 Register(boost::function<_T *(A0, A1, A2)> function) {\
141 _Module *obj = GetInstance();\
142 obj->make_ ## _T ## _ ## _P ## _ = function;\
144 template <class U, int UP>\
145 static typename boost::enable_if_c<\
146 boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
147 Create(A0 a0, A1 a1, A2 a2) {\
148 _Module *obj = GetInstance();\
149 return obj->make_ ## _T ## _ ## _P ##_(a0, a1, a2);\
152 boost::function<_T *(A0, A1, A2)> make_ ## _T ## _ ## _P ## _\
154 #define FACTORY_TYPE_N4(_Module, _T, A0, A1, A2, A3)\
157 static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
158 Register(boost::function<_T *(A0, A1, A2, A3)> function) {\
159 _Module *obj = GetInstance();\
160 obj->make_ ## _T ## _ = function;\
163 static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
164 Create(A0 a0, A1 a1, A2 a2, A3 a3) {\
165 _Module *obj = GetInstance();\
166 return obj->make_ ## _T ## _(a0, a1, a2, a3);\
169 boost::function<_T *(A0, A1, A2, A3)> make_ ## _T ##_\
171 #define FACTORY_PARAM_TYPE_N4(_Module, _T, _P, A0, A1, A2, A3)\
173 template <class U, int UP>\
174 static typename boost::enable_if_c<\
175 boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
176 Register(boost::function<_T *(A0, A1, A2, A3)> function) {\
177 _Module *obj = GetInstance();\
178 obj->make_ ## _T ## _ ## _P ## _ = function;\
180 template <class U, int UP>\
181 static typename boost::enable_if_c<\
182 boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
183 Create(A0 a0, A1 a1, A2 a2, A3 a3) {\
184 _Module *obj = GetInstance();\
185 return obj->make_ ## _T ## _ ## _P ##_(a0, a1, a2, a3);\
188 boost::function<_T *(A0, A1, A2, A3)> make_ ## _T ## _ ## _P ## _\
190 #define FACTORY_TYPE_N5(_Module, _T, A0, A1, A2, A3, A4)\
193 static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
194 Register(boost::function<_T *(A0, A1, A2, A3, A4)> function) {\
195 _Module *obj = GetInstance();\
196 obj->make_ ## _T ## _ = function;\
199 static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
200 Create(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4) {\
201 _Module *obj = GetInstance();\
202 return obj->make_ ## _T ## _(a0, a1, a2, a3, a4);\
205 boost::function<_T *(A0, A1, A2, A3, A4)> make_ ## _T ##_\
207 #define FACTORY_PARAM_TYPE_N5(_Module, _T, _P, A0, A1, A2, A3, A4)\
209 template <class U, int UP>\
210 static typename boost::enable_if_c<\
211 boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
212 Register(boost::function<_T *(A0, A1, A2, A3, A4)> function) {\
213 _Module *obj = GetInstance();\
214 obj->make_ ## _T ## _ ## _P ## _ = function;\
216 template <class U, int UP>\
217 static typename boost::enable_if_c<\
218 boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
219 Create(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4) {\
220 _Module *obj = GetInstance();\
221 return obj->make_ ## _T ## _ ## _P ##_(a0, a1, a2, a3, a4);\
224 boost::function<_T *(A0, A1, A2, A3, A4)> make_ ## _T ## _ ## _P ## _\
226 #define FACTORY_TYPE_N6(_Module, _T, A0, A1, A2, A3, A4, A5)\
229 static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
230 Register(boost::function<_T *(A0, A1, A2, A3, A4, A5)> function) {\
231 _Module *obj = GetInstance();\
232 obj->make_ ## _T ## _ = function;\
235 static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
236 Create(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) {\
237 _Module *obj = GetInstance();\
238 return obj->make_ ## _T ## _(a0, a1, a2, a3, a4, a5);\
241 boost::function<_T *(A0, A1, A2, A3, A4, A5)> make_ ## _T ##_\
243 #define FACTORY_PARAM_TYPE_N6(_Module, _T, _P, A0, A1, A2, A3, A4, A5)\
245 template <class U, int UP>\
246 static typename boost::enable_if_c<\
247 boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
248 Register(boost::function<_T *(A0, A1, A2, A3, A4, A5)> function) {\
249 _Module *obj = GetInstance();\
250 obj->make_ ## _T ## _ ## _P ## _ = function;\
252 template <class U, int UP>\
253 static typename boost::enable_if_c<\
254 boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
255 Create(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) {\
256 _Module *obj = GetInstance();\
257 return obj->make_ ## _T ## _ ## _P ##_(a0, a1, a2, a3, a4, a5);\
260 boost::function<_T *(A0, A1, A2, A3, A4, A5)> make_ ## _T ## _ ## _P ## _\
262 #define FACTORY_TYPE_N7(_Module, _T, A0, A1, A2, A3, A4, A5, A6)\
265 static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
266 Register(boost::function<_T *(A0, A1, A2, A3, A4, A5, A6)> function) {\
267 _Module *obj = GetInstance();\
268 obj->make_ ## _T ## _ = function;\
271 static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
272 Create(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) {\
273 _Module *obj = GetInstance();\
274 return obj->make_ ## _T ## _(a0, a1, a2, a3, a4, a5, a6);\
277 boost::function<_T *(A0, A1, A2, A3, A4, A5, A6)> make_ ## _T ##_\
279 #define FACTORY_PARAM_TYPE_N7(_Module, _T, _P, A0, A1, A2, A3, A4, A5, A6)\
281 template <class U, int UP>\
282 static typename boost::enable_if_c<\
283 boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
284 Register(boost::function<_T *(A0, A1, A2, A3, A4, A5, A6)> function) {\
285 _Module *obj = GetInstance();\
286 obj->make_ ## _T ## _ ## _P ## _ = function;\
288 template <class U, int UP>\
289 static typename boost::enable_if_c<\
290 boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
291 Create(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) {\
292 _Module *obj = GetInstance();\
293 return obj->make_ ## _T ## _ ## _P ##_(a0, a1, a2, a3, a4, a5, a6);\
296 boost::function<_T *(A0, A1, A2, A3, A4, A5, A6)> make_ ## _T ## _ ## _P ## _\
298 #define FACTORY_TYPE_N8(_Module, _T, A0, A1, A2, A3, A4, A5, A6, A7)\
301 static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
302 Register(boost::function<_T *(A0, A1, A2, A3, A4, A5, A6, A7)> function) {\
303 _Module *obj = GetInstance();\
304 obj->make_ ## _T ## _ = function;\
307 static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
308 Create(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) {\
309 _Module *obj = GetInstance();\
310 return obj->make_ ## _T ## _(a0, a1, a2, a3, a4, a5, a6, a7);\
313 boost::function<_T *(A0, A1, A2, A3, A4, A5, A6, A7)> make_ ## _T ##_\
315 #define FACTORY_PARAM_TYPE_N8(_Module, _T, _P, A0, A1, A2, A3, A4, A5, A6, A7)\
317 template <class U, int UP>\
318 static typename boost::enable_if_c<\
319 boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
320 Register(boost::function<_T *(A0, A1, A2, A3, A4, A5, A6, A7)> function) {\
321 _Module *obj = GetInstance();\
322 obj->make_ ## _T ## _ ## _P ## _ = function;\
324 template <class U, int UP>\
325 static typename boost::enable_if_c<\
326 boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
327 Create(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) {\
328 _Module *obj = GetInstance();\
329 return obj->make_ ## _T ## _ ## _P ##_(a0, a1, a2, a3, a4, a5, a6, a7);\
332 boost::function<_T *(A0, A1, A2, A3, A4, A5, A6, A7)> make_ ## _T ## _ ## _P ## _\