TripRequest

Objective-C

@interface TripRequest : NSManagedObject

@property (nonatomic, retain) TKNamedCoordinate *fromLocation;
@property (nonatomic, retain) TKNamedCoordinate *toLocation;
@property (nonatomic, retain, nullable) NSString *purpose;
@property (nonatomic, retain, nullable) TripGroup *preferredGroup;
@property (nonatomic, strong, nullable) NSDate * arrivalTime;
@property (nonatomic, strong, nullable) NSDate * departureTime;
@property (nonatomic, strong) NSDate * timeCreated;
@property (nonatomic, strong) NSNumber * timeType;
@property (nonatomic, assign) BOOL expandForFavorite;
@property (nonatomic, retain) NSArray<NSString *> *excludedStops;

@property (nonatomic, strong, nullable) NSSet <TripGroup *> * tripGroups;

/**
 * Non Core Data property
 */

@property (nonatomic, weak, nullable) TripRequest *replacement;
@property (nonatomic, assign) TKTripGroupVisibility defaultVisibility;

- (BOOL)resultsInSameQueryAs:(TripRequest *)other;

@property (nonatomic, strong, nullable) TripGroup *lastSelection;
@property (nonatomic, strong, nullable) Trip *preferredTrip;

- (void)adjustVisibilityForMinimizedModeIdentifiers:(NSSet *)minimized
                              hiddenModeIdentifiers:(NSSet *)hidden;

/**
 @return The region the complete trip takes place in. Can be international if it spanning more than one region.
 */
- (TKRegion *)spanningRegion;

/**
 @return The local region this trip starts in. Cannot be international and thus might be nil.
 */
- (nullable TKRegion *)startRegion;

/**
 @return The local region this trip ends in. Cannot be international and thus might be nil.
 */
- (nullable TKRegion *)endRegion;

- (NSArray <NSString *> *)applicableModeIdentifiers;

- (nullable NSTimeZone *)departureTimeZone;

- (nullable NSTimeZone *)arrivalTimeZone;

- (NSString *)timeSorterTitle;

- (BOOL)hasTrips;

/**
 @return If any trip has pricing information. Also returns `YES` if there are no trips.
 */
- (BOOL)priceInformationAvailable;

- (NSString *)debugString;

@end
extension TripRequest: TKURLShareable

Swift

class TripRequest : NSManagedObject

Undocumented

  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, retain) TKNamedCoordinate *fromLocation

    Swift

    var fromLocation: TKNamedCoordinate { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, retain) TKNamedCoordinate *toLocation

    Swift

    var toLocation: TKNamedCoordinate { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, retain, nullable) NSString *purpose

    Swift

    var purpose: String? { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, retain, nullable) TripGroup *preferredGroup

    Swift

    var preferredGroup: TripGroup? { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSDate * arrivalTime

    Swift

    var arrivalTime: Date? { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSDate * departureTime

    Swift

    var departureTime: Date? { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, strong) NSDate * timeCreated

    Swift

    var timeCreated: Date { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, strong) NSNumber * timeType

    Swift

    var timeType: NSNumber { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic) BOOL expandForFavorite

    Swift

    var expandForFavorite: Bool { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, retain) NSArray<NSString *> *excludedStops

    Swift

    var excludedStops: [String] { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSSet <TripGroup *> * tripGroups

    Swift

    var tripGroups: Set<TripGroup>? { get set }
  • Non Core Data property

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) TripRequest *replacement;

    Swift

    weak var replacement: TripRequest? { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic) TKTripGroupVisibility defaultVisibility

    Swift

    var defaultVisibility: TKTripGroupVisibility { get set }
  • Undocumented

    Declaration

    Objective-C

    - (BOOL)resultsInSameQueryAs:(TripRequest *)other;

    Swift

    func resultsInSameQuery(as other: TripRequest) -> Bool
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) TripGroup *lastSelection

    Swift

    var lastSelection: TripGroup? { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) Trip *preferredTrip

    Swift

    var preferredTrip: Trip? { get set }
  • Undocumented

    Declaration

    Objective-C

    - (void)adjustVisibilityForMinimizedModeIdentifiers:(NSSet *)minimized
                                  hiddenModeIdentifiers:(NSSet *)hidden;

    Swift

    func adjustVisibility(forMinimizedModeIdentifiers minimized: Set<AnyHashable>, hiddenModeIdentifiers hidden: Set<AnyHashable>)
  • Declaration

    Objective-C

    - (nonnull TKRegion *)spanningRegion;

    Swift

    func spanningRegion() -> TKRegion

    Return Value

    The region the complete trip takes place in. Can be international if it spanning more than one region.

  • Declaration

    Objective-C

    - (nullable TKRegion *)startRegion;

    Swift

    func startRegion() -> TKRegion?

    Return Value

    The local region this trip starts in. Cannot be international and thus might be nil.

  • Declaration

    Objective-C

    - (nullable TKRegion *)endRegion;

    Swift

    func endRegion() -> TKRegion?

    Return Value

    The local region this trip ends in. Cannot be international and thus might be nil.

  • Undocumented

    Declaration

    Objective-C

    - (NSArray <NSString *> *)applicableModeIdentifiers;

    Swift

    func applicableModeIdentifiers() -> [String]
  • Undocumented

    Declaration

    Objective-C

    - (nullable NSTimeZone *)departureTimeZone;

    Swift

    func departureTimeZone() -> TimeZone?
  • Undocumented

    Declaration

    Objective-C

    - (nullable NSTimeZone *)arrivalTimeZone;

    Swift

    func arrivalTimeZone() -> TimeZone?
  • Undocumented

    Declaration

    Objective-C

    - (NSString *)timeSorterTitle;

    Swift

    func timeSorterTitle() -> String
  • Undocumented

    Declaration

    Objective-C

    - (BOOL)hasTrips;

    Swift

    func hasTrips() -> Bool
  • Declaration

    Objective-C

    - (BOOL)priceInformationAvailable;

    Swift

    func priceInformationAvailable() -> Bool

    Return Value

    If any trip has pricing information. Also returns YES if there are no trips.

  • Undocumented

    Declaration

    Objective-C

    - (NSString *)debugString;

    Swift

    func debugString() -> String

Classify

CoreDataGeneratedAccessors

  • Undocumented

    Declaration

    Objective-C

    - (void)addTripGroupObject:(TripGroup *)value;

    Swift

    func addTripGroupObject(_ value: TripGroup)
  • Undocumented

    Declaration

    Objective-C

    - (void)removeTripGroupObject:(TripGroup *)value;

    Swift

    func removeTripGroupObject(_ value: TripGroup)
  • Undocumented

    Declaration

    Objective-C

    - (void)addTripGroups:(NSSet *)values;

    Swift

    func addTripGroups(_ values: Set<AnyHashable>)
  • Undocumented

    Declaration

    Objective-C

    - (void)removeTripGroups:(NSSet *)values;

    Swift

    func removeTripGroups(_ values: Set<AnyHashable>)
  • Undocumented

    Declaration

    Objective-C

    - (void)addRouteObject:(Trip *)value;

    Swift

    func addRouteObject(_ value: Trip)
  • Undocumented

    Declaration

    Objective-C

    - (void)removeRouteObject:(Trip *)value;

    Swift

    func removeRouteObject(_ value: Trip)
  • Undocumented

    Declaration

    Objective-C

    - (void)addRoutes:(NSSet <Trip *> *)values;

    Swift

    func addRoutes(_ values: Set<AnyHashable>)
  • Undocumented

    Declaration

    Objective-C

    - (void)removeRoutes:(NSSet <Trip *> *)values;

    Swift

    func removeRoutes(_ values: Set<AnyHashable>)

Non-CoreData properties

  • Declaration

    Swift

    @objc
    public var trips: Set<Trip> { get }
  • Declaration

    Swift

    @objc
    public var type: TKTimeType { get }
  • Declaration

    Swift

    @objc
    public var time: Date? { get }
  • Set the time and type for this request.

    Declaration

    Swift

    @objc(setTime:forType:)
    public func setTime(_ time: Date?, for type: TKTimeType)
  • Declaration

    Swift

    @objc
    public var timeString: String { get }

Inserting

  • Declaration

    Swift

    @objc(insertEmptyIntoContext:)
    public static func insertEmpty(into context: NSManagedObjectContext) -> TripRequest
  • Declaration

    Swift

    @objc(insertRequestFrom:to:forTime:ofType:intoContext:)
    public static func insert(from start: MKAnnotation, to end: MKAnnotation, for time: Date?, timeType: TKTimeType, into context: NSManagedObjectContext) -> TripRequest
  • Declaration

    Swift

    public func emptyCopy() -> TripRequest
  • Declaration

    Swift

    @objc(timeStringForTime:ofType:timeZone:)
    public static func timeString(for time: Date?, timeType: TKTimeType, in timeZone: TimeZone?) -> String
  • Declaration

    Swift

    @objc
    public func insertCopyWithoutTrips() -> TripRequest

Miscellaneous

  • Declaration

    Swift

    @objc
    public func _determineRegions() -> [TKRegion]
  • The primary alternatives for this request, which is constructed by taking the trip groups, sorting them by the user’s selected sort orders, and then taking each group’s visible trip.

    See also

    sortDescriptorsAccordingToSelectedOrder

    Declaration

    Swift

    @objc
    public func sortedVisibleTrips() -> [Trip]

    Return Value

    Visible trip for each trip group sorted by user’s preferences

  • Declaration

    Swift

    @objc
    public func sortDescriptorsAccordingToSelectedOrder() -> [NSSortDescriptor]
  • Declaration

    Swift

    @objc
    public func sortDescriptors(withPrimary primary: TKTripCostType) -> [NSSortDescriptor]
  • Declaration

    Swift

    public func tripTimeSortDescriptors() -> [NSSortDescriptor]
  • Declaration

    Swift

    public var shareURL: URL? { get }