use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSScanner;
);
#[cfg(feature = "NSObject")]
extern_conformance!(
unsafe impl NSCopying for NSScanner {}
);
#[cfg(feature = "NSObject")]
unsafe impl CopyingHelper for NSScanner {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for NSScanner {}
);
impl NSScanner {
extern_methods!(
#[cfg(feature = "NSString")]
#[unsafe(method(string))]
#[unsafe(method_family = none)]
pub unsafe fn string(&self) -> Retained<NSString>;
#[unsafe(method(scanLocation))]
#[unsafe(method_family = none)]
pub unsafe fn scanLocation(&self) -> NSUInteger;
#[unsafe(method(setScanLocation:))]
#[unsafe(method_family = none)]
pub unsafe fn setScanLocation(&self, scan_location: NSUInteger);
#[cfg(feature = "NSCharacterSet")]
#[unsafe(method(charactersToBeSkipped))]
#[unsafe(method_family = none)]
pub unsafe fn charactersToBeSkipped(&self) -> Option<Retained<NSCharacterSet>>;
#[cfg(feature = "NSCharacterSet")]
#[unsafe(method(setCharactersToBeSkipped:))]
#[unsafe(method_family = none)]
pub unsafe fn setCharactersToBeSkipped(
&self,
characters_to_be_skipped: Option<&NSCharacterSet>,
);
#[unsafe(method(caseSensitive))]
#[unsafe(method_family = none)]
pub unsafe fn caseSensitive(&self) -> bool;
#[unsafe(method(setCaseSensitive:))]
#[unsafe(method_family = none)]
pub unsafe fn setCaseSensitive(&self, case_sensitive: bool);
#[unsafe(method(locale))]
#[unsafe(method_family = none)]
pub unsafe fn locale(&self) -> Option<Retained<AnyObject>>;
#[unsafe(method(setLocale:))]
#[unsafe(method_family = none)]
pub unsafe fn setLocale(&self, locale: Option<&AnyObject>);
#[cfg(feature = "NSString")]
#[unsafe(method(initWithString:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithString(this: Allocated<Self>, string: &NSString) -> Retained<Self>;
);
}
impl NSScanner {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
impl NSScanner {
extern_methods!(
#[unsafe(method(scanInt:))]
#[unsafe(method_family = none)]
pub unsafe fn scanInt(&self, result: *mut c_int) -> bool;
#[unsafe(method(scanInteger:))]
#[unsafe(method_family = none)]
pub unsafe fn scanInteger(&self, result: *mut NSInteger) -> bool;
#[unsafe(method(scanLongLong:))]
#[unsafe(method_family = none)]
pub unsafe fn scanLongLong(&self, result: *mut c_longlong) -> bool;
#[unsafe(method(scanUnsignedLongLong:))]
#[unsafe(method_family = none)]
pub unsafe fn scanUnsignedLongLong(&self, result: *mut c_ulonglong) -> bool;
#[unsafe(method(scanFloat:))]
#[unsafe(method_family = none)]
pub unsafe fn scanFloat(&self, result: *mut c_float) -> bool;
#[unsafe(method(scanDouble:))]
#[unsafe(method_family = none)]
pub unsafe fn scanDouble(&self, result: *mut c_double) -> bool;
#[unsafe(method(scanHexInt:))]
#[unsafe(method_family = none)]
pub unsafe fn scanHexInt(&self, result: *mut c_uint) -> bool;
#[unsafe(method(scanHexLongLong:))]
#[unsafe(method_family = none)]
pub unsafe fn scanHexLongLong(&self, result: *mut c_ulonglong) -> bool;
#[unsafe(method(scanHexFloat:))]
#[unsafe(method_family = none)]
pub unsafe fn scanHexFloat(&self, result: *mut c_float) -> bool;
#[unsafe(method(scanHexDouble:))]
#[unsafe(method_family = none)]
pub unsafe fn scanHexDouble(&self, result: *mut c_double) -> bool;
#[cfg(feature = "NSString")]
#[unsafe(method(scanString:intoString:))]
#[unsafe(method_family = none)]
pub unsafe fn scanString_intoString(
&self,
string: &NSString,
result: Option<&mut Option<Retained<NSString>>>,
) -> bool;
#[cfg(all(feature = "NSCharacterSet", feature = "NSString"))]
#[unsafe(method(scanCharactersFromSet:intoString:))]
#[unsafe(method_family = none)]
pub unsafe fn scanCharactersFromSet_intoString(
&self,
set: &NSCharacterSet,
result: Option<&mut Option<Retained<NSString>>>,
) -> bool;
#[cfg(feature = "NSString")]
#[unsafe(method(scanUpToString:intoString:))]
#[unsafe(method_family = none)]
pub unsafe fn scanUpToString_intoString(
&self,
string: &NSString,
result: Option<&mut Option<Retained<NSString>>>,
) -> bool;
#[cfg(all(feature = "NSCharacterSet", feature = "NSString"))]
#[unsafe(method(scanUpToCharactersFromSet:intoString:))]
#[unsafe(method_family = none)]
pub unsafe fn scanUpToCharactersFromSet_intoString(
&self,
set: &NSCharacterSet,
result: Option<&mut Option<Retained<NSString>>>,
) -> bool;
#[unsafe(method(isAtEnd))]
#[unsafe(method_family = none)]
pub unsafe fn isAtEnd(&self) -> bool;
#[cfg(feature = "NSString")]
#[unsafe(method(scannerWithString:))]
#[unsafe(method_family = none)]
pub unsafe fn scannerWithString(string: &NSString) -> Retained<Self>;
#[cfg(feature = "NSString")]
#[unsafe(method(localizedScannerWithString:))]
#[unsafe(method_family = none)]
pub unsafe fn localizedScannerWithString(string: &NSString) -> Retained<AnyObject>;
);
}