mirror of
https://github.com/gnustep/libs-gdl2.git
synced 2025-02-22 19:01:04 +00:00
Reimplementation of processRecentChanges handling. (see ChangeLog)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20656 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
556940e16b
commit
246b40bc6a
3 changed files with 1196 additions and 699 deletions
65
ChangeLog
65
ChangeLog
|
@ -25,9 +25,74 @@
|
||||||
(-forgetLocksForObjectsWithGlobalIDs:) Ditto.
|
(-forgetLocksForObjectsWithGlobalIDs:) Ditto.
|
||||||
* EOAccess/EODatabaseDataSource.m (-insertObject): Do not
|
* EOAccess/EODatabaseDataSource.m (-insertObject): Do not
|
||||||
insert object into the editing context.
|
insert object into the editing context.
|
||||||
|
|
||||||
* EOAdaptors/Postgres95/Postgres95Adaptor.m (externalTypeNames):
|
* EOAdaptors/Postgres95/Postgres95Adaptor.m (externalTypeNames):
|
||||||
Add new types.
|
Add new types.
|
||||||
|
|
||||||
|
* EOControl/EOEditingContext.h
|
||||||
|
(_objectsById): Rename to _globalIDsByObject.
|
||||||
|
(ignoreSharedContextNotifications, isSharedContextLocked): Added.
|
||||||
|
(_sharedContext, fetchTimestamp): Ditto.
|
||||||
|
(-_insertObject:withGlobalID:, -_observeUndoManagerNotifications)
|
||||||
|
(-_processDeletedObjects)
|
||||||
|
(-_processOwnedObjectsUsingChangeTable:deleteTable:)
|
||||||
|
(-_registerClearStateWithUndoManager): Remove public declarations
|
||||||
|
of private methods.
|
||||||
|
(-didMergeChangedObjectsInEditingContext:) Rename to
|
||||||
|
-editingContextDidMergeChanges:.
|
||||||
|
* EOControl/EOEditingContext.m: Update header dependencies.
|
||||||
|
Declare private methods locally.
|
||||||
|
(EOThreadSafeQueue): New local class.
|
||||||
|
(null, EOEditingContextClass, EOAssociationClass)
|
||||||
|
(ecDeallocHT, assocDeallocHT): New static local variables.
|
||||||
|
(EOConstObject, EOConstChanges, EOConstKey, EOConstValue)
|
||||||
|
(EOConstAdd, EOConstDel): Added experimental variables.
|
||||||
|
(_mergeValueForKey): New function.
|
||||||
|
(-_mergeObject:withChanges:): Implement.
|
||||||
|
(-_objectBasedChangeInfoForGIDInfo:): Ditto.
|
||||||
|
(-_processObjectStoreChanges:): Implement.
|
||||||
|
(-_objectsChangedInStore:): Reimplement.
|
||||||
|
(-_changesFromInvalidatingObjectsWithGlobalIDs:): Implement.
|
||||||
|
(-_uncommittedChangesForObject:fromSnapshot:): Implement.
|
||||||
|
(-_mutableSetFromToManyArray:): Implement.
|
||||||
|
(-_globalIDChanged:): Reimplement.
|
||||||
|
(-_processNotificationQueue): Implement.
|
||||||
|
(-_sendOrEnqueueNotification:selector:): Implement.
|
||||||
|
(-invalidateAllObjects): Reimplement.
|
||||||
|
(-_forgetObjectWithGlobalID:): Implement.
|
||||||
|
(-_invalidateObject:withGlobalID:) Implement.
|
||||||
|
(-_invalidateObjectWithGlobalID:) Implement.
|
||||||
|
(-_invalidateObjectsWithGlobalIDs:) Implement.
|
||||||
|
(-invalidateObjectsWithGlobalIDs:) Reimplement.
|
||||||
|
(-_resetAllChanges:): Implement.
|
||||||
|
(-_resetAllChanges): Implement.
|
||||||
|
(-_enqueueEndOfEventNotification): Reimplement.
|
||||||
|
(-_processEndOfEventNotification): Reimplement.
|
||||||
|
(-noop:): Implement.
|
||||||
|
(-_undoManagerCheckpoint:): Remove TODO.
|
||||||
|
(-processRecentChanges): Ditto.
|
||||||
|
(-_processRecentChanges:): Reimplement.
|
||||||
|
(-_clearChangedThisTransaction:): Implement.
|
||||||
|
(+initialize): Initialize some static variables.
|
||||||
|
(+objectDeallocated:): Implemented.
|
||||||
|
(_objectsById): Update usages with _globalIDsByObject.
|
||||||
|
Do not retain objects but rely on new objectDeallocated:
|
||||||
|
mechanism.
|
||||||
|
(-initWithParentObjectStore:): Initialize undo manager.
|
||||||
|
(-init): Make more gdb friendly.
|
||||||
|
(-insertObject:): Use standard autorelease macro.
|
||||||
|
(-_insertObject:withGlobalID:) Always insert the a new object
|
||||||
|
into the inserted objects independent of previous GID mappings.
|
||||||
|
(-hasChanges): Also check unprocessed changes.
|
||||||
|
(-revert): Enable undo manager handling.
|
||||||
|
(-objectWillChange:): Register for revert.
|
||||||
|
(-recordObject:globalID:): Initialize ecDeallocHT and insert
|
||||||
|
objects that are registered.
|
||||||
|
(-forgetObject:): Remove objects from ecDeallocHT.
|
||||||
|
|
||||||
|
([NSObject-dealloc]): Added hack to automagically deregister
|
||||||
|
objects fromm the editing context and association mappings.
|
||||||
|
|
||||||
2005-02-02 Matt Rice <ratmice@yahoo.com>
|
2005-02-02 Matt Rice <ratmice@yahoo.com>
|
||||||
|
|
||||||
* EOAccess/EOEntity.m (-setName:): Validate the new name and remove
|
* EOAccess/EOEntity.m (-setName:): Validate the new name and remove
|
||||||
|
|
|
@ -52,6 +52,7 @@
|
||||||
{
|
{
|
||||||
EOObjectStore *_objectStore;
|
EOObjectStore *_objectStore;
|
||||||
NSUndoManager *_undoManager;
|
NSUndoManager *_undoManager;
|
||||||
|
|
||||||
NSHashTable *_unprocessedChanges;
|
NSHashTable *_unprocessedChanges;
|
||||||
NSHashTable *_unprocessedDeletes;
|
NSHashTable *_unprocessedDeletes;
|
||||||
NSHashTable *_unprocessedInserts;
|
NSHashTable *_unprocessedInserts;
|
||||||
|
@ -59,7 +60,7 @@
|
||||||
NSHashTable *_deletedObjects;
|
NSHashTable *_deletedObjects;
|
||||||
NSHashTable *_changedObjects;
|
NSHashTable *_changedObjects;
|
||||||
|
|
||||||
NSMapTable *_objectsById;
|
NSMapTable *_globalIDsByObject;
|
||||||
NSMapTable *_objectsByGID;
|
NSMapTable *_objectsByGID;
|
||||||
NSMutableDictionary *_snapshotsByGID;
|
NSMutableDictionary *_snapshotsByGID;
|
||||||
NSMutableDictionary *_eventSnapshotsByGID;
|
NSMutableDictionary *_eventSnapshotsByGID;
|
||||||
|
@ -68,6 +69,7 @@
|
||||||
NSMutableArray *_editors;
|
NSMutableArray *_editors;
|
||||||
id _messageHandler;
|
id _messageHandler;
|
||||||
unsigned short _undoTransactionID;
|
unsigned short _undoTransactionID;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
unsigned registeredForCallback:1;
|
unsigned registeredForCallback:1;
|
||||||
unsigned propagatesDeletesAtEndOfEvent:1;
|
unsigned propagatesDeletesAtEndOfEvent:1;
|
||||||
|
@ -80,8 +82,11 @@
|
||||||
unsigned registeredUndoTransactionID:1;
|
unsigned registeredUndoTransactionID:1;
|
||||||
unsigned retainsAllRegisteredObjects:1;
|
unsigned retainsAllRegisteredObjects:1;
|
||||||
unsigned lockUsingParent:1;
|
unsigned lockUsingParent:1;
|
||||||
unsigned unused:5;
|
unsigned ignoreSharedContextNotifications:1;
|
||||||
|
unsigned isSharedContextLocked:1;
|
||||||
|
unsigned unused:3;
|
||||||
} _flags;
|
} _flags;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
unsigned willRunLoginPanel:1;
|
unsigned willRunLoginPanel:1;
|
||||||
unsigned shouldFetchObjects:1;
|
unsigned shouldFetchObjects:1;
|
||||||
|
@ -94,9 +99,11 @@
|
||||||
} _delegateRespondsTo;
|
} _delegateRespondsTo;
|
||||||
|
|
||||||
NSRecursiveLock*_lock;
|
NSRecursiveLock*_lock;
|
||||||
|
id _sharedContext;
|
||||||
int _lockCount;
|
int _lockCount;
|
||||||
id _notificationQueue;
|
id _notificationQueue;
|
||||||
NSAutoreleasePool * _lockPool;
|
NSAutoreleasePool * _lockPool;
|
||||||
|
NSTimeInterval fetchTimestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (void)setDefaultFetchTimestampLag: (NSTimeInterval)lag;
|
+ (void)setDefaultFetchTimestampLag: (NSTimeInterval)lag;
|
||||||
|
@ -112,8 +119,6 @@
|
||||||
- (void)insertObject: (id)object;
|
- (void)insertObject: (id)object;
|
||||||
- (void)insertObject: (id)object
|
- (void)insertObject: (id)object
|
||||||
withGlobalID: (EOGlobalID *)gid;
|
withGlobalID: (EOGlobalID *)gid;
|
||||||
- (void)_insertObject: (id)object
|
|
||||||
withGlobalID: (EOGlobalID *)gid;
|
|
||||||
|
|
||||||
-(void)setLevelsOfUndo: (int)levels;
|
-(void)setLevelsOfUndo: (int)levels;
|
||||||
|
|
||||||
|
@ -138,8 +143,6 @@
|
||||||
- (void)setUndoManager: (NSUndoManager *)undoManager;
|
- (void)setUndoManager: (NSUndoManager *)undoManager;
|
||||||
- (NSUndoManager *)undoManager;
|
- (NSUndoManager *)undoManager;
|
||||||
|
|
||||||
- (void)_observeUndoManagerNotifications;
|
|
||||||
|
|
||||||
- (void)objectWillChange: (id)object;
|
- (void)objectWillChange: (id)object;
|
||||||
|
|
||||||
- (void)recordObject: (id)object
|
- (void)recordObject: (id)object
|
||||||
|
@ -155,9 +158,6 @@
|
||||||
- (NSArray *)insertedObjects;
|
- (NSArray *)insertedObjects;
|
||||||
- (NSArray *)deletedObjects;
|
- (NSArray *)deletedObjects;
|
||||||
|
|
||||||
- (void)_processDeletedObjects;
|
|
||||||
- (void)_processOwnedObjectsUsingChangeTable: (NSHashTable *)changeTable
|
|
||||||
deleteTable: (NSHashTable *)deleteTable;
|
|
||||||
- (void)propagatesDeletesUsingTable: (NSHashTable *)deleteTable;
|
- (void)propagatesDeletesUsingTable: (NSHashTable *)deleteTable;
|
||||||
- (void)validateDeletesUsingTable: (NSHashTable *)deleteTable;
|
- (void)validateDeletesUsingTable: (NSHashTable *)deleteTable;
|
||||||
- (BOOL)validateTable: (NSHashTable *)table
|
- (BOOL)validateTable: (NSHashTable *)table
|
||||||
|
@ -167,7 +167,6 @@
|
||||||
|
|
||||||
|
|
||||||
- (void)processRecentChanges;
|
- (void)processRecentChanges;
|
||||||
- (void)_registerClearStateWithUndoManager;
|
|
||||||
|
|
||||||
- (BOOL)propagatesDeletesAtEndOfEvent;
|
- (BOOL)propagatesDeletesAtEndOfEvent;
|
||||||
- (void)setPropagatesDeletesAtEndOfEvent: (BOOL)propagatesDeletesAtEndOfEvent;
|
- (void)setPropagatesDeletesAtEndOfEvent: (BOOL)propagatesDeletesAtEndOfEvent;
|
||||||
|
@ -287,9 +286,8 @@ shouldInvalidateObject: (id)object
|
||||||
shouldFetchObjectsDescribedByFetchSpecification: (EOFetchSpecification *)fetchSpecification;
|
shouldFetchObjectsDescribedByFetchSpecification: (EOFetchSpecification *)fetchSpecification;
|
||||||
|
|
||||||
- (BOOL)editingContext: (EOEditingContext *)editingContext
|
- (BOOL)editingContext: (EOEditingContext *)editingContext
|
||||||
shouldMergeChangedObject: (id)object;
|
shouldMergeChangesForObject: (id)object;
|
||||||
|
- (void)editingContextDidMergeChanges: (EOEditingContext *)editingContext;
|
||||||
- (void)didMergeChangedObjectsInEditingContext: (EOEditingContext *)editingContext;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue