GPKGFeatureCache
Objective-C
@interface GPKGFeatureCache : NSObject
Swift
class GPKGFeatureCache : NSObject
Feature Row Cache for a single feature table
-
Initialize
Declaration
Objective-C
- (instancetype)init;
Swift
init!()
Return Value
new feature cache
-
Initialize
Declaration
Objective-C
- (instancetype)initWithMaxSize:(int)maxSize;
Swift
init!(maxSize: Int32)
Parameters
maxSize
max feature rows to retain in the cache
Return Value
new feature cache
-
Get the cache max size
Declaration
Objective-C
- (int)maxSize;
Swift
func maxSize() -> Int32
Return Value
max size
-
Get the cached feature row by feature id
Declaration
Objective-C
- (GPKGFeatureRow *)rowById:(int)featureId;
Swift
func row(byId featureId: Int32) -> GPKGFeatureRow!
Parameters
featureId
feature row id
Return Value
feature row or null
-
Get the cached feature row by feature id
Declaration
Objective-C
- (GPKGFeatureRow *)rowByIdNumber:(NSNumber *)featureId;
Swift
func row(byIdNumber featureId: NSNumber!) -> GPKGFeatureRow!
Parameters
featureId
feature row id
Return Value
feature row or null
-
Cache the feature row
Declaration
Objective-C
- (GPKGFeatureRow *)putRow:(GPKGFeatureRow *)featureRow;
Swift
func put(_ featureRow: GPKGFeatureRow!) -> GPKGFeatureRow!
Parameters
featureRow
feature row
Return Value
previous cached feature row or null
-
Remove the cached feature row
Declaration
Objective-C
- (GPKGFeatureRow *)removeRow:(GPKGFeatureRow *)featureRow;
Swift
func remove(_ featureRow: GPKGFeatureRow!) -> GPKGFeatureRow!
Parameters
featureRow
feature row
Return Value
removed feature row or null
-
Remove the cached feature row by id
Declaration
Objective-C
- (GPKGFeatureRow *)removeById:(int)featureId;
Swift
func remove(byId featureId: Int32) -> GPKGFeatureRow!
Parameters
featureId
feature row id
Return Value
removed feature row or null
-
Remove the cached feature row by id
Declaration
Objective-C
- (GPKGFeatureRow *)removeByIdNumber:(NSNumber *)featureId;
Swift
func remove(byIdNumber featureId: NSNumber!) -> GPKGFeatureRow!
Parameters
featureId
feature row id
Return Value
removed feature row or null
-
Clear the cache
Declaration
Objective-C
- (void)clear;
Swift
func clear()
-
Resize the cache
Declaration
Objective-C
- (void)resizeWithMaxSize:(int)maxSize;
Swift
func resize(withMaxSize maxSize: Int32)
Parameters
maxSize
max size
-
Clear and resize the cache
Declaration
Objective-C
- (void)clearAndResizeWithMaxSize:(int)maxSize;
Swift
func clearAndResize(withMaxSize maxSize: Int32)
Parameters
maxSize
max size of the cache