FunctionType

enum FunctionType : String, Codable, Equatable

An enum for storing the function group state of the message associated with a print number.

Each case is used to specify the formatting of function name node types when displaying the associated message in the console.

Each case is assigned a single character value as an abbreviation of the case name. The values are the same used to specify the FunctionType of a message in the EntityLog JSON although the values are not directly bound.

Note

The use of this feature is discretional and does not bind the function referenced in the source code to the group specified by a particular case: any case can be used for any group of function, mapped to signify an alternative group or the single default case CustomFunc can be used for all functions.

The grouping of functions named in the enum is not intended to be an exhaustive list or the representation of an ideal demarcation.

The purpose of differential formatting according to function group is as an additional visual aid that makes it easier to spot anomalies or unexpected routes in the control flow. It is also designed to help developers gain understanding of the functionality of unfamiliar code.

  • The message FunctionName NodeType should be formatted as an initialiser.

    Declaration

    Swift

    case initialiser = "i"
  • The message FunctionName NodeType should be formatted as a custom function or method.

    Declaration

    Swift

    case customFunc = "f"
  • The message FunctionName NodeType should be formatted as a custom override of a system library method.

    Declaration

    Swift

    case systemOverride = "o"
  • The message FunctionName NodeType should be formatted as an action method.

    Declaration

    Swift

    case actionMethod = "a"
  • The message FunctionName NodeType should be formatted as a delegate method.

    Declaration

    Swift

    case delegateMethod = "g"
  • The message FunctionName NodeType should be formatted as a datasource method.

    Declaration

    Swift

    case datasourceMethod = "d"
  • The message FunctionName NodeType should be formatted as a computed variable.

    Declaration

    Swift

    case computedVar = "v"
  • The message FunctionName NodeType should be formatted as a method implementation written in a protocol extension.

    Declaration

    Swift

    case protocolExtensionMethod = "e"