FEDEM Solver  R8.0
Source code of the dynamics solver
Macros
FFaDynCB.H File Reference

Macros for definition of dynamic callback objects. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FFaDynCB0M(ownerType, ownerPt, methodName)    FFaDynCB0(new FFaMethodCB0< ownerType > (ownerPt, &ownerType::methodName))
 
#define FFaDynCB1M(ownerType, ownerPt, methodName, P1Type)    FFaDynCB1 < P1Type > (new FFaMethodCB1< ownerType , P1Type > (ownerPt, &ownerType::methodName))
 
#define FFaDynCB2M(ownerType, ownerPt, methodName, P1Type, P2Type)    FFaDynCB2 < P1Type, P2Type > (new FFaMethodCB2< ownerType , P1Type , P2Type > (ownerPt, &ownerType::methodName))
 
#define FFaDynCB3M(ownerType, ownerPt, methodName, P1Type, P2Type, P3Type)    FFaDynCB3 < P1Type, P2Type, P3Type > (new FFaMethodCB3< ownerType , P1Type , P2Type , P3Type > (ownerPt, &ownerType::methodName))
 
#define FFaDynCB4M(ownerType, ownerPt, methodName, P1Type, P2Type, P3Type, P4Type)    FFaDynCB4 < P1Type, P2Type, P3Type, P4Type > (new FFaMethodCB4< ownerType , P1Type , P2Type , P3Type, P4Type > (ownerPt, &ownerType::methodName))
 
#define FFaDynCB0S(function)    FFaDynCB0(new FFaStaticCB0 (function))
 
#define FFaDynCB1S(function, P1Type)    FFaDynCB1 < P1Type > (new FFaStaticCB1 < P1Type > (function))
 
#define FFaDynCB2S(function, P1Type, P2Type)    FFaDynCB2 < P1Type, P2Type > (new FFaStaticCB2 < P1Type , P2Type > (function))
 
#define FFaDynCB3S(function, P1Type, P2Type, P3Type)    FFaDynCB3 < P1Type, P2Type, P3Type > (new FFaStaticCB3 < P1Type , P2Type , P3Type > (function))
 
#define FFaDynCB4S(function, P1Type, P2Type, P3Type, P4Type)    FFaDynCB4 < P1Type, P2Type, P3Type, P4Type > (new FFaStaticCB4 < P1Type , P2Type , P3Type, P4Type > (function))
 
#define FFADYNCB_H_TEMPLATE1   template< class P1Type >
 
#define FFADYNCB_H_ADDED_TEMPLATE_ARGS1   , class P1Type
 
#define FFADYNCB_H_TYPE_LIST1   < P1Type >
 
#define FFADYNCB_H_ADDED_TYPE_LIST1   , P1Type
 
#define FFADYNCB_H_ARGUMENT_LIST1   P1Type p1
 
#define FFADYNCB_H_PARAM_LIST1   p1
 
#define FFADYNCB_H_TEMPLATE2   template< class P1Type, class P2Type >
 
#define FFADYNCB_H_ADDED_TEMPLATE_ARGS2   , class P1Type, class P2Type
 
#define FFADYNCB_H_TYPE_LIST2   < P1Type, P2Type >
 
#define FFADYNCB_H_ADDED_TYPE_LIST2   , P1Type, P2Type
 
#define FFADYNCB_H_ARGUMENT_LIST2   P1Type p1, P2Type p2
 
#define FFADYNCB_H_PARAM_LIST2   p1, p2
 
#define FFADYNCB_H_TEMPLATE3   template< class P1Type, class P2Type , class P3Type >
 
#define FFADYNCB_H_ADDED_TEMPLATE_ARGS3   , class P1Type, class P2Type, class P3Type
 
#define FFADYNCB_H_TYPE_LIST3   < P1Type, P2Type , P3Type >
 
#define FFADYNCB_H_ADDED_TYPE_LIST3   , P1Type, P2Type, P3Type
 
#define FFADYNCB_H_ARGUMENT_LIST3   P1Type p1, P2Type p2, P3Type p3
 
#define FFADYNCB_H_PARAM_LIST3   p1, p2, p3
 
#define FFADYNCB_H_TEMPLATE4   template< class P1Type, class P2Type , class P3Type, class P4Type >
 
#define FFADYNCB_H_ADDED_TEMPLATE_ARGS4   , class P1Type, class P2Type, class P3Type, class P4Type
 
#define FFADYNCB_H_TYPE_LIST4   < P1Type, P2Type , P3Type, P4Type >
 
#define FFADYNCB_H_ADDED_TYPE_LIST4   , P1Type, P2Type, P3Type, P4Type
 
#define FFADYNCB_H_ARGUMENT_LIST4   P1Type p1, P2Type p2, P3Type p3, P4Type p4
 
#define FFADYNCB_H_PARAM_LIST4   p1, p2, p3, p4
 
#define MAKE_BASE_DYNCB(nr, templateDef, argumentList)
 
#define MAKE_METHODCB(nr, addedTemplateArgs, argumentList, parameterList, typeList, addedTypeList)
 
#define MAKE_STATICCB(nr, templateDef, argumentList, parameterList, typeList)
 
#define MAKE_DYNCB(nr, templateDef, argumentList, parameterList, typeList)
 

Detailed Description

Macros for definition of dynamic callback objects.

Enables callbacks to point at methods in specific objects, or to standard static methods or functions.

Macro Definition Documentation

◆ FFaDynCB0M

#define FFaDynCB0M (   ownerType,
  ownerPt,
  methodName 
)     FFaDynCB0(new FFaMethodCB0< ownerType > (ownerPt, &ownerType::methodName))

◆ FFaDynCB0S

#define FFaDynCB0S (   function)     FFaDynCB0(new FFaStaticCB0 (function))

◆ FFaDynCB1M

#define FFaDynCB1M (   ownerType,
  ownerPt,
  methodName,
  P1Type 
)     FFaDynCB1 < P1Type > (new FFaMethodCB1< ownerType , P1Type > (ownerPt, &ownerType::methodName))

◆ FFaDynCB1S

#define FFaDynCB1S (   function,
  P1Type 
)     FFaDynCB1 < P1Type > (new FFaStaticCB1 < P1Type > (function))

◆ FFaDynCB2M

#define FFaDynCB2M (   ownerType,
  ownerPt,
  methodName,
  P1Type,
  P2Type 
)     FFaDynCB2 < P1Type, P2Type > (new FFaMethodCB2< ownerType , P1Type , P2Type > (ownerPt, &ownerType::methodName))

◆ FFaDynCB2S

#define FFaDynCB2S (   function,
  P1Type,
  P2Type 
)     FFaDynCB2 < P1Type, P2Type > (new FFaStaticCB2 < P1Type , P2Type > (function))

◆ FFaDynCB3M

#define FFaDynCB3M (   ownerType,
  ownerPt,
  methodName,
  P1Type,
  P2Type,
  P3Type 
)     FFaDynCB3 < P1Type, P2Type, P3Type > (new FFaMethodCB3< ownerType , P1Type , P2Type , P3Type > (ownerPt, &ownerType::methodName))

◆ FFaDynCB3S

#define FFaDynCB3S (   function,
  P1Type,
  P2Type,
  P3Type 
)     FFaDynCB3 < P1Type, P2Type, P3Type > (new FFaStaticCB3 < P1Type , P2Type , P3Type > (function))

◆ FFaDynCB4M

#define FFaDynCB4M (   ownerType,
  ownerPt,
  methodName,
  P1Type,
  P2Type,
  P3Type,
  P4Type 
)     FFaDynCB4 < P1Type, P2Type, P3Type, P4Type > (new FFaMethodCB4< ownerType , P1Type , P2Type , P3Type, P4Type > (ownerPt, &ownerType::methodName))

◆ FFaDynCB4S

#define FFaDynCB4S (   function,
  P1Type,
  P2Type,
  P3Type,
  P4Type 
)     FFaDynCB4 < P1Type, P2Type, P3Type, P4Type > (new FFaStaticCB4 < P1Type , P2Type , P3Type, P4Type > (function))

◆ FFADYNCB_H_ADDED_TEMPLATE_ARGS1

#define FFADYNCB_H_ADDED_TEMPLATE_ARGS1   , class P1Type

◆ FFADYNCB_H_ADDED_TEMPLATE_ARGS2

#define FFADYNCB_H_ADDED_TEMPLATE_ARGS2   , class P1Type, class P2Type

◆ FFADYNCB_H_ADDED_TEMPLATE_ARGS3

#define FFADYNCB_H_ADDED_TEMPLATE_ARGS3   , class P1Type, class P2Type, class P3Type

◆ FFADYNCB_H_ADDED_TEMPLATE_ARGS4

#define FFADYNCB_H_ADDED_TEMPLATE_ARGS4   , class P1Type, class P2Type, class P3Type, class P4Type

◆ FFADYNCB_H_ADDED_TYPE_LIST1

#define FFADYNCB_H_ADDED_TYPE_LIST1   , P1Type

◆ FFADYNCB_H_ADDED_TYPE_LIST2

#define FFADYNCB_H_ADDED_TYPE_LIST2   , P1Type, P2Type

◆ FFADYNCB_H_ADDED_TYPE_LIST3

#define FFADYNCB_H_ADDED_TYPE_LIST3   , P1Type, P2Type, P3Type

◆ FFADYNCB_H_ADDED_TYPE_LIST4

#define FFADYNCB_H_ADDED_TYPE_LIST4   , P1Type, P2Type, P3Type, P4Type

◆ FFADYNCB_H_ARGUMENT_LIST1

#define FFADYNCB_H_ARGUMENT_LIST1   P1Type p1

◆ FFADYNCB_H_ARGUMENT_LIST2

#define FFADYNCB_H_ARGUMENT_LIST2   P1Type p1, P2Type p2

◆ FFADYNCB_H_ARGUMENT_LIST3

#define FFADYNCB_H_ARGUMENT_LIST3   P1Type p1, P2Type p2, P3Type p3

◆ FFADYNCB_H_ARGUMENT_LIST4

#define FFADYNCB_H_ARGUMENT_LIST4   P1Type p1, P2Type p2, P3Type p3, P4Type p4

◆ FFADYNCB_H_PARAM_LIST1

#define FFADYNCB_H_PARAM_LIST1   p1

◆ FFADYNCB_H_PARAM_LIST2

#define FFADYNCB_H_PARAM_LIST2   p1, p2

◆ FFADYNCB_H_PARAM_LIST3

#define FFADYNCB_H_PARAM_LIST3   p1, p2, p3

◆ FFADYNCB_H_PARAM_LIST4

#define FFADYNCB_H_PARAM_LIST4   p1, p2, p3, p4

◆ FFADYNCB_H_TEMPLATE1

#define FFADYNCB_H_TEMPLATE1   template< class P1Type >

◆ FFADYNCB_H_TEMPLATE2

#define FFADYNCB_H_TEMPLATE2   template< class P1Type, class P2Type >

◆ FFADYNCB_H_TEMPLATE3

#define FFADYNCB_H_TEMPLATE3   template< class P1Type, class P2Type , class P3Type >

◆ FFADYNCB_H_TEMPLATE4

#define FFADYNCB_H_TEMPLATE4   template< class P1Type, class P2Type , class P3Type, class P4Type >

◆ FFADYNCB_H_TYPE_LIST1

#define FFADYNCB_H_TYPE_LIST1   < P1Type >

◆ FFADYNCB_H_TYPE_LIST2

#define FFADYNCB_H_TYPE_LIST2   < P1Type, P2Type >

◆ FFADYNCB_H_TYPE_LIST3

#define FFADYNCB_H_TYPE_LIST3   < P1Type, P2Type , P3Type >

◆ FFADYNCB_H_TYPE_LIST4

#define FFADYNCB_H_TYPE_LIST4   < P1Type, P2Type , P3Type, P4Type >

◆ MAKE_BASE_DYNCB

#define MAKE_BASE_DYNCB (   nr,
  templateDef,
  argumentList 
)
Value:
\
templateDef class FFaBaseDynCB##nr \
{ \
public: \
FFaBaseDynCB##nr () {} \
virtual ~FFaBaseDynCB##nr () {} \
\
virtual void invoke (argumentList) = 0; \
virtual FFaBaseDynCB##nr * copy () const = 0; \
};

◆ MAKE_DYNCB

#define MAKE_DYNCB (   nr,
  templateDef,
  argumentList,
  parameterList,
  typeList 
)
Value:
\
templateDef class FFaDynCB##nr \
{ \
public: \
FFaDynCB##nr (FFaBaseDynCB##nr typeList *aBaseDynCB = 0) : myBaseDynCBPtr(aBaseDynCB) {} \
FFaDynCB##nr (const FFaDynCB##nr typeList &rhs) \
{ \
myBaseDynCBPtr = rhs.myBaseDynCBPtr ? rhs.myBaseDynCBPtr->copy() : 0; \
} \
~FFaDynCB##nr () { if (myBaseDynCBPtr) delete myBaseDynCBPtr; } \
\
void invoke(argumentList) { if (myBaseDynCBPtr) myBaseDynCBPtr->invoke(parameterList); } \
\
FFaDynCB##nr &operator= (const FFaDynCB##nr typeList &rhs) \
{ \
if (this != &rhs) \
{ \
if (myBaseDynCBPtr) delete myBaseDynCBPtr; \
myBaseDynCBPtr = rhs.myBaseDynCBPtr ? rhs.myBaseDynCBPtr->copy() : 0; \
} \
return *this; \
} \
\
bool empty() const { return myBaseDynCBPtr == 0; } \
void erase() { if (myBaseDynCBPtr) delete myBaseDynCBPtr; myBaseDynCBPtr = 0; } \
FFaDynCB##nr* copy() const { return new FFaDynCB##nr (*this); } \
\
private: \
FFaBaseDynCB##nr typeList *myBaseDynCBPtr; \
};

◆ MAKE_METHODCB

#define MAKE_METHODCB (   nr,
  addedTemplateArgs,
  argumentList,
  parameterList,
  typeList,
  addedTypeList 
)
Value:
\
template<class T addedTemplateArgs> class FFaMethodCB##nr : public FFaBaseDynCB##nr typeList \
{ \
typedef void (T::*methodType) (argumentList); \
\
public: \
FFaMethodCB##nr (T* anObj, methodType aMethod) : myObject(anObj), myMethodPt(aMethod) {} \
virtual ~FFaMethodCB##nr () {} \
\
virtual void invoke (argumentList) { if (myObject) (myObject->*this->myMethodPt) (parameterList); } \
\
virtual FFaBaseDynCB##nr typeList * copy () const \
{ \
return new FFaMethodCB##nr <T addedTypeList> (myObject, myMethodPt); \
} \
\
private: \
T* myObject; \
methodType myMethodPt; \
};

◆ MAKE_STATICCB

#define MAKE_STATICCB (   nr,
  templateDef,
  argumentList,
  parameterList,
  typeList 
)
Value:
\
templateDef class FFaStaticCB##nr : public FFaBaseDynCB##nr typeList \
{ \
typedef void (*functionType)(argumentList); \
\
public: \
FFaStaticCB##nr (functionType aFunction) : myFunctionPt(aFunction) {} \
virtual ~FFaStaticCB##nr () {} \
\
virtual void invoke (argumentList) { myFunctionPt(parameterList); } \
\
virtual FFaBaseDynCB##nr typeList * copy () const \
{ \
return new FFaStaticCB##nr typeList (myFunctionPt); \
} \
\
private: \
functionType myFunctionPt; \
};