MP4::AtomList MP4::Atom::findall(const char *name, bool recursive) { MP4::AtomList result; for(AtomList::ConstIterator it = children.begin(); it != children.end(); ++it) { if((*it)->name == name) { result.append(*it); } if(recursive) { result.append((*it)->findall(name, recursive)); } } return result; }
MP4::AtomList MP4::Atom::findall(const char *name, bool recursive) { MP4::AtomList result; for(unsigned int i = 0; i < children.size(); i++) { if(children[i]->name == name) { result.append(children[i]); } if(recursive) { result.append(children[i]->findall(name, recursive)); } } return result; }
bool MP4::Atom::path(MP4::AtomList &path, const char *name1, const char *name2, const char *name3) { path.append(this); if(name1 == 0) { return true; } for(AtomList::ConstIterator it = children.begin(); it != children.end(); ++it) { if((*it)->name == name1) { return (*it)->path(path, name2, name3); } } return false; }
bool MP4::Atom::path(MP4::AtomList &path, const char *name1, const char *name2, const char *name3) { path.append(this); if(name1 == 0) { return true; } for(unsigned int i = 0; i < children.size(); i++) { if(children[i]->name == name1) { return children[i]->path(path, name2, name3); } } return false; }