Files
openfoam/src/OpenFOAM/db/runTimeSelection/addToRunTimeSelectionTable.H
Mark Olesen 0473f177ad 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.
2008-07-20 15:19:07 +02:00

61 lines
2.8 KiB
C

/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Foam::runTimeSelectionTables
Description
Macros for easy insertion into run-time selection tables
\*---------------------------------------------------------------------------*/
#ifndef addToRunTimeSelectionTable_H
#define addToRunTimeSelectionTable_H
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#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) \
\
/* Add the thisType constructor function to the table */ \
baseType::add##argNames##ConstructorToTable<thisType> \
add_##lookup##_##thisType##argNames##ConstructorTo##baseType##Table_(#lookup)
#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_
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //