Add Dependency::ResolvableVersionMatches()

This commit is contained in:
Ingo Weinhold 2011-06-25 17:11:33 +02:00
parent 032ef7b25b
commit e71dd015a5
2 changed files with 13 additions and 0 deletions

View File

@ -49,3 +49,14 @@ Dependency::SetVersionRequirement(BPackageResolvableOperator op,
fVersionOperator = op;
fVersion = version;
}
bool
Dependency::ResolvableVersionMatches(Version* resolvableVersion) const
{
if (fVersion == NULL)
return true;
return resolvableVersion != NULL
&& fVersion->Compare(fVersionOperator, *resolvableVersion);
}

View File

@ -47,6 +47,8 @@ public:
{ fResolvable = resolvable; }
::Resolvable* Resolvable() const
{ return fResolvable; }
bool ResolvableVersionMatches(
Version* resolvableVersion) const;
const char* Name() const { return fName; }