mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
fileName gets additional convenience methods
- exists() = forward to OSspecific exists(...) - isDir() = forward to OSspecific dir(...) - isFile() = forward to OSspecific file(...) - IOobjectComponents() - split into instance, local, name following rules set out for IOobject. - added IOobject(path, registry, ...) constructor that uses fileName::IOobjectComponents(). This hides the complexity we otherwise need.
This commit is contained in:
@ -98,6 +98,37 @@ Foam::IOobject::IOobject
|
||||
}
|
||||
|
||||
|
||||
Foam::IOobject::IOobject
|
||||
(
|
||||
const fileName& path,
|
||||
const objectRegistry& registry,
|
||||
readOption ro,
|
||||
writeOption wo,
|
||||
bool registerObject
|
||||
)
|
||||
:
|
||||
name_(),
|
||||
headerClassName_(typeName),
|
||||
note_(),
|
||||
instance_(),
|
||||
local_(),
|
||||
db_(registry),
|
||||
rOpt_(ro),
|
||||
wOpt_(wo),
|
||||
registerObject_(registerObject),
|
||||
objState_(GOOD)
|
||||
{
|
||||
path.IOobjectComponents(instance_, local_, name_);
|
||||
|
||||
if (objectRegistry::debug)
|
||||
{
|
||||
Info<< "Constructing IOobject called " << name_
|
||||
<< " of type " << headerClassName_
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::IOobject::~IOobject()
|
||||
|
||||
Reference in New Issue
Block a user