if (false);
else if (selector == @selector(clear))
return @"clear";
+ else if (selector == @selector(getField:))
+ return @"getField";
else if (selector == @selector(hasTag:))
return @"hasTag";
else if (selector == @selector(install))
return relations;
} }
+- (NSString *) getField:(NSString *)name {
+@synchronized (database_) {
+ if ([database_ era] != era_ || file_.end())
+ return nil;
+
+ pkgRecords::Parser &parser([database_ records]->Lookup(file_));
+
+ const char *start, *end;
+ if (!parser.Find([name UTF8String], start, end))
+ return (NSString *) [NSNull null];
+
+ return [(NSString *) CYStringCreate(start, end - start) autorelease];
+} }
+
- (void) parse {
if (parsed_ != NULL)
return;