Go to the documentation of this file.
9 #define FACTORY_TYPE_N0(_Module, _T)\
12 static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
13 Register(boost::function<_T *()> function) {\
14 _Module *obj = GetInstance();\
15 obj->make_ ## _T ## _ = function;\
18 static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
20 _Module *obj = GetInstance();\
21 return obj->make_ ## _T ## _();\
24 boost::function<_T *()> make_ ## _T ##_\
26 #define FACTORY_PARAM_TYPE_N0(_Module, _T, _P)\
28 template <class U, int UP>\
29 static typename boost::enable_if_c<\
30 boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
31 Register(boost::function<_T *()> function) {\
32 _Module *obj = GetInstance();\
33 obj->make_ ## _T ## _ ## _P ## _ = function;\
35 template <class U, int UP>\
36 static typename boost::enable_if_c<\
37 boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
39 _Module *obj = GetInstance();\
40 return obj->make_ ## _T ## _ ## _P ##_();\
43 boost::function<_T *()> make_ ## _T ## _ ## _P ## _\
45 #define FACTORY_TYPE_N1(_Module, _T, A0)\
48 static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
49 Register(boost::function<_T *(A0)> function) {\
50 _Module *obj = GetInstance();\
51 obj->make_ ## _T ## _ = function;\
54 static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
56 _Module *obj = GetInstance();\
57 return obj->make_ ## _T ## _(a0);\
60 boost::function<_T *(A0)> make_ ## _T ##_\
62 #define FACTORY_PARAM_TYPE_N1(_Module, _T, _P, A0)\
64 template <class U, int UP>\
65 static typename boost::enable_if_c<\
66 boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
67 Register(boost::function<_T *(A0)> function) {\
68 _Module *obj = GetInstance();\
69 obj->make_ ## _T ## _ ## _P ## _ = function;\
71 template <class U, int UP>\
72 static typename boost::enable_if_c<\
73 boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
75 _Module *obj = GetInstance();\
76 return obj->make_ ## _T ## _ ## _P ##_(a0);\
79 boost::function<_T *(A0)> make_ ## _T ## _ ## _P ## _\
81 #define FACTORY_TYPE_N2(_Module, _T, A0, A1)\
84 static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
85 Register(boost::function<_T *(A0, A1)> function) {\
86 _Module *obj = GetInstance();\
87 obj->make_ ## _T ## _ = function;\
90 static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
91 Create(A0 a0, A1 a1) {\
92 _Module *obj = GetInstance();\
93 return obj->make_ ## _T ## _(a0, a1);\
96 boost::function<_T *(A0, A1)> make_ ## _T ##_\
98 #define FACTORY_PARAM_TYPE_N2(_Module, _T, _P, A0, A1)\
100 template <class U, int UP>\
101 static typename boost::enable_if_c<\
102 boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
103 Register(boost::function<_T *(A0, A1)> function) {\
104 _Module *obj = GetInstance();\
105 obj->make_ ## _T ## _ ## _P ## _ = function;\
107 template <class U, int UP>\
108 static typename boost::enable_if_c<\
109 boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
110 Create(A0 a0, A1 a1) {\
111 _Module *obj = GetInstance();\
112 return obj->make_ ## _T ## _ ## _P ##_(a0, a1);\
115 boost::function<_T *(A0, A1)> make_ ## _T ## _ ## _P ## _\
117 #define FACTORY_TYPE_N3(_Module, _T, A0, A1, A2)\
120 static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
121 Register(boost::function<_T *(A0, A1, A2)> function) {\
122 _Module *obj = GetInstance();\
123 obj->make_ ## _T ## _ = function;\
126 static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
127 Create(A0 a0, A1 a1, A2 a2) {\
128 _Module *obj = GetInstance();\
129 return obj->make_ ## _T ## _(a0, a1, a2);\
132 boost::function<_T *(A0, A1, A2)> make_ ## _T ##_\
134 #define FACTORY_PARAM_TYPE_N3(_Module, _T, _P, A0, A1, A2)\
136 template <class U, int UP>\
137 static typename boost::enable_if_c<\
138 boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
139 Register(boost::function<_T *(A0, A1, A2)> function) {\
140 _Module *obj = GetInstance();\
141 obj->make_ ## _T ## _ ## _P ## _ = function;\
143 template <class U, int UP>\
144 static typename boost::enable_if_c<\
145 boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
146 Create(A0 a0, A1 a1, A2 a2) {\
147 _Module *obj = GetInstance();\
148 return obj->make_ ## _T ## _ ## _P ##_(a0, a1, a2);\
151 boost::function<_T *(A0, A1, A2)> make_ ## _T ## _ ## _P ## _\
153 #define FACTORY_TYPE_N4(_Module, _T, A0, A1, A2, A3)\
156 static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
157 Register(boost::function<_T *(A0, A1, A2, A3)> function) {\
158 _Module *obj = GetInstance();\
159 obj->make_ ## _T ## _ = function;\
162 static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
163 Create(A0 a0, A1 a1, A2 a2, A3 a3) {\
164 _Module *obj = GetInstance();\
165 return obj->make_ ## _T ## _(a0, a1, a2, a3);\
168 boost::function<_T *(A0, A1, A2, A3)> make_ ## _T ##_\
170 #define FACTORY_PARAM_TYPE_N4(_Module, _T, _P, A0, A1, A2, A3)\
172 template <class U, int UP>\
173 static typename boost::enable_if_c<\
174 boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
175 Register(boost::function<_T *(A0, A1, A2, A3)> function) {\
176 _Module *obj = GetInstance();\
177 obj->make_ ## _T ## _ ## _P ## _ = function;\
179 template <class U, int UP>\
180 static typename boost::enable_if_c<\
181 boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
182 Create(A0 a0, A1 a1, A2 a2, A3 a3) {\
183 _Module *obj = GetInstance();\
184 return obj->make_ ## _T ## _ ## _P ##_(a0, a1, a2, a3);\
187 boost::function<_T *(A0, A1, A2, A3)> make_ ## _T ## _ ## _P ## _\
189 #define FACTORY_TYPE_N5(_Module, _T, A0, A1, A2, A3, A4)\
192 static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
193 Register(boost::function<_T *(A0, A1, A2, A3, A4)> function) {\
194 _Module *obj = GetInstance();\
195 obj->make_ ## _T ## _ = function;\
198 static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
199 Create(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4) {\
200 _Module *obj = GetInstance();\
201 return obj->make_ ## _T ## _(a0, a1, a2, a3, a4);\
204 boost::function<_T *(A0, A1, A2, A3, A4)> make_ ## _T ##_\
206 #define FACTORY_PARAM_TYPE_N5(_Module, _T, _P, A0, A1, A2, A3, A4)\
208 template <class U, int UP>\
209 static typename boost::enable_if_c<\
210 boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
211 Register(boost::function<_T *(A0, A1, A2, A3, A4)> function) {\
212 _Module *obj = GetInstance();\
213 obj->make_ ## _T ## _ ## _P ## _ = function;\
215 template <class U, int UP>\
216 static typename boost::enable_if_c<\
217 boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
218 Create(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4) {\
219 _Module *obj = GetInstance();\
220 return obj->make_ ## _T ## _ ## _P ##_(a0, a1, a2, a3, a4);\
223 boost::function<_T *(A0, A1, A2, A3, A4)> make_ ## _T ## _ ## _P ## _\
225 #define FACTORY_TYPE_N6(_Module, _T, A0, A1, A2, A3, A4, A5)\
228 static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
229 Register(boost::function<_T *(A0, A1, A2, A3, A4, A5)> function) {\
230 _Module *obj = GetInstance();\
231 obj->make_ ## _T ## _ = function;\
234 static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
235 Create(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) {\
236 _Module *obj = GetInstance();\
237 return obj->make_ ## _T ## _(a0, a1, a2, a3, a4, a5);\
240 boost::function<_T *(A0, A1, A2, A3, A4, A5)> make_ ## _T ##_\
242 #define FACTORY_PARAM_TYPE_N6(_Module, _T, _P, A0, A1, A2, A3, A4, A5)\
244 template <class U, int UP>\
245 static typename boost::enable_if_c<\
246 boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
247 Register(boost::function<_T *(A0, A1, A2, A3, A4, A5)> function) {\
248 _Module *obj = GetInstance();\
249 obj->make_ ## _T ## _ ## _P ## _ = function;\
251 template <class U, int UP>\
252 static typename boost::enable_if_c<\
253 boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
254 Create(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) {\
255 _Module *obj = GetInstance();\
256 return obj->make_ ## _T ## _ ## _P ##_(a0, a1, a2, a3, a4, a5);\
259 boost::function<_T *(A0, A1, A2, A3, A4, A5)> make_ ## _T ## _ ## _P ## _\
261 #define FACTORY_TYPE_N7(_Module, _T, A0, A1, A2, A3, A4, A5, A6)\
264 static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
265 Register(boost::function<_T *(A0, A1, A2, A3, A4, A5, A6)> function) {\
266 _Module *obj = GetInstance();\
267 obj->make_ ## _T ## _ = function;\
270 static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
271 Create(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) {\
272 _Module *obj = GetInstance();\
273 return obj->make_ ## _T ## _(a0, a1, a2, a3, a4, a5, a6);\
276 boost::function<_T *(A0, A1, A2, A3, A4, A5, A6)> make_ ## _T ##_\
278 #define FACTORY_PARAM_TYPE_N7(_Module, _T, _P, A0, A1, A2, A3, A4, A5, A6)\
280 template <class U, int UP>\
281 static typename boost::enable_if_c<\
282 boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
283 Register(boost::function<_T *(A0, A1, A2, A3, A4, A5, A6)> function) {\
284 _Module *obj = GetInstance();\
285 obj->make_ ## _T ## _ ## _P ## _ = function;\
287 template <class U, int UP>\
288 static typename boost::enable_if_c<\
289 boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
290 Create(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) {\
291 _Module *obj = GetInstance();\
292 return obj->make_ ## _T ## _ ## _P ##_(a0, a1, a2, a3, a4, a5, a6);\
295 boost::function<_T *(A0, A1, A2, A3, A4, A5, A6)> make_ ## _T ## _ ## _P ## _\
297 #define FACTORY_TYPE_N8(_Module, _T, A0, A1, A2, A3, A4, A5, A6, A7)\
300 static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
301 Register(boost::function<_T *(A0, A1, A2, A3, A4, A5, A6, A7)> function) {\
302 _Module *obj = GetInstance();\
303 obj->make_ ## _T ## _ = function;\
306 static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
307 Create(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) {\
308 _Module *obj = GetInstance();\
309 return obj->make_ ## _T ## _(a0, a1, a2, a3, a4, a5, a6, a7);\
312 boost::function<_T *(A0, A1, A2, A3, A4, A5, A6, A7)> make_ ## _T ##_\
314 #define FACTORY_PARAM_TYPE_N8(_Module, _T, _P, A0, A1, A2, A3, A4, A5, A6, A7)\
316 template <class U, int UP>\
317 static typename boost::enable_if_c<\
318 boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
319 Register(boost::function<_T *(A0, A1, A2, A3, A4, A5, A6, A7)> function) {\
320 _Module *obj = GetInstance();\
321 obj->make_ ## _T ## _ ## _P ## _ = function;\
323 template <class U, int UP>\
324 static typename boost::enable_if_c<\
325 boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
326 Create(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) {\
327 _Module *obj = GetInstance();\
328 return obj->make_ ## _T ## _ ## _P ##_(a0, a1, a2, a3, a4, a5, a6, a7);\
331 boost::function<_T *(A0, A1, A2, A3, A4, A5, A6, A7)> make_ ## _T ## _ ## _P ## _\