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_VOID_H_INCLUDED_
00036 #define _XST_STATIC_VOID_H_INCLUDED_
00037
00038 namespace cttl_impl {
00039
00054 template< typename StaticActionT, typename ArgumentT >
00055 class xst_static_action< StaticActionT, ArgumentT, void >
00056
00057 #ifdef CTTL_TRACE_DEPOSITS
00058 : public xst_traced_action_base
00059 #endif
00060
00061 {
00063 StaticActionT m_static_action;
00064
00066 xst_storage_adaptor< ArgumentT > m_argument;
00067
00068 public:
00070 typedef xst_static_action< StaticActionT, ArgumentT, void > action_T;
00071
00073 typedef int result_T;
00074
00076 typedef typename xst_dereference_traits< action_T, result_T >::value_type value_type;
00077
00079 xst_static_action(
00080 #ifdef CTTL_TRACE_DEPOSITS
00081 int line_,
00082 char const* action_name_,
00083 #endif
00084 StaticActionT static_action_,
00085 ArgumentT argument_
00086 )
00087 :
00088 #ifdef CTTL_TRACE_DEPOSITS
00089 xst_traced_action_base( line_, action_name_ ),
00090 #endif
00091 m_static_action( static_action_ ),
00092 m_argument( argument_ )
00093 {
00094 }
00095
00097 result_T operator() ( bool ) const
00098 {
00099 return operator*();
00100 }
00101
00103 result_T operator* () const
00104 {
00105 #ifdef CTTL_TRACE_DEPOSITS
00106 trace_prolog( m_argument.value() );
00107 m_static_action( m_argument.value() );
00108 result_T result = result_T( 1 );
00109 trace_epilog( result );
00110 return result;
00111 #else
00112 m_static_action( m_argument.value() );
00113 return result_T( 1 );
00114 #endif // CTTL_TRACE_DEPOSITS
00115 }
00116
00117 };
00118
00119 }
00120
00121
00122 #endif //_XST_STATIC_VOID_H_INCLUDED_