Function.hxx

00001 // Copyright (C) 2003-2007, Vivien Mallet
00002 //
00003 // This file is part of SeldonData library, used for data processing.
00004 //
00005 // SeldonData is free software; you can redistribute it and/or modify it under
00006 // the terms of the GNU General Public License as published by the Free
00007 // Software Foundation; either version 2 of the License, or (at your option)
00008 // any later version.
00009 //
00010 // SeldonData is distributed in the hope that it will be useful, but WITHOUT
00011 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
00013 // more details.
00014 //
00015 // For more information, visit the SeldonData home page:
00016 //      http://vivienmallet.net/lib/seldondata/
00017 
00018 #ifndef FILE_SELDONDATA_FUNCTION_HXX
00019 
00020 #include <iostream>
00021 using std::cout;
00022 using std::endl;
00023 
00024 namespace SeldonData
00025 {
00026 
00027 
00029   // FUNCTION_BASE //
00031 
00032 
00034 
00038   template<class T, class TOut = void>
00039   class Function_Base
00040   {
00041 
00042   public:
00043 
00045     Function_Base() {}
00047     virtual ~Function_Base() {}
00048     
00050     virtual TOut operator () (T& i0)
00051     {
00052       throw Undefined("Function_Base<T>::operator(1)");
00053     }
00054 
00056     virtual TOut operator () (T& i0, T& i1)
00057     {
00058       throw Undefined("Function_Base<T>::operator(2)");
00059     }
00060 
00062     virtual TOut operator () (T& i0, T& i1,
00063                               T& i2)
00064     {
00065       throw Undefined("Function_Base<T>::operator(3)");
00066     }
00067 
00069     virtual TOut operator () (T& i0, T& i1,
00070                               T& i2, T& i3)
00071     {
00072       throw Undefined("Function_Base<T>::operator(4)");
00073     }
00074 
00076     virtual TOut operator () (T& i0, T& i1,
00077                               T& i2, T& i3,
00078                               T& i4)
00079     {
00080       throw Undefined("Function_Base<T>::operator(5)");
00081     }
00082 
00084     virtual TOut operator () (T& i0, T& i1,
00085                               T& i2, T& i3,
00086                               T& i4, T& i5)
00087     {
00088       throw Undefined("Function_Base<T>::operator(6)");
00089     }
00090 
00092     virtual TOut operator () (T& i0, T& i1,
00093                               T& i2, T& i3,
00094                               T& i4, T& i5,
00095                               T& i6)
00096     {
00097       throw Undefined("Function_Base<T>::operator(7)");
00098     }
00099 
00101     virtual TOut operator () (T& i0, T& i1,
00102                               T& i2, T& i3,
00103                               T& i4, T& i5,
00104                               T& i6, T& i7)
00105     {
00106       throw Undefined("Function_Base<T>::operator(8)");
00107     }
00108 
00110     virtual TOut operator () (T& i0, T& i1,
00111                               T& i2, T& i3,
00112                               T& i4, T& i5,
00113                               T& i6, T& i7,
00114                               T& i8)
00115     {
00116       throw Undefined("Function_Base<T>::operator(9)");
00117     }
00118 
00120     virtual TOut operator () (T& i0, T& i1,
00121                               T& i2, T& i3,
00122                               T& i4, T& i5,
00123                               T& i6, T& i7,
00124                               T& i8, T& i9)
00125     {
00126       throw Undefined("Function_Base<T>::operator(10)");
00127     }
00128 
00130     virtual TOut operator () (T& i0, T& i1,
00131                               T& i2, T& i3,
00132                               T& i4, T& i5,
00133                               T& i6, T& i7,
00134                               T& i8, T& i9,
00135                               T& i10)
00136     {
00137       throw Undefined("Function_Base<T>::operator(11)");
00138     }
00139 
00141     virtual TOut operator () (T& i0, T& i1,
00142                               T& i2, T& i3,
00143                               T& i4, T& i5,
00144                               T& i6, T& i7,
00145                               T& i8, T& i9,
00146                               T& i10, T& i11)
00147     {
00148       throw Undefined("Function_Base<T>::operator(12)");
00149     }
00150 
00152     virtual TOut operator () (T& i0, T& i1,
00153                               T& i2, T& i3,
00154                               T& i4, T& i5,
00155                               T& i6, T& i7,
00156                               T& i8, T& i9,
00157                               T& i10, T& i11,
00158                               T& i12)
00159     {
00160       throw Undefined("Function_Base<T>::operator(13)");
00161     }
00162 
00164     virtual TOut operator () (T& i0, T& i1,
00165                               T& i2, T& i3,
00166                               T& i4, T& i5,
00167                               T& i6, T& i7,
00168                               T& i8, T& i9,
00169                               T& i10, T& i11,
00170                               T& i12, T& i13)
00171     {
00172       throw Undefined("Function_Base<T>::operator(14)");
00173     }
00174 
00176     virtual TOut operator () (T& i0, T& i1,
00177                               T& i2, T& i3,
00178                               T& i4, T& i5,
00179                               T& i6, T& i7,
00180                               T& i8, T& i9,
00181                               T& i10, T& i11,
00182                               T& i12, T& i13,
00183                               T& i14)
00184     {
00185       throw Undefined("Function_Base<T>::operator(15)");
00186     }
00187 
00189     virtual TOut operator () (T& i0, T& i1,
00190                               T& i2, T& i3,
00191                               T& i4, T& i5,
00192                               T& i6, T& i7,
00193                               T& i8, T& i9,
00194                               T& i10, T& i11,
00195                               T& i12, T& i13,
00196                               T& i14, T& i15)
00197     {
00198       throw Undefined("Function_Base<T>::operator(16)");
00199     }
00200 
00202     virtual TOut operator () (T& i0, T& i1,
00203                               T& i2, T& i3,
00204                               T& i4, T& i5,
00205                               T& i6, T& i7,
00206                               T& i8, T& i9,
00207                               T& i10, T& i11,
00208                               T& i12, T& i13,
00209                               T& i14, T& i15,
00210                               T& i16)
00211     {
00212       throw Undefined("Function_Base<T>::operator(17)");
00213     }
00214 
00216     virtual TOut operator () (T& i0, T& i1,
00217                               T& i2, T& i3,
00218                               T& i4, T& i5,
00219                               T& i6, T& i7,
00220                               T& i8, T& i9,
00221                               T& i10, T& i11,
00222                               T& i12, T& i13,
00223                               T& i14, T& i15,
00224                               T& i16, T& i17)
00225     {
00226       throw Undefined("Function_Base<T>::operator(18)");
00227     }
00228 
00230     virtual TOut operator () (T& i0, T& i1,
00231                               T& i2, T& i3,
00232                               T& i4, T& i5,
00233                               T& i6, T& i7,
00234                               T& i8, T& i9,
00235                               T& i10, T& i11,
00236                               T& i12, T& i13,
00237                               T& i14, T& i15,
00238                               T& i16, T& i17,
00239                               T& i18)
00240     {
00241       throw Undefined("Function_Base<T>::operator(19)");
00242     }
00243 
00245     virtual TOut operator () (T& i0, T& i1,
00246                               T& i2, T& i3,
00247                               T& i4, T& i5,
00248                               T& i6, T& i7,
00249                               T& i8, T& i9,
00250                               T& i10, T& i11,
00251                               T& i12, T& i13,
00252                               T& i14, T& i15,
00253                               T& i16, T& i17,
00254                               T& i18, T& i19)
00255     {
00256       throw Undefined("Function_Base<T>::operator(20)");
00257     }
00258 
00259   };
00260 
00261 
00262 
00264   // FUNCCOORDS_BASE //
00266 
00267 
00269 
00274   template<class T>
00275   class FuncCoords_Base
00276   {
00277 
00278   public:
00279 
00281     FuncCoords_Base() {}
00283     ~FuncCoords_Base() {}
00284     
00286     virtual void operator () (T& i0)
00287     {
00288       throw Undefined("FuncCoords_Base<T>::operator(1)");
00289     }
00290 
00292     virtual void operator () (const T& i0, T& i1)
00293     {
00294       throw Undefined("FuncCoords_Base<T>::operator(2)");
00295     }
00296 
00298     virtual void operator () (const T& i0, const T& i1,
00299                               T& i2, T& i3)
00300     {
00301       throw Undefined("FuncCoords_Base<T>::operator(4)");
00302     }
00303 
00305     virtual void operator () (const T& i0, const T& i1,
00306                               const T& i2, T& i3,
00307                               T& i4, T& i5)
00308     {
00309       throw Undefined("FuncCoords_Base<T>::operator(6)");
00310     }
00311 
00313     virtual void operator () (const T& i0, const T& i1,
00314                               const T& i2, const T& i3,
00315                               T& i4, T& i5,
00316                               T& i6, T& i7)
00317     {
00318       throw Undefined("FuncCoords_Base<T>::operator(8)");
00319     }
00320 
00322     virtual void operator () (const T& i0, const T& i1,
00323                               const T& i2, const T& i3,
00324                               const T& i4, const T& i5,
00325                               T& i6, T& i7,
00326                               T& i8, T& i9)
00327     {
00328       throw Undefined("FuncCoords_Base<T>::operator(10)");
00329     }
00330 
00332     virtual void operator () (const T& i0, const T& i1,
00333                               const T& i2, const T& i3,
00334                               const T& i4, const T& i5,
00335                               T& i6, T& i7,
00336                               T& i8, T& i9,
00337                               T& i10, T& i11)
00338     {
00339       throw Undefined("FuncCoords_Base<T>::operator(12)");
00340     }
00341 
00343     virtual void operator () (const T& i0, const T& i1,
00344                               const T& i2, const T& i3,
00345                               const T& i4, const T& i5,
00346                               const T& i6, T& i7,
00347                               T& i8, T& i9,
00348                               T& i10, T& i11,
00349                               T& i12, T& i13)
00350     {
00351       throw Undefined("FuncCoords_Base<T>::operator(14)");
00352     }
00353 
00355     virtual void operator () (const T& i0, const T& i1,
00356                               const T& i2, const T& i3,
00357                               const T& i4, const T& i5,
00358                               const T& i6, const T& i7,
00359                               T& i8, T& i9,
00360                               T& i10, T& i11,
00361                               T& i12, T& i13,
00362                               T& i14, T& i15)
00363     {
00364       throw Undefined("FuncCoords_Base<T>::operator(16)");
00365     }
00366 
00368     virtual void operator () (const T& i0, const T& i1,
00369                               const T& i2, const T& i3,
00370                               const T& i4, const T& i5,
00371                               const T& i6, const T& i7,
00372                               const T& i8, T& i9,
00373                               T& i10, T& i11,
00374                               T& i12, T& i13,
00375                               T& i14, T& i15,
00376                               T& i16, T& i17)
00377     {
00378       throw Undefined("FuncCoords_Base<T>::operator(18)");
00379     }
00380 
00382     virtual void operator () (const T& i0, const T& i1,
00383                               const T& i2, const T& i3,
00384                               const T& i4, const T& i5,
00385                               const T& i6, const T& i7,
00386                               const T& i8, const T& i9,
00387                               T& i10, T& i11,
00388                               T& i12, T& i13,
00389                               T& i14, T& i15,
00390                               T& i16, T& i17,
00391                               T& i18, T& i19)
00392     {
00393       throw Undefined("FuncCoords_Base<T>::operator(20)");
00394     }
00395 
00396   };
00397 
00398 
00399 }  // namespace SeldonData.
00400 
00401 #define FILE_SELDONDATA_FUNCTION_HXX
00402 #endif

Generated on Tue Nov 17 11:20:52 2009 for SeldonData by  doxygen 1.5.1