LandmarkStoreContextCollection

Objective-C


@interface LandmarkStoreContextCollection : NSObject

Swift

class LandmarkStoreContextCollection : NSObject

This class encapsulates landmark store context collection information.

  • Initializes and returns a newly allocated object using the model data.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithModelData:(nonnull void *)data;
  • Returns the number of stores in the collection.

    Declaration

    Objective-C

    - (int)size;

    Swift

    func size() -> Int32
  • Returns the store items.

    Declaration

    Objective-C

    - (nonnull NSArray<LandmarkStoreContext *> *)getItems;

    Swift

    func getItems() -> [LandmarkStoreContext]
  • Returns the store ID for the specified index.

    Declaration

    Objective-C

    - (int)getStoreIdAt:(int)index;

    Swift

    func getStoreId(at index: Int32) -> Int32
  • Check if the specified store ID has any category in the list.

    Declaration

    Objective-C

    - (BOOL)contains:(int)storeId;

    Swift

    func contains(_ storeId: Int32) -> Bool
  • Check if the specified category ID from the specified store ID was already added.

    Declaration

    Objective-C

    - (BOOL)contains:(int)storeId categoryId:(int)categoryId;

    Swift

    func contains(_ storeId: Int32, categoryId: Int32) -> Bool
  • Get the number of categories enabled for the specified store.

    Declaration

    Objective-C

    - (int)getCategoryCount:(int)storeId;

    Swift

    func getCategoryCount(_ storeId: Int32) -> Int32
  • Get the specified category ID for the specified store.

    Declaration

    Objective-C

    - (int)getStoreCategoryId:(int)storeId indexCategory:(int)indexCategory;

    Swift

    func getStoreCategoryId(_ storeId: Int32, indexCategory: Int32) -> Int32
  • Add a new category ID into the specified store list.

    Declaration

    Objective-C

    - (SDKErrorCode)addStoreCategoryId:(int)storeId categoryId:(int)categoryId;

    Swift

    func addStoreCategoryId(_ storeId: Int32, categoryId: Int32) -> SDKErrorCode

    Return Value

    SDKErrorCodeKNoError on success.

  • Add a list of categories into the specified store list.

    Declaration

    Objective-C

    - (SDKErrorCode)
        addStoreCategoryList:(int)storeId
                  categories:(nonnull NSArray<LandmarkCategoryObject *> *)array;

    Swift

    func addStoreCategoryList(_ storeId: Int32, categories array: [LandmarkCategoryObject]) -> SDKErrorCode

    Return Value

    SDKErrorCodeKNoError on success.

  • Add all the categories of the specified store ID.

    Declaration

    Objective-C

    - (SDKErrorCode)addAllStoreCategories:(int)storeId;

    Swift

    func addAllStoreCategories(_ storeId: Int32) -> SDKErrorCode

    Return Value

    SDKErrorCodeKNoError on success.

  • Remove category ID from the specified store list.

    Declaration

    Objective-C

    - (SDKErrorCode)removeStoreCategoryId:(int)storeId categoryId:(int)categoryId;

    Swift

    func removeStoreCategoryId(_ storeId: Int32, categoryId: Int32) -> SDKErrorCode

    Return Value

    SDKErrorCodeKNoError on success.

  • Remove all the categories of the specified store ID.

    Declaration

    Objective-C

    - (SDKErrorCode)removeAllStoreCategories:(int)storeId;

    Swift

    func removeAllStoreCategories(_ storeId: Int32) -> SDKErrorCode

    Return Value

    SDKErrorCodeKNoError on success.

  • Remove all stores and categories.

    Declaration

    Objective-C

    - (void)clear;

    Swift

    func clear()