use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct HKQuantity;
);
unsafe impl Send for HKQuantity {}
unsafe impl Sync for HKQuantity {}
extern_conformance!(
unsafe impl NSCoding for HKQuantity {}
);
extern_conformance!(
unsafe impl NSCopying for HKQuantity {}
);
unsafe impl CopyingHelper for HKQuantity {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for HKQuantity {}
);
extern_conformance!(
unsafe impl NSSecureCoding for HKQuantity {}
);
impl HKQuantity {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "HKUnit")]
#[unsafe(method(quantityWithUnit:doubleValue:))]
#[unsafe(method_family = none)]
pub unsafe fn quantityWithUnit_doubleValue(
unit: &HKUnit,
value: c_double,
) -> Retained<Self>;
#[cfg(feature = "HKUnit")]
#[unsafe(method(isCompatibleWithUnit:))]
#[unsafe(method_family = none)]
pub unsafe fn isCompatibleWithUnit(&self, unit: &HKUnit) -> bool;
#[cfg(feature = "HKUnit")]
#[unsafe(method(doubleValueForUnit:))]
#[unsafe(method_family = none)]
pub unsafe fn doubleValueForUnit(&self, unit: &HKUnit) -> c_double;
#[unsafe(method(compare:))]
#[unsafe(method_family = none)]
pub unsafe fn compare(&self, quantity: &HKQuantity) -> NSComparisonResult;
);
}
impl HKQuantity {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}