cttl Namespace Reference

Namespace cttl defines publicly visible classes and functions of CTTL library. More...


Namespaces

namespace  alias
 Contains prefabricated helper functions to create closures for member functions of CTTL objects and STL containers.

Classes

struct  lambda
 A collection of convenience typedefs for instantiation of singular lambda primitives. More...

Functions

template<typename ObjectT , typename MemberActionT >
xst_member_action< ObjectT
&, MemberActionT, void,
typename
MemberActionT::result_type > 
action (ObjectT *pobject_, MemberActionT action_)
 Helper function to create closure object for member function with no arguments.
template<typename ObjectT , typename MemberActionT >
xst_member_action< ObjectT
const &, MemberActionT, void,
typename
MemberActionT::result_type > 
action (ObjectT const &object_, MemberActionT action_)
 Helper function to create closure object for constant member function with no arguments.
template<typename ObjectT , typename MemberActionT , typename ArgumentT >
xst_member_action< ObjectT
&, MemberActionT, ArgumentT
const &, typename
MemberActionT::result_type > 
action (ObjectT *pobject_, MemberActionT action_, ArgumentT const &argument_)
 Helper function to create closure object for member function with one constant argument.
template<typename ObjectT , typename MemberActionT , typename ArgumentT >
xst_member_action< ObjectT
const &, MemberActionT,
ArgumentT const &, typename
MemberActionT::result_type > 
action (ObjectT const &object_, MemberActionT action_, ArgumentT const &argument_)
 Helper function to create closure object for constant member function with one constant argument.
template<typename ObjectT , typename MemberActionT , typename ArgumentT >
xst_member_action< ObjectT
&, MemberActionT, ArgumentT
&, typename
MemberActionT::result_type > 
action (ObjectT *pobject_, MemberActionT action_, ArgumentT *pargument_)
 Helper function to create closure object for member function with one mutable argument.
template<typename ObjectT , typename MemberActionT , typename ArgumentT >
xst_member_action< ObjectT
const &, MemberActionT,
ArgumentT &, typename
MemberActionT::result_type > 
action (ObjectT const &object_, MemberActionT action_, ArgumentT *pargument_)
 Helper function to create closure object for constant member function with one mutable argument.
template<typename ReturnT , typename StaticActionT >
xst_static_action
< StaticActionT, void, ReturnT > 
action (StaticActionT action_)
 Helper function to create closure object for free function with no arguments.
template<typename StaticActionT , typename ArgumentT >
xst_static_action
< StaticActionT, ArgumentT
const &, typename
StaticActionT::result_type > 
action (StaticActionT action_, ArgumentT const &argument_)
 Helper function to create closure object for free function with one constant argument.
template<typename StaticActionT , typename ArgumentT >
xst_static_action
< StaticActionT, ArgumentT
&, typename
StaticActionT::result_type > 
action (StaticActionT action_, ArgumentT *pargument_)
 Helper function to create closure object for free function with one mutable argument.
template<typename ValueT >
xst_lambda_wrap< xst_stack
< std::stack< ValueT > > > 
make_stack (ValueT const &value_)
 Helper function to instantiate stack lambda primitive.
template<typename LhsLambdaT , typename RhsTranslatorT >
xst_lambda_wrap
< xst_translator< LhsLambdaT,
RhsTranslatorT >> 
make_translator (xst_lambda_wrap< LhsLambdaT > const &lambda_, RhsTranslatorT translator_)
 Helper function to formulate general purpose translator based on functional composition.
template<typename RightExprT , typename LambdaLhsExprT , typename LambdaRhsExprT , typename PolicyAdaptorT >
xtl_wrap< xtl_opbinand
< xtl_wrap< xst_binary_adaptor
< LambdaLhsExprT,
LambdaRhsExprT, PolicyAdaptorT >
>, xtl_wrap< RightExprT > >> 
operator& (xst_binary_adaptor< LambdaLhsExprT, LambdaRhsExprT, PolicyAdaptorT > const &lhs_expr_, xtl_wrap< RightExprT > const &rhs_expr_)
 Overloads binary set intersection operator allowing to chain lambda expression and CTTL grammar expressions.
template<typename LeftExprT , typename LambdaLhsExprT , typename LambdaRhsExprT , typename PolicyAdaptorT >
xtl_wrap< xtl_opbinand
< xtl_wrap< LeftExprT >
, xtl_wrap< xst_binary_adaptor
< LambdaLhsExprT,
LambdaRhsExprT, PolicyAdaptorT > > >> 
operator& (xtl_wrap< LeftExprT > const &lhs_expr_, xst_binary_adaptor< LambdaLhsExprT, LambdaRhsExprT, PolicyAdaptorT > const &rhs_expr_)
 Overloads binary set intersection operator allowing to chain CTTL grammar and lambda expressions.
template<typename RightExprT , typename LambdaExprT , typename PolicyAdaptorT >
xtl_wrap< xtl_opbinand
< xtl_wrap< xst_unary_adaptor
< LambdaExprT, PolicyAdaptorT >
>, xtl_wrap< RightExprT > >> 
operator& (xst_unary_adaptor< LambdaExprT, PolicyAdaptorT > const &lhs_expr_, xtl_wrap< RightExprT > const &rhs_expr_)
 Overloads binary set intersection operator allowing to chain lambda expression and CTTL grammar.
template<typename LeftExprT , typename LambdaExprT , typename PolicyAdaptorT >
xtl_wrap< xtl_opbinand
< xtl_wrap< LeftExprT >
, xtl_wrap< xst_unary_adaptor
< LambdaExprT, PolicyAdaptorT > > >> 
operator& (xtl_wrap< LeftExprT > const &lhs_expr_, xst_unary_adaptor< LambdaExprT, PolicyAdaptorT > const &rhs_expr_)
 Overloads binary set intersection operator allowing to chain CTTL grammar and lambda expressions.
template<typename RightExprT , typename LambdaLhsExprT , typename LambdaRhsExprT , typename PolicyAdaptorT >
xtl_wrap< xtl_opbinplus
< xtl_wrap< xst_binary_adaptor
< LambdaLhsExprT,
LambdaRhsExprT, PolicyAdaptorT >
>, xtl_wrap< RightExprT > >> 
operator+ (xst_binary_adaptor< LambdaLhsExprT, LambdaRhsExprT, PolicyAdaptorT > const &lhs_expr_, xtl_wrap< RightExprT > const &rhs_expr_)
 Overloads binary sequence operator allowing to chain lambda expression and CTTL grammar.
template<typename LeftExprT , typename LambdaLhsExprT , typename LambdaRhsExprT , typename PolicyAdaptorT >
xtl_wrap< xtl_opbinplus
< xtl_wrap< LeftExprT >
, xtl_wrap< xst_binary_adaptor
< LambdaLhsExprT,
LambdaRhsExprT, PolicyAdaptorT > > >> 
operator+ (xtl_wrap< LeftExprT > const &lhs_expr_, xst_binary_adaptor< LambdaLhsExprT, LambdaRhsExprT, PolicyAdaptorT > const &rhs_expr_)
 Overloads binary sequence operator allowing to chain CTTL grammar and lambda expressions.
template<typename RightExprT , typename LambdaExprT , typename PolicyAdaptorT >
xtl_wrap< xtl_opbinplus
< xtl_wrap< xst_unary_adaptor
< LambdaExprT, PolicyAdaptorT >
>, xtl_wrap< RightExprT > >> 
operator+ (xst_unary_adaptor< LambdaExprT, PolicyAdaptorT > const &lhs_expr_, xtl_wrap< RightExprT > const &rhs_expr_)
 Overloads binary sequence operator allowing to chain lambda expression and CTTL grammar.
template<typename LeftExprT , typename LambdaExprT , typename PolicyAdaptorT >
xtl_wrap< xtl_opbinplus
< xtl_wrap< LeftExprT >
, xtl_wrap< xst_unary_adaptor
< LambdaExprT, PolicyAdaptorT > > >> 
operator+ (xtl_wrap< LeftExprT > const &lhs_expr_, xst_unary_adaptor< LambdaExprT, PolicyAdaptorT > const &rhs_expr_)
 Overloads binary sequence operator allowing to chain CTTL grammar and lambda expressions.
template<typename OutputIteratorT , typename LambdaT >
OutputIteratorT const & operator<< (OutputIteratorT const &iterator_, xst_lambda_wrap< LambdaT > const &lambda_)
 Overloaded operator to write data of lambda compound to output iterator.
template<typename LhsLambdaT , typename RhsTranslatorT >
xst_lambda_wrap
< xst_translator< typename
LhsLambdaT::reference_T,
RhsTranslatorT >> 
operator^ (xst_lambda_wrap< LhsLambdaT > const &lambda_, RhsTranslatorT translator_)
 Overloaded operator to formulate general purpose translator based on functional composition.
template<typename LhsLambdaT >
xst_lambda_wrap
< xst_translator< typename
LhsLambdaT::reference_T,
xst_literal_translator
< wchar_t > >> 
operator^ (xst_lambda_wrap< LhsLambdaT > const &lambda_, wchar_t const *pwchar_)
 Overloaded operator to formulate translator for wide character literal.
template<typename LhsLambdaT >
xst_lambda_wrap
< xst_translator< typename
LhsLambdaT::reference_T,
xst_literal_translator< char > >> 
operator^ (xst_lambda_wrap< LhsLambdaT > const &lambda_, char const *pchar_)
 Overloaded operator to formulate translator for character literal.
template<typename LhsLambdaT , typename SequenceT >
xst_lambda_wrap
< xst_translator< typename
LhsLambdaT::reference_T,
xst_sequence_translator
< SequenceT > >> 
operator^ (xst_lambda_wrap< LhsLambdaT > const &lambda_, std::pair< SequenceT, int > &pair_)
 Overloaded operator to formulate STL sequence translator.
template<typename LhsLambdaT , typename SequenceT >
xst_lambda_wrap
< xst_translator< typename
LhsLambdaT::reference_T,
xst_sequence_translator
< SequenceT > >> 
operator^ (xst_lambda_wrap< LhsLambdaT > const &lambda_, std::pair< SequenceT *, int > &pair_)
 Overloaded operator to formulate sequence translator.
template<typename LhsLambdaT , typename SequenceT , typename MapT >
xst_lambda_wrap
< xst_translator< typename
LhsLambdaT::reference_T,
xst_dictionary_translator
< SequenceT, MapT > >> 
operator^ (xst_lambda_wrap< LhsLambdaT > const &lambda_, std::pair< SequenceT, MapT > &pair_)
 Overloaded operator to formulate dictionary translator.
template<typename LhsLambdaT , typename SequenceT , typename MapT >
xst_lambda_wrap
< xst_translator< typename
LhsLambdaT::reference_T,
xst_dictionary_translator
< SequenceT, MapT > >> 
operator^ (xst_lambda_wrap< LhsLambdaT > const &lambda_, std::pair< SequenceT *, MapT * > &pair_)
 Overloaded operator to formulate dictionary translator.
template<typename LhsLambdaT , typename ValueT >
xst_lambda_wrap
< xst_translator< typename
LhsLambdaT::reference_T,
xst_sequence_translator
< std::vector< ValueT > > >> 
operator^ (xst_lambda_wrap< LhsLambdaT > const &lambda_, std::vector< ValueT > &vector_)
 Overloaded operator to formulate translator for STL vector.
template<typename LambdaT , typename TranslatorT , typename ValueT >
xst_lambda_wrap
< xst_translator
< xst_lambda_wrap
< xst_translator< LambdaT,
TranslatorT >
>, xst_sequence_translator
< std::vector< ValueT > > >> 
operator^ (xst_lambda_wrap< xst_translator< LambdaT, TranslatorT > > const &lambda_, std::vector< ValueT > &vector_)
 Overloaded operator to formulate translator for STL vector.
template<typename LambdaT , typename TranslatorT , typename PolicyT , typename StringT >
xst_lambda_wrap
< xst_translator
< xst_lambda_wrap
< xst_translator< LambdaT,
TranslatorT >
>, xst_edge_translator
< PolicyT, StringT > >> 
operator^ (xst_lambda_wrap< xst_translator< LambdaT, TranslatorT > > const &lambda_, edge< PolicyT, StringT > const &edge_)
 Overloaded operator to formulate translator for CTTL substring.
template<typename LambdaT , typename TranslatorT , typename PolicyT , typename StringT >
xst_lambda_wrap
< xst_translator
< xst_lambda_wrap
< xst_translator< LambdaT,
TranslatorT >
>, xst_edge_translator
< PolicyT, StringT > >> 
operator^ (xst_lambda_wrap< xst_translator< LambdaT, TranslatorT > > const &lambda_, const_edge< PolicyT, StringT > const &edge_)
 Overloaded operator to formulate translator for CTTL substring.
template<typename LhsT >
xst_lambda_wrap< xst_pair
< xst_lambda_wrap< typename
LhsT::reference_T >
, xst_lambda_wrap< xst_scalar
< int & > > >> 
operator^ (xst_lambda_wrap< LhsT > const &lhs_expr_, int *pvalue_)
 Overloaded operator to compose binary tree representing lambda compound.
template<typename LhsT , typename ValueT >
xst_lambda_wrap< xst_pair
< xst_lambda_wrap< typename
LhsT::reference_T >
, xst_lambda_wrap< xst_stack
< std::stack< ValueT > & > > >> 
operator^ (xst_lambda_wrap< LhsT > const &lhs_expr_, std::stack< ValueT > *pstack_)
 Overloaded operator to compose binary tree representing lambda compound.
template<typename LhsT , typename ValueT >
xst_lambda_wrap< xst_pair
< xst_lambda_wrap< typename
LhsT::reference_T >
, xst_lambda_wrap< xst_stack
< std::stack< ValueT > > > >> 
operator^ (xst_lambda_wrap< LhsT > const &lhs_expr_, std::stack< ValueT > const &stack_)
 Overloaded operator to compose binary tree representing lambda compound.
template<typename LhsT >
xst_lambda_wrap< xst_pair
< xst_lambda_wrap< typename
LhsT::reference_T >
, xst_lambda_wrap< xst_scalar
< int > > >> 
operator^ (xst_lambda_wrap< LhsT > const &lhs_expr_, int value_)
 Overloaded operator to compose binary tree representing lambda compound.
template<typename LhsT , typename RhsT >
xst_lambda_wrap< xst_pair
< xst_lambda_wrap< typename
LhsT::reference_T >
, xst_lambda_wrap< typename
RhsT::reference_T > >> 
operator^ (xst_lambda_wrap< LhsT > const &lhs_expr_, xst_lambda_wrap< RhsT > const &rhs_expr_)
 Overloaded operator to compose binary tree representing lambda compound.
template<typename RightExprT , typename LambdaLhsExprT , typename LambdaRhsExprT , typename PolicyAdaptorT >
xtl_wrap< xtl_opbinpipe
< xtl_wrap< xst_binary_adaptor
< LambdaLhsExprT,
LambdaRhsExprT, PolicyAdaptorT >
>, xtl_wrap< RightExprT > >> 
operator| (xst_binary_adaptor< LambdaLhsExprT, LambdaRhsExprT, PolicyAdaptorT > const &lhs_expr_, xtl_wrap< RightExprT > const &rhs_expr_)
 Overloads binary set union operator allowing to chain lambda expression and CTTL grammar expressions.
template<typename LeftExprT , typename LambdaLhsExprT , typename LambdaRhsExprT , typename PolicyAdaptorT >
xtl_wrap< xtl_opbinpipe
< xtl_wrap< LeftExprT >
, xtl_wrap< xst_binary_adaptor
< LambdaLhsExprT,
LambdaRhsExprT, PolicyAdaptorT > > >> 
operator| (xtl_wrap< LeftExprT > const &lhs_expr_, xst_binary_adaptor< LambdaLhsExprT, LambdaRhsExprT, PolicyAdaptorT > const &rhs_expr_)
 Overloads binary set union operator allowing to chain CTTL grammar and lambda expressions.
template<typename RightExprT , typename LambdaExprT , typename PolicyAdaptorT >
xtl_wrap< xtl_opbinpipe
< xtl_wrap< xst_unary_adaptor
< LambdaExprT, PolicyAdaptorT >
>, xtl_wrap< RightExprT > >> 
operator| (xst_unary_adaptor< LambdaExprT, PolicyAdaptorT > const &lhs_expr_, xtl_wrap< RightExprT > const &rhs_expr_)
 Overloads binary set union operator allowing to chain lambda expression and CTTL grammar.
template<typename LeftExprT , typename LambdaExprT , typename PolicyAdaptorT >
xtl_wrap< xtl_opbinpipe
< xtl_wrap< LeftExprT >
, xtl_wrap< xst_unary_adaptor
< LambdaExprT, PolicyAdaptorT > > >> 
operator| (xtl_wrap< LeftExprT > const &lhs_expr_, xst_unary_adaptor< LambdaExprT, PolicyAdaptorT > const &rhs_expr_)
 Overloads binary set union operator allowing to chain CTTL grammar and lambda expressions.
template<typename ValueT >
xst_lambda_wrap< xst_stack
< std::stack< ValueT > & > > 
scalar (std::stack< ValueT > *pstack_)
 Helper function to instantiate stack reference primitive.
template<typename ValueT >
xst_lambda_wrap< xst_scalar
< ValueT & > > 
scalar (ValueT *pvalue_)
 Helper function to instantiate lambda reference primitive.
template<typename ValueT >
xst_lambda_wrap< xst_stack
< std::stack< ValueT > > > 
scalar (std::stack< ValueT > const &stack_)
 Helper function to instantiate stack lambda primitive.
template<typename ValueT >
xst_lambda_wrap< xst_scalar
< ValueT > > 
scalar (ValueT const &value_)
 Helper function to instantiate scalar primitive.


Detailed Description

Namespace cttl defines publicly visible classes and functions of CTTL library.


Function Documentation

template<typename ObjectT , typename MemberActionT >
xst_member_action< ObjectT&, MemberActionT, void, typename MemberActionT::result_type > cttl::action ( ObjectT *  pobject_,
MemberActionT  action_ 
)

Helper function to create closure object for member function with no arguments.

Template Parameters:
ObjectT specifies C++ type implementing desired member function.
MemberActionT specifies member function pointer adaptor compatible with STL adaptable unary function such as mem_fun_t.
Parameters:
pobject_ Pointer to object.
action_ Instance of function pointer adaptor for unary member function.
Returns:
Instance of CTTL closure specialization for cttl_impl::xst_member_action.

Definition at line 404 of file xst_action_helpers.h.

00408 {
00409     return xst_member_action< ObjectT&, MemberActionT, void, typename MemberActionT::result_type >(
00410 #ifdef CTTL_TRACE_DEPOSITS
00411        __LINE__,                     // line_
00412        "xst_member_action", // action_name_,
00413 #endif // CTTL_TRACE_DEPOSITS
00414         *pobject_,
00415         action_
00416         );
00417 }

template<typename ObjectT , typename MemberActionT >
xst_member_action< ObjectT const&, MemberActionT, void, typename MemberActionT::result_type > cttl::action ( ObjectT const &  object_,
MemberActionT  action_ 
)

Helper function to create closure object for constant member function with no arguments.

Template Parameters:
ObjectT specifies C++ type implementing desired member function.
MemberActionT specifies constant member function pointer adaptor compatible with STL adaptable unary function such as std::const_mem_fun_t.
Parameters:
object_ Reference to object.
action_ Instance of function pointer adaptor for constant unary member function.
Returns:
Instance of CTTL closure specialization for cttl_impl::xst_member_action.

Definition at line 364 of file xst_action_helpers.h.

00368 {
00369     return xst_member_action< ObjectT const&, MemberActionT, void, typename MemberActionT::result_type >(
00370 #ifdef CTTL_TRACE_DEPOSITS
00371        __LINE__,                     // line_
00372        "xst_member_action", // action_name_,
00373 #endif // CTTL_TRACE_DEPOSITS
00374         object_,
00375         action_
00376         );
00377 }

template<typename ObjectT , typename MemberActionT , typename ArgumentT >
xst_member_action< ObjectT&, MemberActionT, ArgumentT const&, typename MemberActionT::result_type > cttl::action ( ObjectT *  pobject_,
MemberActionT  action_,
ArgumentT const &  argument_ 
)

Helper function to create closure object for member function with one constant argument.

Template Parameters:
ObjectT specifies C++ type implementing desired member function.
MemberActionT specifies member function pointer adaptor compatible with STL adaptable binary function such as mem_fun1_t:
ArgumentT specifies type of unary function argument.
Parameters:
pobject_ Pointer to object.
action_ Instance of function pointer adaptor for unary member function.
argument_ Reference to argument of member function.
Returns:
Instance of CTTL closure implementation class cttl_impl::xst_member_action.

Definition at line 324 of file xst_action_helpers.h.

00329 {
00330     return xst_member_action< ObjectT&, MemberActionT, ArgumentT const&, typename MemberActionT::result_type >(
00331 #ifdef CTTL_TRACE_DEPOSITS
00332        __LINE__,               // line_
00333        "xst_member_action", // action_name_,
00334 #endif // CTTL_TRACE_DEPOSITS
00335         *pobject_,
00336         action_,
00337         argument_
00338         );
00339 }

template<typename ObjectT , typename MemberActionT , typename ArgumentT >
xst_member_action< ObjectT const&, MemberActionT, ArgumentT const&, typename MemberActionT::result_type > cttl::action ( ObjectT const &  object_,
MemberActionT  action_,
ArgumentT const &  argument_ 
)

Helper function to create closure object for constant member function with one constant argument.

Template Parameters:
ObjectT specifies C++ type implementing desired member function.
MemberActionT specifies constant member function pointer adaptor compatible with STL adaptable binary function such as std::const_mem_fun1_t.
ArgumentT specifies type of member function argument.
Parameters:
object_ Reference to object.
action_ Instance of function pointer adaptor for constant unary member function.
argument_ Reference to function argument.
Returns:
Instance of CTTL closure implementation class cttl_impl::xst_member_action.

Definition at line 277 of file xst_action_helpers.h.

00282 {
00283     return xst_member_action< ObjectT const&, MemberActionT, ArgumentT const&, typename MemberActionT::result_type >(
00284 #ifdef CTTL_TRACE_DEPOSITS
00285        __LINE__,               // line_
00286        "xst_member_action", // action_name_,
00287 #endif // CTTL_TRACE_DEPOSITS
00288         object_,
00289         action_,
00290         argument_
00291         );
00292 }

template<typename ObjectT , typename MemberActionT , typename ArgumentT >
xst_member_action< ObjectT&, MemberActionT, ArgumentT&, typename MemberActionT::result_type > cttl::action ( ObjectT *  pobject_,
MemberActionT  action_,
ArgumentT *  pargument_ 
)

Helper function to create closure object for member function with one mutable argument.

Template Parameters:
ObjectT specifies C++ type implementing desired member function.
MemberActionT specifies member function pointer adaptor compatible with STL adaptable binary function such as mem_fun1_t:
ArgumentT specifies type of unary function argument.
Parameters:
pobject_ Pointer to object.
action_ Instance of function pointer adaptor for unary member function.
pargument_ Pointer to member function argument.
Returns:
Instance of CTTL closure implementation class cttl_impl::xst_member_action.

Definition at line 231 of file xst_action_helpers.h.

00236 {
00237     return xst_member_action< ObjectT&, MemberActionT, ArgumentT&, typename MemberActionT::result_type >(
00238 #ifdef CTTL_TRACE_DEPOSITS
00239        __LINE__,               // line_
00240        "xst_member_action", // action_name_,
00241 #endif // CTTL_TRACE_DEPOSITS
00242         *pobject_,
00243         action_,
00244         *pargument_
00245         );
00246 }

template<typename ObjectT , typename MemberActionT , typename ArgumentT >
xst_member_action< ObjectT const&, MemberActionT, ArgumentT&, typename MemberActionT::result_type > cttl::action ( ObjectT const &  object_,
MemberActionT  action_,
ArgumentT *  pargument_ 
)

Helper function to create closure object for constant member function with one mutable argument.

Template Parameters:
ObjectT specifies C++ type implementing desired member function.
MemberActionT specifies constant member function pointer adaptor compatible with STL adaptable binary function such as std::const_mem_fun1_t.
ArgumentT specifies type of member function argument.
Parameters:
object_ Reference to object.
action_ Instance of function pointer adaptor for constant unary member function.
pargument_ Pointer to function argument.
Returns:
Instance of CTTL closure implementation class cttl_impl::xst_member_action.

Definition at line 184 of file xst_action_helpers.h.

00189 {
00190     return xst_member_action< ObjectT const&, MemberActionT, ArgumentT&, typename MemberActionT::result_type >(
00191 #ifdef CTTL_TRACE_DEPOSITS
00192        __LINE__,               // line_
00193        "xst_member_action", // action_name_,
00194 #endif // CTTL_TRACE_DEPOSITS
00195         object_,
00196         action_,
00197         *pargument_
00198         );
00199 }

template<typename ReturnT , typename StaticActionT >
xst_static_action< StaticActionT, void, ReturnT > cttl::action ( StaticActionT  action_  ) 

Helper function to create closure object for free function with no arguments.

Template Parameters:
StaticActionT specifies type which is a function pointer to global or static member function with no arguments.
ReturnT specifies function return type.
Parameters:
action_ Function pointer.
Returns:
Instance of CTTL closure specialization for cttl_impl::xst_static_action.

Definition at line 139 of file xst_action_helpers.h.

00142 {
00143     return xst_static_action< StaticActionT, void, ReturnT >(
00144 #ifdef CTTL_TRACE_DEPOSITS
00145        __LINE__,               // line_
00146        "xst_static_action", // action_name_,
00147 #endif // CTTL_TRACE_DEPOSITS
00148         action_
00149         );
00150 }

template<typename StaticActionT , typename ArgumentT >
xst_static_action< StaticActionT, ArgumentT const&, typename StaticActionT::result_type > cttl::action ( StaticActionT  action_,
ArgumentT const &  argument_ 
)

Helper function to create closure object for free function with one constant argument.

Template Parameters:
StaticActionT specifies type which is a function pointer adaptor compatible with STL adaptable unary function, such as pointer_to_unary_function:
ArgumentT specifies type of unary function argument.
Parameters:
action_ Instance of function pointer adaptor for global or static member unary function.
argument_ Constant reference to unary function argument.
Returns:
Instance of CTTL closure implementation class cttl_impl::xst_static_action.

Definition at line 106 of file xst_action_helpers.h.

00110 {
00111     return xst_static_action< StaticActionT, ArgumentT const&, typename StaticActionT::result_type >(
00112 #ifdef CTTL_TRACE_DEPOSITS
00113        __LINE__,               // line_
00114        "xst_static_action", // action_name_,
00115 #endif // CTTL_TRACE_DEPOSITS
00116         action_,
00117         argument_
00118         );
00119 }

template<typename StaticActionT , typename ArgumentT >
xst_static_action< StaticActionT, ArgumentT&, typename StaticActionT::result_type > cttl::action ( StaticActionT  action_,
ArgumentT *  pargument_ 
)

Helper function to create closure object for free function with one mutable argument.

Template Parameters:
StaticActionT specifies type which is a function pointer adaptor compatible with STL adaptable unary function, such as pointer_to_unary_function.
ArgumentT specifies type unary function argument.
Parameters:
action_ Instance of function pointer adaptor for global or static member unary function.
pargument_ Pointer to unary function argument.
Returns:
Instance of CTTL closure implementation class cttl_impl::xst_static_action.

Definition at line 67 of file xst_action_helpers.h.

00071 {
00072     return xst_static_action< StaticActionT, ArgumentT&, typename StaticActionT::result_type >(
00073 #ifdef CTTL_TRACE_DEPOSITS
00074        __LINE__,               // line_
00075        "xst_static_action", // action_name_,
00076 #endif // CTTL_TRACE_DEPOSITS
00077         action_,
00078         *pargument_
00079         );
00080 }

template<typename ValueT >
xst_lambda_wrap< xst_stack< std::stack< ValueT > > > cttl::make_stack ( ValueT const &  value_  ) 

Helper function to instantiate stack lambda primitive.

Template Parameters:
ValueT specifies type of object stored in the stack.
Parameters:
value_ Constant reference to an object which can be stored in the stack. No values are pushed into the stack by make_stack function: actual value of value_ is not used.
Returns:
Instance of stack lambda primitive encapsulating instance of STL std::stack container adaptor.

Definition at line 98 of file xst_helpers.h.

00099 {
00100     return xst_lambda_wrap< xst_stack< std::stack< ValueT > > >( value_ );
00101 }

template<typename LhsLambdaT , typename RhsTranslatorT >
xst_lambda_wrap< xst_translator< LhsLambdaT, RhsTranslatorT >> cttl::make_translator ( xst_lambda_wrap< LhsLambdaT > const &  lambda_,
RhsTranslatorT  translator_ 
)

Helper function to formulate general purpose translator based on functional composition.

Returns:
General purpose translator retaining physical copy of the return value.

Definition at line 749 of file xst_helpers.h.

00753 {
00754     typedef
00755             xst_translator<
00756                 LhsLambdaT,
00757                 RhsTranslatorT
00758             >
00759         translator_T;
00760 
00761     return xst_lambda_wrap< translator_T >(
00762         translator_T(
00763             lambda_.right_lambda(),
00764             translator_
00765             )
00766         );
00767 }

template<typename RightExprT , typename LambdaLhsExprT , typename LambdaRhsExprT , typename PolicyAdaptorT >
xtl_wrap< xtl_opbinand< xtl_wrap< xst_binary_adaptor< LambdaLhsExprT, LambdaRhsExprT, PolicyAdaptorT > >, xtl_wrap< RightExprT > >> cttl::operator& ( xst_binary_adaptor< LambdaLhsExprT, LambdaRhsExprT, PolicyAdaptorT > const &  lhs_expr_,
xtl_wrap< RightExprT > const &  rhs_expr_ 
)

Overloads binary set intersection operator allowing to chain lambda expression and CTTL grammar expressions.

Template Parameters:
RightExprT specifies type of left-hand-side expression representing grammar of the input language.
LambdaLhsExprT specifies type of lambda expression encapsulated by cttl_impl::xst_binary_adaptor.
LambdaRhsExprT specifies type of lambda expression encapsulated by cttl_impl::xst_binary_adaptor.
PolicyAdaptorT specifies type of policy class implementing behavior of the binary operator.
Parameters:
lhs_expr_ reference to left-hand-side lambda compound expression object.
rhs_expr_ reference to right-hand-side grammar expression object.
Returns:
Instance of CTTL grammar expression object.

Definition at line 1196 of file xst_helpers.h.

01200 {
01201     typedef
01202         xtl_opbinand<
01203             xtl_wrap< xst_binary_adaptor< LambdaLhsExprT, LambdaRhsExprT, PolicyAdaptorT > >,
01204             xtl_wrap< RightExprT >
01205         >
01206         opplus_T;
01207 
01208     return xtl_wrap< opplus_T >( opplus_T( lhs_expr_, rhs_expr_ ) );
01209 }

template<typename LeftExprT , typename LambdaLhsExprT , typename LambdaRhsExprT , typename PolicyAdaptorT >
xtl_wrap< xtl_opbinand< xtl_wrap< LeftExprT >, xtl_wrap< xst_binary_adaptor< LambdaLhsExprT, LambdaRhsExprT, PolicyAdaptorT > > >> cttl::operator& ( xtl_wrap< LeftExprT > const &  lhs_expr_,
xst_binary_adaptor< LambdaLhsExprT, LambdaRhsExprT, PolicyAdaptorT > const &  rhs_expr_ 
)

Overloads binary set intersection operator allowing to chain CTTL grammar and lambda expressions.

Template Parameters:
LeftExprT specifies type of left-hand-side expression representing grammar of the input language.
LambdaLhsExprT specifies type of lambda expression encapsulated by cttl_impl::xst_binary_adaptor.
LambdaRhsExprT specifies type of lambda expression encapsulated by cttl_impl::xst_binary_adaptor.
PolicyAdaptorT specifies type of policy class implementing behavior of the binary operator.
Parameters:
lhs_expr_ reference to left-hand-side grammar expression object.
rhs_expr_ reference to right-hand-side lambda compound expression object.
Returns:
Instance of CTTL grammar expression object.

Definition at line 1139 of file xst_helpers.h.

01143 {
01144     typedef
01145         xtl_opbinand<
01146             xtl_wrap< LeftExprT >,
01147             xtl_wrap< xst_binary_adaptor< LambdaLhsExprT, LambdaRhsExprT, PolicyAdaptorT > >
01148         >
01149         opplus_T;
01150 
01151     return xtl_wrap< opplus_T >( opplus_T( lhs_expr_, rhs_expr_ ) );
01152 }

template<typename RightExprT , typename LambdaExprT , typename PolicyAdaptorT >
xtl_wrap< xtl_opbinand< xtl_wrap< xst_unary_adaptor< LambdaExprT, PolicyAdaptorT > >, xtl_wrap< RightExprT > >> cttl::operator& ( xst_unary_adaptor< LambdaExprT, PolicyAdaptorT > const &  lhs_expr_,
xtl_wrap< RightExprT > const &  rhs_expr_ 
)

Overloads binary set intersection operator allowing to chain lambda expression and CTTL grammar.

Template Parameters:
RightExprT specifies type of left-hand-side expression representing grammar of the input language.
LambdaExprT specifies type of lambda expression encapsulated by cttl_impl::xst_unary_adaptor.
PolicyAdaptorT specifies type of policy class implementing behavior of the unary operator.
Parameters:
lhs_expr_ reference to left-hand-side lambda compound expression object.
rhs_expr_ reference to right-hand-side grammar expression object.
Returns:
Instance of CTTL grammar expression object.

Definition at line 1083 of file xst_helpers.h.

01087 {
01088     typedef
01089         xtl_opbinand<
01090             xtl_wrap< xst_unary_adaptor< LambdaExprT, PolicyAdaptorT > >,
01091             xtl_wrap< RightExprT >
01092         >
01093         opplus_T;
01094 
01095     return xtl_wrap< opplus_T >( opplus_T( lhs_expr_, rhs_expr_ ) );
01096 }

template<typename LeftExprT , typename LambdaExprT , typename PolicyAdaptorT >
xtl_wrap< xtl_opbinand< xtl_wrap< LeftExprT >, xtl_wrap< xst_unary_adaptor< LambdaExprT, PolicyAdaptorT > > >> cttl::operator& ( xtl_wrap< LeftExprT > const &  lhs_expr_,
xst_unary_adaptor< LambdaExprT, PolicyAdaptorT > const &  rhs_expr_ 
)

Overloads binary set intersection operator allowing to chain CTTL grammar and lambda expressions.

Template Parameters:
LeftExprT specifies type of left-hand-side expression representing grammar of the input language.
LambdaExprT specifies type of lambda expression encapsulated by cttl_impl::xst_unary_adaptor.
PolicyAdaptorT specifies type of policy class implementing behavior of the unary operator.
Parameters:
lhs_expr_ reference to left-hand-side grammar expression object.
rhs_expr_ reference to right-hand-side lambda compound expression object.
Returns:
Instance of CTTL grammar expression object.

Definition at line 1032 of file xst_helpers.h.

01036 {
01037     typedef
01038         xtl_opbinand<
01039             xtl_wrap< LeftExprT >,
01040             xtl_wrap< xst_unary_adaptor< LambdaExprT, PolicyAdaptorT > >
01041         >
01042         opplus_T;
01043 
01044     return xtl_wrap< opplus_T >( opplus_T( lhs_expr_, rhs_expr_ ) );
01045 }

template<typename RightExprT , typename LambdaLhsExprT , typename LambdaRhsExprT , typename PolicyAdaptorT >
xtl_wrap< xtl_opbinplus< xtl_wrap< xst_binary_adaptor< LambdaLhsExprT, LambdaRhsExprT, PolicyAdaptorT > >, xtl_wrap< RightExprT > >> cttl::operator+ ( xst_binary_adaptor< LambdaLhsExprT, LambdaRhsExprT, PolicyAdaptorT > const &  lhs_expr_,
xtl_wrap< RightExprT > const &  rhs_expr_ 
)

Overloads binary sequence operator allowing to chain lambda expression and CTTL grammar.

Template Parameters:
RightExprT specifies type of left-hand-side expression representing grammar of the input language.
LambdaLhsExprT specifies type of lambda expression encapsulated by cttl_impl::xst_binary_adaptor.
LambdaRhsExprT specifies type of lambda expression encapsulated by cttl_impl::xst_binary_adaptor.
PolicyAdaptorT specifies type of policy class implementing behavior of the binary operator.
Parameters:
lhs_expr_ reference to left-hand-side lambda compound expression object.
rhs_expr_ reference to right-hand-side grammar expression object.
Returns:
Instance of CTTL grammar expression object.

Definition at line 974 of file xst_helpers.h.

00978 {
00979     typedef
00980         xtl_opbinplus<
00981             xtl_wrap< xst_binary_adaptor< LambdaLhsExprT, LambdaRhsExprT, PolicyAdaptorT > >,
00982             xtl_wrap< RightExprT >
00983         >
00984         opplus_T;
00985 
00986     return xtl_wrap< opplus_T >( opplus_T( lhs_expr_, rhs_expr_ ) );
00987 }

template<typename LeftExprT , typename LambdaLhsExprT , typename LambdaRhsExprT , typename PolicyAdaptorT >
xtl_wrap< xtl_opbinplus< xtl_wrap< LeftExprT >, xtl_wrap< xst_binary_adaptor< LambdaLhsExprT, LambdaRhsExprT, PolicyAdaptorT > > >> cttl::operator+ ( xtl_wrap< LeftExprT > const &  lhs_expr_,
xst_binary_adaptor< LambdaLhsExprT, LambdaRhsExprT, PolicyAdaptorT > const &  rhs_expr_ 
)

Overloads binary sequence operator allowing to chain CTTL grammar and lambda expressions.

Template Parameters:
LeftExprT specifies type of left-hand-side expression representing grammar of the input language.
LambdaLhsExprT specifies type of lambda expression encapsulated by cttl_impl::xst_binary_adaptor.
LambdaRhsExprT specifies type of lambda expression encapsulated by cttl_impl::xst_binary_adaptor.
PolicyAdaptorT specifies type of policy class implementing behavior of the binary operator.
Parameters:
lhs_expr_ reference to left-hand-side grammar expression object.
rhs_expr_ reference to right-hand-side lambda compound expression object.
Returns:
Instance of CTTL grammar expression object.

Definition at line 918 of file xst_helpers.h.

00922 {
00923     typedef
00924         xtl_opbinplus<
00925             xtl_wrap< LeftExprT >,
00926             xtl_wrap< xst_binary_adaptor< LambdaLhsExprT, LambdaRhsExprT, PolicyAdaptorT > >
00927         >
00928         opplus_T;
00929 
00930     return xtl_wrap< opplus_T >( opplus_T( lhs_expr_, rhs_expr_ ) );
00931 }

template<typename RightExprT , typename LambdaExprT , typename PolicyAdaptorT >
xtl_wrap< xtl_opbinplus< xtl_wrap< xst_unary_adaptor< LambdaExprT, PolicyAdaptorT > >, xtl_wrap< RightExprT > >> cttl::operator+ ( xst_unary_adaptor< LambdaExprT, PolicyAdaptorT > const &  lhs_expr_,
xtl_wrap< RightExprT > const &  rhs_expr_ 
)

Overloads binary sequence operator allowing to chain lambda expression and CTTL grammar.

Template Parameters:
RightExprT specifies type of left-hand-side expression representing grammar of the input language.
LambdaExprT specifies type of lambda expression encapsulated by cttl_impl::xst_unary_adaptor.
PolicyAdaptorT specifies type of policy class implementing behavior of the unary operator.
Parameters:
lhs_expr_ reference to left-hand-side lambda compound expression object.
rhs_expr_ reference to right-hand-side grammar expression object.
Returns:
Instance of CTTL grammar expression object.

Definition at line 862 of file xst_helpers.h.

00866 {
00867     typedef
00868         xtl_opbinplus<
00869             xtl_wrap< xst_unary_adaptor< LambdaExprT, PolicyAdaptorT > >,
00870             xtl_wrap< RightExprT >
00871         >
00872         opplus_T;
00873 
00874     return xtl_wrap< opplus_T >( opplus_T( lhs_expr_, rhs_expr_ ) );
00875 }

template<typename LeftExprT , typename LambdaExprT , typename PolicyAdaptorT >
xtl_wrap< xtl_opbinplus< xtl_wrap< LeftExprT >, xtl_wrap< xst_unary_adaptor< LambdaExprT, PolicyAdaptorT > > >> cttl::operator+ ( xtl_wrap< LeftExprT > const &  lhs_expr_,
xst_unary_adaptor< LambdaExprT, PolicyAdaptorT > const &  rhs_expr_ 
)

Overloads binary sequence operator allowing to chain CTTL grammar and lambda expressions.

Template Parameters:
LeftExprT specifies type of left-hand-side expression representing grammar of the input language.
LambdaExprT specifies type of lambda expression encapsulated by cttl_impl::xst_unary_adaptor.
PolicyAdaptorT specifies type of policy class implementing behavior of the unary operator.
Parameters:
lhs_expr_ reference to left-hand-side grammar expression object.
rhs_expr_ reference to right-hand-side lambda compound expression object.
Returns:
Instance of CTTL grammar expression object.

Definition at line 811 of file xst_helpers.h.

00815 {
00816     typedef
00817         xtl_opbinplus<
00818             xtl_wrap< LeftExprT >,
00819             xtl_wrap< xst_unary_adaptor< LambdaExprT, PolicyAdaptorT > >
00820         >
00821         opplus_T;
00822 
00823     return xtl_wrap< opplus_T >( opplus_T( lhs_expr_, rhs_expr_ ) );
00824 }

template<typename OutputIteratorT , typename LambdaT >
OutputIteratorT const& cttl::operator<< ( OutputIteratorT const &  iterator_,
xst_lambda_wrap< LambdaT > const &  lambda_ 
)

Overloaded operator to write data of lambda compound to output iterator.

Definition at line 1436 of file xst_helpers.h.

01440 {
01441     OutputIteratorT* p_mutable_iterator_ = const_cast< OutputIteratorT* >( &iterator_ );
01442     xst_iterator_writer< OutputIteratorT > writer( *p_mutable_iterator_ );
01443     lambda_.traverse_top_down( writer );
01444     return iterator_;
01445 }

template<typename LhsLambdaT , typename RhsTranslatorT >
xst_lambda_wrap< xst_translator< typename LhsLambdaT::reference_T, RhsTranslatorT >> cttl::operator^ ( xst_lambda_wrap< LhsLambdaT > const &  lambda_,
RhsTranslatorT  translator_ 
)

Overloaded operator to formulate general purpose translator based on functional composition.

Returns:
Functional composition translator which stores a reference to the left-hand-side lambda compound.
Warning:
Translator returned by this version of overloaded operator^ is designed for in-line data translations inside lambda expressions. Since only reference to the lambda primitive accepting result of translation is stored, it is unsuitable for user-defined helper functions which intend to return translator with scalar root back to the caller. Such functions should use cttl::make_translator() helper function to manufacture value-based translator, or else a reference to local object will be returned, resulting in a hard to catch bug.

Definition at line 713 of file xst_helpers.h.

00717 {
00718     typedef
00719             xst_translator<
00720                 typename LhsLambdaT::reference_T,
00721                 RhsTranslatorT
00722             >
00723         translator_T;
00724 
00725     return xst_lambda_wrap< translator_T >(
00726         translator_T(
00727             lambda_.right_lambda().make_reference(),
00728             translator_
00729             )
00730         );
00731 }

template<typename LhsLambdaT >
xst_lambda_wrap< xst_translator< typename LhsLambdaT::reference_T, xst_literal_translator< wchar_t > >> cttl::operator^ ( xst_lambda_wrap< LhsLambdaT > const &  lambda_,
wchar_t const *  pwchar_ 
)

Overloaded operator to formulate translator for wide character literal.

Definition at line 664 of file xst_helpers.h.

00668 {
00669     typedef xst_literal_translator< wchar_t > wliteral_translator_T;
00670     typedef
00671             xst_translator<
00672                 typename LhsLambdaT::reference_T,
00673                 wliteral_translator_T
00674             >
00675         translator_T;
00676 
00677     return xst_lambda_wrap< translator_T >(
00678         translator_T(
00679             lambda_.right_lambda().make_reference(),
00680             wliteral_translator_T( pwchar_ )
00681             )
00682         );
00683 }

template<typename LhsLambdaT >
xst_lambda_wrap< xst_translator< typename LhsLambdaT::reference_T, xst_literal_translator< char > >> cttl::operator^ ( xst_lambda_wrap< LhsLambdaT > const &  lambda_,
char const *  pchar_ 
)

Overloaded operator to formulate translator for character literal.

Definition at line 633 of file xst_helpers.h.

00637 {
00638     typedef xst_literal_translator< char > literal_translator_T;
00639     typedef
00640             xst_translator<
00641                 typename LhsLambdaT::reference_T,
00642                 literal_translator_T
00643             >
00644         translator_T;
00645 
00646     return xst_lambda_wrap< translator_T >(
00647         translator_T(
00648             lambda_.right_lambda().make_reference(),
00649             literal_translator_T( pchar_ )
00650             )
00651         );
00652 }

template<typename LhsLambdaT , typename SequenceT >
xst_lambda_wrap< xst_translator< typename LhsLambdaT::reference_T, xst_sequence_translator< SequenceT > >> cttl::operator^ ( xst_lambda_wrap< LhsLambdaT > const &  lambda_,
std::pair< SequenceT, int > &  pair_ 
)

Overloaded operator to formulate STL sequence translator.

Definition at line 602 of file xst_helpers.h.

00607 {
00608     typedef xst_sequence_translator< SequenceT > sequence_translator_T;
00609     typedef
00610             xst_translator<
00611                 typename LhsLambdaT::reference_T,
00612                 sequence_translator_T
00613             >
00614         translator_T;
00615 
00616     return xst_lambda_wrap< translator_T >(
00617         translator_T(
00618             lambda_.right_lambda().make_reference(),
00619             sequence_translator_T( pair_.first )
00620             )
00621         );
00622 }

template<typename LhsLambdaT , typename SequenceT >
xst_lambda_wrap< xst_translator< typename LhsLambdaT::reference_T, xst_sequence_translator< SequenceT > >> cttl::operator^ ( xst_lambda_wrap< LhsLambdaT > const &  lambda_,
std::pair< SequenceT *, int > &  pair_ 
)

Overloaded operator to formulate sequence translator.

Definition at line 571 of file xst_helpers.h.

00576 {
00577     typedef xst_sequence_translator< SequenceT > sequence_translator_T;
00578     typedef
00579             xst_translator<
00580                 typename LhsLambdaT::reference_T,
00581                 sequence_translator_T
00582             >
00583         translator_T;
00584 
00585     return xst_lambda_wrap< translator_T >(
00586         translator_T(
00587             lambda_.right_lambda().make_reference(),
00588             sequence_translator_T( *pair_.first )
00589             )
00590         );
00591 }

template<typename LhsLambdaT , typename SequenceT , typename MapT >
xst_lambda_wrap< xst_translator< typename LhsLambdaT::reference_T, xst_dictionary_translator< SequenceT, MapT > >> cttl::operator^ ( xst_lambda_wrap< LhsLambdaT > const &  lambda_,
std::pair< SequenceT, MapT > &  pair_ 
)

Overloaded operator to formulate dictionary translator.

Definition at line 540 of file xst_helpers.h.

00545 {
00546     typedef xst_dictionary_translator< SequenceT, MapT > dictionary_translator_T;
00547     typedef
00548             xst_translator<
00549                 typename LhsLambdaT::reference_T,
00550                 dictionary_translator_T
00551             >
00552         translator_T;
00553 
00554     return xst_lambda_wrap< translator_T >(
00555         translator_T(
00556             lambda_.right_lambda().make_reference(),
00557             dictionary_translator_T( pair_.first, pair_.second )
00558             )
00559         );
00560 }

template<typename LhsLambdaT , typename SequenceT , typename MapT >
xst_lambda_wrap< xst_translator< typename LhsLambdaT::reference_T, xst_dictionary_translator< SequenceT, MapT > >> cttl::operator^ ( xst_lambda_wrap< LhsLambdaT > const &  lambda_,
std::pair< SequenceT *, MapT * > &  pair_ 
)

Overloaded operator to formulate dictionary translator.

Definition at line 509 of file xst_helpers.h.

00514 {
00515     typedef xst_dictionary_translator< SequenceT, MapT > dictionary_translator_T;
00516     typedef
00517             xst_translator<
00518                 typename LhsLambdaT::reference_T,
00519                 dictionary_translator_T
00520             >
00521         translator_T;
00522 
00523     return xst_lambda_wrap< translator_T >(
00524         translator_T(
00525             lambda_.right_lambda().make_reference(),
00526             dictionary_translator_T( *pair_.first, *pair_.second )
00527             )
00528         );
00529 }

template<typename LhsLambdaT , typename ValueT >
xst_lambda_wrap< xst_translator< typename LhsLambdaT::reference_T, xst_sequence_translator< std::vector< ValueT > > >> cttl::operator^ ( xst_lambda_wrap< LhsLambdaT > const &  lambda_,
std::vector< ValueT > &  vector_ 
)

Overloaded operator to formulate translator for STL vector.

Definition at line 478 of file xst_helpers.h.

00478                        : sequence translator
00479            xst_lambda_wrap< LhsLambdaT > const& lambda_,
00480            std::vector< ValueT >&
00481            vector_
00482            )
00483 {
00484     typedef xst_sequence_translator< std::vector< ValueT > > sequence_translator_T;
00485     typedef
00486             xst_translator<
00487                 typename LhsLambdaT::reference_T,
00488                 sequence_translator_T
00489             >
00490         translator_T;
00491 
00492     return xst_lambda_wrap< translator_T >(
00493         translator_T(
00494             lambda_.right_lambda().make_reference(),
00495             sequence_translator_T( vector_ )
00496             )
00497         );
00498 }

template<typename LambdaT , typename TranslatorT , typename ValueT >
xst_lambda_wrap< xst_translator< xst_lambda_wrap< xst_translator< LambdaT, TranslatorT > > , xst_sequence_translator< std::vector< ValueT > > >> cttl::operator^ ( xst_lambda_wrap< xst_translator< LambdaT, TranslatorT > > const &  lambda_,
std::vector< ValueT > &  vector_ 
)

Overloaded operator to formulate translator for STL vector.

Definition at line 439 of file xst_helpers.h.

00451 {
00452     typedef xst_sequence_translator< std::vector< ValueT > > sequence_translator_T;
00453     typedef
00454         xst_translator<
00455             xst_lambda_wrap<
00456                 xst_translator<
00457                     LambdaT,
00458                     TranslatorT
00459                 >
00460             >
00461             ,
00462             sequence_translator_T
00463         >
00464         translator_T;
00465 
00466     return xst_lambda_wrap< translator_T >( translator_T( lambda_, sequence_translator_T( vector_ ) ) );
00467 }

template<typename LambdaT , typename TranslatorT , typename PolicyT , typename StringT >
xst_lambda_wrap< xst_translator< xst_lambda_wrap< xst_translator< LambdaT, TranslatorT > > , xst_edge_translator< PolicyT, StringT > >> cttl::operator^ ( xst_lambda_wrap< xst_translator< LambdaT, TranslatorT > > const &  lambda_,
edge< PolicyT, StringT > const &  edge_ 
)

Overloaded operator to formulate translator for CTTL substring.

Definition at line 393 of file xst_helpers.h.

00406 {
00407     typedef xst_edge_translator< PolicyT, StringT > edge_translator_T;
00408     typedef
00409         xst_translator<
00410             xst_lambda_wrap<
00411                 xst_translator<
00412                     LambdaT,
00413                     TranslatorT
00414                 >
00415             >
00416             ,
00417             edge_translator_T
00418         >
00419         translator_T;
00420 
00421     return xst_lambda_wrap< translator_T >( translator_T( lambda_, edge_translator_T( edge_ ) ) );
00422 }

template<typename LambdaT , typename TranslatorT , typename PolicyT , typename StringT >
xst_lambda_wrap< xst_translator< xst_lambda_wrap< xst_translator< LambdaT, TranslatorT > > , xst_edge_translator< PolicyT, StringT > >> cttl::operator^ ( xst_lambda_wrap< xst_translator< LambdaT, TranslatorT > > const &  lambda_,
const_edge< PolicyT, StringT > const &  edge_ 
)

Overloaded operator to formulate translator for CTTL substring.

Definition at line 347 of file xst_helpers.h.

00360 {
00361     typedef xst_edge_translator< PolicyT, StringT > edge_translator_T;
00362     typedef
00363         xst_translator<
00364             xst_lambda_wrap<
00365                 xst_translator<
00366                     LambdaT,
00367                     TranslatorT
00368                 >
00369             >
00370             ,
00371             edge_translator_T
00372         >
00373         translator_T;
00374 
00375     return xst_lambda_wrap< translator_T >( translator_T( lambda_, edge_translator_T( edge_ ) ) );
00376 }

template<typename LhsT >
xst_lambda_wrap< xst_pair< xst_lambda_wrap< typename LhsT::reference_T >, xst_lambda_wrap< xst_scalar< int& > > >> cttl::operator^ ( xst_lambda_wrap< LhsT > const &  lhs_expr_,
int *  pvalue_ 
)

Overloaded operator to compose binary tree representing lambda compound.

Definition at line 311 of file xst_helpers.h.

00315 {
00316     typedef
00317         xst_pair<
00318             xst_lambda_wrap< typename LhsT::reference_T >,
00319             xst_lambda_wrap< xst_scalar< int& > >
00320         >
00321         pair_T;
00322 
00323     return xst_lambda_wrap< pair_T >(
00324         pair_T(
00325             lhs_expr_.make_reference(),
00326             xst_lambda_wrap< xst_scalar< int& > >( pvalue_ )
00327             )
00328         );
00329 }

template<typename LhsT , typename ValueT >
xst_lambda_wrap< xst_pair< xst_lambda_wrap< typename LhsT::reference_T >, xst_lambda_wrap< xst_stack< std::stack< ValueT >& > > >> cttl::operator^ ( xst_lambda_wrap< LhsT > const &  lhs_expr_,
std::stack< ValueT > *  pstack_ 
)

Overloaded operator to compose binary tree representing lambda compound.

Definition at line 282 of file xst_helpers.h.

00286 {
00287     typedef
00288         xst_pair<
00289             xst_lambda_wrap< typename LhsT::reference_T >,
00290             xst_lambda_wrap< xst_stack< std::stack< ValueT >& > >
00291         >
00292         pair_T;
00293 
00294     return xst_lambda_wrap< pair_T >(
00295         pair_T(
00296             lhs_expr_.make_reference(),
00297             xst_lambda_wrap< xst_stack< std::stack< ValueT >& > >( pstack_ )
00298             )
00299         );
00300 }

template<typename LhsT , typename ValueT >
xst_lambda_wrap< xst_pair< xst_lambda_wrap< typename LhsT::reference_T >, xst_lambda_wrap< xst_stack< std::stack< ValueT > > > >> cttl::operator^ ( xst_lambda_wrap< LhsT > const &  lhs_expr_,
std::stack< ValueT > const &  stack_ 
)

Overloaded operator to compose binary tree representing lambda compound.

Definition at line 253 of file xst_helpers.h.

00257 {
00258     typedef
00259         xst_pair<
00260             xst_lambda_wrap< typename LhsT::reference_T >,
00261             xst_lambda_wrap< xst_stack< std::stack< ValueT > > >
00262         >
00263         pair_T;
00264 
00265     return xst_lambda_wrap< pair_T >(
00266         pair_T(
00267             lhs_expr_.make_reference(),
00268             xst_lambda_wrap< xst_stack< std::stack< ValueT > > >( stack_ )
00269             )
00270         );
00271 }

template<typename LhsT >
xst_lambda_wrap< xst_pair< xst_lambda_wrap< typename LhsT::reference_T >, xst_lambda_wrap< xst_scalar< int > > >> cttl::operator^ ( xst_lambda_wrap< LhsT > const &  lhs_expr_,
int  value_ 
)

Overloaded operator to compose binary tree representing lambda compound.

Definition at line 225 of file xst_helpers.h.

00228 {
00229     typedef
00230         xst_pair<
00231             xst_lambda_wrap< typename LhsT::reference_T >,
00232             xst_lambda_wrap< xst_scalar< int > >
00233         >
00234         pair_T;
00235 
00236     return xst_lambda_wrap< pair_T >(
00237         pair_T(
00238             lhs_expr_.make_reference(),
00239             xst_lambda_wrap< xst_scalar< int > >( value_ )
00240             )
00241         );
00242 }

template<typename LhsT , typename RhsT >
xst_lambda_wrap< xst_pair< xst_lambda_wrap< typename LhsT::reference_T >, xst_lambda_wrap< typename RhsT::reference_T > >> cttl::operator^ ( xst_lambda_wrap< LhsT > const &  lhs_expr_,
xst_lambda_wrap< RhsT > const &  rhs_expr_ 
)

Overloaded operator to compose binary tree representing lambda compound.

Definition at line 189 of file xst_helpers.h.

00193 {
00194     // expression a^b^c produces the following tree:
00195     //     ^    //
00196     //    / \   //
00197     //   ^  c   //
00198     //  / \     //
00199     // a   b    //
00200 
00201     typedef
00202         xst_pair<
00203             xst_lambda_wrap< typename LhsT::reference_T >,
00204             xst_lambda_wrap< typename RhsT::reference_T >
00205         >
00206         pair_T;
00207 
00208     return xst_lambda_wrap< pair_T >(
00209         pair_T(
00210             lhs_expr_.make_reference(),
00211             rhs_expr_.make_reference()
00212         )
00213     );
00214 }

template<typename RightExprT , typename LambdaLhsExprT , typename LambdaRhsExprT , typename PolicyAdaptorT >
xtl_wrap< xtl_opbinpipe< xtl_wrap< xst_binary_adaptor< LambdaLhsExprT, LambdaRhsExprT, PolicyAdaptorT > >, xtl_wrap< RightExprT > >> cttl::operator| ( xst_binary_adaptor< LambdaLhsExprT, LambdaRhsExprT, PolicyAdaptorT > const &  lhs_expr_,
xtl_wrap< RightExprT > const &  rhs_expr_ 
)

Overloads binary set union operator allowing to chain lambda expression and CTTL grammar expressions.

Template Parameters:
RightExprT specifies type of left-hand-side expression representing grammar of the input language.
LambdaLhsExprT specifies type of lambda expression encapsulated by cttl_impl::xst_binary_adaptor.
LambdaRhsExprT specifies type of lambda expression encapsulated by cttl_impl::xst_binary_adaptor.
PolicyAdaptorT specifies type of policy class implementing behavior of the binary operator.
Parameters:
lhs_expr_ reference to left-hand-side lambda compound expression object.
rhs_expr_ reference to right-hand-side grammar expression object.
Returns:
Instance of CTTL grammar expression object.

Definition at line 1418 of file xst_helpers.h.

01422 {
01423     typedef
01424         xtl_opbinpipe<
01425             xtl_wrap< xst_binary_adaptor< LambdaLhsExprT, LambdaRhsExprT, PolicyAdaptorT > >,
01426             xtl_wrap< RightExprT >
01427         >
01428         opplus_T;
01429 
01430     return xtl_wrap< opplus_T >( opplus_T( lhs_expr_, rhs_expr_ ) );
01431 }

template<typename LeftExprT , typename LambdaLhsExprT , typename LambdaRhsExprT , typename PolicyAdaptorT >
xtl_wrap< xtl_opbinpipe< xtl_wrap< LeftExprT >, xtl_wrap< xst_binary_adaptor< LambdaLhsExprT, LambdaRhsExprT, PolicyAdaptorT > > >> cttl::operator| ( xtl_wrap< LeftExprT > const &  lhs_expr_,
xst_binary_adaptor< LambdaLhsExprT, LambdaRhsExprT, PolicyAdaptorT > const &  rhs_expr_ 
)

Overloads binary set union operator allowing to chain CTTL grammar and lambda expressions.

Template Parameters:
LeftExprT specifies type of left-hand-side expression representing grammar of the input language.
LambdaLhsExprT specifies type of lambda expression encapsulated by cttl_impl::xst_binary_adaptor.
LambdaRhsExprT specifies type of lambda expression encapsulated by cttl_impl::xst_binary_adaptor.
PolicyAdaptorT specifies type of policy class implementing behavior of the binary operator.
Parameters:
lhs_expr_ reference to left-hand-side grammar expression object.
rhs_expr_ reference to right-hand-side lambda compound expression object.
Returns:
Instance of CTTL grammar expression object.

Definition at line 1361 of file xst_helpers.h.

01365 {
01366     typedef
01367         xtl_opbinpipe<
01368             xtl_wrap< LeftExprT >,
01369             xtl_wrap< xst_binary_adaptor< LambdaLhsExprT, LambdaRhsExprT, PolicyAdaptorT > >
01370         >
01371         opplus_T;
01372 
01373     return xtl_wrap< opplus_T >( opplus_T( lhs_expr_, rhs_expr_ ) );
01374 }

template<typename RightExprT , typename LambdaExprT , typename PolicyAdaptorT >
xtl_wrap< xtl_opbinpipe< xtl_wrap< xst_unary_adaptor< LambdaExprT, PolicyAdaptorT > >, xtl_wrap< RightExprT > >> cttl::operator| ( xst_unary_adaptor< LambdaExprT, PolicyAdaptorT > const &  lhs_expr_,
xtl_wrap< RightExprT > const &  rhs_expr_ 
)

Overloads binary set union operator allowing to chain lambda expression and CTTL grammar.

Template Parameters:
RightExprT specifies type of left-hand-side expression representing grammar of the input language.
LambdaExprT specifies type of lambda expression encapsulated by cttl_impl::xst_unary_adaptor.
PolicyAdaptorT specifies type of policy class implementing behavior of the unary operator.
Parameters:
lhs_expr_ reference to left-hand-side lambda compound expression object.
rhs_expr_ reference to right-hand-side grammar expression object.
Returns:
Instance of CTTL grammar expression object.

Definition at line 1305 of file xst_helpers.h.

01309 {
01310     typedef
01311         xtl_opbinpipe<
01312             xtl_wrap< xst_unary_adaptor< LambdaExprT, PolicyAdaptorT > >,
01313             xtl_wrap< RightExprT >
01314         >
01315         opplus_T;
01316 
01317     return xtl_wrap< opplus_T >( opplus_T( lhs_expr_, rhs_expr_ ) );
01318 }

template<typename LeftExprT , typename LambdaExprT , typename PolicyAdaptorT >
xtl_wrap< xtl_opbinpipe< xtl_wrap< LeftExprT >, xtl_wrap< xst_unary_adaptor< LambdaExprT, PolicyAdaptorT > > >> cttl::operator| ( xtl_wrap< LeftExprT > const &  lhs_expr_,
xst_unary_adaptor< LambdaExprT, PolicyAdaptorT > const &  rhs_expr_ 
)

Overloads binary set union operator allowing to chain CTTL grammar and lambda expressions.

Template Parameters:
LeftExprT specifies type of left-hand-side expression representing grammar of the input language.
LambdaExprT specifies type of lambda expression encapsulated by cttl_impl::xst_unary_adaptor.
PolicyAdaptorT specifies type of policy class implementing behavior of the unary operator.
Parameters:
lhs_expr_ reference to left-hand-side grammar expression object.
rhs_expr_ reference to right-hand-side lambda compound expression object.
Returns:
Instance of CTTL grammar expression object.

Definition at line 1254 of file xst_helpers.h.

01258 {
01259     typedef
01260         xtl_opbinpipe<
01261             xtl_wrap< LeftExprT >,
01262             xtl_wrap< xst_unary_adaptor< LambdaExprT, PolicyAdaptorT > >
01263         >
01264         opplus_T;
01265 
01266     return xtl_wrap< opplus_T >( opplus_T( lhs_expr_, rhs_expr_ ) );
01267 }

template<typename ValueT >
xst_lambda_wrap< xst_stack< std::stack< ValueT >& > > cttl::scalar ( std::stack< ValueT > *  pstack_  ) 

Helper function to instantiate stack reference primitive.

Template Parameters:
ValueT specifies type of object stored in the stack.
Parameters:
pstack_ Pointer to std::stack object to refer to.
Returns:
Stack lambda reference primitive encapsulating mutable reference to the specified stack object.

Definition at line 171 of file xst_helpers.h.

00172 {
00173     assert( pstack_ );
00174     return xst_lambda_wrap< xst_stack< std::stack< ValueT >& > >( pstack_ );
00175 }

template<typename ValueT >
xst_lambda_wrap< xst_scalar< ValueT& > > cttl::scalar ( ValueT *  pvalue_  ) 

Helper function to instantiate lambda reference primitive.

Template Parameters:
ValueT specifies type of object to be referred by scalar reference primitive. ValueT can be either primitive type, or a value container, a compound type exposing value_type typedef. In addition, ValueT can be of type std::pair.
Parameters:
pvalue_ Pointer to object to refer to.
Returns:
Reference lambda primitive encapsulating mutable reference to the specified object.

Definition at line 147 of file xst_helpers.h.

00148 {
00149     assert( pvalue_ );
00150     return xst_lambda_wrap< xst_scalar< ValueT& > >( pvalue_ );
00151 }

template<typename ValueT >
xst_lambda_wrap< xst_stack< std::stack< ValueT > > > cttl::scalar ( std::stack< ValueT > const &  stack_  ) 

Helper function to instantiate stack lambda primitive.

Template Parameters:
ValueT specifies type of object stored in the stack.
Parameters:
stack_ Constant reference to std::stack container adaptor.
Returns:
Instance of stack lambda primitive encapsulating copy of STL stack specified by function argument.

Definition at line 121 of file xst_helpers.h.

00122 {
00123     return xst_lambda_wrap< xst_stack< std::stack< ValueT > > >( stack_ );
00124 }

template<typename ValueT >
xst_lambda_wrap< xst_scalar< ValueT > > cttl::scalar ( ValueT const &  value_  ) 

Helper function to instantiate scalar primitive.

Template Parameters:
ValueT specifies type of copy-constructlible object to be stored in scalar lambda primitive. ValueT can be either primitive type, or a value container, a compound type exposing value_type typedef. In addition, ValueT can be of type std::pair.
Parameters:
value_ Constant reference to object to store a copy of.
Returns:
Scalar lambda primitive object encapsulating the value.

Definition at line 73 of file xst_helpers.h.

00074 {
00075     return xst_lambda_wrap< xst_scalar< ValueT > >( value_ );
00076 }


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