BEAST/BSE - Better Audio System and Sound Engine
0.8.2
|
00001 00002 /* Void0Closure */ 00003 template<class T> 00004 class Void0Closure : public CxxClosure { 00005 typedef void (T::*MCb) (); /* Member Callback */ 00006 T *o; 00007 MCb f; 00008 public: 00009 Void0Closure (T *t, MCb _f) : o(t), f(_f) { 00010 sig_tokens = "|"; 00011 } 00012 void operator() (Value *return_value, 00013 const Value *param_values, 00014 gpointer invocation_hint, 00015 gpointer marshal_data) { 00016 (o->*f) (); 00017 } 00018 }; 00019 template<class T> 00020 Void0Closure<T>* Closure (T *t, void (T::*f) ()) { 00021 return new Void0Closure<T> (t, f); 00022 } 00023 00024 /* Void1Closure */ 00025 template<class T, typename A1> 00026 class Void1Closure : public CxxClosure { 00027 typedef void (T::*MCb) (A1); /* Member Callback */ 00028 T *o; 00029 MCb f; 00030 Arg<A1> a1; 00031 public: 00032 Void1Closure (T *t, MCb _f) : o(t), f(_f) { 00033 sig_tokens = "|" + a1.token(); 00034 } 00035 void operator() (Value *return_value, 00036 const Value *param_values, 00037 gpointer invocation_hint, 00038 gpointer marshal_data) { 00039 (o->*f) (a1.get (param_values + 0)); 00040 } 00041 }; 00042 template<class T, typename A1> 00043 Void1Closure<T, A1>* Closure (T *t, void (T::*f) (A1)) { 00044 return new Void1Closure<T, A1> (t, f); 00045 } 00046 00047 /* Void2Closure */ 00048 template<class T, typename A1, typename A2> 00049 class Void2Closure : public CxxClosure { 00050 typedef void (T::*MCb) (A1, A2); /* Member Callback */ 00051 T *o; 00052 MCb f; 00053 Arg<A1> a1; Arg<A2> a2; 00054 public: 00055 Void2Closure (T *t, MCb _f) : o(t), f(_f) { 00056 sig_tokens = "|" + a1.token() + a2.token(); 00057 } 00058 void operator() (Value *return_value, 00059 const Value *param_values, 00060 gpointer invocation_hint, 00061 gpointer marshal_data) { 00062 (o->*f) (a1.get (param_values + 0), a2.get (param_values + 1)); 00063 } 00064 }; 00065 template<class T, typename A1, typename A2> 00066 Void2Closure<T, A1, A2>* Closure (T *t, void (T::*f) (A1, A2)) { 00067 return new Void2Closure<T, A1, A2> (t, f); 00068 } 00069 00070 /* Void3Closure */ 00071 template<class T, typename A1, typename A2, typename A3> 00072 class Void3Closure : public CxxClosure { 00073 typedef void (T::*MCb) (A1, A2, A3); /* Member Callback */ 00074 T *o; 00075 MCb f; 00076 Arg<A1> a1; Arg<A2> a2; Arg<A3> a3; 00077 public: 00078 Void3Closure (T *t, MCb _f) : o(t), f(_f) { 00079 sig_tokens = "|" + a1.token() + a2.token() + a3.token(); 00080 } 00081 void operator() (Value *return_value, 00082 const Value *param_values, 00083 gpointer invocation_hint, 00084 gpointer marshal_data) { 00085 (o->*f) (a1.get (param_values + 0), a2.get (param_values + 1), a3.get (param_values + 2)); 00086 } 00087 }; 00088 template<class T, typename A1, typename A2, typename A3> 00089 Void3Closure<T, A1, A2, A3>* Closure (T *t, void (T::*f) (A1, A2, A3)) { 00090 return new Void3Closure<T, A1, A2, A3> (t, f); 00091 } 00092 00093 /* Void4Closure */ 00094 template<class T, typename A1, typename A2, typename A3, typename A4> 00095 class Void4Closure : public CxxClosure { 00096 typedef void (T::*MCb) (A1, A2, A3, A4); /* Member Callback */ 00097 T *o; 00098 MCb f; 00099 Arg<A1> a1; Arg<A2> a2; Arg<A3> a3; Arg<A4> a4; 00100 public: 00101 Void4Closure (T *t, MCb _f) : o(t), f(_f) { 00102 sig_tokens = "|" + a1.token() + a2.token() + a3.token() + a4.token(); 00103 } 00104 void operator() (Value *return_value, 00105 const Value *param_values, 00106 gpointer invocation_hint, 00107 gpointer marshal_data) { 00108 (o->*f) (a1.get (param_values + 0), a2.get (param_values + 1), a3.get (param_values + 2), a4.get (param_values + 3)); 00109 } 00110 }; 00111 template<class T, typename A1, typename A2, typename A3, typename A4> 00112 Void4Closure<T, A1, A2, A3, A4>* Closure (T *t, void (T::*f) (A1, A2, A3, A4)) { 00113 return new Void4Closure<T, A1, A2, A3, A4> (t, f); 00114 } 00115 00116 /* Void5Closure */ 00117 template<class T, typename A1, typename A2, typename A3, typename A4, typename A5> 00118 class Void5Closure : public CxxClosure { 00119 typedef void (T::*MCb) (A1, A2, A3, A4, A5); /* Member Callback */ 00120 T *o; 00121 MCb f; 00122 Arg<A1> a1; Arg<A2> a2; Arg<A3> a3; Arg<A4> a4; Arg<A5> a5; 00123 public: 00124 Void5Closure (T *t, MCb _f) : o(t), f(_f) { 00125 sig_tokens = "|" + a1.token() + a2.token() + a3.token() + a4.token() + a5.token(); 00126 } 00127 void operator() (Value *return_value, 00128 const Value *param_values, 00129 gpointer invocation_hint, 00130 gpointer marshal_data) { 00131 (o->*f) (a1.get (param_values + 0), a2.get (param_values + 1), a3.get (param_values + 2), a4.get (param_values + 3), a5.get (param_values + 4)); 00132 } 00133 }; 00134 template<class T, typename A1, typename A2, typename A3, typename A4, typename A5> 00135 Void5Closure<T, A1, A2, A3, A4, A5>* Closure (T *t, void (T::*f) (A1, A2, A3, A4, A5)) { 00136 return new Void5Closure<T, A1, A2, A3, A4, A5> (t, f); 00137 } 00138 00139 /* Void6Closure */ 00140 template<class T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6> 00141 class Void6Closure : public CxxClosure { 00142 typedef void (T::*MCb) (A1, A2, A3, A4, A5, A6); /* Member Callback */ 00143 T *o; 00144 MCb f; 00145 Arg<A1> a1; Arg<A2> a2; Arg<A3> a3; Arg<A4> a4; Arg<A5> a5; Arg<A6> a6; 00146 public: 00147 Void6Closure (T *t, MCb _f) : o(t), f(_f) { 00148 sig_tokens = "|" + a1.token() + a2.token() + a3.token() + a4.token() + a5.token() + a6.token(); 00149 } 00150 void operator() (Value *return_value, 00151 const Value *param_values, 00152 gpointer invocation_hint, 00153 gpointer marshal_data) { 00154 (o->*f) (a1.get (param_values + 0), a2.get (param_values + 1), a3.get (param_values + 2), a4.get (param_values + 3), a5.get (param_values + 4), a6.get (param_values + 5)); 00155 } 00156 }; 00157 template<class T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6> 00158 Void6Closure<T, A1, A2, A3, A4, A5, A6>* Closure (T *t, void (T::*f) (A1, A2, A3, A4, A5, A6)) { 00159 return new Void6Closure<T, A1, A2, A3, A4, A5, A6> (t, f); 00160 } 00161 00162 /* Void7Closure */ 00163 template<class T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7> 00164 class Void7Closure : public CxxClosure { 00165 typedef void (T::*MCb) (A1, A2, A3, A4, A5, A6, A7); /* Member Callback */ 00166 T *o; 00167 MCb f; 00168 Arg<A1> a1; Arg<A2> a2; Arg<A3> a3; Arg<A4> a4; Arg<A5> a5; Arg<A6> a6; Arg<A7> a7; 00169 public: 00170 Void7Closure (T *t, MCb _f) : o(t), f(_f) { 00171 sig_tokens = "|" + a1.token() + a2.token() + a3.token() + a4.token() + a5.token() + a6.token() + a7.token(); 00172 } 00173 void operator() (Value *return_value, 00174 const Value *param_values, 00175 gpointer invocation_hint, 00176 gpointer marshal_data) { 00177 (o->*f) (a1.get (param_values + 0), a2.get (param_values + 1), a3.get (param_values + 2), a4.get (param_values + 3), a5.get (param_values + 4), a6.get (param_values + 5), a7.get (param_values + 6)); 00178 } 00179 }; 00180 template<class T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7> 00181 Void7Closure<T, A1, A2, A3, A4, A5, A6, A7>* Closure (T *t, void (T::*f) (A1, A2, A3, A4, A5, A6, A7)) { 00182 return new Void7Closure<T, A1, A2, A3, A4, A5, A6, A7> (t, f); 00183 } 00184 00185 /* Void8Closure */ 00186 template<class T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8> 00187 class Void8Closure : public CxxClosure { 00188 typedef void (T::*MCb) (A1, A2, A3, A4, A5, A6, A7, A8); /* Member Callback */ 00189 T *o; 00190 MCb f; 00191 Arg<A1> a1; Arg<A2> a2; Arg<A3> a3; Arg<A4> a4; Arg<A5> a5; Arg<A6> a6; Arg<A7> a7; Arg<A8> a8; 00192 public: 00193 Void8Closure (T *t, MCb _f) : o(t), f(_f) { 00194 sig_tokens = "|" + a1.token() + a2.token() + a3.token() + a4.token() + a5.token() + a6.token() + a7.token() + a8.token(); 00195 } 00196 void operator() (Value *return_value, 00197 const Value *param_values, 00198 gpointer invocation_hint, 00199 gpointer marshal_data) { 00200 (o->*f) (a1.get (param_values + 0), a2.get (param_values + 1), a3.get (param_values + 2), a4.get (param_values + 3), a5.get (param_values + 4), a6.get (param_values + 5), a7.get (param_values + 6), a8.get (param_values + 7)); 00201 } 00202 }; 00203 template<class T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8> 00204 Void8Closure<T, A1, A2, A3, A4, A5, A6, A7, A8>* Closure (T *t, void (T::*f) (A1, A2, A3, A4, A5, A6, A7, A8)) { 00205 return new Void8Closure<T, A1, A2, A3, A4, A5, A6, A7, A8> (t, f); 00206 } 00207 00208 /* Ret0Closure */ 00209 template<typename R, class T> 00210 class Ret0Closure : public CxxClosure { 00211 typedef R (T::*MCb) (); /* Member Callback */ 00212 T *o; 00213 MCb f; 00214 Arg<R> r; 00215 public: 00216 Ret0Closure (T *t, MCb _f) : o(t), f(_f) { 00217 sig_tokens = r.token() + "|"; 00218 } 00219 void operator() (Value *return_value, 00220 const Value *param_values, 00221 gpointer invocation_hint, 00222 gpointer marshal_data) { 00223 r.set (return_value, (o->*f) ()); 00224 } 00225 }; 00226 template<typename R, class T> 00227 Ret0Closure<R, T>* Closure (T *t, R (T::*f) ()) { 00228 return new Ret0Closure<R, T> (t, f); 00229 } 00230 00231 /* Ret1Closure */ 00232 template<typename R, class T, typename A1> 00233 class Ret1Closure : public CxxClosure { 00234 typedef R (T::*MCb) (A1); /* Member Callback */ 00235 T *o; 00236 MCb f; 00237 Arg<R> r; 00238 Arg<A1> a1; 00239 public: 00240 Ret1Closure (T *t, MCb _f) : o(t), f(_f) { 00241 sig_tokens = r.token() + "|" + a1.token(); 00242 } 00243 void operator() (Value *return_value, 00244 const Value *param_values, 00245 gpointer invocation_hint, 00246 gpointer marshal_data) { 00247 r.set (return_value, (o->*f) (a1.get (param_values + 0))); 00248 } 00249 }; 00250 template<typename R, class T, typename A1> 00251 Ret1Closure<R, T, A1>* Closure (T *t, R (T::*f) (A1)) { 00252 return new Ret1Closure<R, T, A1> (t, f); 00253 } 00254 00255 /* Ret2Closure */ 00256 template<typename R, class T, typename A1, typename A2> 00257 class Ret2Closure : public CxxClosure { 00258 typedef R (T::*MCb) (A1, A2); /* Member Callback */ 00259 T *o; 00260 MCb f; 00261 Arg<R> r; 00262 Arg<A1> a1; Arg<A2> a2; 00263 public: 00264 Ret2Closure (T *t, MCb _f) : o(t), f(_f) { 00265 sig_tokens = r.token() + "|" + a1.token() + a2.token(); 00266 } 00267 void operator() (Value *return_value, 00268 const Value *param_values, 00269 gpointer invocation_hint, 00270 gpointer marshal_data) { 00271 r.set (return_value, (o->*f) (a1.get (param_values + 0), a2.get (param_values + 1))); 00272 } 00273 }; 00274 template<typename R, class T, typename A1, typename A2> 00275 Ret2Closure<R, T, A1, A2>* Closure (T *t, R (T::*f) (A1, A2)) { 00276 return new Ret2Closure<R, T, A1, A2> (t, f); 00277 } 00278 00279 /* Ret3Closure */ 00280 template<typename R, class T, typename A1, typename A2, typename A3> 00281 class Ret3Closure : public CxxClosure { 00282 typedef R (T::*MCb) (A1, A2, A3); /* Member Callback */ 00283 T *o; 00284 MCb f; 00285 Arg<R> r; 00286 Arg<A1> a1; Arg<A2> a2; Arg<A3> a3; 00287 public: 00288 Ret3Closure (T *t, MCb _f) : o(t), f(_f) { 00289 sig_tokens = r.token() + "|" + a1.token() + a2.token() + a3.token(); 00290 } 00291 void operator() (Value *return_value, 00292 const Value *param_values, 00293 gpointer invocation_hint, 00294 gpointer marshal_data) { 00295 r.set (return_value, (o->*f) (a1.get (param_values + 0), a2.get (param_values + 1), a3.get (param_values + 2))); 00296 } 00297 }; 00298 template<typename R, class T, typename A1, typename A2, typename A3> 00299 Ret3Closure<R, T, A1, A2, A3>* Closure (T *t, R (T::*f) (A1, A2, A3)) { 00300 return new Ret3Closure<R, T, A1, A2, A3> (t, f); 00301 } 00302 00303 /* Ret4Closure */ 00304 template<typename R, class T, typename A1, typename A2, typename A3, typename A4> 00305 class Ret4Closure : public CxxClosure { 00306 typedef R (T::*MCb) (A1, A2, A3, A4); /* Member Callback */ 00307 T *o; 00308 MCb f; 00309 Arg<R> r; 00310 Arg<A1> a1; Arg<A2> a2; Arg<A3> a3; Arg<A4> a4; 00311 public: 00312 Ret4Closure (T *t, MCb _f) : o(t), f(_f) { 00313 sig_tokens = r.token() + "|" + a1.token() + a2.token() + a3.token() + a4.token(); 00314 } 00315 void operator() (Value *return_value, 00316 const Value *param_values, 00317 gpointer invocation_hint, 00318 gpointer marshal_data) { 00319 r.set (return_value, (o->*f) (a1.get (param_values + 0), a2.get (param_values + 1), a3.get (param_values + 2), a4.get (param_values + 3))); 00320 } 00321 }; 00322 template<typename R, class T, typename A1, typename A2, typename A3, typename A4> 00323 Ret4Closure<R, T, A1, A2, A3, A4>* Closure (T *t, R (T::*f) (A1, A2, A3, A4)) { 00324 return new Ret4Closure<R, T, A1, A2, A3, A4> (t, f); 00325 } 00326 00327 /* Ret5Closure */ 00328 template<typename R, class T, typename A1, typename A2, typename A3, typename A4, typename A5> 00329 class Ret5Closure : public CxxClosure { 00330 typedef R (T::*MCb) (A1, A2, A3, A4, A5); /* Member Callback */ 00331 T *o; 00332 MCb f; 00333 Arg<R> r; 00334 Arg<A1> a1; Arg<A2> a2; Arg<A3> a3; Arg<A4> a4; Arg<A5> a5; 00335 public: 00336 Ret5Closure (T *t, MCb _f) : o(t), f(_f) { 00337 sig_tokens = r.token() + "|" + a1.token() + a2.token() + a3.token() + a4.token() + a5.token(); 00338 } 00339 void operator() (Value *return_value, 00340 const Value *param_values, 00341 gpointer invocation_hint, 00342 gpointer marshal_data) { 00343 r.set (return_value, (o->*f) (a1.get (param_values + 0), a2.get (param_values + 1), a3.get (param_values + 2), a4.get (param_values + 3), a5.get (param_values + 4))); 00344 } 00345 }; 00346 template<typename R, class T, typename A1, typename A2, typename A3, typename A4, typename A5> 00347 Ret5Closure<R, T, A1, A2, A3, A4, A5>* Closure (T *t, R (T::*f) (A1, A2, A3, A4, A5)) { 00348 return new Ret5Closure<R, T, A1, A2, A3, A4, A5> (t, f); 00349 } 00350 00351 /* Ret6Closure */ 00352 template<typename R, class T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6> 00353 class Ret6Closure : public CxxClosure { 00354 typedef R (T::*MCb) (A1, A2, A3, A4, A5, A6); /* Member Callback */ 00355 T *o; 00356 MCb f; 00357 Arg<R> r; 00358 Arg<A1> a1; Arg<A2> a2; Arg<A3> a3; Arg<A4> a4; Arg<A5> a5; Arg<A6> a6; 00359 public: 00360 Ret6Closure (T *t, MCb _f) : o(t), f(_f) { 00361 sig_tokens = r.token() + "|" + a1.token() + a2.token() + a3.token() + a4.token() + a5.token() + a6.token(); 00362 } 00363 void operator() (Value *return_value, 00364 const Value *param_values, 00365 gpointer invocation_hint, 00366 gpointer marshal_data) { 00367 r.set (return_value, (o->*f) (a1.get (param_values + 0), a2.get (param_values + 1), a3.get (param_values + 2), a4.get (param_values + 3), a5.get (param_values + 4), a6.get (param_values + 5))); 00368 } 00369 }; 00370 template<typename R, class T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6> 00371 Ret6Closure<R, T, A1, A2, A3, A4, A5, A6>* Closure (T *t, R (T::*f) (A1, A2, A3, A4, A5, A6)) { 00372 return new Ret6Closure<R, T, A1, A2, A3, A4, A5, A6> (t, f); 00373 } 00374 00375 /* Ret7Closure */ 00376 template<typename R, class T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7> 00377 class Ret7Closure : public CxxClosure { 00378 typedef R (T::*MCb) (A1, A2, A3, A4, A5, A6, A7); /* Member Callback */ 00379 T *o; 00380 MCb f; 00381 Arg<R> r; 00382 Arg<A1> a1; Arg<A2> a2; Arg<A3> a3; Arg<A4> a4; Arg<A5> a5; Arg<A6> a6; Arg<A7> a7; 00383 public: 00384 Ret7Closure (T *t, MCb _f) : o(t), f(_f) { 00385 sig_tokens = r.token() + "|" + a1.token() + a2.token() + a3.token() + a4.token() + a5.token() + a6.token() + a7.token(); 00386 } 00387 void operator() (Value *return_value, 00388 const Value *param_values, 00389 gpointer invocation_hint, 00390 gpointer marshal_data) { 00391 r.set (return_value, (o->*f) (a1.get (param_values + 0), a2.get (param_values + 1), a3.get (param_values + 2), a4.get (param_values + 3), a5.get (param_values + 4), a6.get (param_values + 5), a7.get (param_values + 6))); 00392 } 00393 }; 00394 template<typename R, class T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7> 00395 Ret7Closure<R, T, A1, A2, A3, A4, A5, A6, A7>* Closure (T *t, R (T::*f) (A1, A2, A3, A4, A5, A6, A7)) { 00396 return new Ret7Closure<R, T, A1, A2, A3, A4, A5, A6, A7> (t, f); 00397 } 00398 00399 /* Ret8Closure */ 00400 template<typename R, class T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8> 00401 class Ret8Closure : public CxxClosure { 00402 typedef R (T::*MCb) (A1, A2, A3, A4, A5, A6, A7, A8); /* Member Callback */ 00403 T *o; 00404 MCb f; 00405 Arg<R> r; 00406 Arg<A1> a1; Arg<A2> a2; Arg<A3> a3; Arg<A4> a4; Arg<A5> a5; Arg<A6> a6; Arg<A7> a7; Arg<A8> a8; 00407 public: 00408 Ret8Closure (T *t, MCb _f) : o(t), f(_f) { 00409 sig_tokens = r.token() + "|" + a1.token() + a2.token() + a3.token() + a4.token() + a5.token() + a6.token() + a7.token() + a8.token(); 00410 } 00411 void operator() (Value *return_value, 00412 const Value *param_values, 00413 gpointer invocation_hint, 00414 gpointer marshal_data) { 00415 r.set (return_value, (o->*f) (a1.get (param_values + 0), a2.get (param_values + 1), a3.get (param_values + 2), a4.get (param_values + 3), a5.get (param_values + 4), a6.get (param_values + 5), a7.get (param_values + 6), a8.get (param_values + 7))); 00416 } 00417 }; 00418 template<typename R, class T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8> 00419 Ret8Closure<R, T, A1, A2, A3, A4, A5, A6, A7, A8>* Closure (T *t, R (T::*f) (A1, A2, A3, A4, A5, A6, A7, A8)) { 00420 return new Ret8Closure<R, T, A1, A2, A3, A4, A5, A6, A7, A8> (t, f); 00421 }