ICRS Eurobot 2013

Dependencies:   mbed mbed-rtos Servo QEI

Embed: (wiki syntax)

« Back to documentation index

XprVector< E, Sz > Class Template Reference

XprVector< E, Sz > Class Template Reference

Represents the expression for vectors at any node in the parse tree. More...

#include <tvmet/xpr/Vector.h>

Inherits TvmetBase< XprVector< E, Sz > >.

Public Types

enum  { Size = Sz }
 

Dimensions.

More...
enum  
 

Complexity counter.

More...

Public Member Functions

 XprVector (const E &e)
 Constructor.
 XprVector (const XprVector &e)
 Copy Constructor.
value_type operator() (std::size_t i) const
 const index operator for vectors.
value_type operator[] (std::size_t i) const
 const index operator for vectors.
template<class Dest , class Assign >
void assign_to (Dest &dest, const Assign &assign_fn) const
 assign this expression to Vector dest.

Detailed Description

template<class E, std::size_t Sz>
class tvmet::XprVector< E, Sz >

Represents the expression for vectors at any node in the parse tree.

Specifically, XprVector is the class that wraps the expression, and the expression itself is represented by the template parameter E. The class XprVector is known as an anonymizing expression wrapper because it can hold any subexpression of arbitrary complexity, allowing clients to work with any expression by holding on to it via the wrapper, without having to know the name of the type object that actually implements the expression.

Note:
leave the Ctors non-explicit to allow implicit type conversation.

Definition at line 50 of file xpr/Vector.h.


Member Enumeration Documentation

anonymous enum

Dimensions.

Enumerator:
Size 

The size of the vector.

Definition at line 60 of file xpr/Vector.h.

anonymous enum

Complexity counter.

Definition at line 66 of file xpr/Vector.h.


Constructor & Destructor Documentation

XprVector ( const E &  e ) [explicit]

Constructor.

Definition at line 74 of file xpr/Vector.h.

XprVector ( const XprVector< E, Sz > &  e )

Copy Constructor.

Not explicit!

Definition at line 80 of file xpr/Vector.h.


Member Function Documentation

void assign_to ( Dest &  dest,
const Assign &  assign_fn 
) const

assign this expression to Vector dest.

Definition at line 114 of file xpr/Vector.h.

value_type operator() ( std::size_t  i ) const

const index operator for vectors.

Definition at line 86 of file xpr/Vector.h.

value_type operator[] ( std::size_t  i ) const

const index operator for vectors.

Definition at line 92 of file xpr/Vector.h.