| 145 | } |
| 146 | |
| 147 | void ModuleResourceContainer::GetChildren(const std::string& resourcePath, bool relativePaths, |
| 148 | std::vector<std::string>& names, std::vector<uint32_t>& indices) const |
| 149 | { |
| 150 | d->InitSortedEntries(); |
| 151 | |
| 152 | ModuleResourceContainerPrivate::SetType::const_iterator iter = |
| 153 | d->m_SortedEntries.find(std::make_pair(resourcePath, 0)); |
| 154 | if (iter == d->m_SortedEntries.end()) |
| 155 | { |
| 156 | return; |
| 157 | } |
| 158 | |
| 159 | for (++iter; iter != d->m_SortedEntries.end(); ++iter) |
| 160 | { |
| 161 | if (resourcePath.size() > iter->first.size()) break; |
| 162 | if (iter->first.compare(0, resourcePath.size(), resourcePath) == 0) |
| 163 | { |
| 164 | std::size_t pos = iter->first.find_first_of('/', resourcePath.size()); |
| 165 | if (pos == std::string::npos || pos == iter->first.size()-1) |
| 166 | { |
| 167 | if (relativePaths) |
| 168 | { |
| 169 | names.push_back(iter->first.substr(resourcePath.size())); |
| 170 | } |
| 171 | else |
| 172 | { |
| 173 | names.push_back(iter->first); |
| 174 | } |
| 175 | indices.push_back(iter->second); |
| 176 | } |
| 177 | } |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | void ModuleResourceContainer::FindNodes(const std::string& path, const std::string& filePattern, |
| 182 | bool recurse, std::vector<ModuleResource>& resources) const |
no test coverage detected