Ticket #13426: MPIndex.h.diff

File MPIndex.h.diff, 1.9 KB (added by kirk.kelsey@…, 16 years ago)

MPIndex.h diff

  • MPIndex.h

     
    3333 *      POSSIBILITY OF SUCH DAMAGE.
    3434 */
    3535
     36/*!
     37 @header
     38 The MPIndex maintains an in-memory cache of all available ports and their
     39 install status.
     40*/
    3641#import <Cocoa/Cocoa.h>
    3742#import "MPMacPorts.h"
    3843#import "MPPort.h"
     
    4045#define MPIndexWillSetIndex     @"org.macports.framework.index.willSetIndex"
    4146#define MPIndexDidSetIndex      @"org.macports.framework.index.didSetIndex"
    4247
     48/*!
     49 @class MPIndex
     50 @abstract Index of all ports
     51 @discussion Maintains an in-memory cache of all available ports and their
     52 install status. The MPIndex class is analogous to the PortIndex files for every
     53 port collection (most users have just one collection listed in
     54 /opt/local/etc/macports/sources.conf).
     55 */
    4356@interface MPIndex : MPMutableDictionary {
    4457
    4558}
    4659
     60/*!
     61 @brief Initialize a newly allocated index with enough memory for numItems ports
     62 @param numItems The number of ports that the index will initially have capacity for
     63 */
     64- (id)initWithCapacity:(unsigned)numItems;
     65
     66/*!
     67 @brief Returns a new array conaining of all available ports
     68 */
    4769- (NSArray *)ports;
     70
     71/*!
     72@brief Returns a new array of all port names
     73 */
    4874- (NSArray *)portNames;
    4975
     76/*!
     77@brief Loads all ports into the index from the MacPorts backend
     78*/
    5079- (void)setIndex;
    5180
     81/*!
     82@brief Returns the port with the given name
     83@param name The name of the port
     84 */
    5285- (MPPort *)port:(NSString *)name;
     86
     87/*!
     88@brief Returns an enumerator of all ports
     89 */
    5390- (NSEnumerator *)portEnumerator;
     91
     92/*!
     93 @brief Removes the port with the given name from the index
     94 @param name The name of the port
     95 */
    5496- (void)removePort:(NSString *)name;
     97
     98/*!
     99@brief Adds the port to the index
     100 @param port The port
     101@discussion The default state for the port is "not installed"
     102 */
    55103- (void)setPort:(MPPort *)port;
    56104
    57105+ (Class)classForKeyedUnarchiver;