#include <xst_stack.h>
Public Types | |
enum | { const_value_, depth_ = 1, capacity_ = 1, primitive_id_ = primitive_id_stack } |
typedef value_T | dereferenced_value_T |
Defines type of dereferenced stack primitive, which is type of object stored in the stack. | |
typedef xst_stack< StackT > | left_T |
Defines type of left scalar primitive of lambda compound. | |
typedef xst_stack< typename xst_storage_adaptor< StackT > ::reference > | reference_T |
Defines reference type for stack primitive. | |
typedef xst_stack< StackT > | right_T |
Defines type of right scalar primitive of lambda compound. | |
typedef xst_storage_adaptor < StackT >::value_type | stack_T |
Defines type of encapsulated stack object. | |
typedef stack_T::value_type | value_T |
Defines type of object stored in the stack. | |
Public Member Functions | |
template<int LocationT> | |
dereferenced_value_T & | dereferenced_value (xst_lambda_wrap< xst_const_scalar< LocationT > > subscript_) |
Dereferenced stack primitive returns top stack element. | |
left_T const & | left_lambda () const |
Direct constant access to left-hand-side stack lambda compound node. | |
left_T & | left_lambda () |
Direct mutable access to left-hand-side stack lambda compound node. | |
reference_T | make_reference () const |
Manufactures copy of reference object for stack primitive. | |
template<int LocationT> | |
void | pop (xst_lambda_wrap< xst_const_scalar< LocationT > >) |
Push data from stack. | |
template<int LocationT, typename InputValueT > | |
void | push (xst_lambda_wrap< xst_const_scalar< LocationT > >, InputValueT const &data_) |
Push data to stack. | |
right_T const & | right_lambda () const |
Direct constant access to right-hand-side stack lambda compound node. | |
right_T & | right_lambda () |
Direct mutable access to right-hand-side stack lambda compound node. | |
template<int LocationT> | |
size_t | size (xst_lambda_wrap< xst_const_scalar< LocationT > >) const |
Get stack size. | |
template<int LocationT> | |
stack_T * | stack_ptr (xst_lambda_wrap< xst_const_scalar< LocationT > >) |
Get mutable pointer to stack encapsulated by lambda compound node. | |
template<int LocationT> | |
stack_T const * | stack_ptr (xst_lambda_wrap< xst_const_scalar< LocationT > >) const |
Get constant pointer to stack encapsulated by lambda compound node. | |
template<int LocationT> | |
value_T & | top (xst_lambda_wrap< xst_const_scalar< LocationT > >) |
Mutable access to top element of stack. | |
template<int LocationT> | |
value_T const & | top (xst_lambda_wrap< xst_const_scalar< LocationT > >) const |
Constant access to top element of stack. | |
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_stack (xst_stack< StackT > const &other_) | |
Copy constructor. | |
xst_stack (value_T const &) | |
Constructs stack primitive from type of object stored in the stack. | |
xst_stack (StackT stack_) | |
Constructs stack primitive from stack or reference to stack. | |
xst_stack () | |
Default constructor. | |
Static Public Member Functions | |
template<typename FunctorT > | |
static void | subscript_bottom_up (FunctorT &functor_) |
Subscript bottom-up traversal algorithm. | |
template<typename FunctorT > | |
static void | subscript_top_down (FunctorT &functor_) |
Subscript top-down subscript traversal algorithm. | |
Friends | |
struct | xst_lambda_wrap |
struct | xst_translator |
StackT | specifies type of stack or reference to stack. |
Definition at line 57 of file xst_stack.h.
typedef value_T cttl_impl::xst_stack< StackT >::dereferenced_value_T |
Defines type of dereferenced stack primitive, which is type of object stored in the stack.
Definition at line 86 of file xst_stack.h.
typedef xst_stack< StackT > cttl_impl::xst_stack< StackT >::left_T |
Defines type of left scalar primitive of lambda compound.
Definition at line 89 of file xst_stack.h.
typedef xst_stack< typename xst_storage_adaptor< StackT >::reference > cttl_impl::xst_stack< StackT >::reference_T |
typedef xst_stack< StackT > cttl_impl::xst_stack< StackT >::right_T |
Defines type of right scalar primitive of lambda compound.
Definition at line 92 of file xst_stack.h.
typedef xst_storage_adaptor< StackT >::value_type cttl_impl::xst_stack< StackT >::stack_T |
typedef stack_T::value_type cttl_impl::xst_stack< StackT >::value_T |
anonymous enum |
Definition at line 65 of file xst_stack.h.
00065 { 00067 const_value_, 00068 00070 depth_ = 1, 00071 00073 capacity_ = 1, 00074 00076 primitive_id_ = primitive_id_stack 00077 };
cttl_impl::xst_stack< StackT >::xst_stack | ( | ) |
cttl_impl::xst_stack< StackT >::xst_stack | ( | StackT | stack_ | ) |
Constructs stack primitive from stack or reference to stack.
Definition at line 103 of file xst_stack.h.
cttl_impl::xst_stack< StackT >::xst_stack | ( | value_T const & | ) |
Constructs stack primitive from type of object stored in the stack.
Definition at line 115 of file xst_stack.h.
cttl_impl::xst_stack< StackT >::xst_stack | ( | xst_stack< StackT > const & | other_ | ) |
dereferenced_value_T& cttl_impl::xst_stack< StackT >::dereferenced_value | ( | xst_lambda_wrap< xst_const_scalar< LocationT > > | subscript_ | ) |
Dereferenced stack primitive returns top stack element.
Definition at line 136 of file xst_stack.h.
00137 { 00138 return top( subscript_ ); 00139 }
left_T const& cttl_impl::xst_stack< StackT >::left_lambda | ( | ) | const |
Direct constant access to left-hand-side stack lambda compound node.
Definition at line 153 of file xst_stack.h.
left_T& cttl_impl::xst_stack< StackT >::left_lambda | ( | ) |
Direct mutable access to left-hand-side stack lambda compound node.
Definition at line 146 of file xst_stack.h.
reference_T cttl_impl::xst_stack< StackT >::make_reference | ( | ) | const |
Manufactures copy of reference object for stack primitive.
Definition at line 127 of file xst_stack.h.
00128 { 00129 return reference_T( const_cast< xst_stack< StackT >* >( this )->m_stack.value() ); 00130 }
void cttl_impl::xst_stack< StackT >::pop | ( | xst_lambda_wrap< xst_const_scalar< LocationT > > | ) |
void cttl_impl::xst_stack< StackT >::push | ( | xst_lambda_wrap< xst_const_scalar< LocationT > > | , | |
InputValueT const & | data_ | |||
) |
Push data to stack.
Definition at line 232 of file xst_stack.h.
00236 { 00237 CTTL_TRACE_DEPOSIT_TEXT( "->" ); 00238 CTTL_TRACE_DEPOSIT_TEXT( xst_storage_adaptor< StackT >::trace_char() ); 00239 CTTL_TRACE_DEPOSIT_TEXT( "push$" ); 00240 CTTL_TRACE_DEPOSIT_TEXT( xst_non_scalar_traits< InputValueT >::identity( data_ ) ); 00241 CTTL_TRACE_DEPOSIT_TEXT( ' ' ); 00242 xpush_descend< LocationT >( data_ ); 00243 }
right_T const& cttl_impl::xst_stack< StackT >::right_lambda | ( | ) | const |
Direct constant access to right-hand-side stack lambda compound node.
Definition at line 165 of file xst_stack.h.
right_T& cttl_impl::xst_stack< StackT >::right_lambda | ( | ) |
Direct mutable access to right-hand-side stack lambda compound node.
Definition at line 159 of file xst_stack.h.
size_t cttl_impl::xst_stack< StackT >::size | ( | xst_lambda_wrap< xst_const_scalar< LocationT > > | ) | const |
stack_T* cttl_impl::xst_stack< StackT >::stack_ptr | ( | xst_lambda_wrap< xst_const_scalar< LocationT > > | ) |
Get mutable pointer to stack encapsulated by lambda compound node.
Definition at line 313 of file xst_stack.h.
stack_T const* cttl_impl::xst_stack< StackT >::stack_ptr | ( | xst_lambda_wrap< xst_const_scalar< LocationT > > | ) | const |
Get constant pointer to stack encapsulated by lambda compound node.
Definition at line 300 of file xst_stack.h.
static void cttl_impl::xst_stack< StackT >::subscript_bottom_up | ( | FunctorT & | functor_ | ) | [static] |
Subscript bottom-up traversal algorithm.
Definition at line 184 of file xst_stack.h.
00185 { 00186 functor_( const_scalar( 0 ) ); 00187 }
static void cttl_impl::xst_stack< StackT >::subscript_top_down | ( | FunctorT & | functor_ | ) | [static] |
Subscript top-down subscript traversal algorithm.
Definition at line 177 of file xst_stack.h.
00178 { 00179 functor_( const_scalar( 0 ) ); 00180 }
value_T& cttl_impl::xst_stack< StackT >::top | ( | xst_lambda_wrap< xst_const_scalar< LocationT > > | ) |
value_T const& cttl_impl::xst_stack< StackT >::top | ( | xst_lambda_wrap< xst_const_scalar< LocationT > > | ) | const |
void cttl_impl::xst_stack< StackT >::traverse_bottom_up | ( | FunctorT & | functor_ | ) | const |
Lambda compound bottom up traversal algorithm with constant access to terminal nodes.
Definition at line 209 of file xst_stack.h.
void cttl_impl::xst_stack< StackT >::traverse_bottom_up | ( | FunctorT & | functor_ | ) |
Lambda compound bottom up traversal algorithm with mutable access to terminal nodes.
Definition at line 195 of file xst_stack.h.
void cttl_impl::xst_stack< StackT >::traverse_top_down | ( | FunctorT & | functor_ | ) | const |
Lambda compound top-down traversal algorithm with constant access to terminal nodes.
Definition at line 216 of file xst_stack.h.
void cttl_impl::xst_stack< StackT >::traverse_top_down | ( | FunctorT & | functor_ | ) |
Lambda compound top-down traversal algorithm with mutable access to terminal nodes.
Definition at line 202 of file xst_stack.h.
friend struct xst_lambda_wrap [friend] |
Definition at line 60 of file xst_stack.h.
friend struct xst_translator [friend] |
Definition at line 63 of file xst_stack.h.