00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00026
00036
00037
00038 #ifndef _XST_STATIC_VOID_H_INCLUDED_
00039 #define _XST_STATIC_VOID_H_INCLUDED_
00040
00041 namespace cttl_impl {
00042
00057 template< typename StaticActionT, typename ArgumentT >
00058 class xst_static_action< StaticActionT, ArgumentT, void >
00059
00060 #ifdef CTTL_TRACE_DEPOSITS
00061 : public xst_traced_action_base
00062 #endif
00063
00064 {
00066 StaticActionT m_static_action;
00067
00069 xst_storage_adaptor< ArgumentT > m_argument;
00070
00071 public:
00073 typedef xst_static_action< StaticActionT, ArgumentT, void > action_T;
00074
00076 typedef int result_T;
00077
00079 typedef typename xst_dereference_traits< action_T, result_T >::value_type value_type;
00080
00082 xst_static_action(
00083 #ifdef CTTL_TRACE_DEPOSITS
00084 int line_,
00085 char const* action_name_,
00086 #endif
00087 StaticActionT static_action_,
00088 ArgumentT argument_
00089 )
00090 :
00091 #ifdef CTTL_TRACE_DEPOSITS
00092 xst_traced_action_base( line_, action_name_ ),
00093 #endif
00094 m_static_action( static_action_ ),
00095 m_argument( argument_ )
00096 {
00097 }
00098
00100 result_T operator() ( bool ) const
00101 {
00102 return operator*();
00103 }
00104
00106 result_T operator* () const
00107 {
00108 #ifdef CTTL_TRACE_DEPOSITS
00109 trace_prolog( m_argument.value() );
00110 m_static_action( m_argument.value() );
00111 result_T result = result_T( 1 );
00112 trace_epilog( result );
00113 return result;
00114 #else
00115 m_static_action( m_argument.value() );
00116 return result_T( 1 );
00117 #endif // CTTL_TRACE_DEPOSITS
00118 }
00119
00120 };
00121
00122 }
00123
00124
00125 #endif //_XST_STATIC_VOID_H_INCLUDED_