cttl::alias::associative Namespace Reference

Alias helpers for count() and erase() member functions of STL associative containers. More...


Functions

template<typename LambdaT , typename ArgumentT >
xst_unary_adaptor
< xst_lambda_wrap< xst_scalar
< xst_member_action< typename
LambdaT::value_T const
&, std::const_mem_fun1_t
< typename
LambdaT::value_T::size_type,
typename LambdaT::value_T,
ArgumentT const & >, ArgumentT
const &, typename
LambdaT::value_T::size_type >
> >, xst_dereference_policy
< xst_dereference_traits
< typename LambdaT::value_T,
typename
LambdaT::value_T::size_type >
::capacity_,
LambdaT::primitive_id_ >> 
count (xst_lambda_wrap< LambdaT > const &lambda_, ArgumentT const &arg_)
 Alias helper function count.
template<typename LambdaT , typename ArgumentT >
xst_unary_adaptor
< xst_lambda_wrap< xst_scalar
< xst_member_action< typename
LambdaT::value_T
&, std::mem_fun1_t< typename
LambdaT::value_T::size_type,
typename LambdaT::value_T,
ArgumentT const & >, ArgumentT
const &, typename
LambdaT::value_T::size_type >
> >, xst_dereference_policy
< xst_dereference_traits
< typename LambdaT::value_T,
typename
LambdaT::value_T::size_type >
::capacity_,
LambdaT::primitive_id_ >> 
erase (xst_lambda_wrap< LambdaT > *plambda_, ArgumentT const &arg_)
 Alias helper function erase.


Detailed Description

Alias helpers for count() and erase() member functions of STL associative containers.


Function Documentation

template<typename LambdaT , typename ArgumentT >
xst_unary_adaptor< xst_lambda_wrap< xst_scalar< xst_member_action< typename LambdaT::value_T const&, std::const_mem_fun1_t< typename LambdaT::value_T::size_type, typename LambdaT::value_T, ArgumentT const& >, ArgumentT const&, typename LambdaT::value_T::size_type > > > , xst_dereference_policy< xst_dereference_traits< typename LambdaT::value_T, typename LambdaT::value_T::size_type >::capacity_, LambdaT::primitive_id_ >> cttl::alias::associative::count ( xst_lambda_wrap< LambdaT > const &  lambda_,
ArgumentT const &  arg_ 
)

Alias helper function count.

Returns closure for

    X::size_type alias::associative::count(key_type const&)const;

member function. The closure object delays actual function call till run-time by capturing pointer to member function and its argument.

Definition at line 6859 of file xst_member_action_alias.h.

06863 {
06864     typedef typename LambdaT::value_T object_T;
06865     typedef typename LambdaT::value_T::size_type result_T;
06866     typedef xst_unary_adaptor<
06867         xst_lambda_wrap<
06868             xst_scalar<
06869                 xst_member_action<
06870                     /*ObjectT*/         typename LambdaT::value_T const&,
06871                     /*MemberActionT*/   std::const_mem_fun1_t<
06872                                             /*ResultT*/typename LambdaT::value_T::size_type,
06873                                             /*ObjectT*/typename LambdaT::value_T,
06874                                             /*ArgumentT*/ArgumentT const&
06875                                         >,
06876                     /*ArgumentT*/       ArgumentT const&,
06877                     /*ResultT*/         typename LambdaT::value_T::size_type
06878                 >
06879             >
06880         >
06881         ,
06882         xst_dereference_policy<
06883             xst_dereference_traits<
06884                 /*ObjectT*/ typename LambdaT::value_T,
06885                 /*ResultT*/ typename LambdaT::value_T::size_type
06886             >::capacity_,
06887             LambdaT::primitive_id_
06888         >
06889     >
06890     xst_adaptor_T;
06891 
06892     return xst_adaptor_T( scalar(
06893 #ifdef CTTL_TRACE_DEPOSITS
06894             xst_traced_action(
06895                 __LINE__,
06896                 "X::size_type alias::associative::count(key_type const&)const",
06897 #else
06898             action(
06899 #endif // CTTL_TRACE_DEPOSITS
06900                 lambda_.top( const_scalar( 0 ) ),
06901                 ( std::const_mem_fun1_t<
06902                     result_T,
06903                     object_T,
06904                     ArgumentT const&
06905                     >
06906                     ( &object_T::count )
06907                 ),
06908                 arg_
06909             )
06910         ))
06911         ;
06912 }

template<typename LambdaT , typename ArgumentT >
xst_unary_adaptor< xst_lambda_wrap< xst_scalar< xst_member_action< typename LambdaT::value_T &, std::mem_fun1_t< typename LambdaT::value_T::size_type, typename LambdaT::value_T, ArgumentT const& >, ArgumentT const&, typename LambdaT::value_T::size_type > > > , xst_dereference_policy< xst_dereference_traits< typename LambdaT::value_T, typename LambdaT::value_T::size_type >::capacity_, LambdaT::primitive_id_ >> cttl::alias::associative::erase ( xst_lambda_wrap< LambdaT > *  plambda_,
ArgumentT const &  arg_ 
)

Alias helper function erase.

Returns closure for

    X::size_type alias::associative::erase(key_type const&);

member function. The closure object delays actual function call till run-time by capturing pointer to member function and its argument.

Definition at line 6957 of file xst_member_action_alias.h.

06961 {
06962     typedef typename LambdaT::value_T object_T;
06963     typedef typename LambdaT::value_T::size_type result_T;
06964     typedef xst_unary_adaptor<
06965         xst_lambda_wrap<
06966             xst_scalar<
06967                 xst_member_action<
06968                     /*ObjectT*/         typename LambdaT::value_T &,
06969                     /*MemberActionT*/   std::mem_fun1_t<
06970                                             /*ResultT*/typename LambdaT::value_T::size_type,
06971                                             /*ObjectT*/typename LambdaT::value_T,
06972                                             /*ArgumentT*/ArgumentT const&
06973                                         >,
06974                     /*ArgumentT*/       ArgumentT const&,
06975                     /*ResultT*/         typename LambdaT::value_T::size_type
06976                 >
06977             >
06978         >
06979         ,
06980         xst_dereference_policy<
06981             xst_dereference_traits<
06982                 /*ObjectT*/ typename LambdaT::value_T,
06983                 /*ResultT*/ typename LambdaT::value_T::size_type
06984             >::capacity_,
06985             LambdaT::primitive_id_
06986         >
06987     >
06988     xst_adaptor_T;
06989 
06990     return xst_adaptor_T( scalar(
06991 #ifdef CTTL_TRACE_DEPOSITS
06992             xst_traced_action(
06993                 __LINE__,
06994                 "X::size_type alias::associative::erase(key_type const&)",
06995 #else
06996             action(
06997 #endif // CTTL_TRACE_DEPOSITS
06998                 &plambda_->top( const_scalar( 0 ) ),
06999                 ( std::mem_fun1_t<
07000                     result_T,
07001                     object_T,
07002                     ArgumentT const&
07003                     >
07004                     ( &object_T::erase )
07005                 ),
07006                 arg_
07007             )
07008         ))
07009         ;
07010 }


Generated on Sun Aug 23 13:44:11 2009 for Common Text Transformation Library by  doxygen 1.5.9