| 428 | |
| 429 | |
| 430 | bool 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 | |
| 469 | const Foam::entry* Foam::dictionary::lookupEntryPtr |
no test coverage detected