1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::CoreData::*;
use crate::Foundation::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "CoreData_NSAtomicStore")]
    pub struct NSAtomicStore;

    #[cfg(feature = "CoreData_NSAtomicStore")]
    unsafe impl ClassType for NSAtomicStore {
        #[inherits(NSObject)]
        type Super = NSPersistentStore;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "CoreData_NSAtomicStore")]
unsafe impl NSObjectProtocol for NSAtomicStore {}

extern_methods!(
    #[cfg(feature = "CoreData_NSAtomicStore")]
    unsafe impl NSAtomicStore {
        #[cfg(all(
            feature = "CoreData_NSPersistentStoreCoordinator",
            feature = "Foundation_NSDictionary",
            feature = "Foundation_NSString",
            feature = "Foundation_NSURL"
        ))]
        #[method_id(@__retain_semantics Init initWithPersistentStoreCoordinator:configurationName:URL:options:)]
        pub unsafe fn initWithPersistentStoreCoordinator_configurationName_URL_options(
            this: Option<Allocated<Self>>,
            coordinator: Option<&NSPersistentStoreCoordinator>,
            configuration_name: Option<&NSString>,
            url: &NSURL,
            options: Option<&NSDictionary>,
        ) -> Id<Self>;

        #[cfg(feature = "Foundation_NSError")]
        #[method(load:_)]
        pub unsafe fn load(&self) -> Result<(), Id<NSError>>;

        #[cfg(feature = "Foundation_NSError")]
        #[method(save:_)]
        pub unsafe fn save(&self) -> Result<(), Id<NSError>>;

        #[cfg(all(
            feature = "CoreData_NSAtomicStoreCacheNode",
            feature = "CoreData_NSManagedObject"
        ))]
        #[method_id(@__retain_semantics New newCacheNodeForManagedObject:)]
        pub unsafe fn newCacheNodeForManagedObject(
            &self,
            managed_object: &NSManagedObject,
        ) -> Id<NSAtomicStoreCacheNode>;

        #[cfg(all(
            feature = "CoreData_NSAtomicStoreCacheNode",
            feature = "CoreData_NSManagedObject"
        ))]
        #[method(updateCacheNode:fromManagedObject:)]
        pub unsafe fn updateCacheNode_fromManagedObject(
            &self,
            node: &NSAtomicStoreCacheNode,
            managed_object: &NSManagedObject,
        );

        #[cfg(all(
            feature = "CoreData_NSAtomicStoreCacheNode",
            feature = "Foundation_NSSet"
        ))]
        #[method_id(@__retain_semantics Other cacheNodes)]
        pub unsafe fn cacheNodes(&self) -> Id<NSSet<NSAtomicStoreCacheNode>>;

        #[cfg(all(
            feature = "CoreData_NSAtomicStoreCacheNode",
            feature = "Foundation_NSSet"
        ))]
        #[method(addCacheNodes:)]
        pub unsafe fn addCacheNodes(&self, cache_nodes: &NSSet<NSAtomicStoreCacheNode>);

        #[cfg(all(
            feature = "CoreData_NSAtomicStoreCacheNode",
            feature = "Foundation_NSSet"
        ))]
        #[method(willRemoveCacheNodes:)]
        pub unsafe fn willRemoveCacheNodes(&self, cache_nodes: &NSSet<NSAtomicStoreCacheNode>);

        #[cfg(all(
            feature = "CoreData_NSAtomicStoreCacheNode",
            feature = "CoreData_NSManagedObjectID"
        ))]
        #[method_id(@__retain_semantics Other cacheNodeForObjectID:)]
        pub unsafe fn cacheNodeForObjectID(
            &self,
            object_id: &NSManagedObjectID,
        ) -> Option<Id<NSAtomicStoreCacheNode>>;

        #[cfg(all(
            feature = "CoreData_NSEntityDescription",
            feature = "CoreData_NSManagedObjectID"
        ))]
        #[method_id(@__retain_semantics Other objectIDForEntity:referenceObject:)]
        pub unsafe fn objectIDForEntity_referenceObject(
            &self,
            entity: &NSEntityDescription,
            data: &AnyObject,
        ) -> Id<NSManagedObjectID>;

        #[cfg(feature = "CoreData_NSManagedObject")]
        #[method_id(@__retain_semantics New newReferenceObjectForManagedObject:)]
        pub unsafe fn newReferenceObjectForManagedObject(
            &self,
            managed_object: &NSManagedObject,
        ) -> Id<AnyObject>;

        #[cfg(feature = "CoreData_NSManagedObjectID")]
        #[method_id(@__retain_semantics Other referenceObjectForObjectID:)]
        pub unsafe fn referenceObjectForObjectID(
            &self,
            object_id: &NSManagedObjectID,
        ) -> Id<AnyObject>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSPersistentStore`
    #[cfg(feature = "CoreData_NSAtomicStore")]
    unsafe impl NSAtomicStore {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Option<Allocated<Self>>) -> Id<Self>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "CoreData_NSAtomicStore")]
    unsafe impl NSAtomicStore {
        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);