MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / found

Function found

src/OpenFOAM/db/dictionary/dictionary.C:430–466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

428
429
430bool Foam::dictionary::found
431(
432 const word& keyword,
433 bool recursive,
434 bool patternMatch
435) const
436{
437 if (hashedEntries_.found(keyword))
438 {
439 return true;
440 }
441 else
442 {
443 if (patternMatch && patternEntries_.size())
444 {
445 DLList<entry*>::const_iterator wcLink =
446 patternEntries_.begin();
447 DLList<autoPtr<regExp>>::const_iterator reLink =
448 patternRegexps_.begin();
449
450 // Find in patterns using regular expressions only
451 if (findInPatterns(patternMatch, keyword, wcLink, reLink))
452 {
453 return true;
454 }
455 }
456
457 if (recursive && &parent_ != &dictionary::null)
458 {
459 return parent_.found(keyword, recursive, patternMatch);
460 }
461 else
462 {
463 return false;
464 }
465 }
466}
467
468
469const Foam::entry* Foam::dictionary::lookupEntryPtr

Callers 10

dictionary.CFile · 0.70
dictionaryFunction · 0.50
writeAveragingPropertiesFunction · 0.50
HashTable.CFile · 0.50
StaticHashTable.CFile · 0.50
DictionaryBase.CFile · 0.50
endFunction · 0.50
solidProperties.CFile · 0.50

Calls 4

findInPatternsFunction · 0.85
foundMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected