use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(MTL4FunctionDescriptor, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "MTL4FunctionDescriptor")]
pub struct MTL4StitchedFunctionDescriptor;
);
#[cfg(feature = "MTL4FunctionDescriptor")]
extern_conformance!(
unsafe impl NSCopying for MTL4StitchedFunctionDescriptor {}
);
#[cfg(feature = "MTL4FunctionDescriptor")]
unsafe impl CopyingHelper for MTL4StitchedFunctionDescriptor {
type Result = Self;
}
#[cfg(feature = "MTL4FunctionDescriptor")]
extern_conformance!(
unsafe impl NSObjectProtocol for MTL4StitchedFunctionDescriptor {}
);
#[cfg(feature = "MTL4FunctionDescriptor")]
impl MTL4StitchedFunctionDescriptor {
extern_methods!(
#[cfg(feature = "MTLFunctionStitching")]
#[unsafe(method(functionGraph))]
#[unsafe(method_family = none)]
pub fn functionGraph(&self) -> Option<Retained<MTLFunctionStitchingGraph>>;
#[cfg(feature = "MTLFunctionStitching")]
#[unsafe(method(setFunctionGraph:))]
#[unsafe(method_family = none)]
pub fn setFunctionGraph(&self, function_graph: Option<&MTLFunctionStitchingGraph>);
#[unsafe(method(functionDescriptors))]
#[unsafe(method_family = none)]
pub fn functionDescriptors(&self) -> Option<Retained<NSArray<MTL4FunctionDescriptor>>>;
#[unsafe(method(setFunctionDescriptors:))]
#[unsafe(method_family = none)]
pub fn setFunctionDescriptors(
&self,
function_descriptors: Option<&NSArray<MTL4FunctionDescriptor>>,
);
);
}
#[cfg(feature = "MTL4FunctionDescriptor")]
impl MTL4StitchedFunctionDescriptor {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new() -> Retained<Self>;
);
}
#[cfg(feature = "MTL4FunctionDescriptor")]
impl DefaultRetained for MTL4StitchedFunctionDescriptor {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}