expression_tree  3.2
 All Classes Files Functions Variables Typedefs Pages
Public Member Functions | Public Attributes | List of all members
expression_tree::detail::default_branch< T, CachingPolicy, ThreadingPolicy > Class Template Reference

Branch class. More...

#include <expression_tree.h>

Inheritance diagram for expression_tree::detail::default_branch< T, CachingPolicy, ThreadingPolicy >:
Inheritance graph
[legend]
Collaboration diagram for expression_tree::detail::default_branch< T, CachingPolicy, ThreadingPolicy >:
Collaboration graph
[legend]

Public Member Functions

 default_branch (const typename operation< T >::t &f, const node< T, CachingPolicy, ThreadingPolicy > &l, const node< T, CachingPolicy, ThreadingPolicy > &r)
 Constructor.
 
 default_branch (const default_branch< T, CachingPolicy, ThreadingPolicy > &other)
 Copy constructor.
 
virtual std::unique_ptr
< node_impl< T > > 
clone () const
 Clones this object.
 
virtual bool constant () const
 The constness of a branch is determined by the constness of its children.
 
virtual T evaluate () const
 Evaluating a branch applies its operation on its children.
 
virtual node< T, CachingPolicy,
ThreadingPolicy > & 
left ()
 This branch's left child.
 
virtual node< T, CachingPolicy,
ThreadingPolicy > & 
right ()
 This branch's right child.
 
virtual void grow ()
 

Public Attributes

node< T, CachingPolicy,
ThreadingPolicy > 
l
 This branch's left child.
 
node< T, CachingPolicy,
ThreadingPolicy > 
r
 This branch's right child.
 
operation< T >::t f
 Operation to be applied to this node's children.
 

Detailed Description

template<typename T, template< typename, typename > class CachingPolicy, class ThreadingPolicy>
class expression_tree::detail::default_branch< T, CachingPolicy, ThreadingPolicy >

Branch class.

This class stores an operation and two children nodes. This default implementation does no caching optimization.

Constructor & Destructor Documentation

template<typename T, template< typename, typename > class CachingPolicy, class ThreadingPolicy>
expression_tree::detail::default_branch< T, CachingPolicy, ThreadingPolicy >::default_branch ( const typename operation< T >::t &  f,
const node< T, CachingPolicy, ThreadingPolicy > &  l,
const node< T, CachingPolicy, ThreadingPolicy > &  r 
)
inline

Constructor.

Parameters
fThe operation to apply to this branch's children,
lThis branch's left child.
rThis branch's right child.

Member Function Documentation

template<typename T, template< typename, typename > class CachingPolicy, class ThreadingPolicy>
virtual void expression_tree::detail::default_branch< T, CachingPolicy, ThreadingPolicy >::grow ( )
inlinevirtual

This function is called when anyone of this branch's children is modified. This default implementation does nothing when that happens.

Reimplemented in expression_tree::cache_on_assignment< T, ThreadingPolicy >::branch, and expression_tree::cache_on_evaluation< T, ThreadingPolicy >::branch.


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