pool_ = pool;
version_ = version;
- iterator_ = version.ParentPkg();
+
+ _profile(Package$initWithVersion$ParentPkg)
+ iterator_ = version.ParentPkg();
+ _end
+
database_ = database;
_profile(Package$initWithVersion$Latest)
name_.set(pool, iterator_.Display());
_end
- _profile(Package$lowercaseString)
+ _profile(Package$initWithVersion$lowercaseString)
char *data(id_.data());
for (size_t i(0), e(id_.size()); i != e; ++i)
// XXX: do not use tolower() as this is not locale-specific? :(
section_.set(pool_, iterator_.Section());
_end
- obsolete_ = [self hasTag:@"cydia::obsolete"];
- essential_ = ((iterator_->Flags & pkgCache::Flag::Essential) == 0 ? NO : YES) || [self hasTag:@"cydia::essential"];
- [self setVisible];
+ _profile(Package$initWithVersion$hasTag)
+ obsolete_ = [self hasTag:@"cydia::obsolete"];
+ essential_ = ((iterator_->Flags & pkgCache::Flag::Essential) == 0 ? NO : YES) || [self hasTag:@"cydia::essential"];
+ _end
+
+ _profile(Package$initWithVersion$setVisible)
+ [self setVisible];
+ _end
_end } return self;
}
}
- (BOOL) unfiltered {
- NSString *section([self section]);
- return !obsolete_ && [self hasSupportingRole] && (section == nil || isSectionVisible(section));
+ _profile(Package$unfiltered$obsolete)
+ if (obsolete_)
+ return false;
+ _end
+
+ _profile(Package$unfiltered$hasSupportingRole)
+ if (![self hasSupportingRole])
+ return false;
+ _end
+
+ NSString *section;
+
+ _profile(Package$unfiltered$section)
+ section = [self section];
+ _end
+
+ _profile(Package$unfiltered$isSectionVisible)
+ if (section != nil && !isSectionVisible(section))
+ return false;
+ _end
+
+ return true;
}
- (BOOL) visible {