Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Clone in Desktop Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
58 lines (45 sloc) 1.56 KB
/**
* This header is generated by class-dump-z 0.1-11s.
* class-dump-z is Copyright (C) 2009 by KennyTM~, licensed under GPLv3.
*
* Source: /System/Library/PrivateFrameworks/AppSupport.framework/AppSupport
*/
#import "CPLRUDictionary.h"
#import <Foundation/NSObject.h>
/*!
CPLRUDictionary is a dictionary storing limited set of data, with extra data filted out by last accessed time. LRU stands
for Least Recently Used.
@code
CPLRUDictionary* dict = [[CPLRUDictionary alloc] initWithMaximumCapacity:4];
[dict setObject:@"1" forKey:@"first"];
[dict setObject:@"2" forKey:@"second"];
[dict setObject:@"3" forKey:@"third"];
[dict setObject:@"4" forKey:@"fourth"];
[dict objectForKey:@"first"]; // Bump "first" as most recently used.
[dict setObject:@"5" forKey:@"fifth"];
[dict setObject:@"6" forKey:@"sixth"];
NSLog(@"%@", [dict allKeys]); // Should have "first", "fourth", "fifth" and "sixth" in any order.
[dict release];
@endcode
*/
@class CPLRUDictionaryNode, NSMutableDictionary;
@interface CPLRUDictionary : NSObject {
NSMutableDictionary* _dictionary;
unsigned _maxCount;
CPLRUDictionaryNode* _head;
CPLRUDictionaryNode* _tail;
}
-(id)initWithMaximumCapacity:(NSUInteger)maximumCapacity;
-(NSUInteger)count;
-(id)allKeys;
-(id)objectForKey:(id)key;
-(void)setObject:(id)object forKey:(id)key;
-(void)removeObjectForKey:(id)key;
-(void)removeAllObjects;
@end
@interface CPLRUDictionary (NodeHelpers)
-(void)_removeNodeFromLinkedList:(id)linkedList;
-(void)_removeNode:(id)node;
-(void)_moveNodeToFront:(id)front;
-(void)_addNodeToFront:(id)front;
@end
Jump to Line
Something went wrong with that request. Please try again.