ResolvableFamily: Add ResolveDependency()
This commit is contained in:
parent
0d7d1795a1
commit
4081d37dec
@ -44,3 +44,18 @@ ResolvableFamily::RemoveResolvable(Resolvable* resolvable,
|
||||
resolvable->SetFamily(NULL);
|
||||
fResolvables.Remove(resolvable);
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
ResolvableFamily::ResolveDependency(Dependency* dependency)
|
||||
{
|
||||
for (FamilyResolvableList::Iterator it = fResolvables.GetIterator();
|
||||
Resolvable* resolvable = it.Next();) {
|
||||
if (dependency->ResolvableVersionMatches(resolvable->Version())) {
|
||||
resolvable->AddDependency(dependency);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -21,6 +21,8 @@ public:
|
||||
ResolvableDependencyList&
|
||||
dependenciesToUpdate);
|
||||
|
||||
bool ResolveDependency(Dependency* dependency);
|
||||
|
||||
const char* Name() const;
|
||||
|
||||
bool IsLastResolvable(Resolvable* resolvable) const;
|
||||
|
Loading…
Reference in New Issue
Block a user