Commit 6b15244d authored by Mark Olesen's avatar Mark Olesen
Browse files

STYLE: Enum instead of NamedEnum for fileOperation

parent 5848b0af
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment