GPKGGeoPackageCache

Objective-C

@interface GPKGGeoPackageCache : NSObject

Swift

class GPKGGeoPackageCache : NSObject

GeoPackage Cache to maintain opened GeoPackages

  • Close quietly flag

    Declaration

    Objective-C

    @property (nonatomic) BOOL closeQuietly;

    Swift

    var closeQuietly: Bool { get set }
  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithManager:(GPKGGeoPackageManager *)manager;

    Swift

    init!(manager: GPKGGeoPackageManager!)

    Parameters

    manager

    geoPackage manager

    Return Value

    new cache

  • Get the cached GeoPackage or open and cache the GeoPackage

    Declaration

    Objective-C

    - (GPKGGeoPackage *)geoPackageOpenName:(NSString *)name;

    Swift

    func geoPackageOpenName(_ name: String!) -> GPKGGeoPackage!

    Parameters

    name

    GeoPackage name

    Return Value

    open GeoPackage

  • Get the cached GeoPackage or open the GeoPackage without caching it

    Declaration

    Objective-C

    - (GPKGGeoPackage *)geoPackageNoCacheOpenName:(NSString *)name;

    Swift

    func geoPackageNoCacheOpenName(_ name: String!) -> GPKGGeoPackage!

    Parameters

    name

    GeoPackage name

    Return Value

    open GeoPackage

  • Get the names of the cached GeoPackages

    Declaration

    Objective-C

    - (NSArray<NSString *> *)names;

    Swift

    func names() -> [String]!

    Return Value

    cached GeoPackage names

  • Get the cached GeoPackages

    Declaration

    Objective-C

    - (NSArray<GPKGGeoPackage *> *)geoPackages;

    Swift

    func geoPackages() -> [GPKGGeoPackage]!

    Return Value

    cached GeoPackages

  • Determine if the cache has the GeoPackage name

    Declaration

    Objective-C

    - (BOOL)hasName:(NSString *)name;

    Swift

    func hasName(_ name: String!) -> Bool

    Parameters

    name

    GeoPackage name

    Return Value

    true if has cached GeoPackage

  • Get the GeoPackage with name

    Declaration

    Objective-C

    - (GPKGGeoPackage *)geoPackageWithName:(NSString *)name;

    Swift

    func geoPackage(withName name: String!) -> GPKGGeoPackage!

    Parameters

    name

    GeoPackage name

    Return Value

    cached GeoPackage

  • Checks if the GeoPackage name exists in the cache

    Declaration

    Objective-C

    - (BOOL)existsWithName:(NSString *)name;

    Swift

    func exists(withName name: String!) -> Bool

    Parameters

    name

    GeoPackage name

    Return Value

    true if exists

  • Close all GeoPackages in the cache

    Declaration

    Objective-C

    - (void)closeAll;

    Swift

    func closeAll()
  • Add a GeoPackage to the cache

    Declaration

    Objective-C

    - (void)addGeoPackage:(GPKGGeoPackage *)geoPackage;

    Swift

    func addGeoPackage(_ geoPackage: GPKGGeoPackage!)

    Parameters

    geoPackage

    GeoPackage

  • Add the collection of GeoPackages

    Declaration

    Objective-C

    - (void)addAllGeoPackages:(NSArray<GPKGGeoPackage *> *)geoPackages;

    Swift

    func addAllGeoPackages(_ geoPackages: [GPKGGeoPackage]!)

    Parameters

    geoPackages

    GeoPackages

  • Remove the GeoPackage with the name but does not close it, callse close to close and remove

    Declaration

    Objective-C

    - (GPKGGeoPackage *)removeByName:(NSString *)name;

    Swift

    func remove(byName name: String!) -> GPKGGeoPackage!

    Parameters

    name

    GeoPackage name

    Return Value

    removed GeoPackage

  • Clears all cached GeoPackages but does not close them, call closeAll to close and clear all GeoPackages

    Declaration

    Objective-C

    - (void)clear;

    Swift

    func clear()
  • Close the GeoPackage with name

    Declaration

    Objective-C

    - (BOOL)closeByName:(NSString *)name;

    Swift

    func close(byName name: String!) -> Bool

    Parameters

    name

    GeoPackage name

    Return Value

    true if found and closed

  • Close GeoPackages not specified in the retain GeoPackage names

    Declaration

    Objective-C

    - (void)closeRetain:(NSArray *)retain;

    Swift

    func closeRetain(_ retain: [Any]!)

    Parameters

    retain

    array of names to retain

  • Close GeoPackages with names

    Declaration

    Objective-C

    - (void)closeNames:(NSArray *)names;

    Swift

    func closeNames(_ names: [Any]!)

    Parameters

    names

    GeoPackage names to close

  • Close the GeoPackage

    Declaration

    Objective-C

    - (void)closeGeoPackage:(GPKGGeoPackage *)geoPackage;

    Swift

    func closeGeoPackage(_ geoPackage: GPKGGeoPackage!)

    Parameters

    geoPackage

    GeoPackage

  • Close the GeoPackage if it is cached (same GeoPackage instance)

    Declaration

    Objective-C

    - (BOOL)closeGeoPackageIfCached:(GPKGGeoPackage *)geoPackage;

    Swift

    func closeGeoPackageIfCached(_ geoPackage: GPKGGeoPackage!) -> Bool

    Parameters

    geoPackage

    GeoPackage

    Return Value

    true if closed

  • Close the GeoPackage if it is not cached (GeoPackage not cached or different instance)

    Declaration

    Objective-C

    - (BOOL)closeGeoPackageIfNotCached:(GPKGGeoPackage *)geoPackage;

    Swift

    func closeGeoPackageIfNotCached(_ geoPackage: GPKGGeoPackage!) -> Bool

    Parameters

    geoPackage

    GeoPackage

    Return Value

    true if closed