COPASI API  4.16.103
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
FSwapClass< ClassType, IndexType, ReturnType > Class Template Reference

#include <CSort.h>

Inheritance diagram for FSwapClass< ClassType, IndexType, ReturnType >:
Inheritance graph
[legend]
Collaboration diagram for FSwapClass< ClassType, IndexType, ReturnType >:
Collaboration graph
[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.

Definition at line 267 of file CSort.h.

Constructor & Destructor Documentation

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

Default constructor

Definition at line 273 of file CSort.h.

273  :
275  mpType(NULL),
276  mpSwap(NULL)
277  {}
ClassType * mpType
Definition: CSort.h:312
ReturnType(ClassType::* mpSwap)(IndexType, IndexType)
Definition: CSort.h:317
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)

Definition at line 285 of file CSort.h.

285  :
287  mpType(pType),
288  mpSwap(swap)
289  {}
ClassType * mpType
Definition: CSort.h:312
ReturnType(ClassType::* mpSwap)(IndexType, IndexType)
Definition: CSort.h:317
template<typename ClassType , typename IndexType , typename ReturnType >
virtual FSwapClass< ClassType, IndexType, ReturnType >::~FSwapClass ( )
inlinevirtual

Virtual destructor

Definition at line 294 of file CSort.h.

294 {};

Member Function Documentation

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 >.

Definition at line 302 of file CSort.h.

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

303  {
304  (*mpType.*mpSwap)(to, from);
305  return;
306  }
ClassType * mpType
Definition: CSort.h:312
ReturnType(ClassType::* mpSwap)(IndexType, IndexType)
Definition: CSort.h:317

Member Data Documentation

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.

Definition at line 317 of file CSort.h.

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

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

A pointer to the class.

Definition at line 312 of file CSort.h.

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


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