mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: Enum instead of NamedEnum for fileOperation
This commit is contained in:
@ -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
|
|||||||
#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:
|
|||||||
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;
|
||||||
|
|||||||
Reference in New Issue
Block a user