00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00023
00033
00034
00035 #ifndef _XST_STATIC_NOARG_VOID_H_INCLUDED_
00036 #define _XST_STATIC_NOARG_VOID_H_INCLUDED_
00037
00038 namespace cttl_impl {
00039
00048 template< typename StaticActionT >
00049 class xst_static_action< StaticActionT, void, void >
00050
00051 #ifdef CTTL_TRACE_DEPOSITS
00052 : public xst_traced_action_base
00053 #endif
00054
00055 {
00056
00058 StaticActionT m_static_action;
00059
00060 public:
00062 typedef xst_static_action< StaticActionT, void, void > action_T;
00063
00065 typedef int result_T;
00066
00068 typedef typename xst_dereference_traits< action_T, result_T >::value_type value_type;
00069
00071 xst_static_action(
00072 #ifdef CTTL_TRACE_DEPOSITS
00073 int line_,
00074 char const* action_name_,
00075 #endif
00076 StaticActionT static_action_
00077 )
00078 :
00079 #ifdef CTTL_TRACE_DEPOSITS
00080 xst_traced_action_base( line_, action_name_ ),
00081 #endif
00082 m_static_action( static_action_ )
00083 {
00084 }
00085
00087 result_T operator() ( bool ) const
00088 {
00089 return operator*();
00090 }
00091
00093 result_T operator* () const
00094 {
00095 #ifdef CTTL_TRACE_DEPOSITS
00096 trace_prolog();
00097 m_static_action();
00098 result_T result = result_T( 1 );
00099 trace_epilog( result );
00100 return result;
00101 #else
00102 m_static_action();
00103 return result_T( 1 );
00104 #endif // CTTL_TRACE_DEPOSITS
00105 }
00106
00107 };
00108
00109 }
00110
00111
00112 #endif //_XST_STATIC_NOARG_VOID_H_INCLUDED_