ComputeDataSourceable

protocol ComputeDataSourceable

protocol for ComputeDataSource Implementations. Defines the needed variables data and result as well as the need for semaphores

Also adds some must have funktions like hasNextElement and getNextElement as well as their result counter parts.

  • stores data objects (MetaComputeDataSet) with id for sequential data usage and value.

    Declaration

    Swift

    var data:[Any]
  • stores the result objects (MetaComputeDataSet) similary to data

    Declaration

    Swift

    var results:[Any]
  • semaphore to protect read and writes from data array

    Declaration

    Swift

    var dataSemaphore:DispatchSemaphore
  • semaphore to protect read and writes from resluts array

    Declaration

    Swift

    var resultSemaphore:DispatchSemaphore
  • Undocumented

    Declaration

    Swift

    protocol ComputeDataSourceable
  • Undocumented

    Declaration

    Swift

    protocol ComputeDataSourceable
  • Undocumented

    Declaration

    Swift

    protocol ComputeDataSourceable
  • functions for checking if any data is left in DataSource

    Declaration

    Swift

    func isEmpty() -> Bool
  • function to append data directly from json object

    Declaration

    Swift

    func appendData(_ json: Data)
  • functions for checking if any data is left in DataSource

    Declaration

    Swift

    func hasNextElement() -> Bool
  • gives you the first element of data

    Declaration

    Swift

    func getNextElement() -> Any?
  • functions for checking if any result is left in DataSource

    Declaration

    Swift

    func hasNextResult() -> Bool
  • gives you the first element of results

    Declaration

    Swift

    func getNextResult() -> Any?
  • function for storing an result in results

    Declaration

    Swift

    func storeNextResult(_ result: Any)