32 Foam::schemesLookup::lookupDetail::lookupDetail
35 const fileName& parentDictPath
42 if (parentDictPath.empty())
46 else if (name_.empty())
48 dict_.name() = parentDictPath;
49 name_ = dict_.dictName();
68 Foam::ITstream& Foam::schemesLookup::lookupDetail::fallback()
const 70 ITstream& is =
const_cast<ITstream&
>(default_);
81 if (dict_.found(
name) || default_.empty())
85 return dict_.lookup(
name);
92 void Foam::schemesLookup::lookupDetail::populate
94 const dictionary&
dict,
95 const word& defaultName,
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");
127 void Foam::schemesLookup::lookupDetail::writeEntry(Ostream&
os)
const 129 dict_.writeEntry(
os);
133 void Foam::schemesLookup::lookupDetail::writeEntryOptional(Ostream&
os)
const 137 dict_.writeEntry(
os);
const word dictName("faMeshDefinition")
entry * add(entry *entryPtr, bool mergeEntry=false)
Add a new entry.
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry (const access) with the given keyword.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
OBJstream os(runTime.globalPath()/outputName)
static fileName concat(const std::string &s1, const std::string &s2, const char delim='/')
Join two strings with a path separator ('/' by default).
virtual void rewind() override
Rewind the stream so that it may be read again. Same as seek(0)
An input stream of tokens.