Structures

The following structures are available globally.

RVS_FIFOQueue Struct

  • An efficient variable-size FIFO queue of elements of type “Element.”

    See more

    Declaration

    Swift

    public struct RVS_FIFOQueue<Element> : OLEB_Queue
    extension RVS_FIFOQueue: ExpressibleByArrayLiteral
    extension RVS_FIFOQueue: MutableCollection

Special Weak Wrapper Struct

  • This allows us to maintain collections of weak references.

    USAGE:

    Create instances of RVS_WeakObjectReference, with the values being the objects that you want to aggregate weakly. Aggregate these instances.

    Each instance keeps a hash of the original object, even if that object is released, so we can use these as hashable keys or set members.

    Note

    Remember to access the RVS_WeakObjectReference.value property of each instance, instead of the instance, itself. The value will always be an optional, and may be nil.

    Inspired by this SO answer

    See more

    Declaration

    Swift

    public struct RVS_WeakObjectReference<T> : Equatable, Hashable where T : AnyObject