Chemical Data Processing Library C++ API - Version 1.4.0
Public Member Functions | List of all members
CDPL::Math::DirectAssignmentProxy< C > Class Template Reference

Proxy that converts an assignment to a Math container into the corresponding direct-assignment call on the container (assign / plusAssign / minusAssign) bypassing alias detection. More...

#include <DirectAssignmentProxy.hpp>

Public Member Functions

 DirectAssignmentProxy (LValueType &lval)
 Constructs the proxy wrapping the lvalue lval. More...
 
 DirectAssignmentProxy (const DirectAssignmentProxy &proxy)
 Copy-constructs the proxy from proxy. More...
 
template<typename E >
ClosureType & operator= (const E &e)
 Forwards the assignment of e to the wrapped lvalue's direct-assignment method. More...
 
template<typename E >
ClosureType & operator+= (const E &e)
 Forwards the compound addition of e to the wrapped lvalue's direct-plus-assignment method. More...
 
template<typename E >
ClosureType & operator-= (const E &e)
 Forwards the compound subtraction of e to the wrapped lvalue's direct-minus-assignment method. More...
 

Detailed Description

template<typename C>
class CDPL::Math::DirectAssignmentProxy< C >

Proxy that converts an assignment to a Math container into the corresponding direct-assignment call on the container (assign / plusAssign / minusAssign) bypassing alias detection.

Template Parameters
CThe container type whose closure is wrapped.

Constructor & Destructor Documentation

◆ DirectAssignmentProxy() [1/2]

template<typename C >
CDPL::Math::DirectAssignmentProxy< C >::DirectAssignmentProxy ( LValueType &  lval)
inlineexplicit

Constructs the proxy wrapping the lvalue lval.

Parameters
lvalThe container lvalue to wrap.

◆ DirectAssignmentProxy() [2/2]

template<typename C >
CDPL::Math::DirectAssignmentProxy< C >::DirectAssignmentProxy ( const DirectAssignmentProxy< C > &  proxy)
inline

Copy-constructs the proxy from proxy.

Parameters
proxyThe proxy to copy.

Member Function Documentation

◆ operator=()

template<typename C >
template<typename E >
ClosureType& CDPL::Math::DirectAssignmentProxy< C >::operator= ( const E &  e)
inline

Forwards the assignment of e to the wrapped lvalue's direct-assignment method.

Template Parameters
EThe source expression type.
Parameters
eThe source expression.
Returns
A reference to the wrapped lvalue closure.

◆ operator+=()

template<typename C >
template<typename E >
ClosureType& CDPL::Math::DirectAssignmentProxy< C >::operator+= ( const E &  e)
inline

Forwards the compound addition of e to the wrapped lvalue's direct-plus-assignment method.

Template Parameters
EThe source expression type.
Parameters
eThe expression to add.
Returns
A reference to the wrapped lvalue closure.

◆ operator-=()

template<typename C >
template<typename E >
ClosureType& CDPL::Math::DirectAssignmentProxy< C >::operator-= ( const E &  e)
inline

Forwards the compound subtraction of e to the wrapped lvalue's direct-minus-assignment method.

Template Parameters
EThe source expression type.
Parameters
eThe expression to subtract.
Returns
A reference to the wrapped lvalue closure.

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