32Foam::schemesLookup::lookupDetail::lookupDetail
35 const fileName& parentDictPath
42 if (parentDictPath.empty())
46 else if (name_.empty())
48 dict_.name() = parentDictPath;
49 name_ = dict_.dictName();
53 dict_.name() = fileName::concat(parentDictPath, name_,
'/');
55 default_.name() = fileName::concat(dict_.name(),
"default",
'/');
61void Foam::schemesLookup::lookupDetail::clear()
68Foam::ITstream& Foam::schemesLookup::lookupDetail::fallback()
const
70 ITstream& is =
const_cast<ITstream&
>(default_);
76Foam::ITstream& Foam::schemesLookup::lookupDetail::lookup
81 if (dict_.found(
name) || default_.empty())
85 return dict_.lookup(
name);
92void Foam::schemesLookup::lookupDetail::populate
95 const word& defaultName,
99 if (mandatory ||
dict.found(name_))
103 dict_ =
dict.subDict(name_);
105 else if (!defaultName.empty() && !dict_.found(
"default"))
107 dict_.add(
"default", defaultName);
113 !dict_.found(
"default")
114 || dict_.lookup(
"default").peek() ==
"none"
122 default_ = dict_.lookup(
"default");
127void Foam::schemesLookup::lookupDetail::writeEntry(Ostream&
os)
const
129 dict_.writeEntry(
os);
133void Foam::schemesLookup::lookupDetail::writeEntryOptional(Ostream&
os)
const
137 dict_.writeEntry(
os);
virtual void rewind() override
Rewind the stream so that it may be read again. Same as seek(0).
const fileName & name() const noexcept
The dictionary name.
dictionary()
Default construct, a top-level empty dictionary.
OBJstream os(runTime.globalPath()/outputName)
const word dictName("faMeshDefinition")