TKTransportModes

Objective-C

@interface TKTransportModes : NSObject

///-----------------------------------------------------------------------------
/// @name Handling transport mode identifiers
///-----------------------------------------------------------------------------

/**
 @return The default set of mode identifiers
 */
+ (NSArray<NSString *> *)defaultModeIdentifiers;

/**
 @return mode-related part of the image name
 */
+ (NSString *)modeImageNameForModeIdentifier:(NSString *)modeIdentifier;

/**
 @return image that stands for the specified transport mode identifier
 */
+ (TKImage *)imageForModeIdentifier:(NSString *)modeIdentifier;

/**
 Groups the mode identifiers
 
 @param modeIdentifiers A set of all the identifiers to be grouped
 @param addAllGroup     If an extra group which has all the identifiers should be added
 
 @return A set of a set of mode identifiers
 */
+ (NSSet<NSSet<NSString *> *> *)groupedModeIdentifiers:(NSArray<NSString *> *)modeIdentifiers
                                    includeGroupForAll:(BOOL)addAllGroup;

/**
 @return The generic mode identifier part, e.g., `pt_pub` for `pt_pub_bus`,
    which can be used as routing input
 */
+ (NSString *)genericModeIdentifierForModeIdentifier:(NSString *)modeIdentifier;

+ (BOOL)modeIdentifierIsPublicTransport:(NSString *)modeIdentifier;
+ (BOOL)modeIdentifierIsWalking:(NSString *)modeIdentifier;
+ (BOOL)modeIdentifierIsWheelchair:(NSString *)modeIdentifier;
+ (BOOL)modeIdentifierIsCycling:(NSString *)modeIdentifier;
+ (BOOL)modeIdentifierIsDriving:(NSString *)modeIdentifier;
+ (BOOL)modeIdentifierIsSharedVehicle:(NSString *)modeIdentifier;
+ (BOOL)modeIdentifierIsAffectedByTraffic:(NSString *)modeIdentifier;
+ (BOOL)modeIdentifierIsFlight:(NSString *)modeIdentifier;
+ (BOOL)modeIdentifierIsExpensive:(NSString *)modeIdentifier;

@end

Swift

class TKTransportModes : NSObject

Undocumented

Handling transport mode identifiers

  • Declaration

    Objective-C

    + (nonnull NSArray<NSString *> *)defaultModeIdentifiers;

    Swift

    class func defaultModeIdentifiers() -> [String]

    Return Value

    The default set of mode identifiers

  • Declaration

    Objective-C

    + (nonnull NSString *)modeImageNameForModeIdentifier:
        (nonnull NSString *)modeIdentifier;

    Swift

    class func modeImageName(forModeIdentifier modeIdentifier: String) -> String

    Return Value

    mode-related part of the image name

  • Declaration

    Objective-C

    + (nonnull UIImage *)imageForModeIdentifier:(nonnull NSString *)modeIdentifier;

    Swift

    class func image(forModeIdentifier modeIdentifier: String) -> UIImage

    Return Value

    image that stands for the specified transport mode identifier

  • Groups the mode identifiers

    Declaration

    Objective-C

    + (nonnull NSSet<NSSet<NSString *> *> *)
        groupedModeIdentifiers:(nonnull NSArray<NSString *> *)modeIdentifiers
            includeGroupForAll:(BOOL)addAllGroup;

    Swift

    class func groupedModeIdentifiers(_ modeIdentifiers: [String], includeGroupForAll addAllGroup: Bool) -> Set<Set<String>>

    Parameters

    modeIdentifiers

    A set of all the identifiers to be grouped

    addAllGroup

    If an extra group which has all the identifiers should be added

    Return Value

    A set of a set of mode identifiers

  • Declaration

    Objective-C

    + (nonnull NSString *)genericModeIdentifierForModeIdentifier:
        (nonnull NSString *)modeIdentifier;

    Swift

    class func genericModeIdentifier(forModeIdentifier modeIdentifier: String) -> String

    Return Value

    The generic mode identifier part, e.g., pt_pub for pt_pub_bus, which can be used as routing input

  • Undocumented

    Declaration

    Objective-C

    + (BOOL)modeIdentifierIsPublicTransport:(NSString *)modeIdentifier;

    Swift

    class func modeIdentifierIsPublicTransport(_ modeIdentifier: String) -> Bool
  • Undocumented

    Declaration

    Objective-C

    + (BOOL)modeIdentifierIsWalking:(NSString *)modeIdentifier;

    Swift

    class func modeIdentifierIsWalking(_ modeIdentifier: String) -> Bool
  • Undocumented

    Declaration

    Objective-C

    + (BOOL)modeIdentifierIsWheelchair:(NSString *)modeIdentifier;

    Swift

    class func modeIdentifierIsWheelchair(_ modeIdentifier: String) -> Bool
  • Undocumented

    Declaration

    Objective-C

    + (BOOL)modeIdentifierIsCycling:(NSString *)modeIdentifier;

    Swift

    class func modeIdentifierIsCycling(_ modeIdentifier: String) -> Bool
  • Undocumented

    Declaration

    Objective-C

    + (BOOL)modeIdentifierIsDriving:(NSString *)modeIdentifier;

    Swift

    class func modeIdentifierIsDriving(_ modeIdentifier: String) -> Bool
  • Undocumented

    Declaration

    Objective-C

    + (BOOL)modeIdentifierIsSharedVehicle:(NSString *)modeIdentifier;

    Swift

    class func modeIdentifierIsSharedVehicle(_ modeIdentifier: String) -> Bool
  • Undocumented

    Declaration

    Objective-C

    + (BOOL)modeIdentifierIsAffectedByTraffic:(NSString *)modeIdentifier;

    Swift

    class func modeIdentifierIsAffected(byTraffic modeIdentifier: String) -> Bool
  • Undocumented

    Declaration

    Objective-C

    + (BOOL)modeIdentifierIsFlight:(NSString *)modeIdentifier;

    Swift

    class func modeIdentifierIsFlight(_ modeIdentifier: String) -> Bool
  • Undocumented

    Declaration

    Objective-C

    + (BOOL)modeIdentifierIsExpensive:(NSString *)modeIdentifier;

    Swift

    class func modeIdentifierIsExpensive(_ modeIdentifier: String) -> Bool