annotate dstep/coredata/NSManagedObjectContext.d @ 16:19885b43130e

Huge update, the bridge actually works now
author Jacob Carlborg <doob@me.com>
date Sun, 03 Jan 2010 22:06:11 +0100
parents
children b9de51448c6b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
1 /**
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
2 * Copyright: Copyright (c) 2009 Jacob Carlborg.
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
3 * Authors: Jacob Carlborg
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
4 * Version: Initial created: Sep 25, 2009
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
6 */
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
7 module dstep.coredata.NSManagedObjectContext;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
8
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
9 import dstep.coredata.CoreDataDefines;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
10
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
11 import dstep.coredata.NSFetchRequest;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
12 import dstep.coredata.NSManagedObject;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
13 import dstep.coredata.NSManagedObjectID;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
14 import dstep.coredata.NSPersistentStore;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
15 import dstep.coredata.NSPersistentStoreCoordinator;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
16 import dstep.corefoundation.CFArray;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
17 import dstep.corefoundation.CFDictionary;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
18 import dstep.foundation.NSArray;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
19 import dstep.foundation.NSCoder;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
20 import dstep.foundation.NSDictionary;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
21 import dstep.foundation.NSDate;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
22 import dstep.foundation.NSError;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
23 import dstep.foundation.NSLock;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
24 import dstep.foundation.NSNotification;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
25 import dstep.foundation.NSObjCRuntime;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
26 import dstep.foundation.NSObject;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
27 import dstep.foundation.NSUndoManager;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
28 import dstep.foundation.NSSet;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
29 import dstep.foundation.NSString;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
30 import dstep.objc.bridge.Bridge;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
31 import dstep.objc.objc;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
32
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
33 import bindings = dstep.coredata.NSManagedObjectContext_bindings;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
34
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
35 private
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
36 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
37 NSString NSManagedObjectContextDidSaveNotification_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
38 NSString NSManagedObjectContextObjectsDidChangeNotification_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
39 NSString NSInsertedObjectsKey_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
40 NSString NSUpdatedObjectsKey_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
41 NSString NSDeletedObjectsKey_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
42 NSString NSRefreshedObjectsKey_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
43 NSString NSInvalidatedObjectsKey_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
44 NSString NSInvalidatedAllObjectsKey_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
45 NSObject NSErrorMergePolicy_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
46 NSObject NSMergeByPropertyStoreTrumpMergePolicy_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
47 NSObject NSMergeByPropertyObjectTrumpMergePolicy_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
48 NSObject NSOverwriteMergePolicy_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
49 NSObject NSRollbackMergePolicy_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
50 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
51
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
52 NSString NSManagedObjectContextDidSaveNotification ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
53 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
54 if (NSManagedObjectContextDidSaveNotification_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
55 return NSManagedObjectContextDidSaveNotification_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
56
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
57 return NSManagedObjectContextDidSaveNotification_ = new NSString(bindings.NSManagedObjectContextDidSaveNotification);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
58 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
59
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
60 NSString NSManagedObjectContextObjectsDidChangeNotification ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
61 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
62 if (NSManagedObjectContextObjectsDidChangeNotification_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
63 return NSManagedObjectContextObjectsDidChangeNotification_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
64
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
65 return NSManagedObjectContextObjectsDidChangeNotification_ = new NSString(bindings.NSManagedObjectContextObjectsDidChangeNotification);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
66 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
67
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
68 NSString NSInsertedObjectsKey ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
69 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
70 if (NSInsertedObjectsKey_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
71 return NSInsertedObjectsKey_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
72
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
73 return NSInsertedObjectsKey_ = new NSString(bindings.NSInsertedObjectsKey);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
74 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
75
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
76 NSString NSUpdatedObjectsKey ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
77 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
78 if (NSUpdatedObjectsKey_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
79 return NSUpdatedObjectsKey_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
80
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
81 return NSUpdatedObjectsKey_ = new NSString(bindings.NSUpdatedObjectsKey);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
82 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
83
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
84 NSString NSDeletedObjectsKey ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
85 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
86 if (NSDeletedObjectsKey_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
87 return NSDeletedObjectsKey_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
88
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
89 return NSDeletedObjectsKey_ = new NSString(bindings.NSDeletedObjectsKey);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
90 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
91
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
92 NSString NSRefreshedObjectsKey ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
93 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
94 if (NSRefreshedObjectsKey_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
95 return NSRefreshedObjectsKey_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
96
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
97 return NSRefreshedObjectsKey_ = new NSString(bindings.NSRefreshedObjectsKey);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
98 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
99
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
100 NSString NSInvalidatedObjectsKey ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
101 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
102 if (NSInvalidatedObjectsKey_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
103 return NSInvalidatedObjectsKey_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
104
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
105 return NSInvalidatedObjectsKey_ = new NSString(bindings.NSInvalidatedObjectsKey);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
106 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
107
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
108 NSString NSInvalidatedAllObjectsKey ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
109 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
110 if (NSInvalidatedAllObjectsKey_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
111 return NSInvalidatedAllObjectsKey_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
112
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
113 return NSInvalidatedAllObjectsKey_ = new NSString(bindings.NSInvalidatedAllObjectsKey);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
114 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
115
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
116 NSObject NSErrorMergePolicy ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
117 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
118 if (NSErrorMergePolicy_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
119 return NSErrorMergePolicy_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
120
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
121 return NSErrorMergePolicy_ = new NSObject(bindings.NSErrorMergePolicy);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
122 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
123
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
124 NSObject NSMergeByPropertyStoreTrumpMergePolicy ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
125 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
126 if (NSMergeByPropertyStoreTrumpMergePolicy_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
127 return NSMergeByPropertyStoreTrumpMergePolicy_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
128
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
129 return NSMergeByPropertyStoreTrumpMergePolicy_ = new NSObject(bindings.NSMergeByPropertyStoreTrumpMergePolicy);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
130 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
131
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
132 NSObject NSMergeByPropertyObjectTrumpMergePolicy ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
133 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
134 if (NSMergeByPropertyObjectTrumpMergePolicy_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
135 return NSMergeByPropertyObjectTrumpMergePolicy_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
136
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
137 return NSMergeByPropertyObjectTrumpMergePolicy_ = new NSObject(bindings.NSMergeByPropertyObjectTrumpMergePolicy);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
138 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
139
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
140 NSObject NSOverwriteMergePolicy ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
141 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
142 if (NSOverwriteMergePolicy_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
143 return NSOverwriteMergePolicy_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
144
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
145 return NSOverwriteMergePolicy_ = new NSObject(bindings.NSOverwriteMergePolicy);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
146 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
147
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
148 NSObject NSRollbackMergePolicy ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
149 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
150 if (NSRollbackMergePolicy_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
151 return NSRollbackMergePolicy_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
152
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
153 return NSRollbackMergePolicy_ = new NSObject(bindings.NSRollbackMergePolicy);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
154 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
155
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
156 class NSManagedObjectContext : NSObject, INSCoding, INSLocking
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
157 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
158 mixin (ObjcWrap);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
159
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
160 void setPersistentStoreCoordinator (NSPersistentStoreCoordinator coordinator)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
161 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
162 return invokeObjcSelf!(void, "setPersistentStoreCoordinator:", NSPersistentStoreCoordinator)(coordinator);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
163 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
164
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
165 NSPersistentStoreCoordinator persistentStoreCoordinator ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
166 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
167 return invokeObjcSelf!(NSPersistentStoreCoordinator, "persistentStoreCoordinator");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
168 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
169
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
170 void setUndoManager (NSUndoManager undoManager)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
171 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
172 return invokeObjcSelf!(void, "setUndoManager:", NSUndoManager)(undoManager);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
173 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
174
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
175 NSUndoManager undoManager ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
176 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
177 return invokeObjcSelf!(NSUndoManager, "undoManager");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
178 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
179
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
180 bool hasChanges ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
181 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
182 return invokeObjcSelf!(bool, "hasChanges");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
183 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
184
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
185 NSManagedObject objectRegisteredForID (NSManagedObjectID objectID)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
186 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
187 return invokeObjcSelf!(NSManagedObject, "objectRegisteredForID:", NSManagedObjectID)(objectID);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
188 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
189
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
190 NSManagedObject objectWithID (NSManagedObjectID objectID)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
191 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
192 return invokeObjcSelf!(NSManagedObject, "objectWithID:", NSManagedObjectID)(objectID);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
193 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
194
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
195 NSArray executeFetchRequest (NSFetchRequest request, ref NSError error)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
196 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
197 id __arg1;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
198
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
199 if (error)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
200 __arg1 = error.objcObject;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
201
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
202 NSArray result = invokeObjcSelf!(NSArray, "executeFetchRequest:error:", NSFetchRequest, id*)(request, &__arg1);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
203
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
204 if (__arg1)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
205 error = new NSError(__arg1);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
206
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
207 return result;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
208 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
209
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
210 NSUInteger countForFetchRequest (NSFetchRequest request, ref NSError error)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
211 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
212 id __arg1;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
213
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
214 if (error)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
215 __arg1 = error.objcObject;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
216
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
217 NSUInteger result = invokeObjcSelf!(NSUInteger, "countForFetchRequest:error:", NSFetchRequest, id*)(request, &__arg1);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
218
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
219 if (__arg1)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
220 error = new NSError(__arg1);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
221
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
222 return result;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
223 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
224
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
225 void insertObject (NSManagedObject object)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
226 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
227 return invokeObjcSelf!(void, "insertObject:", NSManagedObject)(object);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
228 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
229
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
230 void deleteObject (NSManagedObject object)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
231 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
232 return invokeObjcSelf!(void, "deleteObject:", NSManagedObject)(object);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
233 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
234
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
235 void refreshObject (NSManagedObject object, bool flag)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
236 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
237 return invokeObjcSelf!(void, "refreshObject:mergeChanges:", NSManagedObject, bool)(object, flag);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
238 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
239
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
240 void detectConflictsForObject (NSManagedObject object)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
241 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
242 return invokeObjcSelf!(void, "detectConflictsForObject:", NSManagedObject)(object);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
243 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
244
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
245 void observeValueForKeyPath (NSString keyPath, Object object, NSDictionary change, void* context)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
246 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
247 return invokeObjcSelf!(void, "observeValueForKeyPath:ofObject:change:context:", NSString, Object, NSDictionary, void*)(keyPath, object, change, context);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
248 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
249
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
250 void processPendingChanges ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
251 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
252 return invokeObjcSelf!(void, "processPendingChanges");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
253 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
254
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
255 void assignObject (Object object, NSPersistentStore store)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
256 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
257 return invokeObjcSelf!(void, "assignObject:toPersistentStore:", Object, NSPersistentStore)(object, store);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
258 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
259
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
260 NSSet insertedObjects ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
261 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
262 return invokeObjcSelf!(NSSet, "insertedObjects");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
263 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
264
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
265 NSSet updatedObjects ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
266 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
267 return invokeObjcSelf!(NSSet, "updatedObjects");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
268 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
269
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
270 NSSet deletedObjects ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
271 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
272 return invokeObjcSelf!(NSSet, "deletedObjects");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
273 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
274
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
275 NSSet registeredObjects ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
276 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
277 return invokeObjcSelf!(NSSet, "registeredObjects");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
278 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
279
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
280 void undo ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
281 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
282 return invokeObjcSelf!(void, "undo");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
283 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
284
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
285 void redo ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
286 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
287 return invokeObjcSelf!(void, "redo");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
288 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
289
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
290 void reset ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
291 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
292 return invokeObjcSelf!(void, "reset");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
293 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
294
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
295 void rollback ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
296 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
297 return invokeObjcSelf!(void, "rollback");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
298 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
299
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
300 bool save (ref NSError error)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
301 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
302 id __arg0;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
303
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
304 if (error)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
305 __arg0 = error.objcObject;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
306
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
307 bool result = invokeObjcSelf!(bool, "save:", id*)(&__arg0);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
308
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
309 if (__arg0)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
310 error = new NSError(__arg0);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
311
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
312 return result;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
313 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
314
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
315 void lock ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
316 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
317 return invokeObjcSelf!(void, "lock");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
318 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
319
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
320 void unlock ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
321 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
322 return invokeObjcSelf!(void, "unlock");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
323 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
324
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
325 bool tryLock ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
326 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
327 return invokeObjcSelf!(bool, "tryLock");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
328 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
329
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
330 bool propagatesDeletesAtEndOfEvent ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
331 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
332 return invokeObjcSelf!(bool, "propagatesDeletesAtEndOfEvent");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
333 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
334
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
335 void setPropagatesDeletesAtEndOfEvent (bool flag)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
336 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
337 return invokeObjcSelf!(void, "setPropagatesDeletesAtEndOfEvent:", bool)(flag);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
338 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
339
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
340 bool retainsRegisteredObjects ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
341 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
342 return invokeObjcSelf!(bool, "retainsRegisteredObjects");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
343 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
344
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
345 void setRetainsRegisteredObjects (bool flag)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
346 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
347 return invokeObjcSelf!(void, "setRetainsRegisteredObjects:", bool)(flag);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
348 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
349
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
350 double stalenessInterval ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
351 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
352 return invokeObjcSelf!(double, "stalenessInterval");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
353 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
354
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
355 void setStalenessInterval (double expiration)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
356 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
357 return invokeObjcSelf!(void, "setStalenessInterval:", double)(expiration);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
358 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
359
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
360 void setMergePolicy (Object mergePolicy)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
361 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
362 return invokeObjcSelf!(void, "setMergePolicy:", Object)(mergePolicy);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
363 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
364
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
365 Object mergePolicy ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
366 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
367 return invokeObjcSelf!(Object, "mergePolicy");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
368 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
369
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
370 bool obtainPermanentIDsForObjects (NSArray objects, ref NSError error)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
371 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
372 id __arg1;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
373
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
374 if (error)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
375 __arg1 = error.objcObject;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
376
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
377 bool result = invokeObjcSelf!(bool, "obtainPermanentIDsForObjects:error:", NSArray, id*)(objects, &__arg1);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
378
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
379 if (__arg1)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
380 error = new NSError(__arg1);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
381
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
382 return result;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
383 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
384
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
385 void mergeChangesFromContextDidSaveNotification (NSNotification notification)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
386 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
387 return invokeObjcSelf!(void, "mergeChangesFromContextDidSaveNotification:", NSNotification)(notification);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
388 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
389
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
390 void encodeWithCoder (NSCoder aCoder)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
391 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
392 return invokeObjcSelf!(void, "encodeWithCoder:", NSCoder)(aCoder);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
393 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
394
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
395 typeof(this) initWithCoder (NSCoder aDecoder)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
396 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
397 return invokeObjcSelf!(typeof(this), "initWithCoder:", NSCoder)(aDecoder);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
398 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
399 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
400