00001 /***************************************************************************** 00002 00003 The following code is derived, directly or indirectly, from the SystemC 00004 source code Copyright (c) 1996-2005 by all Contributors. 00005 All Rights reserved. 00006 00007 The contents of this file are subject to the restrictions and limitations 00008 set forth in the SystemC Open Source License Version 2.4 (the "License"); 00009 You may not use this file except in compliance with such restrictions and 00010 limitations. You may obtain instructions on how to receive a copy of the 00011 License at http://www.systemc.org/. Software distributed by Contributors 00012 under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 00013 ANY KIND, either express or implied. See the License for the specific 00014 language governing rights and limitations under the License. 00015 00016 *****************************************************************************/ 00017 00018 /***************************************************************************** 00019 00020 sc_lambda_defs.h_ - Macros for declaration of various forms of lambda 00021 creation. 00022 00023 Original Author: Stan Y. Liao, Synopsys, Inc. 00024 00025 *****************************************************************************/ 00026 00027 /***************************************************************************** 00028 00029 MODIFICATION LOG - modifiers, enter your name, affiliation, date and 00030 changes you are making here. 00031 00032 Name, Affiliation, Date: 00033 Description of Modification: 00034 00035 *****************************************************************************/ 00036 00037 #ifndef SC_LAMBDA_DEFS_H 00038 #define SC_LAMBDA_DEFS_H 00039 00040 00041 #define L_DECL1(op, rator, ty1, exp1) \ 00042 inline \ 00043 sc_lambda_ptr \ 00044 operator op( ty1 s1 ) \ 00045 { \ 00046 return new sc_lambda( rator, \ 00047 new sc_lambda_rand( exp1 ) ); \ 00048 } 00049 00050 #define L_DECL1SPEC(op, ty1, code) \ 00051 inline \ 00052 sc_lambda_ptr \ 00053 operator op( ty1 s1 ) \ 00054 { \ 00055 code \ 00056 } 00057 00058 #define L_DECL2(op, rator, ty1, ty2, exp1, exp2) \ 00059 inline \ 00060 sc_lambda_ptr \ 00061 operator op( ty1 s1, ty2 s2 ) \ 00062 { \ 00063 return new sc_lambda( rator, \ 00064 new sc_lambda_rand( exp1 ), \ 00065 new sc_lambda_rand( exp2 ) ); \ 00066 } 00067 00068 #define L_DECL2SPEC(op, ty1, ty2, code) \ 00069 inline \ 00070 sc_lambda_ptr \ 00071 operator op( ty1 s1, ty2 s2 ) \ 00072 { \ 00073 code \ 00074 } 00075 00076 00077 #include "sysc/kernel/sc_lambda_exps.h" 00078 00079 00080 #undef L_DECL1 00081 #undef L_DECL1SPEC 00082 #undef L_DECL2 00083 #undef L_DECL2SPEC 00084 00085 00086 #endif
1.5.1