STYLE: Enum instead of NamedEnum for fileOperation
This commit is contained in:
parent
5848b0afd5
commit
6b15244de3
@ -43,43 +43,39 @@ namespace Foam
|
||||
defineTypeNameAndDebug(fileOperation, 0);
|
||||
defineRunTimeSelectionTable(fileOperation, word);
|
||||
|
||||
template<>
|
||||
const char* Foam::NamedEnum
|
||||
<
|
||||
fileOperation::pathType,
|
||||
12
|
||||
>::names[] =
|
||||
{
|
||||
"notFound",
|
||||
"absolute",
|
||||
"objectPath",
|
||||
"writeObject",
|
||||
"uncollatedProc",
|
||||
"globalProc",
|
||||
"localProc",
|
||||
"parentObjectPath",
|
||||
"findInstance",
|
||||
"uncollatedProcInstance",
|
||||
"globalProcInstance",
|
||||
"localProcInstance"
|
||||
};
|
||||
const NamedEnum<fileOperation::pathType, 12> fileOperation::pathTypeNames_;
|
||||
|
||||
word fileOperation::defaultFileHandler
|
||||
(
|
||||
debug::optimisationSwitches().lookupOrAddDefault
|
||||
debug::optimisationSwitches().lookupOrAddDefault<word>
|
||||
(
|
||||
"fileHandler",
|
||||
//Foam::fileOperations::uncollatedFileOperation::typeName,
|
||||
word("uncollated"),
|
||||
"uncollated",
|
||||
false,
|
||||
false
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Foam::word Foam::fileOperation::processorsBaseDir = "processors";
|
||||
|
||||
const Foam::Enum<Foam::fileOperation::pathType>
|
||||
Foam::fileOperation::pathTypeNames_
|
||||
({
|
||||
{ fileOperation::NOTFOUND, "notFound" },
|
||||
{ fileOperation::ABSOLUTE, "absolute" },
|
||||
{ fileOperation::OBJECT, "objectPath" },
|
||||
{ fileOperation::WRITEOBJECT, "writeObject" },
|
||||
{ fileOperation::PROCUNCOLLATED, "uncollatedProc" },
|
||||
{ fileOperation::PROCBASEOBJECT, "globalProc" },
|
||||
{ fileOperation::PROCOBJECT, "localProc" },
|
||||
{ fileOperation::PARENTOBJECT, "parentObjectPath" },
|
||||
{ fileOperation::FINDINSTANCE, "findInstance" },
|
||||
{ fileOperation::PROCUNCOLLATEDINSTANCE, "uncollatedProcInstance" },
|
||||
{ fileOperation::PROCBASEINSTANCE, "globalProcInstance" },
|
||||
{ fileOperation::PROCINSTANCE, "localProcInstance" }
|
||||
});
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
@ -47,7 +47,7 @@ Description
|
||||
#include "labelList.H"
|
||||
#include "Switch.H"
|
||||
#include "tmpNrc.H"
|
||||
#include "NamedEnum.H"
|
||||
#include "Enum.H"
|
||||
#include "Tuple2.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -93,7 +93,7 @@ public:
|
||||
PROCBASEINSTANCE, // as PROCBASEOBJECT but with instance
|
||||
PROCINSTANCE // as PROCOBJECT but with instance
|
||||
};
|
||||
static const NamedEnum<pathType, 12> pathTypeNames_;
|
||||
static const Enum<pathType> pathTypeNames_;
|
||||
|
||||
typedef Tuple2<fileName, Tuple2<pathType, label>> dirIndex;
|
||||
typedef List<dirIndex> dirIndexList;
|
||||
|
Loading…
Reference in New Issue
Block a user