COPASI API  4.40.278
FSwapClass< ClassType, IndexType, ReturnType > Class Template Reference

#include <CSort.h>

Inheritance diagram for FSwapClass< ClassType, IndexType, ReturnType >:
[legend]

Public Member Functions

 FSwapClass (ClassType *pType, ReturnType(ClassType::*swap)(IndexType, IndexType))
 
virtual void operator() (IndexType to, IndexType from)
 
virtual ~FSwapClass ()
 
- Public Member Functions inherited from FSwapBase< IndexType, ReturnType >
 FSwapBase (ReturnType(*swap)(IndexType, IndexType))
 
virtual ~FSwapBase ()
 

Protected Member Functions

 FSwapClass ()
 
- Protected Member Functions inherited from FSwapBase< IndexType, ReturnType >
 FSwapBase ()
 

Private Attributes

ReturnType(ClassType::* mpSwap )(IndexType, IndexType)
 
ClassType * mpType
 

Detailed Description

template<typename ClassType, typename IndexType, typename ReturnType>
class FSwapClass< ClassType, IndexType, ReturnType >

A derived functor providing means to use a class member as the swap method to be used in the applyPivot methods.

Constructor & Destructor Documentation

◆ FSwapClass() [1/2]

template<typename ClassType , typename IndexType , typename ReturnType >
FSwapClass< ClassType, IndexType, ReturnType >::FSwapClass ( )
inlineprotected

Default constructor

◆ FSwapClass() [2/2]

template<typename ClassType , typename IndexType , typename ReturnType >
FSwapClass< ClassType, IndexType, ReturnType >::FSwapClass ( ClassType *  pType,
ReturnType(ClassType::*)(IndexType, IndexType)  swap 
)
inline

Specific constructor

Parameters
ClassType* pType
ReturnType(ClassType::*swap) (IndexType, IndexType)

◆ ~FSwapClass()

template<typename ClassType , typename IndexType , typename ReturnType >
virtual FSwapClass< ClassType, IndexType, ReturnType >::~FSwapClass ( )
inlinevirtual

Virtual destructor

Member Function Documentation

◆ operator()()

template<typename ClassType , typename IndexType , typename ReturnType >
virtual void FSwapClass< ClassType, IndexType, ReturnType >::operator() ( IndexType  to,
IndexType  from 
)
inlinevirtual

Operator wrapping the provided class member swap method

Parameters
IndexTypeto
IndexTypefrom
Returns
ReturnType

Reimplemented from FSwapBase< IndexType, ReturnType >.

References FSwapClass< ClassType, IndexType, ReturnType >::mpSwap, and FSwapClass< ClassType, IndexType, ReturnType >::mpType.

Member Data Documentation

◆ mpSwap

template<typename ClassType , typename IndexType , typename ReturnType >
ReturnType(ClassType::* FSwapClass< ClassType, IndexType, ReturnType >::mpSwap) (IndexType, IndexType)
private

A pointer to the class member swap method.

Referenced by FSwapClass< ClassType, IndexType, ReturnType >::operator()().

◆ mpType

template<typename ClassType , typename IndexType , typename ReturnType >
ClassType* FSwapClass< ClassType, IndexType, ReturnType >::mpType
private

A pointer to the class.

Referenced by FSwapClass< ClassType, IndexType, ReturnType >::operator()().


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