TileCache.h
659 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//
// TileImageCache.h
// Images
//
// Created by Joseph Gentle on 30/08/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "Tile.h"
#import "TileSource.h"
@class TileImage;
@protocol TileCache<NSObject>
// Returns the cached image if it exists. nil otherwise.
-(TileImage*) cachedImage:(Tile)tile;
@optional
-(void)addTile: (Tile)tile WithImage: (TileImage*)image;
@end
@interface TileCache : NSObject<TileCache>
{
NSMutableArray *caches;
}
+(TileCache*)sharedCache;
+(NSNumber*) tileHash: (Tile)tile;
// Add tile to cache
-(void)addTile: (Tile)tile WithImage: (TileImage*)image;
@end