feat: implement Haptika PPG and Watch V1
This commit is contained in:
Generated
+92
@@ -0,0 +1,92 @@
|
||||
///
|
||||
/// NativeHeartbeatSeriesSummary.swift
|
||||
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
||||
/// https://github.com/mrousavy/nitro
|
||||
/// Copyright © Marc Rousavy @ Margelo
|
||||
///
|
||||
|
||||
import NitroModules
|
||||
|
||||
/**
|
||||
* Represents an instance of `NativeHeartbeatSeriesSummary`, backed by a C++ struct.
|
||||
*/
|
||||
public typealias NativeHeartbeatSeriesSummary = margelo.nitro.haptika.ppg.NativeHeartbeatSeriesSummary
|
||||
|
||||
public extension NativeHeartbeatSeriesSummary {
|
||||
private typealias bridge = margelo.nitro.haptika.ppg.bridge.swift
|
||||
|
||||
/**
|
||||
* Create a new instance of `NativeHeartbeatSeriesSummary`.
|
||||
*/
|
||||
init(startDate: String, endDate: String, sourceName: String?, sourceBundleIdentifier: String?, heartbeatTimesSinceSeriesStartSeconds: [Double], precededByGapIndexes: [Double]) {
|
||||
self.init(std.string(startDate), std.string(endDate), { () -> bridge.std__optional_std__string_ in
|
||||
if let __unwrappedValue = sourceName {
|
||||
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
||||
} else {
|
||||
return .init()
|
||||
}
|
||||
}(), { () -> bridge.std__optional_std__string_ in
|
||||
if let __unwrappedValue = sourceBundleIdentifier {
|
||||
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
||||
} else {
|
||||
return .init()
|
||||
}
|
||||
}(), { () -> bridge.std__vector_double_ in
|
||||
var __vector = bridge.create_std__vector_double_(heartbeatTimesSinceSeriesStartSeconds.count)
|
||||
for __item in heartbeatTimesSinceSeriesStartSeconds {
|
||||
__vector.push_back(__item)
|
||||
}
|
||||
return __vector
|
||||
}(), { () -> bridge.std__vector_double_ in
|
||||
var __vector = bridge.create_std__vector_double_(precededByGapIndexes.count)
|
||||
for __item in precededByGapIndexes {
|
||||
__vector.push_back(__item)
|
||||
}
|
||||
return __vector
|
||||
}())
|
||||
}
|
||||
|
||||
@inline(__always)
|
||||
var startDate: String {
|
||||
return String(self.__startDate)
|
||||
}
|
||||
|
||||
@inline(__always)
|
||||
var endDate: String {
|
||||
return String(self.__endDate)
|
||||
}
|
||||
|
||||
@inline(__always)
|
||||
var sourceName: String? {
|
||||
return { () -> String? in
|
||||
if bridge.has_value_std__optional_std__string_(self.__sourceName) {
|
||||
let __unwrapped = bridge.get_std__optional_std__string_(self.__sourceName)
|
||||
return String(__unwrapped)
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
@inline(__always)
|
||||
var sourceBundleIdentifier: String? {
|
||||
return { () -> String? in
|
||||
if bridge.has_value_std__optional_std__string_(self.__sourceBundleIdentifier) {
|
||||
let __unwrapped = bridge.get_std__optional_std__string_(self.__sourceBundleIdentifier)
|
||||
return String(__unwrapped)
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
@inline(__always)
|
||||
var heartbeatTimesSinceSeriesStartSeconds: [Double] {
|
||||
return self.__heartbeatTimesSinceSeriesStartSeconds.map({ __item in __item })
|
||||
}
|
||||
|
||||
@inline(__always)
|
||||
var precededByGapIndexes: [Double] {
|
||||
return self.__precededByGapIndexes.map({ __item in __item })
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user