SwiftConfig Docs (6% documented)

SwiftConfig Reference Config Extension Reference

Config

Undocumented

  • Inserts the provided IConfigLayer at the top of the layer stack (meaning its value for a given key will be preferred to those from other layers whenever possible). The index must be >= startIndex and <= endIndex or a precondition will fail.

    Declaration

    Swift

    public mutating func pushLayer(layer:IConfigLayer)

    Parameters

    layer

    The IConfigLayer to insert.

    index

    The index where insertion should take place.

  • Removes the top IConfigLayer from the stack of layers and returns it.

    Declaration

    Swift

    public mutating func popLayer() -> IConfigLayer?

    Return Value

    The removed element or nil if the stack is empty.

  • Inserts the provided IConfigLayer n positions from the top of the stack. The index must be >= startIndex and <= endIndex or a precondition will fail.

    Declaration

    Swift

    public mutating func insertLayer(layer:IConfigLayer, atIndex index:UnderlyingStackType.Index)

    Parameters

    layer

    The IConfigLayer to insert.

    index

    The index where insertion should take place.

  • Removes the IConfigLayer n positions from the top of the stack and returns it. index must be a valid index or a precondition assertion will fail.

    Declaration

    Swift

    public mutating func removeLayerAtIndex(index:UnderlyingStackType.Index) -> IConfigLayer

    Parameters

    index

    The index of the element to remove.

    Return Value

    The removed element.