use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
pub static NSFetchRequestExpressionType: NSExpressionType = NSExpressionType(50);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSFetchRequestExpression;
unsafe impl ClassType for NSFetchRequestExpression {
#[inherits(NSObject)]
type Super = NSExpression;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for NSFetchRequestExpression {}
unsafe impl NSCopying for NSFetchRequestExpression {}
unsafe impl NSObjectProtocol for NSFetchRequestExpression {}
unsafe impl NSSecureCoding for NSFetchRequestExpression {}
extern_methods!(
unsafe impl NSFetchRequestExpression {
#[method_id(@__retain_semantics Other expressionForFetch:context:countOnly:)]
pub unsafe fn expressionForFetch_context_countOnly(
fetch: &NSExpression,
context: &NSExpression,
count_flag: bool,
) -> Id<NSExpression>;
#[method_id(@__retain_semantics Other requestExpression)]
pub unsafe fn requestExpression(&self) -> Id<NSExpression>;
#[method_id(@__retain_semantics Other contextExpression)]
pub unsafe fn contextExpression(&self) -> Id<NSExpression>;
#[method(isCountOnlyRequest)]
pub unsafe fn isCountOnlyRequest(&self) -> bool;
}
);
extern_methods!(
unsafe impl NSFetchRequestExpression {
#[method_id(@__retain_semantics Init initWithExpressionType:)]
pub unsafe fn initWithExpressionType(
this: Allocated<Self>,
r#type: NSExpressionType,
) -> Id<Self>;
#[method_id(@__retain_semantics Init initWithCoder:)]
pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Option<Id<Self>>;
}
);
extern_methods!(
unsafe impl NSFetchRequestExpression {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);