TKTripClassifier

Objective-C

@protocol TKTripClassifier <NSObject>

Swift

protocol TKTripClassifier : NSObjectProtocol

A trip classifier is used to classify TripGroup instances within the same TripRequest.

What kind of classifications to use, is entirely up to the classifier - as long as they are NSObject instances taht conform to NSCoding.

For examples see:

  • Called before starting a classifiction of multiple trip groups.

    Declaration

    Objective-C

    - (void)prepareForClassifictionOfTripGroups:
        (nonnull NSSet<TripGroup *> *)tripGroups;

    Swift

    func prepareForClassifiction(of tripGroups: Set<AnyHashable>)

    Parameters

    tripGroups

    The set of trip groups that will be classified.

  • Declaration

    Objective-C

    - (nullable NSString *)classificationOfTripGroup:(nonnull TripGroup *)tripGroup;

    Swift

    func classification(of tripGroup: TripGroup) -> String?

    Return Value

    The classifiction of that particular trip group.