Public Member Functions | Static Private Attributes
ExpressionType< Derived, Type, AllowCounter > Class Template Reference

#include <expression.hpp>

Inheritance diagram for ExpressionType< Derived, Type, AllowCounter >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

returnValue clearStaticCounters ()
virtual Expressionclone () const
 ExpressionType ()
 ExpressionType (const std::string &_name, unsigned _nRows, unsigned _nCols)
 ExpressionType (const Expression &_expression, unsigned _componentIdx=0)
 ExpressionType (const double &_arg)
 ExpressionType (const DVector &_arg)
 ExpressionType (const DMatrix &_arg)
 ExpressionType (const Operator &_arg)
virtual ~ExpressionType ()

Static Private Attributes

static unsigned count

Detailed Description

template<class Derived, VariableType Type, bool AllowCounter = true>
class ExpressionType< Derived, Type, AllowCounter >

A helper class implementing the CRTP design pattern.

This class gives object counting and clone capability to a derived class via static polymorphism.

Template Parameters:
DerivedThe derived class.
TypeThe expression type.
See also:
VariableType
Template Parameters:
AllowCounterAllow object instance counting.
Note:
Unfortunately the derived classes have to implement all necessary ctors. In C++11, this can be done in a much simpler way. One only needs to say: using Base::Base.

Definition at line 340 of file expression.hpp.


Constructor & Destructor Documentation

template<class Derived, VariableType Type, bool AllowCounter = true>
ExpressionType< Derived, Type, AllowCounter >::ExpressionType ( ) [inline]

Default constructor.

Definition at line 345 of file expression.hpp.

template<class Derived, VariableType Type, bool AllowCounter = true>
ExpressionType< Derived, Type, AllowCounter >::ExpressionType ( const std::string &  _name,
unsigned  _nRows,
unsigned  _nCols 
) [inline]

The constructor with arguments.

Definition at line 353 of file expression.hpp.

template<class Derived, VariableType Type, bool AllowCounter = true>
ExpressionType< Derived, Type, AllowCounter >::ExpressionType ( const Expression _expression,
unsigned  _componentIdx = 0 
) [inline]

The constructor from an expression.

Definition at line 361 of file expression.hpp.

template<class Derived, VariableType Type, bool AllowCounter = true>
ExpressionType< Derived, Type, AllowCounter >::ExpressionType ( const double &  _arg) [inline]

The constructor from a scalar number.

Definition at line 371 of file expression.hpp.

template<class Derived, VariableType Type, bool AllowCounter = true>
ExpressionType< Derived, Type, AllowCounter >::ExpressionType ( const DVector _arg) [inline]

The constructor from a vector.

Definition at line 376 of file expression.hpp.

template<class Derived, VariableType Type, bool AllowCounter = true>
ExpressionType< Derived, Type, AllowCounter >::ExpressionType ( const DMatrix _arg) [inline]

The constructor from a matrix.

Definition at line 381 of file expression.hpp.

template<class Derived, VariableType Type, bool AllowCounter = true>
ExpressionType< Derived, Type, AllowCounter >::ExpressionType ( const Operator _arg) [inline]

The constructor from an operator.

Definition at line 386 of file expression.hpp.

template<class Derived, VariableType Type, bool AllowCounter = true>
virtual ExpressionType< Derived, Type, AllowCounter >::~ExpressionType ( ) [inline, virtual]

Destructor.

Definition at line 391 of file expression.hpp.


Member Function Documentation

template<class Derived, VariableType Type, bool AllowCounter = true>
returnValue ExpressionType< Derived, Type, AllowCounter >::clearStaticCounters ( ) [inline]

A function for resetting of the istance counter.

Definition at line 398 of file expression.hpp.

template<class Derived, VariableType Type, bool AllowCounter = true>
virtual Expression* ExpressionType< Derived, Type, AllowCounter >::clone ( ) const [inline, virtual]

Function for cloning.

Reimplemented from Expression.

Definition at line 394 of file expression.hpp.


Member Data Documentation

template<class Derived, VariableType Type, bool AllowCounter = true>
unsigned ExpressionType< Derived, Type, AllowCounter >::count [static, private]

Definition at line 402 of file expression.hpp.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Thu Aug 27 2015 12:01:38