mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
runTimeSelection/memberFunctionSelection templated forms
- useful when the baseType isn't a typedef and thus requires the same template argument as the derived class
This commit is contained in:
@ -35,31 +35,52 @@ Description
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#define addToRunTimeSelectionTable(baseType,thisType,argNames) \
|
||||
#define addToRunTimeSelectionTable\
|
||||
(baseType,thisType,argNames) \
|
||||
\
|
||||
/* Add the thisType constructor function to the table */ \
|
||||
baseType::add##argNames##ConstructorToTable<thisType> \
|
||||
add##thisType##argNames##ConstructorTo##baseType##Table_
|
||||
|
||||
#define addNamedToRunTimeSelectionTable(baseType,thisType,argNames,lookup) \
|
||||
#define addNamedToRunTimeSelectionTable\
|
||||
(baseType,thisType,argNames,lookup) \
|
||||
\
|
||||
/* Add the thisType constructor function to the table */ \
|
||||
/* Add the thisType constructor function to the table, find by lookup */ \
|
||||
baseType::add##argNames##ConstructorToTable<thisType> \
|
||||
add_##lookup##_##thisType##argNames##ConstructorTo##baseType##Table_(#lookup)
|
||||
|
||||
#define addTemplateToRunTimeSelectionTable(baseType,thisType,Targ,argNames) \
|
||||
// use when baseType doesn't need a template argument (eg, is a typedef)
|
||||
#define addTemplateToRunTimeSelectionTable\
|
||||
(baseType,thisType,Targ,argNames) \
|
||||
\
|
||||
/* Add the thisType constructor function to the table */ \
|
||||
baseType::add##argNames##ConstructorToTable<thisType<Targ> > \
|
||||
add##thisType##Targ##argNames##ConstructorTo##baseType##Table_
|
||||
|
||||
// use when baseType doesn't need a template argument (eg, is a typedef)
|
||||
#define addNamedTemplateToRunTimeSelectionTable\
|
||||
(baseType,thisType,Targ,argNames,lookup) \
|
||||
\
|
||||
/* Add the thisType constructor function to the table */ \
|
||||
/* Add the thisType constructor function to the table, find by lookup */ \
|
||||
baseType::add##argNames##ConstructorToTable<thisType<Targ> > \
|
||||
add_##lookup##_##thisType##Targ##argNames##ConstructorTo##baseType##Table_(#lookup)
|
||||
|
||||
// use when baseType requires the Targ template argument as well
|
||||
#define addTemplatedToRunTimeSelectionTable\
|
||||
(baseType,thisType,Targ,argNames) \
|
||||
\
|
||||
/* Add the thisType constructor function to the table */ \
|
||||
baseType<Targ>::add##argNames##ConstructorToTable<thisType<Targ> > \
|
||||
add##thisType##Targ##argNames##ConstructorTo##baseType##Targ##Table_
|
||||
|
||||
// use when baseType requires the Targ template argument as well
|
||||
#define addNamedTemplatedToRunTimeSelectionTable\
|
||||
(baseType,thisType,Targ,argNames,lookup) \
|
||||
\
|
||||
/* Add the thisType constructor function to the table, find by lookup */ \
|
||||
baseType<Targ>::add##argNames##ConstructorToTable<thisType<Targ> > \
|
||||
add_##lookup##_##thisType##Targ##argNames##ConstructorTo##baseType##Targ##Table_(#lookup)
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user