Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

xst_action_helpers_traced.h

Go to the documentation of this file.
00001 
00002 // Common Text Transformation Library
00003 // Copyright (C) 1997-2006 by Igor Kholodov. 
00004 //
00005 // This library is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public
00007 // License as published by the Free Software Foundation; either
00008 // version 2.1 of the License, or (at your option) any later version.
00009 //
00010 // This library is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 // Lesser General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with this library; if not, write to the
00017 // Free Software Foundation, Inc.,
00018 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00019 //
00020 // mailto:cttl@users.sourceforge.net
00021 // http://sourceforge.net/projects/cttl/
00023 
00033 // xst_action_helpers_traced.h
00034 
00035 #ifndef _XST_ACTION_HELPERS_TRACED_H_INCLUDED_
00036 #define _XST_ACTION_HELPERS_TRACED_H_INCLUDED_
00037 
00038 #ifdef CTTL_TRACE_DEPOSITS
00039 #   define CTTL_MEMBER_ACTION( xobject, xaction, xargument ) cttl_impl::xst_traced_action( __LINE__, CTTL_QUOTED_EXPRESSION( xaction ), xobject, xaction, xargument )
00040 #   define CTTL_MEMBER_ACTION_NOARG( xobject, xaction ) cttl_impl::xst_traced_action( __LINE__, CTTL_QUOTED_EXPRESSION( xaction ), xobject, xaction )
00041 #   define CTTL_STATIC_ACTION( xaction, xargument ) cttl_impl::xst_traced_action( __LINE__, CTTL_QUOTED_EXPRESSION( xaction ), xaction, xargument )
00042 #   define CTTL_STATIC_ACTION_NOARG( xreseulttype, xaction ) cttl_impl::xst_traced_action< xreseulttype >( __LINE__, CTTL_QUOTED_EXPRESSION( xaction ), xaction )
00043 #else
00044 
00045 #   define CTTL_MEMBER_ACTION( xobject, xaction, xargument ) cttl::action( xobject, xaction, xargument )
00046 
00047 #   define CTTL_MEMBER_ACTION_NOARG( xobject, xaction ) cttl::action( xobject, xaction )
00048 
00049 #   define CTTL_STATIC_ACTION( xaction, xargument ) cttl::action( xaction, xargument )
00050 
00051 #   define CTTL_STATIC_ACTION_NOARG( xreseulttype, xaction ) cttl::action< xreseulttype >( xaction )
00052 #endif // CTTL_TRACE_DEPOSITS
00053 
00054 namespace cttl_impl {
00055 
00078 template< typename StaticActionT, typename ArgumentT >
00079 inline xst_static_action< StaticActionT, ArgumentT&, typename StaticActionT::result_type >
00080 xst_traced_action(
00081 #ifdef CTTL_TRACE_DEPOSITS
00082        int line_,
00083        char const* action_name_,
00084 #endif // CTTL_TRACE_DEPOSITS
00085        StaticActionT action_,
00086        ArgumentT* pargument_
00087        )
00088 {
00089     return xst_static_action< StaticActionT, ArgumentT&, typename StaticActionT::result_type >(
00090 #ifdef CTTL_TRACE_DEPOSITS
00091         line_,
00092         action_name_,
00093 #endif // CTTL_TRACE_DEPOSITS
00094         action_,
00095         *pargument_
00096         );
00097 }
00098 
00121 template< typename StaticActionT, typename ArgumentT >
00122 inline xst_static_action< StaticActionT, ArgumentT const&, typename StaticActionT::result_type >
00123 xst_traced_action(
00124 #ifdef CTTL_TRACE_DEPOSITS
00125        int line_,
00126        char const* action_name_,
00127 #endif // CTTL_TRACE_DEPOSITS
00128        StaticActionT action_,
00129        ArgumentT const& argument_
00130        )
00131 {
00132     return xst_static_action< StaticActionT, ArgumentT const&, typename StaticActionT::result_type >(
00133 #ifdef CTTL_TRACE_DEPOSITS
00134         line_,
00135         action_name_,
00136 #endif // CTTL_TRACE_DEPOSITS
00137         action_,
00138         argument_
00139         );
00140 }
00141 
00158 template< typename ReturnT, typename StaticActionT >
00159 inline xst_static_action< StaticActionT, void, ReturnT >
00160 xst_traced_action(
00161 #ifdef CTTL_TRACE_DEPOSITS
00162        int line_,
00163        char const* action_name_,
00164 #endif // CTTL_TRACE_DEPOSITS
00165        StaticActionT action_
00166        )
00167 {
00168     return xst_static_action< StaticActionT, void, ReturnT >(
00169 #ifdef CTTL_TRACE_DEPOSITS
00170         line_,
00171         action_name_,
00172 #endif // CTTL_TRACE_DEPOSITS
00173         action_
00174         );
00175 }
00176 
00177 
00178 
00179 
00207 template< typename ObjectT, typename MemberActionT, typename ArgumentT >
00208 inline xst_member_action< ObjectT const&, MemberActionT, ArgumentT&, typename MemberActionT::result_type >
00209 xst_traced_action(
00210 #ifdef CTTL_TRACE_DEPOSITS
00211        int line_,
00212        char const* action_name_,
00213 #endif // CTTL_TRACE_DEPOSITS
00214        ObjectT const& object_,
00215        MemberActionT action_,
00216        ArgumentT* pargument_
00217        )
00218 {
00219     return xst_member_action< ObjectT const&, MemberActionT, ArgumentT&, typename MemberActionT::result_type >(
00220 #ifdef CTTL_TRACE_DEPOSITS
00221         line_,
00222         action_name_,
00223 #endif // CTTL_TRACE_DEPOSITS
00224         object_,
00225         action_,
00226         *pargument_
00227         );
00228 }
00229 
00230 
00259 template< typename ObjectT, typename MemberActionT, typename ArgumentT >
00260 inline xst_member_action< ObjectT&, MemberActionT, ArgumentT&, typename MemberActionT::result_type >
00261 xst_traced_action(
00262 #ifdef CTTL_TRACE_DEPOSITS
00263        int line_,
00264        char const* action_name_,
00265 #endif // CTTL_TRACE_DEPOSITS
00266        ObjectT* pobject_,
00267        MemberActionT action_,
00268        ArgumentT* pargument_
00269        )
00270 {
00271     return xst_member_action< ObjectT&, MemberActionT, ArgumentT&, typename MemberActionT::result_type >(
00272 #ifdef CTTL_TRACE_DEPOSITS
00273         line_,
00274         action_name_,
00275 #endif // CTTL_TRACE_DEPOSITS
00276         *pobject_,
00277         action_,
00278         *pargument_
00279         );
00280 }
00281 
00309 template< typename ObjectT, typename MemberActionT, typename ArgumentT >
00310 inline xst_member_action< ObjectT const&, MemberActionT, ArgumentT const&, typename MemberActionT::result_type >
00311 xst_traced_action(
00312 #ifdef CTTL_TRACE_DEPOSITS
00313        int line_,
00314        char const* action_name_,
00315 #endif // CTTL_TRACE_DEPOSITS
00316        ObjectT const& object_,
00317        MemberActionT action_,
00318        ArgumentT const& argument_
00319        )
00320 {
00321     return xst_member_action< ObjectT const&, MemberActionT, ArgumentT const&, typename MemberActionT::result_type >(
00322 #ifdef CTTL_TRACE_DEPOSITS
00323         line_,
00324         action_name_,
00325 #endif // CTTL_TRACE_DEPOSITS
00326         object_,
00327         action_,
00328         argument_
00329         );
00330 }
00331 
00332 
00361 template< typename ObjectT, typename MemberActionT, typename ArgumentT >
00362 inline xst_member_action< ObjectT&, MemberActionT, ArgumentT const&, typename MemberActionT::result_type >
00363 xst_traced_action(
00364 #ifdef CTTL_TRACE_DEPOSITS
00365        int line_,
00366        char const* action_name_,
00367 #endif // CTTL_TRACE_DEPOSITS
00368        ObjectT* pobject_,
00369        MemberActionT action_,
00370        ArgumentT const& argument_
00371        )
00372 {
00373     return xst_member_action< ObjectT&, MemberActionT, ArgumentT const&, typename MemberActionT::result_type >(
00374 #ifdef CTTL_TRACE_DEPOSITS
00375         line_,
00376         action_name_,
00377 #endif // CTTL_TRACE_DEPOSITS
00378         *pobject_,
00379         action_,
00380         argument_
00381         );
00382 }
00383 
00384 
00406 template< typename ObjectT, typename MemberActionT >
00407 inline xst_member_action< ObjectT const&, MemberActionT, void, typename MemberActionT::result_type >
00408 xst_traced_action(
00409 #ifdef CTTL_TRACE_DEPOSITS
00410        int line_,
00411        char const* action_name_,
00412 #endif // CTTL_TRACE_DEPOSITS
00413        ObjectT const& object_,
00414        MemberActionT action_
00415        )
00416 {
00417     return xst_member_action< ObjectT const&, MemberActionT, void, typename MemberActionT::result_type >(
00418 #ifdef CTTL_TRACE_DEPOSITS
00419         line_,
00420         action_name_,
00421 #endif // CTTL_TRACE_DEPOSITS
00422         object_,
00423         action_
00424         );
00425 }
00426 
00427 
00450 template< typename ObjectT, typename MemberActionT >
00451 inline xst_member_action< ObjectT&, MemberActionT, void, typename MemberActionT::result_type >
00452 xst_traced_action(
00453 #ifdef CTTL_TRACE_DEPOSITS
00454        int line_,
00455        char const* action_name_,
00456 #endif // CTTL_TRACE_DEPOSITS
00457        ObjectT* pobject_,
00458        MemberActionT action_
00459        )
00460 {
00461     return xst_member_action< ObjectT&, MemberActionT, void, typename MemberActionT::result_type >(
00462 #ifdef CTTL_TRACE_DEPOSITS
00463         line_,
00464         action_name_,
00465 #endif // CTTL_TRACE_DEPOSITS
00466         *pobject_,
00467         action_
00468         );
00469 }
00470 
00471 }   // namespace cttl_impl
00472 
00473 #endif //_XST_ACTION_HELPERS_TRACED_H_INCLUDED_

Generated on Thu Nov 2 17:48:20 2006 for CTTL Lambda Expression by  doxygen 1.3.9.1