sprint 1-alpha
|
00001 /****************************************************************************** 00002 * sprint::function 00003 * 00004 * Copyright (C) 2005-2011 Paolo Medici <www.pmx.it> 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00019 * 00020 *******************************************************************************/ 00021 00022 #ifndef _SPRINT_function_H 00023 #define _SPRINT_function_H 00024 00025 // $generated on Oct 29 2011 14:01:01$ 00026 00031 namespace sprint { 00032 00034 template<class R> 00035 class function0 { 00036 public: 00037 virtual ~function0() { } 00038 virtual R operator() (void) = 0; 00039 }; 00040 00041 00043 template<class R,class P1> 00044 class function1 { 00045 public: 00046 virtual ~function1() { } 00047 virtual R operator() (P1 p1) = 0; 00048 }; 00049 00051 template<class R,class P1, class P2> 00052 class function2 { 00053 public: 00054 virtual ~function2() { } 00055 virtual R operator() (P1 p1, P2 p2) = 0; 00056 }; 00057 00059 template<class R,class P1, class P2, class P3> 00060 class function3 { 00061 public: 00062 virtual ~function3() { } 00063 virtual R operator() (P1 p1, P2 p2, P3 p3) = 0; 00064 }; 00065 00067 template<class R,class P1, class P2, class P3, class P4> 00068 class function4 { 00069 public: 00070 virtual ~function4() { } 00071 virtual R operator() (P1 p1, P2 p2, P3 p3, P4 p4) = 0; 00072 }; 00073 00075 template<class R,class P1, class P2, class P3, class P4, class P5> 00076 class function5 { 00077 public: 00078 virtual ~function5() { } 00079 virtual R operator() (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) = 0; 00080 }; 00081 00083 template<class R,class P1, class P2, class P3, class P4, class P5, class P6> 00084 class function6 { 00085 public: 00086 virtual ~function6() { } 00087 virtual R operator() (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) = 0; 00088 }; 00089 00091 template<class R,class P1, class P2, class P3, class P4, class P5, class P6, class P7> 00092 class function7 { 00093 public: 00094 virtual ~function7() { } 00095 virtual R operator() (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7) = 0; 00096 }; 00097 00099 template<class R,class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8> 00100 class function8 { 00101 public: 00102 virtual ~function8() { } 00103 virtual R operator() (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8) = 0; 00104 }; 00105 00107 template<class R,class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8, class P9> 00108 class function9 { 00109 public: 00110 virtual ~function9() { } 00111 virtual R operator() (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9) = 0; 00112 }; 00113 00115 template<class R,class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8, class P9, class P10> 00116 class function10 { 00117 public: 00118 virtual ~function10() { } 00119 virtual R operator() (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10) = 0; 00120 }; 00121 00123 template<class R,class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8, class P9, class P10, class P11> 00124 class function11 { 00125 public: 00126 virtual ~function11() { } 00127 virtual R operator() (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11) = 0; 00128 }; 00129 00131 template<class R,class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8, class P9, class P10, class P11, class P12> 00132 class function12 { 00133 public: 00134 virtual ~function12() { } 00135 virtual R operator() (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12) = 0; 00136 }; 00137 00138 00139 } 00140 00141 #endif 00142