Skip to content
Snippets Groups Projects
Commit 6b15244d authored by Mark OLESEN's avatar Mark OLESEN
Browse files

STYLE: Enum instead of NamedEnum for fileOperation

parent 5848b0af
Branches
Tags
No related merge requests found
...@@ -43,43 +43,39 @@ namespace Foam ...@@ -43,43 +43,39 @@ namespace Foam
defineTypeNameAndDebug(fileOperation, 0); defineTypeNameAndDebug(fileOperation, 0);
defineRunTimeSelectionTable(fileOperation, word); 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 word fileOperation::defaultFileHandler
( (
debug::optimisationSwitches().lookupOrAddDefault debug::optimisationSwitches().lookupOrAddDefault<word>
( (
"fileHandler", "fileHandler",
//Foam::fileOperations::uncollatedFileOperation::typeName, //Foam::fileOperations::uncollatedFileOperation::typeName,
word("uncollated"), "uncollated",
false, false,
false false
) )
); );
} }
Foam::word Foam::fileOperation::processorsBaseDir = "processors"; 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 * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
......
...@@ -47,7 +47,7 @@ Description ...@@ -47,7 +47,7 @@ Description
#include "labelList.H" #include "labelList.H"
#include "Switch.H" #include "Switch.H"
#include "tmpNrc.H" #include "tmpNrc.H"
#include "NamedEnum.H" #include "Enum.H"
#include "Tuple2.H" #include "Tuple2.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...@@ -93,7 +93,7 @@ public: ...@@ -93,7 +93,7 @@ public:
PROCBASEINSTANCE, // as PROCBASEOBJECT but with instance PROCBASEINSTANCE, // as PROCBASEOBJECT but with instance
PROCINSTANCE // as PROCOBJECT 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 Tuple2<fileName, Tuple2<pathType, label>> dirIndex;
typedef List<dirIndex> dirIndexList; typedef List<dirIndex> dirIndexList;
......
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