| 185 | } |
| 186 | |
| 187 | KDevVarLengthArray<IndexedTopDUContext> Uses::uses(const DeclarationId& id) const |
| 188 | { |
| 189 | KDevVarLengthArray<IndexedTopDUContext> ret; |
| 190 | |
| 191 | UsesItem item; |
| 192 | item.declaration = id; |
| 193 | UsesRequestItem request(item); |
| 194 | |
| 195 | LockedItemRepository::read<Uses>([&](const UsesRepo& repo) { |
| 196 | uint index = repo.findIndex(item); |
| 197 | |
| 198 | if (index) { |
| 199 | const UsesItem* repositoryItem = repo.itemFromIndex(index); |
| 200 | FOREACH_FUNCTION(const IndexedTopDUContext& decl, repositoryItem->uses) |
| 201 | ret.append(decl); |
| 202 | } |
| 203 | }); |
| 204 | |
| 205 | return ret; |
| 206 | } |
| 207 | } |