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 void setDefaultOperation (const std::string &o)
 Defines the default operation of type OperationCB. More...
 
static const std::string & getDefaultOperation ()
 Returns the default operation of type OperationCB. More...
 

Protected Member Functions

 FFaOperationContainer ()
 The default constructor defines 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

typedef std::map< std::string, OperationCB > OperCBMap
 Convenience type definition, name-to-operation mapping. More...
 

Static Private Attributes

static std::map< std::string, OperationCB > * ourOperations = NULL
 Static container for operations of type OperationCB. More...
 
static std::string ourDefaultOper
 Name of the default operation 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

◆ OperCBMap

template<class OperationCB >
typedef std::map<std::string,OperationCB> FFaOperationContainer< OperationCB >::OperCBMap
private

Convenience type definition, name-to-operation mapping.

Constructor & Destructor Documentation

◆ FFaOperationContainer()

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

The default constructor defines 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.

◆ setDefaultOperation()

template<class OperationCB >
static void FFaOperationContainer< OperationCB >::setDefaultOperation ( const std::string &  o)
inlinestatic

Defines the default operation of type OperationCB.

Member Data Documentation

◆ myOperationCB

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

The selected operation.

◆ ourDefaultOper

template<class OperationCB >
std::string FFaOperationContainer< OperationCB >::ourDefaultOper
staticprivate

Name of the default operation type OperationCB.

◆ ourOperations

template<class OperationCB >
std::map< 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: