TypeConversion

enum TypeConversion

Helper for converting types for en-/decoding

  • Provides conversion string for type

    Declaration

    Swift

    static func toString(data from: String) -> String

    Parameters

    from

    type which needs to be converted

    Return Value

    conversion string

  • Provides encoding string

    Declaration

    Swift

    static func getEncodingString(id: String, type: String, required: Bool) -> String

    Parameters

    id

    name of variable

    type

    type of variable

    required

    true if variable is required

    Return Value

    Encoding string

  • Provides decoding string

    Declaration

    Swift

    static func getDecodingString(id: String, type: String) -> String

    Parameters

    id

    name of variable

    type

    type of variable

    Return Value

    Decoding string

  • Get initializer string for default values.

    Declaration

    Swift

    static func getDefaultValueInit(type: String, defaultValue: String) -> String

    Parameters

    type

    type of default value

    defaultValue

    defaullt value string (e.g. JSON if complex)

    Return Value

    initializer string