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

Function remove

src/OpenFOAM/db/dictionary/dictionary.C:966–995  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

964
965
966bool Foam::dictionary::remove(const word& Keyword)
967{
968 HashTable<entry*>::iterator iter = hashedEntries_.find(Keyword);
969
970 if (iter != hashedEntries_.end())
971 {
972 // Delete from patterns first
973 DLList<entry*>::iterator wcLink =
974 patternEntries_.begin();
975 DLList<autoPtr<regExp>>::iterator reLink =
976 patternRegexps_.begin();
977
978 // Find in pattern using exact match only
979 if (findInPatterns(false, Keyword, wcLink, reLink))
980 {
981 patternEntries_.remove(wcLink);
982 patternRegexps_.remove(reLink);
983 }
984
985 IDLList<entry>::remove(iter());
986 delete iter();
987 hashedEntries_.erase(iter);
988
989 return true;
990 }
991 else
992 {
993 return false;
994 }
995}
996
997
998bool Foam::dictionary::changeKeyword

Callers 12

addFunction · 0.70
readFunction · 0.70
loopFunction · 0.50
rmFunction · 0.50
HashPtrTable.CFile · 0.50
DictionaryBase.CFile · 0.50
removeMethod · 0.50
ILList.CFile · 0.50
removeMethod · 0.50
removeMethod · 0.50
removeMethod · 0.50
readFunction · 0.50

Calls 5

findInPatternsFunction · 0.85
eraseMethod · 0.80
endMethod · 0.45
beginMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected