00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #define UNARY_FUNCTION(ReturnType, Type1, Func) \
00035 \
00036 TEMPLATE \
00037 void Func(Field<ReturnType>& res, const UList<Type1>& f); \
00038 TEMPLATE \
00039 tmp<Field<ReturnType> > Func(const UList<Type1>& f); \
00040 TEMPLATE \
00041 tmp<Field<ReturnType> > Func(const tmp<Field<Type1> >& tf);
00042
00043
00044
00045
00046 #define UNARY_OPERATOR(ReturnType, Type1, Op, OpFunc) \
00047 \
00048 TEMPLATE \
00049 void OpFunc(Field<ReturnType>& res, const UList<Type1>& f); \
00050 TEMPLATE \
00051 tmp<Field<ReturnType> > operator Op(const UList<Type1>& f); \
00052 TEMPLATE \
00053 tmp<Field<ReturnType> > operator Op(const tmp<Field<Type1> >& tf);
00054
00055
00056
00057
00058 #define BINARY_FUNCTION(ReturnType, Type1, Type2, Func) \
00059 \
00060 TEMPLATE \
00061 void Func \
00062 ( \
00063 Field<ReturnType>& f, \
00064 const UList<Type1>& f1, \
00065 const UList<Type2>& f2 \
00066 ); \
00067 \
00068 TEMPLATE \
00069 tmp<Field<ReturnType> > Func \
00070 ( \
00071 const UList<Type1>& f1, \
00072 const UList<Type2>& f2 \
00073 ); \
00074 \
00075 TEMPLATE \
00076 tmp<Field<ReturnType> > Func \
00077 ( \
00078 const UList<Type1>& f1, \
00079 const tmp<Field<Type2> >& tf2 \
00080 ); \
00081 \
00082 TEMPLATE \
00083 tmp<Field<ReturnType> > Func \
00084 ( \
00085 const tmp<Field<Type1> >& tf1, \
00086 const UList<Type2>& f2 \
00087 ); \
00088 \
00089 TEMPLATE \
00090 tmp<Field<ReturnType> > Func \
00091 ( \
00092 const tmp<Field<Type1> >& tf1, \
00093 const tmp<Field<Type2> >& tf2 \
00094 );
00095
00096
00097
00098
00099 #define BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func) \
00100 \
00101 TEMPLATE \
00102 void Func \
00103 ( \
00104 Field<ReturnType>& f, \
00105 const Type1& s1, \
00106 const UList<Type2>& f2 \
00107 ); \
00108 \
00109 TEMPLATE \
00110 tmp<Field<ReturnType> > Func \
00111 ( \
00112 const Type1& s1, \
00113 const UList<Type2>& f2 \
00114 ); \
00115 \
00116 TEMPLATE \
00117 tmp<Field<ReturnType> > Func \
00118 ( \
00119 const Type1& s1, \
00120 const tmp<Field<Type2> >& tf2 \
00121 );
00122
00123
00124 #define BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func) \
00125 \
00126 TEMPLATE \
00127 void Func \
00128 ( \
00129 Field<ReturnType>& f, \
00130 const UList<Type1>& f1, \
00131 const Type2& s2 \
00132 ); \
00133 \
00134 TEMPLATE \
00135 tmp<Field<ReturnType> > Func \
00136 ( \
00137 const UList<Type1>& f1, \
00138 const Type2& s2 \
00139 ); \
00140 \
00141 TEMPLATE \
00142 tmp<Field<ReturnType> > Func \
00143 ( \
00144 const tmp<Field<Type1> >& tf1, \
00145 const Type2& s2 \
00146 );
00147
00148
00149 #define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func) \
00150 BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func) \
00151 BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)
00152
00153
00154
00155
00156 #define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpFunc) \
00157 \
00158 TEMPLATE \
00159 void OpFunc \
00160 ( \
00161 Field<ReturnType>& f, \
00162 const UList<Type1>& f1, \
00163 const UList<Type2>& f2 \
00164 ); \
00165 \
00166 TEMPLATE \
00167 tmp<Field<ReturnType> > operator Op \
00168 ( \
00169 const UList<Type1>& f1, \
00170 const UList<Type2>& f2 \
00171 ); \
00172 \
00173 TEMPLATE \
00174 tmp<Field<ReturnType> > operator Op \
00175 ( \
00176 const UList<Type1>& f1, \
00177 const tmp<Field<Type2> >& tf2 \
00178 ); \
00179 \
00180 TEMPLATE \
00181 tmp<Field<ReturnType> > operator Op \
00182 ( \
00183 const tmp<Field<Type1> >& tf1, \
00184 const UList<Type2>& f2 \
00185 ); \
00186 \
00187 TEMPLATE \
00188 tmp<Field<ReturnType> > operator Op \
00189 ( \
00190 const tmp<Field<Type1> >& tf1, \
00191 const tmp<Field<Type2> >& tf2 \
00192 );
00193
00194
00195
00196
00197 #define BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpFunc) \
00198 \
00199 TEMPLATE \
00200 void OpFunc \
00201 ( \
00202 Field<ReturnType>& f, \
00203 const Type1& s1, \
00204 const UList<Type2>& f2 \
00205 ); \
00206 \
00207 TEMPLATE \
00208 tmp<Field<ReturnType> > operator Op \
00209 ( \
00210 const Type1& s1, \
00211 const UList<Type2>& f2 \
00212 ); \
00213 \
00214 TEMPLATE \
00215 tmp<Field<ReturnType> > operator Op \
00216 ( \
00217 const Type1& s1, \
00218 const tmp<Field<Type2> >& tf2 \
00219 );
00220
00221
00222 #define BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpFunc) \
00223 \
00224 TEMPLATE \
00225 void OpFunc \
00226 ( \
00227 Field<ReturnType>& f, \
00228 const UList<Type1>& f1, \
00229 const Type2& s2 \
00230 ); \
00231 \
00232 TEMPLATE \
00233 tmp<Field<ReturnType> > operator Op \
00234 ( \
00235 const UList<Type1>& f1, \
00236 const Type2& s2 \
00237 ); \
00238 \
00239 TEMPLATE \
00240 tmp<Field<ReturnType> > operator Op \
00241 ( \
00242 const tmp<Field<Type1> >& tf1, \
00243 const Type2& s2 \
00244 );
00245
00246
00247 #define BINARY_TYPE_OPERATOR(ReturnType, Type1, Type2, Op, OpFunc) \
00248 BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpFunc) \
00249 BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpFunc)
00250
00251
00252