[29755] users/rhwood/MacPorts.Framework
source_changes at macosforge.org
source_changes at macosforge.org
Mon Oct 8 12:23:21 PDT 2007
Revision: 29755
http://trac.macosforge.org/projects/macports/changeset/29755
Author: rhwood at macports.org
Date: 2007-10-08 12:23:20 -0700 (Mon, 08 Oct 2007)
Log Message:
-----------
Add methods ports and portNames to return NSArrays listing every port as an MPPort and every port name respectively
Modified Paths:
--------------
users/rhwood/MacPorts.Framework/MPIndex.h
users/rhwood/MacPorts.Framework/MPIndex.m
Modified: users/rhwood/MacPorts.Framework/MPIndex.h
===================================================================
--- users/rhwood/MacPorts.Framework/MPIndex.h 2007-10-08 19:23:12 UTC (rev 29754)
+++ users/rhwood/MacPorts.Framework/MPIndex.h 2007-10-08 19:23:20 UTC (rev 29755)
@@ -25,6 +25,8 @@
- (void)finishInitWithCapacity:(unsigned)numItems WithMacPorts:(MPMacPorts *)macPortsInstance;
+- (NSArray *)ports;
+- (NSArray *)portNames;
- (void)setIndex;
- (void)addEntriesFromPortIndex:(NSString *)portIndex;
@@ -43,4 +45,4 @@
+ (Class)classForKeyedUnarchiver;
- (Class)classForKeyedArchiver;
- at end
+ at end
\ No newline at end of file
Modified: users/rhwood/MacPorts.Framework/MPIndex.m
===================================================================
--- users/rhwood/MacPorts.Framework/MPIndex.m 2007-10-08 19:23:12 UTC (rev 29754)
+++ users/rhwood/MacPorts.Framework/MPIndex.m 2007-10-08 19:23:20 UTC (rev 29755)
@@ -80,6 +80,14 @@
}
}
+- (NSArray *)ports {
+ return [self allValues];
+}
+
+- (NSArray *)portNames {
+ return [self allKeys];
+}
+
- (MPPort *)port:(NSString *)name {
return [self objectForKey:name];
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20071008/3d8bed14/attachment.html
More information about the macports-changes
mailing list