#include <expressionMemberOperations.hpp>
Public Types | |
using | Impl = T_Impl |
See ExpressionMemberOperations. | |
using | Real = T_Real |
See ExpressionMemberOperations. | |
Protected Member Functions | |
inlineImpl const & | cast () const |
Cast to implementation. | |
Interface for injecting member operations in expressions
The ExpressionInterface extends from this interface and therefore all methods defined in specializations of this class are available in expressions with the specialized Real type.
E.g. the complex type has the member operations real() and imag(). Which makes the following code possible.
In an expression framework, the member operator could be implemented in the AggregatedActiveType specialization for std::complex but this will not make the member operator available in the expression (a+b). The compiler would throw an error that the member operator real()
is not available in a BinaryExpression.
By the specialization of this class, member methods can be injected into arbitrary expression implementations. This includes e.g. ActiveType, AggregatedActiveType, BinaryExpression, etc. In the complex case the specialization can be viewed in stdComplex.hpp.
T_Real | Original primal value of the statement/expression. |
T_Impl | Class implementing this interface. |