FEDEM Solver  R8.0
Source code of the dynamics solver
Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Static Private Attributes | List of all members
FFaOperationContainer< OperationCB > Class Template Reference

A class used to manage and store callbacks of a certain type. More...

#include <FFaOperation.H>

Static Public Member Functions

static void addOperation (const std::string &name, OperationCB operation)
 Adds a named operation to the OperationCB container. More...
 
static void getOperations (std::vector< std::string > &names)
 Returns a list of all operations of type OperationCB. More...
 
static const std::string & getDefaultOperation ()
 Returns the default operation of type OperationCB. More...
 

Protected Member Functions

 FFaOperationContainer ()
 The default constructor selects the default operation. More...
 
void selectOperation (const std::string &name)
 Selects the named operation to use. More...
 

Protected Attributes

OperationCB myOperationCB
 The selected operation. More...
 

Private Types

using NamedOper = std::pair< std::string, OperationCB >
 Convenience type alias for a named operations. More...
 

Static Private Attributes

static std::vector< NamedOper > * ourOperations = NULL
 Static container for operations of type OperationCB. More...
 

Detailed Description

template<class OperationCB>
class FFaOperationContainer< OperationCB >

A class used to manage and store callbacks of a certain type.

This must be a base class of all operations that are supposed to have changeable calculations.

Member Typedef Documentation

◆ NamedOper

template<class OperationCB >
using FFaOperationContainer< OperationCB >::NamedOper = std::pair<std::string,OperationCB>
private

Convenience type alias for a named operations.

Constructor & Destructor Documentation

◆ FFaOperationContainer()

template<class OperationCB >
FFaOperationContainer< OperationCB >::FFaOperationContainer ( )
inlineprotected

The default constructor selects the default operation.

Member Function Documentation

◆ addOperation()

template<class OperationCB >
static void FFaOperationContainer< OperationCB >::addOperation ( const std::string &  name,
OperationCB  operation 
)
inlinestatic

Adds a named operation to the OperationCB container.

◆ getDefaultOperation()

template<class OperationCB >
static const std::string& FFaOperationContainer< OperationCB >::getDefaultOperation ( )
inlinestatic

Returns the default operation of type OperationCB.

◆ getOperations()

template<class OperationCB >
static void FFaOperationContainer< OperationCB >::getOperations ( std::vector< std::string > &  names)
inlinestatic

Returns a list of all operations of type OperationCB.

◆ selectOperation()

template<class OperationCB >
void FFaOperationContainer< OperationCB >::selectOperation ( const std::string &  name)
inlineprotected

Selects the named operation to use.

The given name has to be in the ourOperations container. If not, this operation will be undefined and when invoked it will not change the output argument.

Member Data Documentation

◆ myOperationCB

template<class OperationCB >
OperationCB FFaOperationContainer< OperationCB >::myOperationCB
protected

The selected operation.

◆ ourOperations

template<class OperationCB >
std::vector< std::pair< std::string, OperationCB > > * FFaOperationContainer< OperationCB >::ourOperations = NULL
staticprivate

Static container for operations of type OperationCB.


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