35 void Foam::dictionary::reportDefault
45 <<
"No optional entry: " << keyword
46 <<
" Default: " << deflt <<
nl
53 os <<
"-- Executable: "
54 << dictionary::executableName()
71 os.writeQuoted(keyword,
true);
72 os <<
" Default: " << deflt;
84 template<
class Compare>
87 return hashedEntries_.sortedToc(comp);
113 readEntry<T>(keyword, val, matchOpt);
118 template<
class T,
class Predicate>
122 const Predicate& pred,
127 readCheck<T, Predicate>(keyword, val, pred, matchOpt);
136 std::initializer_list<std::pair<const char*,int>> compat,
141 readCompat<T>(keyword, compat, val, matchOpt);
154 const const_searcher finder(csearch(keyword, matchOpt));
160 ITstream& is = finder.ptr()->stream();
163 checkITstream(is, keyword);
167 else if (writeOptionalEntries)
169 reportDefault(keyword, deflt);
184 const const_searcher finder(csearch(keyword, matchOpt));
190 ITstream& is = finder.ptr()->stream();
193 checkITstream(is, keyword);
197 else if (writeOptionalEntries)
199 reportDefault(keyword, deflt,
true);
207 template<
class T,
class Predicate>
212 const Predicate& pred,
220 <<
"Entry '" << keyword <<
"' with invalid default in dictionary "
226 const const_searcher finder(csearch(keyword, matchOpt));
232 ITstream& is = finder.ptr()->stream();
235 checkITstream(is, keyword);
239 raiseBadInput(is, keyword);
244 else if (writeOptionalEntries)
246 reportDefault(keyword, deflt);
253 template<
class T,
class Predicate>
258 const Predicate& pred,
266 <<
"Entry '" << keyword <<
"' with invalid default in dictionary "
272 const const_searcher finder(csearch(keyword, matchOpt));
278 ITstream& is = finder.ptr()->stream();
281 checkITstream(is, keyword);
285 raiseBadInput(is, keyword);
290 else if (writeOptionalEntries)
292 reportDefault(keyword, deflt,
true);
309 const const_searcher finder(csearch(keyword, matchOpt));
313 ITstream& is = finder.ptr()->stream();
316 checkITstream(is, keyword);
323 <<
"Entry '" << keyword <<
"' not found in dictionary "
332 template<
class T,
class Predicate>
337 const Predicate& pred,
342 const const_searcher finder(csearch(keyword, matchOpt));
346 ITstream& is = finder.ptr()->stream();
349 checkITstream(is, keyword);
353 raiseBadInput(is, keyword);
361 <<
"Entry '" << keyword <<
"' not found in dictionary "
374 std::initializer_list<std::pair<const char*,int>> compat,
380 const const_searcher finder(csearchCompat(keyword, compat, matchOpt));
384 ITstream& is = finder.ptr()->stream();
387 checkITstream(is, keyword);
394 <<
"Entry '" << keyword <<
"' not found in dictionary "
412 return readEntry<T>(keyword, val, matchOpt,
false);
416 template<
class T,
class Predicate>
421 const Predicate& pred,
426 return readCheck<T, Predicate>(keyword, val, pred, matchOpt,
false);
434 std::initializer_list<std::pair<const char*,int>> compat,
439 const const_searcher finder(csearchCompat(keyword, compat, matchOpt));
445 ITstream& is = finder.ptr()->stream();
448 checkITstream(is, keyword);
452 else if (writeOptionalEntries)
454 reportDefault(keyword, deflt);
465 std::initializer_list<std::pair<const char*,int>> compat,
471 return readCompat<T>(keyword, compat, val, matchOpt,
false);