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

xst_action_helpers.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.h
00034 
00035 #ifndef _XST_ACTION_HELPERS_H_INCLUDED_
00036 #define _XST_ACTION_HELPERS_H_INCLUDED_
00037 
00038 namespace cttl {
00039 
00062 template< typename StaticActionT, typename ArgumentT >
00063 inline xst_static_action< StaticActionT, ArgumentT&, typename StaticActionT::result_type >
00064 action(
00065        StaticActionT action_,
00066        ArgumentT* pargument_
00067        )
00068 {
00069     return xst_static_action< StaticActionT, ArgumentT&, typename StaticActionT::result_type >(
00070 #ifdef CTTL_TRACE_DEPOSITS
00071        __LINE__,               // line_
00072        "xst_static_action", // action_name_,
00073 #endif // CTTL_TRACE_DEPOSITS
00074         action_,
00075         *pargument_
00076         );
00077 }
00078 
00101 template< typename StaticActionT, typename ArgumentT >
00102 inline xst_static_action< StaticActionT, ArgumentT const&, typename StaticActionT::result_type >
00103 action(
00104        StaticActionT action_,
00105        ArgumentT const& argument_
00106        )
00107 {
00108     return xst_static_action< StaticActionT, ArgumentT const&, typename StaticActionT::result_type >(
00109 #ifdef CTTL_TRACE_DEPOSITS
00110        __LINE__,               // line_
00111        "xst_static_action", // action_name_,
00112 #endif // CTTL_TRACE_DEPOSITS
00113         action_,
00114         argument_
00115         );
00116 }
00117 
00134 template< typename ReturnT, typename StaticActionT >
00135 inline xst_static_action< StaticActionT, void, ReturnT >
00136 action(
00137        StaticActionT action_
00138        )
00139 {
00140     return xst_static_action< StaticActionT, void, ReturnT >(
00141 #ifdef CTTL_TRACE_DEPOSITS
00142        __LINE__,               // line_
00143        "xst_static_action", // action_name_,
00144 #endif // CTTL_TRACE_DEPOSITS
00145         action_
00146         );
00147 }
00148 
00149 
00150 
00151 
00179 template< typename ObjectT, typename MemberActionT, typename ArgumentT >
00180 inline xst_member_action< ObjectT const&, MemberActionT, ArgumentT&, typename MemberActionT::result_type >
00181 action(
00182        ObjectT const& object_,
00183        MemberActionT action_,
00184        ArgumentT* pargument_
00185        )
00186 {
00187     return xst_member_action< ObjectT const&, MemberActionT, ArgumentT&, typename MemberActionT::result_type >(
00188 #ifdef CTTL_TRACE_DEPOSITS
00189        __LINE__,               // line_
00190        "xst_member_action", // action_name_,
00191 #endif // CTTL_TRACE_DEPOSITS
00192         object_,
00193         action_,
00194         *pargument_
00195         );
00196 }
00197 
00226 template< typename ObjectT, typename MemberActionT, typename ArgumentT >
00227 inline xst_member_action< ObjectT&, MemberActionT, ArgumentT&, typename MemberActionT::result_type >
00228 action(
00229        ObjectT* pobject_,
00230        MemberActionT action_,
00231        ArgumentT* pargument_
00232        )
00233 {
00234     return xst_member_action< ObjectT&, MemberActionT, ArgumentT&, typename MemberActionT::result_type >(
00235 #ifdef CTTL_TRACE_DEPOSITS
00236        __LINE__,               // line_
00237        "xst_member_action", // action_name_,
00238 #endif // CTTL_TRACE_DEPOSITS
00239         *pobject_,
00240         action_,
00241         *pargument_
00242         );
00243 }
00244 
00272 template< typename ObjectT, typename MemberActionT, typename ArgumentT >
00273 inline xst_member_action< ObjectT const&, MemberActionT, ArgumentT const&, typename MemberActionT::result_type >
00274 action(
00275        ObjectT const& object_,
00276        MemberActionT action_,
00277        ArgumentT const& argument_
00278        )
00279 {
00280     return xst_member_action< ObjectT const&, MemberActionT, ArgumentT const&, typename MemberActionT::result_type >(
00281 #ifdef CTTL_TRACE_DEPOSITS
00282        __LINE__,               // line_
00283        "xst_member_action", // action_name_,
00284 #endif // CTTL_TRACE_DEPOSITS
00285         object_,
00286         action_,
00287         argument_
00288         );
00289 }
00290 
00319 template< typename ObjectT, typename MemberActionT, typename ArgumentT >
00320 inline xst_member_action< ObjectT&, MemberActionT, ArgumentT const&, typename MemberActionT::result_type >
00321 action(
00322        ObjectT* pobject_,
00323        MemberActionT action_,
00324        ArgumentT const& argument_
00325        )
00326 {
00327     return xst_member_action< ObjectT&, MemberActionT, ArgumentT const&, typename MemberActionT::result_type >(
00328 #ifdef CTTL_TRACE_DEPOSITS
00329        __LINE__,               // line_
00330        "xst_member_action", // action_name_,
00331 #endif // CTTL_TRACE_DEPOSITS
00332         *pobject_,
00333         action_,
00334         argument_
00335         );
00336 }
00337 
00359 template< typename ObjectT, typename MemberActionT >
00360 inline xst_member_action< ObjectT const&, MemberActionT, void, typename MemberActionT::result_type >
00361 action(
00362        ObjectT const& object_,
00363        MemberActionT action_
00364        )
00365 {
00366     return xst_member_action< ObjectT const&, MemberActionT, void, typename MemberActionT::result_type >(
00367 #ifdef CTTL_TRACE_DEPOSITS
00368        __LINE__,                     // line_
00369        "xst_member_action", // action_name_,
00370 #endif // CTTL_TRACE_DEPOSITS
00371         object_,
00372         action_
00373         );
00374 }
00375 
00376 
00399 template< typename ObjectT, typename MemberActionT >
00400 inline xst_member_action< ObjectT&, MemberActionT, void, typename MemberActionT::result_type >
00401 action(
00402        ObjectT* pobject_,
00403        MemberActionT action_
00404        )
00405 {
00406     return xst_member_action< ObjectT&, MemberActionT, void, typename MemberActionT::result_type >(
00407 #ifdef CTTL_TRACE_DEPOSITS
00408        __LINE__,                     // line_
00409        "xst_member_action", // action_name_,
00410 #endif // CTTL_TRACE_DEPOSITS
00411         *pobject_,
00412         action_
00413         );
00414 }
00415 
00416 }   // namespace cttl
00417 
00418 #endif //_XST_ACTION_HELPERS_H_INCLUDED_

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