Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::proto::when< Grammar, external_transform > Struct Template Reference

This specialization uses the Data parameter as a collection of transforms that can be indexed by the specified rule. More...

#include <when.hpp>

Inheritance diagram for boost::proto::when< Grammar, external_transform >:
Collaboration diagram for boost::proto::when< Grammar, external_transform >:

Classes

struct  impl
 

Public Types

typedef Grammar first
 
typedef external_transform second
 
typedef Grammar::proto_grammar proto_grammar
 
typedef when< Grammar,
external_transform > 
transform_type
 

Public Member Functions

 BOOST_PROTO_CALLABLE () typedef X proto_is_transform_
 
BOOST_FORCEINLINE
boost::proto::detail::apply_transform
< transform_type(Expr const &)>
::result_type 
operator() (Expr &&e) const
 
BOOST_FORCEINLINE
boost::proto::detail::apply_transform
< transform_type(Expr const
&, State const &)>
::result_type 
operator() (Expr &&e, State &&s) const
 
BOOST_FORCEINLINE
boost::proto::detail::apply_transform
< transform_type(Expr const
&, State const &, Data const &)>
::result_type 
operator() (Expr &&e, State &&s, Data &&d) const
 

Detailed Description

template<typename Grammar>
struct boost::proto::when< Grammar, external_transform >

This specialization uses the Data parameter as a collection of transforms that can be indexed by the specified rule.

Use when<T, external_transform> in your code when you would like to define a grammar once and use it to evaluate expressions with many different sets of transforms. The transforms are found by using the Data parameter as a map from rules to transforms.

See action_map for an example.

Member Typedef Documentation

template<typename Grammar >
typedef Grammar boost::proto::when< Grammar, external_transform >::first
template<typename Grammar >
typedef Grammar::proto_grammar boost::proto::when< Grammar, external_transform >::proto_grammar
template<typename Grammar >
typedef external_transform boost::proto::when< Grammar, external_transform >::second
typedef when< Grammar, external_transform > boost::proto::transform< when< Grammar, external_transform > , X >::transform_type
inherited

Member Function Documentation

boost::proto::transform< when< Grammar, external_transform > , X >::BOOST_PROTO_CALLABLE ( )
inherited
BOOST_FORCEINLINE boost::proto::detail::apply_transform<transform_type(Expr const &, State const &, Data const &)>::result_type boost::proto::transform< when< Grammar, external_transform > , X >::operator() ( Expr &&  e,
State &&  s,
Data &&  d 
) const
inlineinherited
BOOST_FORCEINLINE boost::proto::detail::apply_transform<transform_type(Expr const &, State const &)>::result_type boost::proto::transform< when< Grammar, external_transform > , X >::operator() ( Expr &&  e,
State &&  s 
) const
inlineinherited
BOOST_FORCEINLINE boost::proto::detail::apply_transform<transform_type(Expr const &)>::result_type boost::proto::transform< when< Grammar, external_transform > , X >::operator() ( Expr &&  e) const
inlineinherited

The documentation for this struct was generated from the following file: