RouteBookmarksObject

Objective-C


@interface RouteBookmarksObject : NSObject

Swift

class RouteBookmarksObject : NSObject

This class encapsulates route bookmarks information.

  • Initializes and returns a newly allocated object using the file name and folder name ( optionally ).

    Declaration

    Objective-C

    - (nonnull instancetype)initWithFileName:(nonnull NSString *)file
                                  folderName:(nullable NSString *)folder;

    Swift

    init(fileName file: String, folderName folder: String?)
  • Returns the bookmarks collection path.

    Declaration

    Objective-C

    - (nonnull NSString *)getFilePath;

    Swift

    func getFilePath() -> String
  • Changes the sort order of the routes.

    Declaration

    Objective-C

    - (void)setSortOrder:(RouteBookmarksSort)sort;

    Swift

    func setSortOrder(_ sort: RouteBookmarksSort)
  • Returns the number of routes.

    Declaration

    Objective-C

    - (int)getSize;

    Swift

    func getSize() -> Int32
  • Returns the name of the route specified by index.

    Declaration

    Objective-C

    - (nonnull NSString *)getName:(int)index;

    Swift

    func getName(_ index: Int32) -> String
  • Returns the preferences of the route specified by index.

    Declaration

    Objective-C

    - (nonnull RoutePreferencesObject *)getPreferences:(int)index;

    Swift

    func getPreferences(_ index: Int32) -> RoutePreferencesObject
  • Returns the waypoints of the route specified by index.

    Declaration

    Objective-C

    - (nonnull NSArray<LandmarkObject *> *)getWaypoints:(int)index;

    Swift

    func getWaypoints(_ index: Int32) -> [LandmarkObject]
  • Returns the timestamp of the route specified by index.

    Declaration

    Objective-C

    - (nullable TimeObject *)getTimestamp:(int)index;

    Swift

    func getTimestamp(_ index: Int32) -> TimeObject?
  • Returns true if updating the route was done with success.

    Declaration

    Objective-C

    - (BOOL)update:(int)index
               name:(nonnull NSString *)name
               list:(nonnull NSArray<LandmarkObject *> *)waypoints
        preferences:(nullable RoutePreferencesObject *)preferences;

    Swift

    func update(_ index: Int32, name: String, list waypoints: [LandmarkObject], preferences: RoutePreferencesObject?) -> Bool
  • Returns true if the add route operation was done with success.

    Declaration

    Objective-C

    - (BOOL)add:(nonnull NSString *)name
               list:(nonnull NSArray<LandmarkObject *> *)waypoints
        preferences:(nullable RoutePreferencesObject *)preferences
          overwrite:(BOOL)overwrite;

    Swift

    func add(_ name: String, list waypoints: [LandmarkObject], preferences: RoutePreferencesObject?, overwrite: Bool) -> Bool
  • Returns the number of imported routes, otherwise 0 for operation failed.

    Declaration

    Objective-C

    - (NSInteger)addTrips:(nonnull NSString *)fileName
           skipDuplicates:(BOOL)skipDuplicates;

    Swift

    func addTrips(_ fileName: String, skipDuplicates: Bool) -> Int
  • Returns true if the remove operation was done with success.

    Declaration

    Objective-C

    - (BOOL)remove:(int)index;

    Swift

    func remove(_ index: Int32) -> Bool
  • Clears routes.

    Declaration

    Objective-C

    - (void)clear;

    Swift

    func clear()
  • Creates a basic route unique name based on waypoints coordinates.

    Declaration

    Objective-C

    - (nonnull NSString *)getBaseUniqueName:
        (nonnull NSArray<LandmarkObject *> *)waypoints;

    Swift

    func getBaseUniqueName(_ waypoints: [LandmarkObject]) -> String
  • Create a new landmark with the given track.

    Declaration

    Objective-C

    + (nullable LandmarkObject *)setWaypointTrackData:
        (nonnull PathObject *)pathObject;

    Swift

    class func setWaypointTrackData(_ pathObject: PathObject) -> LandmarkObject?

    Return Value

    New landmark object with the path if operation succeeded.

  • Add the given track to landmark.

    Declaration

    Objective-C

    + (nullable LandmarkObject *)
        setWaypointTrackData:(nonnull LandmarkObject *)landmarkObject
                        path:(nonnull PathObject *)pathObject;

    Swift

    class func setWaypointTrackData(_ landmarkObject: LandmarkObject, path pathObject: PathObject) -> LandmarkObject?

    Return Value

    New landmark object with the path if operation succeeded.

  • Extract track from the given landmark.

    Declaration

    Objective-C

    + (nullable PathObject *)getWaypointTrackData:
        (nonnull LandmarkObject *)landmarkObject;

    Swift

    class func getWaypointTrackData(_ landmarkObject: LandmarkObject) -> PathObject?
  • Returns true if the landmark has track data.

    Declaration

    Objective-C

    + (BOOL)waypointHasTrackData:(nonnull LandmarkObject *)landmarkObject;

    Swift

    class func waypointHasTrackData(_ landmarkObject: LandmarkObject) -> Bool
  • Returns true if the reverse waypoint track data operation was done with success.

    Declaration

    Objective-C

    + (BOOL)reverseWaypointTrackData:(nonnull LandmarkObject *)landmarkObject;

    Swift

    class func reverseWaypointTrackData(_ landmarkObject: LandmarkObject) -> Bool
  • Returns true if the truncate track data operation between the given departure and destination coordinates was done with success.

    Declaration

    Objective-C

    + (BOOL)setWaypointTrackDepartureAndDestination:
                (nonnull LandmarkObject *)landmarkObject
                                          departure:
                                              (nonnull CoordinatesObject *)departure
                                        destination:(nonnull CoordinatesObject *)
                                                        destination;

    Swift

    class func setWaypointTrackDepartureAndDestination(_ landmarkObject: LandmarkObject, departure: CoordinatesObject, destination: CoordinatesObject) -> Bool
  • Export the route to the given file.

    Declaration

    Objective-C

    - (BOOL)exportToFile:(int)index path:(nonnull NSString *)path;

    Swift

    func export(toFile index: Int32, path: String) -> Bool
  • Set auto delete mode. @details If auto delete mode is true, the database if automatically deleted when object is destroyed. @details Default is false.

    Declaration

    Objective-C

    - (void)setAutoDeleteMode:(BOOL)mode;

    Swift

    func setAutoDeleteMode(_ mode: Bool)
  • Get auto delete mode. @details If auto delete mode is true, the database if automatically deleted when object is destroyed. @details Default is false

    Declaration

    Objective-C

    - (BOOL)getAutoDeleteMode;

    Swift

    func getAutoDeleteMode() -> Bool