COMP: NamedEnum specialization within 'Foam' namespace only

- specializing within deeper nested namespaces is not allowed
This commit is contained in:
Mark Olesen
2010-12-17 09:49:59 +01:00
parent ce7694efcc
commit 3d2734f62b
2 changed files with 56 additions and 26 deletions

View File

@ -28,27 +28,43 @@ License
#include "fvPatchFieldMapper.H" #include "fvPatchFieldMapper.H"
#include "volFields.H" #include "volFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace compressible
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
template<> namespace Foam
const char* {
NamedEnum<turbulentHeatFluxTemperatureFvPatchScalarField::heatSourceType, 2>:: // declare specialization within 'Foam' namespace
names[] = template<>
const char* NamedEnum
<
Foam::compressible::
turbulentHeatFluxTemperatureFvPatchScalarField::heatSourceType,
2
>::names[] =
{ {
"power", "power",
"flux" "flux"
}; };
const }
NamedEnum<turbulentHeatFluxTemperatureFvPatchScalarField::heatSourceType, 2>
turbulentHeatFluxTemperatureFvPatchScalarField::heatSourceTypeNames_;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace compressible
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
const NamedEnum
<
turbulentHeatFluxTemperatureFvPatchScalarField::heatSourceType,
2
> turbulentHeatFluxTemperatureFvPatchScalarField::heatSourceTypeNames_;
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -29,27 +29,41 @@ License
#include "volFields.H" #include "volFields.H"
#include "RASModel.H" #include "RASModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
// declare specialization within 'Foam' namespace
template<>
const char* NamedEnum
<
Foam::incompressible::
turbulentHeatFluxTemperatureFvPatchScalarField::heatSourceType,
2
>::names[] =
{
"power",
"flux"
};
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace incompressible namespace incompressible
{ {
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
template<> const NamedEnum
const char* <
NamedEnum<turbulentHeatFluxTemperatureFvPatchScalarField::heatSourceType, 2>:: turbulentHeatFluxTemperatureFvPatchScalarField::heatSourceType,
names[] = 2
{ > turbulentHeatFluxTemperatureFvPatchScalarField::heatSourceTypeNames_;
"power",
"flux"
};
const
NamedEnum<turbulentHeatFluxTemperatureFvPatchScalarField::heatSourceType, 2>
turbulentHeatFluxTemperatureFvPatchScalarField::heatSourceTypeNames_;
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //