Create unique member name for addNamed...SelectionTable

We can now add the same member function with different lookups
  e.g. 'stl' and 'stlb'

By using leading/trailing underscores around the lookup name,
we get a unique name and avoid possible collision with other classes.
This commit is contained in:
Mark Olesen
2008-07-20 15:19:07 +02:00
parent f75ffd7f15
commit 0473f177ad
2 changed files with 5 additions and 6 deletions

View File

@ -26,7 +26,7 @@ InClass
Foam::memberFunctionSelectionTables Foam::memberFunctionSelectionTables
Description Description
Macros to enable the easy insertion into member function selection tables. Macros for easy insertion into member function selection tables
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -47,14 +47,13 @@ Description
\ \
/* Add the thisType constructor function to the table */ \ /* Add the thisType constructor function to the table */ \
baseType::add##memberFunction##argNames##MemberFunctionToTable<thisType> \ baseType::add##memberFunction##argNames##MemberFunctionToTable<thisType> \
add##thisType##memberFunction##argNames##MemberFunctionTo##baseType##Table_(#lookup) add_##lookup##_##thisType##memberFunction##argNames##MemberFunctionTo##baseType##Table_(#lookup)
#define addTemplateToMemberFunctionSelectionTable\ #define addTemplateToMemberFunctionSelectionTable\
(baseType,thisType,Targ,memberFunction,argNames) \ (baseType,thisType,Targ,memberFunction,argNames) \
\ \
/* Add the thisType constructor function to the table */ \ /* Add the thisType constructor function to the table */ \
baseType::add##memberFunction##argNames##MemberFunctionToTable \ baseType::add##memberFunction##argNames##MemberFunctionToTable<thisType<Targ> > \
<thisType<Targ> > \
add##thisType##Targ##memberFunction##argNames##MemberFunctionTo##baseType##Table_ add##thisType##Targ##memberFunction##argNames##MemberFunctionTo##baseType##Table_

View File

@ -26,7 +26,7 @@ InClass
Foam::runTimeSelectionTables Foam::runTimeSelectionTables
Description Description
Macros to enable the easy insertion into run-time selection tables. Macros for easy insertion into run-time selection tables
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -45,7 +45,7 @@ Description
\ \
/* Add the thisType constructor function to the table */ \ /* Add the thisType constructor function to the table */ \
baseType::add##argNames##ConstructorToTable<thisType> \ baseType::add##argNames##ConstructorToTable<thisType> \
add##thisType##argNames##ConstructorTo##baseType##Table_(#lookup) add_##lookup##_##thisType##argNames##ConstructorTo##baseType##Table_(#lookup)
#define addTemplateToRunTimeSelectionTable(baseType,thisType,Targ,argNames) \ #define addTemplateToRunTimeSelectionTable(baseType,thisType,Targ,argNames) \
\ \