MBNNRouteAlternative.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // This file is generated and will be overwritten automatically.
  2. #import <Foundation/Foundation.h>
  3. @class MBNNAlternativeRouteInfo;
  4. @class MBNNRouteIntersection;
  5. @protocol MBNNRouteInterface;
  6. /** New route with additional information about where this route first deviates from the current route. */
  7. NS_SWIFT_NAME(RouteAlternative)
  8. __attribute__((visibility ("default")))
  9. @interface MBNNRouteAlternative : NSObject
  10. // This class provides custom init which should be called
  11. - (nonnull instancetype)init NS_UNAVAILABLE;
  12. // This class provides custom init which should be called
  13. + (nonnull instancetype)new NS_UNAVAILABLE;
  14. - (nonnull instancetype)initWithId:(uint32_t)id
  15. route:(nonnull id<MBNNRouteInterface>)route
  16. mainRouteFork:(nonnull MBNNRouteIntersection *)mainRouteFork
  17. alternativeRouteFork:(nonnull MBNNRouteIntersection *)alternativeRouteFork
  18. infoFromFork:(nonnull MBNNAlternativeRouteInfo *)infoFromFork
  19. infoFromStart:(nonnull MBNNAlternativeRouteInfo *)infoFromStart
  20. isNew:(BOOL)isNew;
  21. /**
  22. * Stable alternative's identificator. Always greater than zero.
  23. * If route is changed but route's geometry fully includes to old route's geometry -- id will not change.
  24. */
  25. @property (nonatomic, readonly) uint32_t id;
  26. /**
  27. * Alternative route object from router as is.
  28. * Route from this response starts from some point on the main route (where the puck was at the time of the route request).
  29. */
  30. @property (nonatomic, readonly, nonnull) id<MBNNRouteInterface> route;
  31. /**
  32. * Main route's segment and leg where alternative route first deviates from the current route.
  33. * Can be used to find the moment when the puck is near the fork route point.
  34. */
  35. @property (nonatomic, readonly, nonnull) MBNNRouteIntersection *mainRouteFork;
  36. /**
  37. * Alternative route's segment and leg where alternative route first deviates from the current route.
  38. * Can be used to skip the common part of the alternative route when drawing an alternate route.
  39. */
  40. @property (nonatomic, readonly, nonnull) MBNNRouteIntersection *alternativeRouteFork;
  41. /** Information about part of alternative route, that starts from fork point (deviation point). */
  42. @property (nonatomic, readonly, nonnull) MBNNAlternativeRouteInfo *infoFromFork;
  43. /** Route information, which is obtained by joining the begin part of the main route with an alternate route. */
  44. @property (nonatomic, readonly, nonnull) MBNNAlternativeRouteInfo *infoFromStart;
  45. /**
  46. * True if the alternative is new.
  47. * That means that onRouteAlternativesChanged event was triggered at least because by the current alternative is came from router.
  48. * I.e. the alternative appears first time in onRouteAlternativesChanged callback.
  49. */
  50. @property (nonatomic, readonly, getter=isIsNew) BOOL isNew;
  51. @end