feat: class to wrap a eoMonOp into a eoQuadOp
This commit is contained in:
parent
87d4f08258
commit
9b887c83a6
1 changed files with 44 additions and 0 deletions
|
|
@ -184,6 +184,50 @@ private:
|
|||
eoQuadOp<EOT> & quadOp;
|
||||
};
|
||||
|
||||
/** Wrap eoMonOp into an eoQuadOp: simply don't touch the second arg.
|
||||
*/
|
||||
template <class EOT>
|
||||
class eoMon2QuadOp1: public eoQuadOp<EOT>
|
||||
{
|
||||
public:
|
||||
/** Ctor
|
||||
* @param _monOp the eoMonOp to be transformed
|
||||
*/
|
||||
eoMon2QuadOp1(eoMonOp<EOT> & _monOp) : monOp(_monOp) {}
|
||||
|
||||
/** Call the eoMonOp on the first argument only.
|
||||
*/
|
||||
bool operator()(EOT & _eo1, EOT & /*_eo2*/)
|
||||
{
|
||||
return monOp(_eo1);
|
||||
}
|
||||
|
||||
private:
|
||||
eoMonOp<EOT> & monOp;
|
||||
};
|
||||
|
||||
/** Wrap eoMonOp into an eoQuadOp: simply don't touch the first arg.
|
||||
*/
|
||||
template <class EOT>
|
||||
class eoMon2QuadOp2: public eoQuadOp<EOT>
|
||||
{
|
||||
public:
|
||||
/** Ctor
|
||||
* @param _monOp the eoMonOp to be transformed
|
||||
*/
|
||||
eoMon2QuadOp2(eoMonOp<EOT> & _monOp) : monOp(_monOp) {}
|
||||
|
||||
/** Call the eoMonOp on the second argument only.
|
||||
*/
|
||||
bool operator()(EOT & /*_eo1*/, EOT & _eo2)
|
||||
{
|
||||
return monOp(_eo2);
|
||||
}
|
||||
|
||||
private:
|
||||
eoMonOp<EOT> & monOp;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//@}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue