#include <xst_translator.h>
Public Types | |
enum | { const_value_ = LambdaT::const_value_, depth_ = LambdaT::depth_, capacity_ = LambdaT::capacity_, primitive_id_ = primitive_id_translator } |
typedef LambdaT::dereferenced_value_T | dereferenced_value_T |
Defines type of dereferenced object encapsulated by lambda primitive. | |
typedef LambdaT | lambda_T |
Defines C++ type of lambda primitive. | |
typedef xst_translator < LambdaT, TranslatorT > | left_T |
Defines type of left scalar primitive of lambda compound. | |
typedef xst_translator < LambdaT, TranslatorT > | reference_T |
Defines lambda reference type for this primitive. | |
typedef xst_translator < LambdaT, TranslatorT > | right_T |
Defines type of right scalar primitive of lambda compound. | |
typedef TranslatorT | translator_T |
Defines the type of the translator function or functor. | |
typedef LambdaT::value_T | value_T |
Defines C++ type of object encapsulated by lambda primitive. | |
Public Member Functions | |
template<int LocationT> | |
dereferenced_value_T & | dereferenced_value (xst_lambda_wrap< xst_const_scalar< LocationT > > subscript_) |
Dereferenced value of the lambda compound node. | |
left_T const & | left_lambda () const |
Direct constant access to the left-hand-side lambda compound nodes. | |
left_T & | left_lambda () |
Direct mutable access to the left-hand-side lambda compound nodes. | |
reference_T | make_reference () const |
Manufactures lambda reference for this translator. | |
template<typename SubscriptLambdaT > | |
void | pop (SubscriptLambdaT subscript_) |
Pop data from specified lambda compound location. | |
template<typename SubscriptLambdaT , typename InputValueT > | |
void | push (SubscriptLambdaT subscript_, InputValueT const &data_) |
Push data at specified lambda compound location. | |
right_T const & | right_lambda () const |
Direct constant access to the right-hand-side lambda compound nodes. | |
right_T & | right_lambda () |
Direct mutable access to the right-hand-side lambda compound nodes. | |
template<typename SubscriptLambdaT > | |
size_t | size (SubscriptLambdaT subscript_) const |
Get size of stack at specified lambda compound location. | |
template<typename SubscriptLambdaT > | |
std::stack< value_T > const * | stack_ptr (SubscriptLambdaT subscript_) const |
Get constant stack pointer at specified lambda compound location. | |
template<typename SubscriptLambdaT > | |
std::stack< value_T > * | stack_ptr (SubscriptLambdaT subscript_) |
Get stack pointer at specified lambda compound location. | |
template<typename FunctorT > | |
void | subscript_bottom_up (FunctorT &functor_) const |
Subscript bottom-up traversal algorithm. | |
template<typename FunctorT > | |
void | subscript_top_down (FunctorT &functor_) const |
Lambda compound top-down subscript traversal algorithm. | |
template<typename SubscriptLambdaT > | |
value_T & | top (SubscriptLambdaT subscript_) |
Mutable access to data at specified lambda compound location. | |
template<typename SubscriptLambdaT > | |
value_T const & | top (SubscriptLambdaT subscript_) const |
Constant access to data at specified lambda compound location. | |
template<typename FunctorT > | |
void | traverse_bottom_up (FunctorT &functor_) const |
Lambda compound bottom up traversal algorithm with constant access to terminal nodes. | |
template<typename FunctorT > | |
void | traverse_bottom_up (FunctorT &functor_) |
Lambda compound bottom up traversal algorithm with mutable access to terminal nodes. | |
template<typename FunctorT > | |
void | traverse_top_down (FunctorT &functor_) const |
Lambda compound top-down traversal algorithm with constant access to terminal nodes. | |
template<typename FunctorT > | |
void | traverse_top_down (FunctorT &functor_) |
Lambda compound top-down traversal algorithm with mutable access to terminal nodes. | |
xst_translator (xst_translator< LambdaT, TranslatorT > const &other_) | |
Copy constructor. | |
xst_translator (LambdaT const &lambda_, TranslatorT const &translator_) | |
Constructs translator object. | |
Friends | |
struct | xst_lambda_wrap |
struct | xst_translator |
Higher-order-function expression permits data transformations of different types by conversion function f()
:
D ^ f
D.push( f( x ) )
D ^ f ^ g ^ ... ^ k
LambdaT | specifies type of lambda primitive. | |
TranslatorT | specifies type of nested function or function object. |
Definition at line 72 of file xst_translator.h.
typedef LambdaT::dereferenced_value_T cttl_impl::xst_translator< LambdaT, TranslatorT >::dereferenced_value_T |
Defines type of dereferenced object encapsulated by lambda primitive.
Definition at line 104 of file xst_translator.h.
typedef LambdaT cttl_impl::xst_translator< LambdaT, TranslatorT >::lambda_T |
typedef xst_translator< LambdaT, TranslatorT > cttl_impl::xst_translator< LambdaT, TranslatorT >::left_T |
Defines type of left scalar primitive of lambda compound.
Definition at line 107 of file xst_translator.h.
typedef xst_translator< LambdaT, TranslatorT > cttl_impl::xst_translator< LambdaT, TranslatorT >::reference_T |
typedef xst_translator< LambdaT, TranslatorT > cttl_impl::xst_translator< LambdaT, TranslatorT >::right_T |
Defines type of right scalar primitive of lambda compound.
Definition at line 110 of file xst_translator.h.
typedef TranslatorT cttl_impl::xst_translator< LambdaT, TranslatorT >::translator_T |
Defines the type of the translator function or functor.
Definition at line 98 of file xst_translator.h.
typedef LambdaT::value_T cttl_impl::xst_translator< LambdaT, TranslatorT >::value_T |
Defines C++ type of object encapsulated by lambda primitive.
Definition at line 101 of file xst_translator.h.
anonymous enum |
Definition at line 80 of file xst_translator.h.
00080 { 00082 const_value_ = LambdaT::const_value_, 00083 00085 depth_ = LambdaT::depth_, 00086 00088 capacity_ = LambdaT::capacity_, 00089 00091 primitive_id_ = primitive_id_translator 00092 };
cttl_impl::xst_translator< LambdaT, TranslatorT >::xst_translator | ( | LambdaT const & | lambda_, | |
TranslatorT const & | translator_ | |||
) |
cttl_impl::xst_translator< LambdaT, TranslatorT >::xst_translator | ( | xst_translator< LambdaT, TranslatorT > const & | other_ | ) |
Copy constructor.
Definition at line 124 of file xst_translator.h.
00125 : 00126 m_lambda( other_.m_lambda ), 00127 m_translator( other_.m_translator ) 00128 { 00129 }
dereferenced_value_T& cttl_impl::xst_translator< LambdaT, TranslatorT >::dereferenced_value | ( | xst_lambda_wrap< xst_const_scalar< LocationT > > | subscript_ | ) |
left_T const& cttl_impl::xst_translator< LambdaT, TranslatorT >::left_lambda | ( | ) | const |
Direct constant access to the left-hand-side lambda compound nodes.
Definition at line 153 of file xst_translator.h.
left_T& cttl_impl::xst_translator< LambdaT, TranslatorT >::left_lambda | ( | ) |
Direct mutable access to the left-hand-side lambda compound nodes.
Definition at line 147 of file xst_translator.h.
reference_T cttl_impl::xst_translator< LambdaT, TranslatorT >::make_reference | ( | ) | const |
void cttl_impl::xst_translator< LambdaT, TranslatorT >::pop | ( | SubscriptLambdaT | subscript_ | ) |
void cttl_impl::xst_translator< LambdaT, TranslatorT >::push | ( | SubscriptLambdaT | subscript_, | |
InputValueT const & | data_ | |||
) |
right_T const& cttl_impl::xst_translator< LambdaT, TranslatorT >::right_lambda | ( | ) | const |
Direct constant access to the right-hand-side lambda compound nodes.
Definition at line 165 of file xst_translator.h.
right_T& cttl_impl::xst_translator< LambdaT, TranslatorT >::right_lambda | ( | ) |
Direct mutable access to the right-hand-side lambda compound nodes.
Definition at line 159 of file xst_translator.h.
size_t cttl_impl::xst_translator< LambdaT, TranslatorT >::size | ( | SubscriptLambdaT | subscript_ | ) | const |
Get size of stack at specified lambda compound location.
Definition at line 250 of file xst_translator.h.
std::stack< value_T > const* cttl_impl::xst_translator< LambdaT, TranslatorT >::stack_ptr | ( | SubscriptLambdaT | subscript_ | ) | const |
Get constant stack pointer at specified lambda compound location.
Definition at line 264 of file xst_translator.h.
std::stack< value_T >* cttl_impl::xst_translator< LambdaT, TranslatorT >::stack_ptr | ( | SubscriptLambdaT | subscript_ | ) |
Get stack pointer at specified lambda compound location.
Definition at line 257 of file xst_translator.h.
void cttl_impl::xst_translator< LambdaT, TranslatorT >::subscript_bottom_up | ( | FunctorT & | functor_ | ) | const |
void cttl_impl::xst_translator< LambdaT, TranslatorT >::subscript_top_down | ( | FunctorT & | functor_ | ) | const |
Lambda compound top-down subscript traversal algorithm.
Definition at line 204 of file xst_translator.h.
value_T& cttl_impl::xst_translator< LambdaT, TranslatorT >::top | ( | SubscriptLambdaT | subscript_ | ) |
Mutable access to data at specified lambda compound location.
Definition at line 243 of file xst_translator.h.
value_T const& cttl_impl::xst_translator< LambdaT, TranslatorT >::top | ( | SubscriptLambdaT | subscript_ | ) | const |
Constant access to data at specified lambda compound location.
Definition at line 236 of file xst_translator.h.
void cttl_impl::xst_translator< LambdaT, TranslatorT >::traverse_bottom_up | ( | FunctorT & | functor_ | ) | const |
Lambda compound bottom up traversal algorithm with constant access to terminal nodes.
Definition at line 190 of file xst_translator.h.
void cttl_impl::xst_translator< LambdaT, TranslatorT >::traverse_bottom_up | ( | FunctorT & | functor_ | ) |
Lambda compound bottom up traversal algorithm with mutable access to terminal nodes.
Definition at line 176 of file xst_translator.h.
void cttl_impl::xst_translator< LambdaT, TranslatorT >::traverse_top_down | ( | FunctorT & | functor_ | ) | const |
Lambda compound top-down traversal algorithm with constant access to terminal nodes.
Definition at line 197 of file xst_translator.h.
void cttl_impl::xst_translator< LambdaT, TranslatorT >::traverse_top_down | ( | FunctorT & | functor_ | ) |
Lambda compound top-down traversal algorithm with mutable access to terminal nodes.
Definition at line 183 of file xst_translator.h.
friend struct xst_lambda_wrap [friend] |
Definition at line 75 of file xst_translator.h.
friend struct xst_translator [friend] |
Definition at line 78 of file xst_translator.h.