CiffEntry* CiffIFD::getEntryRecursiveWhere(CiffTag tag, uint32 isValue) { if (mEntry.find(tag) != mEntry.end()) { CiffEntry* entry = mEntry[tag]; if (entry->isInt() && entry->getInt() == isValue) return entry; } for (vector<CiffIFD*>::iterator i = mSubIFD.begin(); i != mSubIFD.end(); ++i) { CiffEntry* entry = (*i)->getEntryRecursive(tag); if (entry) return entry; } return NULL; }
vector<CiffIFD*> CiffIFD::getIFDsWithTagWhere(CiffTag tag, uint32 isValue) { vector<CiffIFD*> matchingIFDs; if (mEntry.find(tag) != mEntry.end()) { CiffEntry* entry = mEntry[tag]; if (entry->isInt() && entry->getInt() == isValue) matchingIFDs.push_back(this); } for (vector<CiffIFD*>::iterator i = mSubIFD.begin(); i != mSubIFD.end(); ++i) { vector<CiffIFD*> t = (*i)->getIFDsWithTag(tag); for (uint32 j = 0; j < t.size(); j++) { matchingIFDs.push_back(t[j]); } } return matchingIFDs; }