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 assignment operator calls on a Math container into calls of corresponding direct-assignment methods that bypass alias detection. More...

#include <DirectAssignmentProxy.hpp>

Public Member Functions

 DirectAssignmentProxy (LValueType &lval)
 Constructs a DirectAssignmentProxy instance wrapping the container lvalue lval. More...
 
 DirectAssignmentProxy (const DirectAssignmentProxy &proxy)
 Creates a DirectAssignmentProxy instance that is a copy of proxy. More...
 
template<typename E >
ClosureType & operator= (const E &e)
 Forwards the assignment of e to *this to the wrapped lvalue's assign() method. More...
 
template<typename E >
ClosureType & operator+= (const E &e)
 Forwards the in-place addition of e to *this to the wrapped lvalue's plusAssign() method. More...
 
template<typename E >
ClosureType & operator-= (const E &e)
 Forwards the in-place subtraction of e from *this to the wrapped lvalue's minusAssign() method. More...
 

Detailed Description

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

Proxy that converts assignment operator calls on a Math container into calls of corresponding direct-assignment methods that bypass 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 a DirectAssignmentProxy instance wrapping the container lvalue lval.

Parameters
lvalThe container lvalue to wrap.

◆ DirectAssignmentProxy() [2/2]

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

Creates a DirectAssignmentProxy instance that is a copy of proxy.

Parameters
proxyThe proxy instance 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 *this to the wrapped lvalue's assign() 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 in-place addition of e to *this to the wrapped lvalue's plusAssign() 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 in-place subtraction of e from *this to the wrapped lvalue's minusAssign() 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: