mirror of
https://github.com/gnustep/libs-gdl2.git
synced 2025-04-23 05:00:46 +00:00
* EOAccess/EOAttribute.m, EOAccess/EODatabaseContext.m,
* EOAccess/EOEntity.m, EOAccess/EOSQLExpression.m * EOAccess/EOPrivate.h, EOAccess/EOPrivate.m, * EOAccess/EOSQLQualifier.m, EOAccess/EOUtilities.m * EOControl/EOClassDescription.m, EOControl/EOEditingContext.m * EOControl/EOGenericRecord.m, EOControl/EOKeyGlobalID.m * EOControl/EOKeyValueCoding.m, * EOControl/EOKeyValueQualifier.m * EOControl/EOMutableKnownKeyDictionary.m, * EOControl/EOPrivate.h, EOControl/EOPrivate.m Unify GDL2 identifiers with GDL2_ prefix. Replace GDL2NSClass_alloc with GDL2_alloc(NSClass). Replace GDL2NSClassWith* calls with AUTORELEASE([GDL2_alloc(NSCLass) initWith* calls]). Rename GDL2PrivInit to GDL2_PrivateInit. (GDL2_NSArray, GDL2_NSMutableArray_allocWithZoneIMP) (GDL2_NSMutableDictionary_allocWithZoneIMP): New globals. (GDL2_alloc): New macro. (GDL2NSString_alloc, GDL2NSDecimalNumber_alloc) (GDL2NSNumber_alloc, GDL2NSCalendarDate_alloc, GDL2NSData_alloc) (GDL2DataWithBytesAndLength, GDL2MutableArrayWithCapacity) (GDL2MutableArrayWithArray, GDL2MutableArray, GDL2Array) (GDL2MutableDictionaryWithCapacity): Remove. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20779 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e4bdd8f5dc
commit
86b1325708
19 changed files with 765 additions and 728 deletions
23
ChangeLog
23
ChangeLog
|
@ -2,6 +2,29 @@
|
|||
|
||||
* EOAccess/EOAdaptor.m (-hasOpenChannels): Make safe for
|
||||
unsigned.
|
||||
|
||||
* EOAccess/EOAttribute.m, EOAccess/EODatabaseContext.m,
|
||||
* EOAccess/EOEntity.m, EOAccess/EOSQLExpression.m
|
||||
* EOAccess/EOPrivate.h, EOAccess/EOPrivate.m,
|
||||
* EOAccess/EOSQLQualifier.m, EOAccess/EOUtilities.m
|
||||
* EOControl/EOClassDescription.m, EOControl/EOEditingContext.m
|
||||
* EOControl/EOGenericRecord.m, EOControl/EOKeyGlobalID.m
|
||||
* EOControl/EOKeyValueCoding.m, EOControl/EOKeyValueQualifier.m
|
||||
* EOControl/EOMutableKnownKeyDictionary.m,
|
||||
* EOControl/EOPrivate.h, EOControl/EOPrivate.m
|
||||
Unify GDL2 identifiers with GDL2_ prefix. Replace
|
||||
GDL2NSClass_alloc with GDL2_alloc(NSClass). Replace
|
||||
GDL2NSClassWith* calls with
|
||||
AUTORELEASE([GDL2_alloc(NSCLass) initWith* calls]).
|
||||
Rename GDL2PrivInit to GDL2_PrivateInit.
|
||||
(GDL2_NSArray, GDL2_NSMutableArray_allocWithZoneIMP)
|
||||
(GDL2_NSMutableDictionary_allocWithZoneIMP): New globals.
|
||||
(GDL2_alloc): New macro.
|
||||
(GDL2NSString_alloc, GDL2NSDecimalNumber_alloc)
|
||||
(GDL2NSNumber_alloc, GDL2NSCalendarDate_alloc, GDL2NSData_alloc)
|
||||
(GDL2DataWithBytesAndLength, GDL2MutableArrayWithCapacity)
|
||||
(GDL2MutableArrayWithArray, GDL2MutableArray, GDL2Array)
|
||||
(GDL2MutableDictionaryWithCapacity): Remove.
|
||||
|
||||
2005-02-20 David Ayers <d.ayers@inode.at>
|
||||
|
||||
|
|
|
@ -197,7 +197,7 @@ RCS_ID("$Id$")
|
|||
tmpString = [propertyList objectForKey: @"parameterDirection"];
|
||||
if (tmpString)
|
||||
{
|
||||
if ([tmpString isKindOfClass: GDL2NSNumberClass])
|
||||
if ([tmpString isKindOfClass: GDL2_NSNumberClass])
|
||||
{
|
||||
[self setParameterDirection: [tmpString intValue]];
|
||||
}
|
||||
|
@ -1086,12 +1086,13 @@ return nexexp
|
|||
NSData *value = nil;
|
||||
Class valueClass = [self _valueClass];
|
||||
|
||||
if (valueClass != Nil && valueClass != GDL2NSDataClass)
|
||||
if (valueClass != Nil && valueClass != GDL2_NSDataClass)
|
||||
{
|
||||
switch (_argumentType)
|
||||
{
|
||||
case EOFactoryMethodArgumentIsNSData:
|
||||
value = [GDL2NSData_alloc() initWithBytes:bytes length: length]; //For efficiency reasons, the returned value is NOT autoreleased !
|
||||
//For efficiency reasons, the returned value is NOT autoreleased !
|
||||
value = [GDL2_alloc(NSData) initWithBytes: bytes length: length];
|
||||
|
||||
if(_valueFactoryMethod != NULL)
|
||||
value = [(id)valueClass performSelector: _valueFactoryMethod
|
||||
|
@ -1099,14 +1100,15 @@ return nexexp
|
|||
break;
|
||||
|
||||
case EOFactoryMethodArgumentIsBytes:
|
||||
value = [valueClass alloc];//For efficiency reasons, the returned value is NOT autoreleased !
|
||||
//For efficiency reasons, the returned value is NOT autoreleased !
|
||||
value = [valueClass allocWithZone: 0];
|
||||
|
||||
aSignature =
|
||||
[valueClass
|
||||
instanceMethodSignatureForSelector: _valueFactoryMethod];
|
||||
|
||||
anInvocation = [NSInvocation
|
||||
invocationWithMethodSignature: aSignature];
|
||||
anInvocation
|
||||
= [NSInvocation invocationWithMethodSignature: aSignature];
|
||||
|
||||
[anInvocation setSelector: _valueFactoryMethod];
|
||||
[anInvocation setTarget: value];
|
||||
|
@ -1121,7 +1123,8 @@ return nexexp
|
|||
}
|
||||
|
||||
if(!value)
|
||||
value = [GDL2NSData_alloc() initWithBytes: bytes length: length];//For efficiency reasons, the returned value is NOT autoreleased !
|
||||
//For efficiency reasons, the returned value is NOT autoreleased !
|
||||
value = [GDL2_alloc(NSData) initWithBytes: bytes length: length];
|
||||
|
||||
return value;
|
||||
}
|
||||
|
@ -1142,35 +1145,44 @@ return nexexp
|
|||
id value = nil;
|
||||
Class valueClass = [self _valueClass];
|
||||
|
||||
if (valueClass != Nil && valueClass != GDL2NSStringClass)
|
||||
if (valueClass != Nil && valueClass != GDL2_NSStringClass)
|
||||
{
|
||||
switch (_argumentType)
|
||||
{
|
||||
case EOFactoryMethodArgumentIsNSString:
|
||||
value = [GDL2NSString_alloc() initWithData: GDL2DataWithBytesAndLength(bytes,length)
|
||||
encoding: encoding];//For efficiency reasons, the returned value is NOT autoreleased !
|
||||
{
|
||||
NSData *data;
|
||||
NSString *string;
|
||||
//For efficiency reasons, the returned value is NOT autoreleased !
|
||||
data = AUTORELEASE([(GDL2_alloc(NSData)) initWithBytes: bytes
|
||||
length: length]);
|
||||
string = AUTORELEASE([(GDL2_alloc(NSString)) initWithData: data
|
||||
encoding: encoding]);
|
||||
|
||||
value = [(id)valueClass performSelector: _valueFactoryMethod
|
||||
withObject: [value autorelease]];
|
||||
break;
|
||||
value = [((id)valueClass) performSelector: _valueFactoryMethod
|
||||
withObject: string];
|
||||
break;
|
||||
}
|
||||
|
||||
case EOFactoryMethodArgumentIsBytes:
|
||||
value = [valueClass alloc];//For efficiency reasons, the returned value is NOT autoreleased !
|
||||
{
|
||||
//For efficiency reasons, the returned value is NOT autoreleased !
|
||||
value = [valueClass alloc];
|
||||
|
||||
aSignature =
|
||||
[valueClass
|
||||
instanceMethodSignatureForSelector: _valueFactoryMethod];
|
||||
aSignature
|
||||
= [valueClass instanceMethodSignatureForSelector: _valueFactoryMethod];
|
||||
|
||||
anInvocation = [NSInvocation
|
||||
invocationWithMethodSignature: aSignature];
|
||||
anInvocation
|
||||
= [NSInvocation invocationWithMethodSignature: aSignature];
|
||||
|
||||
[anInvocation setSelector: _valueFactoryMethod];
|
||||
[anInvocation setTarget: value];
|
||||
[anInvocation setArgument: &bytes atIndex: 2];
|
||||
[anInvocation setArgument: &length atIndex: 3];
|
||||
[anInvocation setArgument: &encoding atIndex: 4];
|
||||
[anInvocation invoke];
|
||||
break;
|
||||
[anInvocation setSelector: _valueFactoryMethod];
|
||||
[anInvocation setTarget: value];
|
||||
[anInvocation setArgument: &bytes atIndex: 2];
|
||||
[anInvocation setArgument: &length atIndex: 3];
|
||||
[anInvocation setArgument: &encoding atIndex: 4];
|
||||
[anInvocation invoke];
|
||||
break;
|
||||
}
|
||||
|
||||
case EOFactoryMethodArgumentIsNSData:
|
||||
break;
|
||||
|
@ -1178,9 +1190,14 @@ return nexexp
|
|||
}
|
||||
|
||||
if(!value)
|
||||
value = [GDL2NSString_alloc()
|
||||
initWithData: GDL2DataWithBytesAndLength(bytes,length)
|
||||
encoding: encoding];//For efficiency reasons, the returned value is NOT autoreleased !
|
||||
{
|
||||
NSData *data;
|
||||
//For efficiency reasons, the returned value is NOT autoreleased !
|
||||
data = AUTORELEASE([(GDL2_alloc(NSData)) initWithBytes: bytes
|
||||
length: length]);
|
||||
value = [(GDL2_alloc(NSString)) initWithData: data
|
||||
encoding: encoding];
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
@ -1205,7 +1222,7 @@ return nexexp
|
|||
NSCalendarDate *date;
|
||||
|
||||
//For efficiency reasons, the returned value is NOT autoreleased !
|
||||
date = [[GDL2NSCalendarDateClass allocWithZone: zone]
|
||||
date = [[GDL2_NSCalendarDateClass allocWithZone: zone]
|
||||
initWithYear: year
|
||||
month: month
|
||||
day: day
|
||||
|
@ -1252,28 +1269,28 @@ return nexexp
|
|||
{
|
||||
/* Temporary reverted so we can discuss about this
|
||||
case EOAdaptorNumberType:
|
||||
convert = [value isKindOfClass: GDL2NSNumberClass] ? NO : YES;
|
||||
convert = [value isKindOfClass: GDL2_NSNumberClass] ? NO : YES;
|
||||
break;
|
||||
case EOAdaptorCharactersType:
|
||||
convert = [value isKindOfClass: GDL2NSStringClass] ? NO : YES;
|
||||
convert = [value isKindOfClass: GDL2_NSStringClass] ? NO : YES;
|
||||
break;
|
||||
case EOAdaptorBytesType:
|
||||
convert = [value isKindOfClass: GDL2NSDataClass] ? NO : YES;
|
||||
convert = [value isKindOfClass: GDL2_NSDataClass] ? NO : YES;
|
||||
break;
|
||||
case EOAdaptorDateType:
|
||||
convert = [value isKindOfClass: GDL2NSDateClass] ? NO : YES;
|
||||
convert = [value isKindOfClass: GDL2_NSDateClass] ? NO : YES;
|
||||
break;
|
||||
*/
|
||||
//TODO It's only a quick Fix
|
||||
case EOAdaptorNumberType:
|
||||
case EOAdaptorCharactersType:
|
||||
case EOAdaptorDateType:
|
||||
convert = ([value isKindOfClass: GDL2NSNumberClass]
|
||||
|| [value isKindOfClass: GDL2NSStringClass]
|
||||
|| [value isKindOfClass: GDL2NSDateClass]) ? NO : YES;
|
||||
convert = ([value isKindOfClass: GDL2_NSNumberClass]
|
||||
|| [value isKindOfClass: GDL2_NSStringClass]
|
||||
|| [value isKindOfClass: GDL2_NSDateClass]) ? NO : YES;
|
||||
break;
|
||||
case EOAdaptorBytesType:
|
||||
convert = [value isKindOfClass: GDL2NSDataClass] ? NO : YES;
|
||||
convert = [value isKindOfClass: GDL2_NSDataClass] ? NO : YES;
|
||||
break;
|
||||
default:
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
|
@ -1281,7 +1298,7 @@ return nexexp
|
|||
adaptorValueType];
|
||||
}
|
||||
|
||||
convert = (value == GDL2EONull) ? NO : convert;
|
||||
convert = (value == GDL2_EONull) ? NO : convert;
|
||||
|
||||
if (convert)
|
||||
{
|
||||
|
@ -1328,9 +1345,9 @@ return nexexp
|
|||
{
|
||||
if (!_flags.isAttributeValueInitialized)
|
||||
{
|
||||
Class adaptorClasses[] = { GDL2NSNumberClass,
|
||||
GDL2NSStringClass,
|
||||
GDL2NSDateClass };
|
||||
Class adaptorClasses[] = { GDL2_NSNumberClass,
|
||||
GDL2_NSStringClass,
|
||||
GDL2_NSDateClass };
|
||||
EOAdaptorValueType values[] = { EOAdaptorNumberType,
|
||||
EOAdaptorCharactersType,
|
||||
EOAdaptorDateType };
|
||||
|
@ -1422,9 +1439,9 @@ return nexexp
|
|||
|
||||
if ([*valueP isKindOfClass: valueClass] == NO)
|
||||
{
|
||||
if ([*valueP isKindOfClass: GDL2NSStringClass])
|
||||
if ([*valueP isKindOfClass: GDL2_NSStringClass])
|
||||
{
|
||||
if (valueClass == GDL2NSNumberClass)
|
||||
if (valueClass == GDL2_NSNumberClass)
|
||||
{
|
||||
char valueTypeChar=[self _valueTypeChar];
|
||||
switch(valueTypeChar)
|
||||
|
@ -1479,24 +1496,23 @@ return nexexp
|
|||
break;
|
||||
};
|
||||
}
|
||||
else if (valueClass == GDL2NSDecimalNumberClass)
|
||||
else if (valueClass == GDL2_NSDecimalNumberClass)
|
||||
*valueP = [NSDecimalNumber
|
||||
decimalNumberWithString: *valueP];
|
||||
|
||||
else if (valueClass == GDL2NSDataClass)
|
||||
else if (valueClass == GDL2_NSDataClass)
|
||||
*valueP = [*valueP
|
||||
dataUsingEncoding: NSASCIIStringEncoding
|
||||
allowLossyConversion: YES];
|
||||
|
||||
else if (valueClass == GDL2NSCalendarDateClass)
|
||||
*valueP = [[[GDL2NSCalendarDateClass alloc]
|
||||
initWithString: *valueP]
|
||||
autorelease];
|
||||
else if (valueClass == GDL2_NSCalendarDateClass)
|
||||
*valueP = AUTORELEASE([(GDL2_alloc(NSCalendarDate))
|
||||
initWithString: *valueP]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ([*valueP isKindOfClass: GDL2NSStringClass])
|
||||
if ([*valueP isKindOfClass: GDL2_NSStringClass])
|
||||
{
|
||||
unsigned width = [self width];
|
||||
|
||||
|
@ -1509,7 +1525,7 @@ return nexexp
|
|||
length: width];
|
||||
}
|
||||
}
|
||||
else if ([*valueP isKindOfClass: GDL2NSNumberClass])
|
||||
else if ([*valueP isKindOfClass: GDL2_NSNumberClass])
|
||||
{
|
||||
// TODO ??
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ static Class _contextClass = Nil;
|
|||
|
||||
GDL2_EOAccessPrivateInit();
|
||||
|
||||
_contextClass = GDL2EODatabaseContextClass;
|
||||
_contextClass = GDL2_EODatabaseContextClass;
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver: self
|
||||
|
@ -357,7 +357,7 @@ static Class _contextClass = Nil;
|
|||
|
||||
storeEnum = [cooperatingObjectStores objectEnumerator];
|
||||
|
||||
while ((coObjectStore = GDL2NextObjectWithImpPtr(storeEnum,&enumNO)))
|
||||
while ((coObjectStore = GDL2_NextObjectWithImpPtr(storeEnum,&enumNO)))
|
||||
{
|
||||
if ([coObjectStore isKindOfClass: [EODatabaseContext class]])
|
||||
{
|
||||
|
@ -421,7 +421,7 @@ static Class _contextClass = Nil;
|
|||
|
||||
for (i = 0 ; !busy && i < count; i++)
|
||||
{
|
||||
EODatabaseChannel *channel = [GDL2ObjectAtIndexWithImp(_registeredChannels,oaiIMP,i)
|
||||
EODatabaseChannel *channel = [GDL2_ObjectAtIndexWithImp(_registeredChannels,oaiIMP,i)
|
||||
nonretainedObjectValue];
|
||||
|
||||
busy = [channel isFetchInProgress];
|
||||
|
@ -444,7 +444,7 @@ static Class _contextClass = Nil;
|
|||
IMP oaiIMP=[_registeredChannels methodForSelector: @selector(objectAtIndex:)];
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
[array addObject: [GDL2ObjectAtIndexWithImp(_registeredChannels,oaiIMP,i)
|
||||
[array addObject: [GDL2_ObjectAtIndexWithImp(_registeredChannels,oaiIMP,i)
|
||||
nonretainedObjectValue]];
|
||||
};
|
||||
|
||||
|
@ -474,7 +474,7 @@ static Class _contextClass = Nil;
|
|||
|
||||
for (i = count - 1; i >= 0; i--)
|
||||
{
|
||||
if ([GDL2ObjectAtIndexWithImp(_registeredChannels,oaiIMP,i)
|
||||
if ([GDL2_ObjectAtIndexWithImp(_registeredChannels,oaiIMP,i)
|
||||
nonretainedObjectValue] == channel)
|
||||
{
|
||||
[_registeredChannels removeObjectAtIndex: i];
|
||||
|
@ -496,7 +496,7 @@ static Class _contextClass = Nil;
|
|||
NSDebugMLLog(@"EODatabaseContext",@"REGISTERED CHANNELS nb=%d",
|
||||
[_registeredChannels count]);
|
||||
|
||||
while ((channel = GDL2NextObjectWithImpPtr(channelsEnum,&enumNO)))
|
||||
while ((channel = GDL2_NextObjectWithImpPtr(channelsEnum,&enumNO)))
|
||||
{
|
||||
if ([(EODatabaseChannel *)[channel nonretainedObjectValue]
|
||||
isFetchInProgress] == NO)
|
||||
|
@ -628,7 +628,7 @@ May raise an exception if transaction has began or if you want pessimistic lock
|
|||
_delegateRespondsTo.shouldFetchArrayFault =
|
||||
[delegate respondsToSelector: @selector(databaseContext:shouldFetchArrayFault:)];
|
||||
|
||||
while ((channel = GDL2NextObjectWithImpPtr(channelsEnum,&enumNO)))
|
||||
while ((channel = GDL2_NextObjectWithImpPtr(channelsEnum,&enumNO)))
|
||||
[channel setDelegate: delegate];
|
||||
}
|
||||
|
||||
|
@ -926,7 +926,7 @@ userInfo = {
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
EOKeyGlobalID *gid=GDL2ObjectAtIndexWithImp(updatedObjects,oaiIMP,i);
|
||||
EOKeyGlobalID *gid=GDL2_ObjectAtIndexWithImp(updatedObjects,oaiIMP,i);
|
||||
NSString *entityName;
|
||||
|
||||
NSDebugMLLog(@"EODatabaseContext", @"gid=%@", gid);
|
||||
|
@ -1024,7 +1024,7 @@ userInfo = {
|
|||
|
||||
for (i = 0; i < sourceSnapshotCount; i++)
|
||||
{
|
||||
snapGID = GDL2ObjectAtIndexWithImp(sourceSnapshot,oaiIMP,i);
|
||||
snapGID = GDL2_ObjectAtIndexWithImp(sourceSnapshot,oaiIMP,i);
|
||||
|
||||
NSDebugMLLog(@"EODatabaseContext", @"snapGID=%@", snapGID);
|
||||
|
||||
|
@ -1034,7 +1034,7 @@ userInfo = {
|
|||
NSDebugMLLog(@"EODatabaseContext", @"snapFault=%@",
|
||||
snapFault);
|
||||
|
||||
GDL2AddObjectWithImp(relationshipValue,addObjectIMP,snapFault);
|
||||
GDL2_AddObjectWithImp(relationshipValue,addObjectIMP,snapFault);
|
||||
}
|
||||
|
||||
objects = relationshipValue;
|
||||
|
@ -1285,7 +1285,7 @@ userInfo = {
|
|||
|
||||
relEnum = [[relationship componentRelationships] objectEnumerator];
|
||||
enumNO=NULL;
|
||||
while ((relationship = GDL2NextObjectWithImpPtr(relEnum,&enumNO)))
|
||||
while ((relationship = GDL2_NextObjectWithImpPtr(relEnum,&enumNO)))
|
||||
{
|
||||
// TODO rebuild object array for relationship path
|
||||
|
||||
|
@ -1297,7 +1297,7 @@ userInfo = {
|
|||
|
||||
objEnum = [objsArray objectEnumerator];
|
||||
enumNO=NULL;
|
||||
while ((obj = GDL2NextObjectWithImpPtr(objEnum,&enumNO)))
|
||||
while ((obj = GDL2_NextObjectWithImpPtr(objEnum,&enumNO)))
|
||||
{
|
||||
EOGlobalID* gid=nil;
|
||||
relObj = [obj storedValueForKey: [relationship name]];
|
||||
|
@ -1458,7 +1458,7 @@ userInfo = {
|
|||
GDL2IMP_UINT arrayIndexOfObjectIdenticalToIMP=
|
||||
(GDL2IMP_UINT)[array methodForSelector:@selector(indexOfObjectIdenticalTo:)];
|
||||
|
||||
arp = GDL2NSAutoreleasePool_new();
|
||||
arp = GDL2_NSAutoreleasePool_new();
|
||||
NSDebugMLLog(@"EODatabaseContext",
|
||||
@"[channel isFetchInProgress]=%s",
|
||||
([channel isFetchInProgress] ? "YES" : "NO"));
|
||||
|
@ -1477,7 +1477,7 @@ userInfo = {
|
|||
|
||||
if (usesDistinct == YES
|
||||
&& num > 0
|
||||
&& GDL2IndexOfObjectIdenticalToWithImp(array,arrayIndexOfObjectIdenticalToIMP,obj)!=NSNotFound)
|
||||
&& GDL2_IndexOfObjectIdenticalToWithImp(array,arrayIndexOfObjectIdenticalToIMP,obj)!=NSNotFound)
|
||||
// (stephane@sente) I thought that DISTINCT was done on server-side?!?
|
||||
{
|
||||
obj = nil;
|
||||
|
@ -1485,7 +1485,7 @@ userInfo = {
|
|||
else
|
||||
{
|
||||
NSDebugMLLog(@"EODatabaseContext", @"AFTER FETCH");
|
||||
GDL2AddObjectWithImp(array,arrayAddObjectIMP,obj);
|
||||
GDL2_AddObjectWithImp(array,arrayAddObjectIMP,obj);
|
||||
NSDebugMLLog(@"EODatabaseContext", @"array count=%d",
|
||||
[array count]);
|
||||
num++;
|
||||
|
@ -1509,7 +1509,7 @@ userInfo = {
|
|||
{
|
||||
DESTROY(arp);
|
||||
autoreleaseStep = autoreleaseSteps;
|
||||
arp = GDL2NSAutoreleasePool_new();
|
||||
arp = GDL2_NSAutoreleasePool_new();
|
||||
}
|
||||
else
|
||||
autoreleaseStep--;
|
||||
|
@ -1633,7 +1633,7 @@ userInfo = {
|
|||
|
||||
(*databaseRecordSnapshotForGlobalID)
|
||||
(_database,@selector(recordSnapshot:forGlobalID:),row,gid);
|
||||
GDL2AddObjectWithImp(cache,cacheAddObjectIMP,gid);
|
||||
GDL2_AddObjectWithImp(cache,cacheAddObjectIMP,gid);
|
||||
}
|
||||
|
||||
NSDebugMLLog(@"EODatabaseContext", @"Finished fetch");
|
||||
|
@ -1665,7 +1665,7 @@ userInfo = {
|
|||
IMP ecObjectForGlobalIDIMP=NULL;
|
||||
IMP ecRecordObjectGlobalIDIMP=NULL;
|
||||
|
||||
while ((gid = GDL2NextObjectWithImp(cacheEnum,cacheEnumNextObjectIMP)))
|
||||
while ((gid = GDL2_NextObjectWithImp(cacheEnum,cacheEnumNextObjectIMP)))
|
||||
{
|
||||
NSDebugMLLog(@"EODatabaseContext", @"gid=%@", gid);
|
||||
|
||||
|
@ -1709,13 +1709,13 @@ userInfo = {
|
|||
|
||||
if (usesDistinct == YES
|
||||
&& num > 0
|
||||
&& GDL2IndexOfObjectIdenticalToWithImp(array,arrayIndexOfObjectIdenticalToIMP,obj)!=NSNotFound)
|
||||
&& GDL2_IndexOfObjectIdenticalToWithImp(array,arrayIndexOfObjectIdenticalToIMP,obj)!=NSNotFound)
|
||||
{
|
||||
obj = nil;
|
||||
}
|
||||
else
|
||||
{
|
||||
GDL2AddObjectWithImp(array,arrayAddObjectIMP,obj);
|
||||
GDL2_AddObjectWithImp(array,arrayAddObjectIMP,obj);
|
||||
num++;
|
||||
|
||||
if (limit && num >= limit)
|
||||
|
@ -1802,7 +1802,7 @@ userInfo = {
|
|||
GDL2IMP_UINT arrayIndexOfObjectIdenticalToIMP=
|
||||
(GDL2IMP_UINT)[array methodForSelector:@selector(indexOfObjectIdenticalTo:)];
|
||||
|
||||
arp = GDL2NSAutoreleasePool_new();
|
||||
arp = GDL2_NSAutoreleasePool_new();
|
||||
|
||||
NSDebugMLLog(@"EODatabaseContext",
|
||||
@"[channel isFetchInProgress]=%s",
|
||||
|
@ -1824,7 +1824,7 @@ userInfo = {
|
|||
|
||||
if (usesDistinct == YES
|
||||
&& num > 0
|
||||
&& GDL2IndexOfObjectIdenticalToWithImp(array,arrayIndexOfObjectIdenticalToIMP,obj)!=NSNotFound)
|
||||
&& GDL2_IndexOfObjectIdenticalToWithImp(array,arrayIndexOfObjectIdenticalToIMP,obj)!=NSNotFound)
|
||||
{
|
||||
NSDebugMLLog(@"EODatabaseContext",
|
||||
@"Already fetched object=%@\n\n", obj);
|
||||
|
@ -1834,7 +1834,7 @@ userInfo = {
|
|||
{
|
||||
NSDebugMLLog(@"EODatabaseContext", @"AFTER FETCH");
|
||||
NSAssert(obj,@"No object");
|
||||
GDL2AddObjectWithImp(array,arrayAddObjectIMP,obj);
|
||||
GDL2_AddObjectWithImp(array,arrayAddObjectIMP,obj);
|
||||
NSDebugMLLog(@"EODatabaseContext", @"array count=%d",
|
||||
[array count]);
|
||||
num++;
|
||||
|
@ -1855,7 +1855,7 @@ userInfo = {
|
|||
{
|
||||
DESTROY(arp);
|
||||
autoreleaseStep = autoreleaseSteps;
|
||||
arp = GDL2NSAutoreleasePool_new();
|
||||
arp = GDL2_NSAutoreleasePool_new();
|
||||
}
|
||||
else
|
||||
autoreleaseStep--;
|
||||
|
@ -1929,7 +1929,7 @@ userInfo = {
|
|||
relationshipKeyPathEnum = [[fetch prefetchingRelationshipKeyPaths]
|
||||
objectEnumerator];
|
||||
enumNO=NULL;
|
||||
while ((relationshipKeyPath = GDL2NextObjectWithImpPtr(relationshipKeyPathEnum,&enumNO)))
|
||||
while ((relationshipKeyPath = GDL2_NextObjectWithImpPtr(relationshipKeyPathEnum,&enumNO)))
|
||||
{
|
||||
IMP rkeyEnumNO=NULL; // nextObject
|
||||
NSArray *relationshipKeyArray = [relationshipKeyPath
|
||||
|
@ -1940,7 +1940,7 @@ userInfo = {
|
|||
NSString *relationshipKey;
|
||||
|
||||
relationshipKeyEnum = [relationshipKeyArray objectEnumerator];
|
||||
while ((relationshipKey = GDL2NextObjectWithImpPtr(relationshipKeyEnum,&rkeyEnumNO)))
|
||||
while ((relationshipKey = GDL2_NextObjectWithImpPtr(relationshipKeyEnum,&rkeyEnumNO)))
|
||||
{
|
||||
relationship = [currentEntity relationshipNamed: relationshipKey];
|
||||
currentEntity = [relationship destinationEntity];
|
||||
|
@ -2027,7 +2027,7 @@ userInfo = {
|
|||
|
||||
attrsEnum = [primaryKeyAttributes objectEnumerator];
|
||||
enumNO=NULL;
|
||||
while ((attribute = GDL2NextObjectWithImpPtr(attrsEnum,&enumNO)))
|
||||
while ((attribute = GDL2_NextObjectWithImpPtr(attrsEnum,&enumNO)))
|
||||
{
|
||||
NSString *name = [attribute name];
|
||||
|
||||
|
@ -2037,7 +2037,7 @@ userInfo = {
|
|||
|
||||
attrsEnum = [attrsUsedForLocking objectEnumerator];
|
||||
enumNO=NULL;
|
||||
while ((attribute = GDL2NextObjectWithImpPtr(attrsEnum,&enumNO)))
|
||||
while ((attribute = GDL2_NextObjectWithImpPtr(attrsEnum,&enumNO)))
|
||||
{
|
||||
NSString *name = [attribute name];
|
||||
|
||||
|
@ -2131,7 +2131,7 @@ userInfo = {
|
|||
array = [NSMutableArray array];
|
||||
enumerator = [globalIDs objectEnumerator];
|
||||
|
||||
while ((gid = GDL2NextObjectWithImpPtr(enumerator,&enumNO)))
|
||||
while ((gid = GDL2_NextObjectWithImpPtr(enumerator,&enumNO)))
|
||||
{
|
||||
if ([_delegate databaseContext: self
|
||||
shouldInvalidateObjectWithGlobalID: gid
|
||||
|
@ -2265,8 +2265,8 @@ forDatabaseOperation:(EODatabaseOperation *)op
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
attribute = GDL2ObjectAtIndexWithImp(classProperties,oaiIMP,i);
|
||||
if ([attribute isKindOfClass:GDL2EOAttributeClass] == NO)
|
||||
attribute = GDL2_ObjectAtIndexWithImp(classProperties,oaiIMP,i);
|
||||
if ([attribute isKindOfClass:GDL2_EOAttributeClass] == NO)
|
||||
continue;
|
||||
|
||||
key = [attribute name];
|
||||
|
@ -2276,7 +2276,7 @@ forDatabaseOperation:(EODatabaseOperation *)op
|
|||
val = [object storedValueForKey:key];
|
||||
|
||||
if (val == nil)
|
||||
val = GDL2EONull;
|
||||
val = GDL2_EONull;
|
||||
|
||||
[newRow setObject:val forKey:key];
|
||||
}
|
||||
|
@ -2352,7 +2352,7 @@ forDatabaseOperation:(EODatabaseOperation *)op
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
id object = GDL2ObjectAtIndexWithImp(array,oaiIMP,i);
|
||||
id object = GDL2_ObjectAtIndexWithImp(array,oaiIMP,i);
|
||||
|
||||
NSDebugMLLog(@"EODatabaseContext",@"object=%@",object);
|
||||
|
||||
|
@ -2456,7 +2456,7 @@ forDatabaseOperation:(EODatabaseOperation *)op
|
|||
NSArray *relationships = nil;
|
||||
EODatabaseOperation *dbOpe = nil;
|
||||
EOEntity *entity = nil;
|
||||
id object = GDL2ObjectAtIndexWithImp(objects[which],oaiIMP,i);
|
||||
id object = GDL2_ObjectAtIndexWithImp(objects[which],oaiIMP,i);
|
||||
int relationshipsCount = 0;
|
||||
IMP relObjectAtIndexIMP= NULL;
|
||||
|
||||
|
@ -2529,7 +2529,7 @@ forDatabaseOperation:(EODatabaseOperation *)op
|
|||
iRelationship++)
|
||||
{
|
||||
EORelationship *relationship =
|
||||
GDL2ObjectAtIndexWithImp(relationships,relObjectAtIndexIMP,iRelationship);
|
||||
GDL2_ObjectAtIndexWithImp(relationships,relObjectAtIndexIMP,iRelationship);
|
||||
|
||||
if ([relationship isToManyToOne])
|
||||
{
|
||||
|
@ -2583,7 +2583,7 @@ forDatabaseOperation:(EODatabaseOperation *)op
|
|||
EORelationship *substitutionRelationship = nil;
|
||||
|
||||
EORelationship *relationship =
|
||||
GDL2ObjectAtIndexWithImp(relationships,relObjectAtIndexIMP,iRelationship);
|
||||
GDL2_ObjectAtIndexWithImp(relationships,relObjectAtIndexIMP,iRelationship);
|
||||
|
||||
/*
|
||||
get rel entity
|
||||
|
@ -2753,7 +2753,7 @@ forDatabaseOperation:(EODatabaseOperation *)op
|
|||
iValue < newValuesCount;
|
||||
iValue++)
|
||||
{
|
||||
id aValue = GDL2ObjectAtIndexWithImp(relationshipSnapshotValue,svObjectAtIndexIMP,iValue);
|
||||
id aValue = GDL2_ObjectAtIndexWithImp(relationshipSnapshotValue,svObjectAtIndexIMP,iValue);
|
||||
EOGlobalID *aValueGID = EODatabaseContext_globalIDForObjectWithImpPtr(self,&selfGIDFO,aValue);
|
||||
|
||||
NSDebugMLLog(@"EODatabaseContext",
|
||||
|
@ -2762,7 +2762,7 @@ forDatabaseOperation:(EODatabaseOperation *)op
|
|||
NSDebugMLLog(@"EODatabaseContext",
|
||||
@"YYYY aValueGID=%@",
|
||||
aValueGID);
|
||||
GDL2AddObjectWithImp(valuesGIDs,valuesGIDsAddObjectIMP,aValueGID);
|
||||
GDL2_AddObjectWithImp(valuesGIDs,valuesGIDsAddObjectIMP,aValueGID);
|
||||
}
|
||||
|
||||
[dbOpe recordToManySnapshot:valuesGIDs
|
||||
|
@ -3733,9 +3733,9 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
|
||||
for (i = 0 ;i < destinationKeysCount; i++)
|
||||
{
|
||||
id destinationKey = GDL2ObjectAtIndexWithImp(destinationKeys,oaiIMP,i);
|
||||
id destinationKey = GDL2_ObjectAtIndexWithImp(destinationKeys,oaiIMP,i);
|
||||
|
||||
[changes setObject: GDL2EONull
|
||||
[changes setObject: GDL2_EONull
|
||||
forKey: destinationKey];
|
||||
}
|
||||
}
|
||||
|
@ -3779,7 +3779,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
|
||||
for (i = 0; i < destinationObjectsCount; i++)
|
||||
{
|
||||
id object = GDL2ObjectAtIndexWithImp(destinationObjects,oaiIMP,i);
|
||||
id object = GDL2_ObjectAtIndexWithImp(destinationObjects,oaiIMP,i);
|
||||
|
||||
NSDebugMLLog(@"EODatabaseContext",
|
||||
@"destinationObject %p=%@ (class %@)",
|
||||
|
@ -3816,7 +3816,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
|
||||
for (i = 0; i < destinationObjectsCount; i++)
|
||||
{
|
||||
id object = GDL2ObjectAtIndexWithImp(destinationObjects,oaiIMP,i);
|
||||
id object = GDL2_ObjectAtIndexWithImp(destinationObjects,oaiIMP,i);
|
||||
|
||||
NSDebugMLLog(@"EODatabaseContext",
|
||||
@"destinationObject %p=%@ (class %@)",
|
||||
|
@ -3903,8 +3903,8 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
NSString *sourceKey = GDL2ObjectAtIndexWithImp(sourceKeys,srcObjectAIndexIMP,i);
|
||||
NSString *destKey = GDL2ObjectAtIndexWithImp(destinationKeys,dstObjectAIndexIMP,i);
|
||||
NSString *sourceKey = GDL2_ObjectAtIndexWithImp(sourceKeys,srcObjectAIndexIMP,i);
|
||||
NSString *destKey = GDL2_ObjectAtIndexWithImp(destinationKeys,dstObjectAIndexIMP,i);
|
||||
id sourceValue = [relayedValues objectForKey: sourceKey];
|
||||
|
||||
NSDebugMLLog(@"EODatabaseContext", @"sourceKey=%@", sourceKey);
|
||||
|
@ -3959,8 +3959,8 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
NSString *sourceKey = GDL2ObjectAtIndexWithImp(sourceKeys,srcObjectAIndexIMP,i);
|
||||
NSString *destinationKey = GDL2ObjectAtIndexWithImp(destinationKeys,dstObjectAIndexIMP,i);
|
||||
NSString *sourceKey = GDL2_ObjectAtIndexWithImp(sourceKeys,srcObjectAIndexIMP,i);
|
||||
NSString *destinationKey = GDL2_ObjectAtIndexWithImp(destinationKeys,dstObjectAIndexIMP,i);
|
||||
id destinationValue = [destinationValues
|
||||
objectForKey: destinationKey];
|
||||
|
||||
|
@ -4012,7 +4012,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
[[join destinationAttribute] name]];
|
||||
|
||||
if (value == nil)
|
||||
value = GDL2EONull;
|
||||
value = GDL2_EONull;
|
||||
|
||||
[row setObject:value
|
||||
forKey:[[join sourceAttribute] name]];
|
||||
|
@ -4057,7 +4057,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
[[join destinationAttribute] name]];
|
||||
|
||||
if (value == nil)
|
||||
value = GDL2EONull;
|
||||
value = GDL2_EONull;
|
||||
|
||||
[row setObject:value
|
||||
forKey:[[join sourceAttribute] name]];
|
||||
|
@ -4228,7 +4228,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
for (i = 0; i < propNamesCount; i++)
|
||||
{
|
||||
id value = nil;
|
||||
NSString *key = GDL2ObjectAtIndexWithImp(classPropertyNames,oaiIMP,i);
|
||||
NSString *key = GDL2_ObjectAtIndexWithImp(classPropertyNames,oaiIMP,i);
|
||||
|
||||
NSDebugMLLog(@"EODatabaseContext", @"key=%@", key);
|
||||
|
||||
|
@ -4243,7 +4243,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
|
||||
if (!value)
|
||||
{
|
||||
value = GDL2EONull;
|
||||
value = GDL2_EONull;
|
||||
|
||||
[[[entity attributeNamed: key] validateValue: &value]
|
||||
raise];
|
||||
|
@ -4274,7 +4274,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
IMP oaiIMP=[dbSnapshotKeys methodForSelector: @selector(objectAtIndex:)];
|
||||
for (i = 0; i < snapKeyCount; i++)
|
||||
{
|
||||
id key = GDL2ObjectAtIndexWithImp(dbSnapshotKeys,oaiIMP,i);
|
||||
id key = GDL2_ObjectAtIndexWithImp(dbSnapshotKeys,oaiIMP,i);
|
||||
id value = [row objectForKey: key]; //Really this key ?
|
||||
|
||||
NSDebugMLLog(@"EODatabaseContext", @"key=%@ value=%@",
|
||||
|
@ -4351,7 +4351,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
IMP oaiIMP=[values methodForSelector: @selector(objectAtIndex:)];
|
||||
|
||||
for (i = 0; nullPKValues && i < count; i++)
|
||||
nullPKValues = _isNilOrEONull(GDL2ObjectAtIndexWithImp(values,oaiIMP,i));
|
||||
nullPKValues = _isNilOrEONull(GDL2_ObjectAtIndexWithImp(values,oaiIMP,i));
|
||||
};
|
||||
|
||||
NSDebugMLLog(@"EODatabaseContext", @"nullPKValues=%s",
|
||||
|
@ -4407,7 +4407,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
EORelationship *relationship = GDL2ObjectAtIndexWithImp(relationships,oaiIMP,i);
|
||||
EORelationship *relationship = GDL2_ObjectAtIndexWithImp(relationships,oaiIMP,i);
|
||||
EORelationship *substRelationship = nil;
|
||||
BOOL propagatesPrimaryKey = NO;
|
||||
|
||||
|
@ -4466,7 +4466,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
iValueValue < valueValuesCount;
|
||||
iValueValue++)
|
||||
{
|
||||
id valueValue = GDL2ObjectAtIndexWithImp(value,vObjectAtIndexIMP,iValueValue);
|
||||
id valueValue = GDL2_ObjectAtIndexWithImp(value,vObjectAtIndexIMP,iValueValue);
|
||||
|
||||
NSDebugMLLog(@"EODatabaseContext",
|
||||
@"valueValue=%@", valueValue);
|
||||
|
@ -4756,7 +4756,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
}
|
||||
|
||||
if (val == nil)
|
||||
val = GDL2EONull;
|
||||
val = GDL2_EONull;
|
||||
|
||||
[newKeys addObject:key];
|
||||
[newVals addObject:val];
|
||||
|
@ -4855,13 +4855,13 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
for (i = 0; i < count; i++)
|
||||
{
|
||||
EOAttribute *attribute =
|
||||
GDL2ObjectAtIndexWithImp(attributesToSave,attributesToSaveObjectAtIndexIMP,i);
|
||||
GDL2_ObjectAtIndexWithImp(attributesToSave,attributesToSaveObjectAtIndexIMP,i);
|
||||
|
||||
NSDebugMLLog(@"EODatabaseContext", @"attribute=%@", attribute);
|
||||
|
||||
if (![attribute isFlattened] && ![attribute isDerived]) //VERIFY
|
||||
{
|
||||
GDL2AddObjectWithImp(attributes,attributesAddObjectIMP,attribute);
|
||||
GDL2_AddObjectWithImp(attributes,attributesAddObjectIMP,attribute);
|
||||
|
||||
if ([rowDiffs objectForKey: [attribute name]]
|
||||
&& [attribute isReadOnly])
|
||||
|
@ -4920,7 +4920,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
EOAdaptorOperation *adaptorOpe = GDL2ObjectAtIndexWithImp(dbOpeAdaptorOperations,oaiIMP,i);
|
||||
EOAdaptorOperation *adaptorOpe = GDL2_ObjectAtIndexWithImp(dbOpeAdaptorOperations,oaiIMP,i);
|
||||
EOEntity *entity = nil;
|
||||
|
||||
NSDebugMLLog(@"EODatabaseContext", @"adaptorOpe=%@",
|
||||
|
@ -4955,13 +4955,13 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
|
||||
for (iEntity = 0; iEntity < entitiesCount; iEntity++)
|
||||
{
|
||||
EOEntity *entity = GDL2ObjectAtIndexWithImp(entityNameOrderingArray,entityObjectAtIndexIMP,iEntity);
|
||||
EOEntity *entity = GDL2_ObjectAtIndexWithImp(entityNameOrderingArray,entityObjectAtIndexIMP,iEntity);
|
||||
|
||||
NSDebugMLLog(@"EODatabaseContext", @"entity=%@", [entity name]);
|
||||
|
||||
for (iAdaptoOpe = 0; iAdaptoOpe < adaptorOpeCount; iAdaptoOpe++)
|
||||
{
|
||||
EOAdaptorOperation *adaptorOpe = GDL2ObjectAtIndexWithImp(adaptorOperations,opeObjectAtIndexIMP,iAdaptoOpe);
|
||||
EOAdaptorOperation *adaptorOpe = GDL2_ObjectAtIndexWithImp(adaptorOperations,opeObjectAtIndexIMP,iAdaptoOpe);
|
||||
EOEntity *opeEntity = [adaptorOpe entity];
|
||||
|
||||
if (opeEntity == entity)
|
||||
|
@ -5000,7 +5000,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
EORelationship *relationship = GDL2ObjectAtIndexWithImp(relationships,oaiIMP,i);
|
||||
EORelationship *relationship = GDL2_ObjectAtIndexWithImp(relationships,oaiIMP,i);
|
||||
|
||||
NSDebugMLLog(@"EODatabaseContext", @"relationship=%@", relationship);
|
||||
|
||||
|
@ -5085,7 +5085,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
for (i = 0; i < count; i++)
|
||||
{
|
||||
//OK
|
||||
EOEntity *entity=GDL2ObjectAtIndexWithImp(entities,oaiIMP,i);
|
||||
EOEntity *entity=GDL2_ObjectAtIndexWithImp(entities,oaiIMP,i);
|
||||
NSArray *dependsEntities = [self
|
||||
entitiesOnWhichThisEntityDepends: entity];
|
||||
|
||||
|
@ -5097,7 +5097,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
ordering = [NSMutableArray array];
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
EOEntity *entity=GDL2ObjectAtIndexWithImp(entities,oaiIMP,i);
|
||||
EOEntity *entity=GDL2_ObjectAtIndexWithImp(entities,oaiIMP,i);
|
||||
[self insertEntity: entity
|
||||
intoOrderingArray: ordering
|
||||
withDependencies: dependsDict
|
||||
|
@ -5165,7 +5165,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
id attribute = GDL2ObjectAtIndexWithImp(attributes,oaiIMP,i);
|
||||
id attribute = GDL2_ObjectAtIndexWithImp(attributes,oaiIMP,i);
|
||||
|
||||
if (!entity)
|
||||
{
|
||||
|
@ -5210,7 +5210,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
id attribute = GDL2ObjectAtIndexWithImp(attributes,oaiIMP,i);
|
||||
id attribute = GDL2_ObjectAtIndexWithImp(attributes,oaiIMP,i);
|
||||
//do this on 1st only
|
||||
BOOL isFlattened = [attribute isFlattened];
|
||||
|
||||
|
@ -5252,7 +5252,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
id attribute = GDL2ObjectAtIndexWithImp(attributes,oaiIMP,i);
|
||||
id attribute = GDL2_ObjectAtIndexWithImp(attributes,oaiIMP,i);
|
||||
BOOL isFlattened = [attribute isFlattened];
|
||||
|
||||
//call isFlattened on 1st only
|
||||
|
@ -5305,7 +5305,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
EOAttribute *attribute = GDL2ObjectAtIndexWithImp(array,oaiIMP,i);
|
||||
EOAttribute *attribute = GDL2_ObjectAtIndexWithImp(array,oaiIMP,i);
|
||||
|
||||
NSDebugMLLog(@"EODatabaseContext", @"attribute=%@", attribute);
|
||||
|
||||
|
@ -5411,7 +5411,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
|
||||
attrNameEnum = [newRow keyEnumerator];
|
||||
enumNO=NULL;
|
||||
while ((attrName = GDL2NextObjectWithImpPtr(attrNameEnum,&enumNO)))
|
||||
while ((attrName = GDL2_NextObjectWithImpPtr(attrNameEnum,&enumNO)))
|
||||
{
|
||||
EOAttribute *attribute = [entity attributeNamed: attrName];
|
||||
id newRowValue = nil;
|
||||
|
@ -5474,7 +5474,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
EOAttribute *attribute = GDL2ObjectAtIndexWithImp(attributes,oaiIMP,i);
|
||||
EOAttribute *attribute = GDL2_ObjectAtIndexWithImp(attributes,oaiIMP,i);
|
||||
BOOL isReadOnly = [attribute isReadOnly];
|
||||
|
||||
NSDebugMLLog(@"EODatabaseContext", @"attribute=%@", attribute);
|
||||
|
@ -5543,31 +5543,33 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
IMP objsEnumNO=NULL;
|
||||
IMP objectsOAI=NULL;
|
||||
|
||||
qualifierArray = GDL2MutableArray();
|
||||
valuesArray = GDL2MutableArray();
|
||||
toManySnapshotArray = GDL2MutableArray();
|
||||
qualifierArray = AUTORELEASE([GDL2_alloc(NSMutableArray) init]);
|
||||
valuesArray = AUTORELEASE([GDL2_alloc(NSMutableArray) init]);
|
||||
toManySnapshotArray = AUTORELEASE([GDL2_alloc(NSMutableArray) init]);
|
||||
toManySnapArrayObjectAtIndexIMP=[toManySnapshotArray methodForSelector: @selector(objectAtIndex:)];
|
||||
relationshipName = [relationship name];
|
||||
|
||||
objsEnum = [objects objectEnumerator];
|
||||
objsEnumNO=NULL;
|
||||
while ((object = GDL2NextObjectWithImpPtr(objsEnum,&objsEnumNO)))
|
||||
while ((object = GDL2_NextObjectWithImpPtr(objsEnum,&objsEnumNO)))
|
||||
{
|
||||
IMP joinsEnumNO=NO;
|
||||
values = GDL2MutableDictionaryWithCapacity(4);
|
||||
values
|
||||
= AUTORELEASE([GDL2_alloc(NSMutableDictionary) initWithCapacity: 4]);
|
||||
|
||||
fault = [object valueForKey: relationshipName];
|
||||
[EOFault clearFault: fault];
|
||||
|
||||
joinsEnum = [[relationship joins] objectEnumerator];
|
||||
while ((join = GDL2NextObjectWithImpPtr(joinsEnum,&joinsEnumNO)))
|
||||
while ((join = GDL2_NextObjectWithImpPtr(joinsEnum,&joinsEnumNO)))
|
||||
{
|
||||
[values setObject: [object valueForKey: [[join sourceAttribute] name]]
|
||||
forKey: [[join destinationAttribute] name]];
|
||||
}
|
||||
|
||||
[valuesArray addObject: values];
|
||||
[toManySnapshotArray addObject: GDL2MutableArray()];
|
||||
[toManySnapshotArray addObject:
|
||||
AUTORELEASE([GDL2_alloc(NSMutableArray) init])];
|
||||
|
||||
[qualifierArray addObject: [EOQualifier qualifierToMatchAllValues:
|
||||
values]];
|
||||
|
@ -5594,7 +5596,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
|
||||
objsEnum = [array objectEnumerator];
|
||||
objsEnumNO=NULL;
|
||||
while ((object = GDL2NextObjectWithImpPtr(objsEnum,&objsEnumNO)))
|
||||
while ((object = GDL2_NextObjectWithImpPtr(objsEnum,&objsEnumNO)))
|
||||
{
|
||||
IMP objectVFK=NULL; // valueForKey:
|
||||
for (i = 0; i < count; i++)
|
||||
|
@ -5602,13 +5604,13 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
IMP keyEnumNO=NULL; // nextObject
|
||||
IMP valuesOFK=NULL; // objectForKey:
|
||||
equal = YES;
|
||||
values = GDL2ObjectAtIndexWithImp(valuesArray,oaiIMP,i);
|
||||
values = GDL2_ObjectAtIndexWithImp(valuesArray,oaiIMP,i);
|
||||
|
||||
keyEnum = [values keyEnumerator];
|
||||
while ((key = GDL2NextObjectWithImpPtr(keyEnum,&keyEnumNO)))
|
||||
while ((key = GDL2_NextObjectWithImpPtr(keyEnum,&keyEnumNO)))
|
||||
{
|
||||
if ([GDL2ValueForKeyWithImpPtr(object,&objectVFK,key)
|
||||
isEqual: GDL2ObjectForKeyWithImpPtr(values,&valuesOFK,key)] == NO)
|
||||
if ([GDL2_ValueForKeyWithImpPtr(object,&objectVFK,key)
|
||||
isEqual: GDL2_ObjectForKeyWithImpPtr(values,&valuesOFK,key)] == NO)
|
||||
{
|
||||
equal = NO;
|
||||
break;
|
||||
|
@ -5618,9 +5620,9 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
if (equal == YES)
|
||||
{
|
||||
EOGlobalID* gid = nil;
|
||||
id snapshot = GDL2ObjectAtIndexWithImp(toManySnapshotArray,toManySnapArrayObjectAtIndexIMP,i);
|
||||
id snapshot = GDL2_ObjectAtIndexWithImp(toManySnapshotArray,toManySnapArrayObjectAtIndexIMP,i);
|
||||
|
||||
[[GDL2ObjectAtIndexWithImpPtr(objects,&objectsOAI,i) valueForKey: relationshipName]
|
||||
[[GDL2_ObjectAtIndexWithImpPtr(objects,&objectsOAI,i) valueForKey: relationshipName]
|
||||
addObject: object];
|
||||
|
||||
gid=EOEditingContext_globalIDForObjectWithImpPtr(editingContext,&globalIDForObjectIMP,object);
|
||||
|
@ -5639,10 +5641,10 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
{
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
id snapshot = GDL2ObjectAtIndexWithImp(toManySnapshotArray,toManySnapArrayObjectAtIndexIMP,i);
|
||||
id snapshot = GDL2_ObjectAtIndexWithImp(toManySnapshotArray,toManySnapArrayObjectAtIndexIMP,i);
|
||||
EOGlobalID* gid=EOEditingContext_globalIDForObjectWithImpPtr(editingContext,
|
||||
&globalIDForObjectIMP,
|
||||
GDL2ObjectAtIndexWithImpPtr(objects,&objectsOAI,i));
|
||||
GDL2_ObjectAtIndexWithImpPtr(objects,&objectsOAI,i));
|
||||
[_database recordSnapshot: snapshot
|
||||
forSourceGlobalID: gid
|
||||
relationshipName: relationshipName];
|
||||
|
@ -6289,7 +6291,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
|
||||
for (i = 0; !snapshot && i < snapshotsDictCount; i++)
|
||||
{
|
||||
NSDictionary *snapshots = GDL2ObjectAtIndexWithImp(_uniqueStack,oaiIMP,i);
|
||||
NSDictionary *snapshots = GDL2_ObjectAtIndexWithImp(_uniqueStack,oaiIMP,i);
|
||||
snapshot = [snapshots objectForKey: gid];
|
||||
}
|
||||
};
|
||||
|
@ -6357,7 +6359,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
|
||||
for (i=0; i<n; i++)
|
||||
{
|
||||
snapshots = GDL2ObjectAtIndexWithImp(_uniqueStack,oaiIMP,i);
|
||||
snapshots = GDL2_ObjectAtIndexWithImp(_uniqueStack,oaiIMP,i);
|
||||
[snapshots removeObjectsForKeys: gids];
|
||||
}
|
||||
};
|
||||
|
@ -6369,7 +6371,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
|
||||
for (i=0; i<n; i++)
|
||||
{
|
||||
snapshots = GDL2ObjectAtIndexWithImp(_uniqueArrayStack,oaiIMP,i);
|
||||
snapshots = GDL2_ObjectAtIndexWithImp(_uniqueArrayStack,oaiIMP,i);
|
||||
[snapshots removeObjectsForKeys: gids];
|
||||
}
|
||||
};
|
||||
|
@ -6380,7 +6382,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
IMP oaiIMP=[_deleteStack methodForSelector: @selector(objectAtIndex:)];
|
||||
for (i=0; i<n; i++)
|
||||
{
|
||||
snapshots = GDL2ObjectAtIndexWithImp(_deleteStack,oaiIMP,i);
|
||||
snapshots = GDL2_ObjectAtIndexWithImp(_deleteStack,oaiIMP,i);
|
||||
[snapshots removeObjectsForKeys: gids];
|
||||
}
|
||||
};
|
||||
|
@ -6420,7 +6422,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
id key = GDL2ObjectAtIndexWithImp(keys,oaiIMP,i);
|
||||
id key = GDL2_ObjectAtIndexWithImp(keys,oaiIMP,i);
|
||||
NSDictionary *snapshotsDict = [snapshots objectForKey: key];
|
||||
NSMutableDictionary *currentSnapshotsDict =
|
||||
[toManySnapshots objectForKey: key];
|
||||
|
@ -6501,13 +6503,13 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
id key = GDL2ObjectAtIndexWithImp(classPropertyAttributeNames,oaiIMP,i);
|
||||
id key = GDL2_ObjectAtIndexWithImp(classPropertyAttributeNames,oaiIMP,i);
|
||||
id value = nil;
|
||||
|
||||
NSDebugMLLog(@"EODatabaseContext", @"key=%@", key);
|
||||
value = EOMKKD_objectForKeyWithImpPtr(row,&rowObjectForKeyIMP,key);
|
||||
|
||||
if (value == GDL2EONull)
|
||||
if (value == GDL2_EONull)
|
||||
value = nil;
|
||||
|
||||
NSDebugMLLog(@"EODatabaseContext", @"value (%p)",
|
||||
|
@ -6515,7 +6517,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
NSDebugMLLog(@"EODatabaseContext", @"value (%p)=%@ (class: %@)",
|
||||
value, value, [value class]);
|
||||
|
||||
GDL2TakeStoredValueForKeyWithImp(object,objectTakeStoredValueForKeyIMP,
|
||||
GDL2_TakeStoredValueForKeyWithImp(object,objectTakeStoredValueForKeyIMP,
|
||||
value,key);
|
||||
}
|
||||
};
|
||||
|
@ -6542,7 +6544,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
for (i = 0; i < count; i++)
|
||||
{
|
||||
id relObject = nil;
|
||||
EORelationship *relationship = GDL2ObjectAtIndexWithImp(relationships,oaiIMP,i);
|
||||
EORelationship *relationship = GDL2_ObjectAtIndexWithImp(relationships,oaiIMP,i);
|
||||
NSString *relName = [relationship name];
|
||||
|
||||
NSDebugMLLog(@"EODatabaseContext", @"relationship=%@", relationship);
|
||||
|
@ -6578,7 +6580,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
row, foreignKeyForSourceRow);
|
||||
|
||||
if (![foreignKeyForSourceRow
|
||||
containsObjectsNotIdenticalTo: GDL2EONull])
|
||||
containsObjectsNotIdenticalTo: GDL2_EONull])
|
||||
{
|
||||
NSLog(@"foreignKeyForSourceRow=%@",foreignKeyForSourceRow);
|
||||
NSEmitTODO();//TODO: what to do if rel is mandatory ?
|
||||
|
@ -6652,7 +6654,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
|
||||
NSDebugMLLog(@"EODatabaseContext", @"TakeStoredValue");
|
||||
|
||||
GDL2TakeStoredValueForKeyWithImp(object,objectTakeStoredValueForKeyIMP,
|
||||
GDL2_TakeStoredValueForKeyWithImp(object,objectTakeStoredValueForKeyIMP,
|
||||
relObject,relName);
|
||||
}
|
||||
};
|
||||
|
@ -6684,7 +6686,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
|
||||
for (i=0; i<n; i++)
|
||||
{
|
||||
gid = GDL2ObjectAtIndexWithImp(gids,oaiIMP,i);
|
||||
gid = GDL2_ObjectAtIndexWithImp(gids,oaiIMP,i);
|
||||
NSHashRemove(_lockedObjects, gid);
|
||||
}
|
||||
};
|
||||
|
@ -6946,7 +6948,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
= [NSMutableDictionary dictionaryWithDictionary: pk];//revoir
|
||||
id key = nil;
|
||||
|
||||
while ((key = GDL2NextObjectWithImpPtr(pk2Enum,&pk2EnumNO)))
|
||||
while ((key = GDL2_NextObjectWithImpPtr(pk2Enum,&pk2EnumNO)))
|
||||
{
|
||||
[realPK setObject: [pk2 objectForKey: key]
|
||||
forKey: key];
|
||||
|
@ -7091,7 +7093,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
{
|
||||
EORelationship *inverseRelationship = nil;
|
||||
|
||||
EORelationship *relationship = GDL2ObjectAtIndexWithImp(relationships,oaiIMP,i);
|
||||
EORelationship *relationship = GDL2_ObjectAtIndexWithImp(relationships,oaiIMP,i);
|
||||
NSDebugMLLog(@"EODatabaseContext", @"relationship=%@",
|
||||
relationship);
|
||||
|
||||
|
@ -7208,7 +7210,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
id object = GDL2ObjectAtIndexWithImp(objects[which],oaiIMP,i);
|
||||
id object = GDL2_ObjectAtIndexWithImp(objects[which],oaiIMP,i);
|
||||
EOEntity *entity = [_database entityForObject: object];
|
||||
|
||||
NSDebugMLLog(@"EODatabaseContext",
|
||||
|
@ -7244,7 +7246,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
iRelationship < relationshipsCount;
|
||||
iRelationship++)
|
||||
{
|
||||
EORelationship *relationship = GDL2ObjectAtIndexWithImp(relationships,relObjectAtIndexIMP,iRelationship);
|
||||
EORelationship *relationship = GDL2_ObjectAtIndexWithImp(relationships,relObjectAtIndexIMP,iRelationship);
|
||||
NSDebugMLLog(@"EODatabaseContext",
|
||||
@"test entity: %@ relationship=%@",
|
||||
[entity name],
|
||||
|
@ -7277,7 +7279,7 @@ Raises an exception is the adaptor is unable to perform the operations.
|
|||
for (i = 0; i < count; i++)
|
||||
{
|
||||
if ([pkAttrs containsObject:
|
||||
GDL2ObjectAtIndexWithImp(destAttrs,destAttrsObjectAtIndexIMP,i)])
|
||||
GDL2_ObjectAtIndexWithImp(destAttrs,destAttrsObjectAtIndexIMP,i)])
|
||||
destPK = YES;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1173,7 +1173,7 @@ NSString *EONextPrimaryKeyProcedureOperation = @"EONextPrimaryKeyProcedureOperat
|
|||
IMP enumNO=NULL;
|
||||
attrEnum = [[self primaryKeyAttributes] objectEnumerator];
|
||||
|
||||
while ((attr = GDL2NextObjectWithImpPtr(attrEnum,&enumNO)))
|
||||
while ((attr = GDL2_NextObjectWithImpPtr(attrEnum,&enumNO)))
|
||||
{
|
||||
if ([[attr name] isEqual: attributeName])
|
||||
return attr;
|
||||
|
@ -1370,7 +1370,7 @@ NSString *EONextPrimaryKeyProcedureOperation = @"EONextPrimaryKeyProcedureOperat
|
|||
|
||||
relEnum = [_hiddenRelationships objectEnumerator];
|
||||
|
||||
while (!rel && (tmpRel = GDL2NextObjectWithImpPtr(relEnum,&enumNO)))
|
||||
while (!rel && (tmpRel = GDL2_NextObjectWithImpPtr(relEnum,&enumNO)))
|
||||
{
|
||||
if ([[tmpRel name] isEqual: relationshipNamed])
|
||||
rel = tmpRel;
|
||||
|
@ -1647,7 +1647,8 @@ NSString *EONextPrimaryKeyProcedureOperation = @"EONextPrimaryKeyProcedureOperat
|
|||
else
|
||||
{
|
||||
//Seems OK
|
||||
NSMutableArray *array = GDL2MutableArrayWithCapacity(count);
|
||||
NSMutableArray *array
|
||||
= AUTORELEASE([GDL2_alloc(NSMutableArray) initWithCapacity: count]);
|
||||
IMP pkanOAI=NULL;
|
||||
IMP rowOFK=NULL;
|
||||
IMP arrayAO=NULL;
|
||||
|
@ -1655,10 +1656,10 @@ NSString *EONextPrimaryKeyProcedureOperation = @"EONextPrimaryKeyProcedureOperat
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
NSString *key = GDL2ObjectAtIndexWithImpPtr(primaryKeyAttributeNames,&pkanOAI,i);
|
||||
id value = GDL2ObjectForKeyWithImpPtr(row,&rowOFK,key);
|
||||
NSString *key = GDL2_ObjectAtIndexWithImpPtr(primaryKeyAttributeNames,&pkanOAI,i);
|
||||
id value = GDL2_ObjectForKeyWithImpPtr(row,&rowOFK,key);
|
||||
|
||||
GDL2AddObjectWithImpPtr(array,&arrayAO,
|
||||
GDL2_AddObjectWithImpPtr(array,&arrayAO,
|
||||
[EOKeyValueQualifier qualifierWithKey: key
|
||||
operatorSelector:
|
||||
EOQualifierOperatorEqual
|
||||
|
@ -1707,14 +1708,14 @@ NSString *EONextPrimaryKeyProcedureOperation = @"EONextPrimaryKeyProcedureOperat
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
EOAttribute *attr = GDL2ObjectAtIndexWithImpPtr(primaryKeyAttributes,&pkaOAI,i);
|
||||
EOAttribute *attr = GDL2_ObjectAtIndexWithImpPtr(primaryKeyAttributes,&pkaOAI,i);
|
||||
NSString* attrName = [attr name];
|
||||
id value = GDL2ObjectForKeyWithImpPtr(row,&rowOFK,attrName);
|
||||
id value = GDL2_ObjectForKeyWithImpPtr(row,&rowOFK,attrName);
|
||||
|
||||
if (!value)
|
||||
value = GDL2EONull;
|
||||
value = GDL2_EONull;
|
||||
|
||||
GDL2SetObjectForKeyWithImpPtr(dict,&dictSOFK,value,attrName);
|
||||
GDL2_SetObjectForKeyWithImpPtr(dict,&dictSOFK,value,attrName);
|
||||
}
|
||||
|
||||
return dict;
|
||||
|
@ -1722,7 +1723,7 @@ NSString *EONextPrimaryKeyProcedureOperation = @"EONextPrimaryKeyProcedureOperat
|
|||
|
||||
- (BOOL)isValidAttributeUsedForLocking: (EOAttribute *)anAttribute
|
||||
{
|
||||
if (!([anAttribute isKindOfClass: GDL2EOAttributeClass]
|
||||
if (!([anAttribute isKindOfClass: GDL2_EOAttributeClass]
|
||||
&& [[self attributesByName] objectForKey: [anAttribute name]]))
|
||||
return NO;
|
||||
|
||||
|
@ -1734,7 +1735,7 @@ NSString *EONextPrimaryKeyProcedureOperation = @"EONextPrimaryKeyProcedureOperat
|
|||
|
||||
- (BOOL)isValidPrimaryKeyAttribute: (EOAttribute *)anAttribute
|
||||
{
|
||||
if (!([anAttribute isKindOfClass: GDL2EOAttributeClass]
|
||||
if (!([anAttribute isKindOfClass: GDL2_EOAttributeClass]
|
||||
&& [[self attributesByName] objectForKey: [anAttribute name]]))
|
||||
return NO;
|
||||
|
||||
|
@ -1759,11 +1760,11 @@ NSString *EONextPrimaryKeyProcedureOperation = @"EONextPrimaryKeyProcedureOperat
|
|||
|
||||
for (i = 0; isValid && i < count; i++)
|
||||
{
|
||||
key = GDL2ObjectAtIndexWithImpPtr(primaryKeyAttributeNames,&pkanOAI,i);
|
||||
key = GDL2_ObjectAtIndexWithImpPtr(primaryKeyAttributeNames,&pkanOAI,i);
|
||||
|
||||
NS_DURING
|
||||
{
|
||||
value = GDL2ValueForKeyWithImpPtr(object,&objectVFK,key);
|
||||
value = GDL2_ValueForKeyWithImpPtr(object,&objectVFK,key);
|
||||
if (_isNilOrEONull(value))
|
||||
isValid = NO;
|
||||
}
|
||||
|
@ -1781,7 +1782,7 @@ NSString *EONextPrimaryKeyProcedureOperation = @"EONextPrimaryKeyProcedureOperat
|
|||
{
|
||||
id thePropertyName;
|
||||
|
||||
if (!([aProperty isKindOfClass: GDL2EOAttributeClass]
|
||||
if (!([aProperty isKindOfClass: GDL2_EOAttributeClass]
|
||||
|| [aProperty isKindOfClass: [EORelationship class]]))
|
||||
return NO;
|
||||
|
||||
|
@ -1871,9 +1872,9 @@ createInstanceWithEditingContext:globalID:zone:
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
id key = GDL2ObjectAtIndexWithImpPtr(primaryKeyAttributeNames,&pkanOAI,i);
|
||||
id key = GDL2_ObjectAtIndexWithImpPtr(primaryKeyAttributeNames,&pkanOAI,i);
|
||||
|
||||
GDL2SetObjectForKeyWithImpPtr(dictionaryForPrimaryKey,&dfpkSOFK,
|
||||
GDL2_SetObjectForKeyWithImpPtr(dictionaryForPrimaryKey,&dfpkSOFK,
|
||||
gidkeyValues[i],key);
|
||||
}
|
||||
}
|
||||
|
@ -2319,7 +2320,7 @@ createInstanceWithEditingContext:globalID:zone:
|
|||
|
||||
enumerator = [[self attributes] objectEnumerator];
|
||||
enumNO=NULL;
|
||||
while ((attr = GDL2NextObjectWithImpPtr(enumerator,&enumNO)))
|
||||
while ((attr = GDL2_NextObjectWithImpPtr(enumerator,&enumNO)))
|
||||
{
|
||||
if ([attr isFlattened] && [[attr realAttribute] isEqual: property])
|
||||
return YES;
|
||||
|
@ -2327,7 +2328,7 @@ createInstanceWithEditingContext:globalID:zone:
|
|||
|
||||
enumerator = [[self relationships] objectEnumerator];
|
||||
enumNO=NULL;
|
||||
while ((rel = GDL2NextObjectWithImpPtr(enumerator,&enumNO)))
|
||||
while ((rel = GDL2_NextObjectWithImpPtr(enumerator,&enumNO)))
|
||||
{
|
||||
if ([rel referencesProperty: property])
|
||||
return YES;
|
||||
|
@ -2648,18 +2649,19 @@ createInstanceWithEditingContext:globalID:zone:
|
|||
{
|
||||
NSArray *array = [self attributesUsedForLocking];
|
||||
int i, n = [array count];
|
||||
NSMutableDictionary *dict = GDL2MutableDictionaryWithCapacity(n);
|
||||
NSMutableDictionary *dict
|
||||
= AUTORELEASE([GDL2_alloc(NSMutableDictionary) initWithCapacity: n]);
|
||||
IMP arrayOAI=NULL;
|
||||
IMP dictSOFK=NULL;
|
||||
IMP aRowOFK=NULL;
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
id key = [(EOAttribute *)GDL2ObjectAtIndexWithImpPtr(array,&arrayOAI,i)
|
||||
id key = [(EOAttribute *)GDL2_ObjectAtIndexWithImpPtr(array,&arrayOAI,i)
|
||||
name];
|
||||
|
||||
GDL2SetObjectForKeyWithImpPtr(dict,&dictSOFK,
|
||||
GDL2ObjectForKeyWithImpPtr(aRow,&aRowOFK,key),
|
||||
GDL2_SetObjectForKeyWithImpPtr(dict,&dictSOFK,
|
||||
GDL2_ObjectForKeyWithImpPtr(aRow,&aRowOFK,key),
|
||||
key);
|
||||
}
|
||||
|
||||
|
@ -2725,8 +2727,8 @@ createInstanceWithEditingContext:globalID:zone:
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
keyArray[i] = GDL2ObjectForKeyWithImpPtr(row,&rowOFK,
|
||||
GDL2ObjectAtIndexWithImpPtr(primaryKeyAttributeNames,
|
||||
keyArray[i] = GDL2_ObjectForKeyWithImpPtr(row,&rowOFK,
|
||||
GDL2_ObjectAtIndexWithImpPtr(primaryKeyAttributeNames,
|
||||
&pkanOAI,i));
|
||||
|
||||
globalID = [EOKeyGlobalID globalIDWithEntityName: [self name]
|
||||
|
@ -2960,7 +2962,8 @@ createInstanceWithEditingContext:globalID:zone:
|
|||
int i, count = [attributesToFetch count];
|
||||
IMP atfOAI=NULL;
|
||||
IMP sAO=NULL;
|
||||
NSMutableArray* tmpArray=GDL2MutableArrayWithCapacity(count);
|
||||
NSMutableArray* tmpArray
|
||||
= AUTORELEASE([GDL2_alloc(NSMutableArray) initWithCapacity: count]);
|
||||
|
||||
NSAssert3(!attributesToFetch
|
||||
|| [attributesToFetch isKindOfClass: [NSArray class]],
|
||||
|
@ -2971,15 +2974,15 @@ createInstanceWithEditingContext:globalID:zone:
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
EOAttribute *attribute = GDL2ObjectAtIndexWithImpPtr(attributesToFetch,&atfOAI,i);
|
||||
EOAttribute *attribute = GDL2_ObjectAtIndexWithImpPtr(attributesToFetch,&atfOAI,i);
|
||||
|
||||
if (![attribute isReadOnly])
|
||||
GDL2AddObjectWithImpPtr(tmpArray,&sAO,[attribute name]);
|
||||
GDL2_AddObjectWithImpPtr(tmpArray,&sAO,[attribute name]);
|
||||
}
|
||||
writableDBSnapshotKeys=tmpArray;
|
||||
}
|
||||
else
|
||||
writableDBSnapshotKeys=GDL2Array();
|
||||
writableDBSnapshotKeys=GDL2_NSArray;
|
||||
|
||||
return writableDBSnapshotKeys;
|
||||
}
|
||||
|
@ -2994,21 +2997,22 @@ createInstanceWithEditingContext:globalID:zone:
|
|||
if (count>0)
|
||||
{
|
||||
int i=0;
|
||||
NSMutableArray *tmpArray = GDL2MutableArrayWithCapacity(count);
|
||||
NSMutableArray *tmpArray
|
||||
= AUTORELEASE([GDL2_alloc(NSMutableArray) initWithCapacity: count]);
|
||||
IMP auflOAI=NULL;
|
||||
IMP tAO=NULL;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
EOAttribute *attribute = GDL2ObjectAtIndexWithImpPtr(attributesUsedForLocking,
|
||||
EOAttribute *attribute = GDL2_ObjectAtIndexWithImpPtr(attributesUsedForLocking,
|
||||
&auflOAI,i);
|
||||
if (![attribute isDerived])
|
||||
GDL2AddObjectWithImpPtr(tmpArray,&tAO,attribute);
|
||||
GDL2_AddObjectWithImpPtr(tmpArray,&tAO,attribute);
|
||||
}
|
||||
rootAttributesUsedForLocking=tmpArray;
|
||||
}
|
||||
else
|
||||
rootAttributesUsedForLocking=GDL2Array();
|
||||
rootAttributesUsedForLocking=GDL2_NSArray;
|
||||
|
||||
return rootAttributesUsedForLocking;
|
||||
}
|
||||
|
@ -3280,21 +3284,22 @@ returns nil if there's no key in the instanceDictionaryInitializer
|
|||
if (count>0)
|
||||
{
|
||||
int i=0;
|
||||
NSMutableArray *tmpArray = GDL2MutableArrayWithCapacity(count);
|
||||
NSMutableArray *tmpArray
|
||||
= AUTORELEASE([GDL2_alloc(NSMutableArray) initWithCapacity: count]);
|
||||
IMP cpOAI=NULL;
|
||||
IMP tAO=NULL;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
id object = GDL2ObjectAtIndexWithImpPtr(classProperties,&cpOAI,i);
|
||||
id object = GDL2_ObjectAtIndexWithImpPtr(classProperties,&cpOAI,i);
|
||||
|
||||
if ([object isKindOfClass: GDL2EOAttributeClass])
|
||||
GDL2AddObjectWithImpPtr(tmpArray,&tAO,object);
|
||||
if ([object isKindOfClass: GDL2_EOAttributeClass])
|
||||
GDL2_AddObjectWithImpPtr(tmpArray,&tAO,object);
|
||||
}
|
||||
classPropertyAttributes = tmpArray;
|
||||
}
|
||||
else
|
||||
classPropertyAttributes=GDL2Array();
|
||||
classPropertyAttributes=GDL2_NSArray;
|
||||
|
||||
return classPropertyAttributes;
|
||||
}
|
||||
|
@ -3392,7 +3397,7 @@ returns nil if there's no key in the instanceDictionaryInitializer
|
|||
@"propertyName=%@ - property=%@",
|
||||
propertyName, property);
|
||||
|
||||
if ([property isKindOfClass: GDL2EOAttributeClass])
|
||||
if ([property isKindOfClass: GDL2_EOAttributeClass])
|
||||
{
|
||||
EOAttribute *attribute = property;
|
||||
|
||||
|
@ -3410,7 +3415,7 @@ returns nil if there's no key in the instanceDictionaryInitializer
|
|||
[(EORelationship*)property relationshipPath]
|
||||
atts: attributesDict];
|
||||
}
|
||||
else if ([property isKindOfClass: GDL2EOAttributeClass])
|
||||
else if ([property isKindOfClass: GDL2_EOAttributeClass])
|
||||
{
|
||||
[attributesDict setObject: property
|
||||
forKey: propertyName];
|
||||
|
@ -3663,16 +3668,16 @@ returns nil if there's no key in the instanceDictionaryInitializer
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
EOJoin *join = GDL2ObjectAtIndexWithImpPtr(joins,&joinsOAI,i);
|
||||
EOJoin *join = GDL2_ObjectAtIndexWithImpPtr(joins,&joinsOAI,i);
|
||||
EOAttribute *sourceAttribute = [join sourceAttribute];
|
||||
EOAttribute *destinationAttribute =
|
||||
[self _mapAttribute:sourceAttribute
|
||||
toDestinationAttributeInLastComponentOfRelationshipPath: path];
|
||||
|
||||
GDL2AddObjectWithImpPtr(sourceAttributeNames,&sanAO,
|
||||
GDL2_AddObjectWithImpPtr(sourceAttributeNames,&sanAO,
|
||||
[sourceAttribute name]);
|
||||
|
||||
GDL2AddObjectWithImpPtr(destinationAttributeNames,&danAO,
|
||||
GDL2_AddObjectWithImpPtr(destinationAttributeNames,&danAO,
|
||||
[destinationAttribute name]);
|
||||
}
|
||||
};
|
||||
|
@ -3765,12 +3770,12 @@ toDestinationAttributeInLastComponentOfRelationshipPath: (NSString*)path
|
|||
|
||||
for(i = 0; i < count; i++)
|
||||
{
|
||||
EOJoin *join = GDL2ObjectAtIndexWithImpPtr(joins,&joinsOAI,i);
|
||||
EOJoin *join = GDL2_ObjectAtIndexWithImpPtr(joins,&joinsOAI,i);
|
||||
EOAttribute *sourceAttribute = [join sourceAttribute];
|
||||
EOAttribute *destinationAttribute = [join destinationAttribute];
|
||||
|
||||
GDL2AddObjectWithImpPtr(sourceKeys,&skAO,[sourceAttribute name]);
|
||||
GDL2AddObjectWithImpPtr(destinationKeys,&dkAO,[destinationAttribute name]);
|
||||
GDL2_AddObjectWithImpPtr(sourceKeys,&skAO,[sourceAttribute name]);
|
||||
GDL2_AddObjectWithImpPtr(destinationKeys,&dkAO,[destinationAttribute name]);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -3850,7 +3855,7 @@ toDestinationAttributeInLastComponentOfRelationshipPath: (NSString*)path
|
|||
{
|
||||
EOAttribute *property = [classProperties objectAtIndex: i];
|
||||
|
||||
if ([property isKindOfClass: GDL2EOAttributeClass])
|
||||
if ([property isKindOfClass: GDL2_EOAttributeClass])
|
||||
[(NSMutableArray*)_classPropertyAttributeNames
|
||||
addObject: [property name]];
|
||||
};
|
||||
|
@ -3947,10 +3952,10 @@ toDestinationAttributeInLastComponentOfRelationshipPath: (NSString*)path
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
EOJoin *join = GDL2ObjectAtIndexWithImpPtr(joins,&joinsOAI,i);
|
||||
EOJoin *join = GDL2_ObjectAtIndexWithImpPtr(joins,&joinsOAI,i);
|
||||
EOAttribute *attribute = [join sourceAttribute];
|
||||
|
||||
GDL2SetObjectForKeyWithImpPtr(attributes,&attributesSOFK,
|
||||
GDL2_SetObjectForKeyWithImpPtr(attributes,&attributesSOFK,
|
||||
attribute,[attribute name]);
|
||||
}
|
||||
};
|
||||
|
@ -4005,19 +4010,20 @@ toDestinationAttributeInLastComponentOfRelationshipPath: (NSString*)path
|
|||
int i=0;
|
||||
IMP atfOAI=NULL;
|
||||
IMP tAO=NULL;
|
||||
NSMutableArray* tmpArray=GDL2MutableArrayWithCapacity(count);
|
||||
NSMutableArray* tmpArray
|
||||
= AUTORELEASE([GDL2_alloc(NSMutableArray) initWithCapacity: count]);
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
EOAttribute *attribute = GDL2ObjectAtIndexWithImpPtr(attributesToFetch,&atfOAI,i);
|
||||
EOAttribute *attribute = GDL2_ObjectAtIndexWithImpPtr(attributesToFetch,&atfOAI,i);
|
||||
|
||||
if ([attribute isFlattened])
|
||||
GDL2AddObjectWithImpPtr(tmpArray,&tAO,attribute);
|
||||
GDL2_AddObjectWithImpPtr(tmpArray,&tAO,attribute);
|
||||
};
|
||||
flattenedAttributes=tmpArray;
|
||||
}
|
||||
else
|
||||
flattenedAttributes=GDL2Array();
|
||||
flattenedAttributes=GDL2_NSArray;
|
||||
|
||||
return flattenedAttributes;
|
||||
}
|
||||
|
@ -4071,7 +4077,7 @@ toDestinationAttributeInLastComponentOfRelationshipPath: (NSString*)path
|
|||
&& *s != '.' && *s != '#' && *s != '$')
|
||||
break;
|
||||
|
||||
objectToken = GDL2StringWithCStringAndLength(start,
|
||||
objectToken = GDL2_StringWithCStringAndLength(start,
|
||||
(unsigned)(s - start));
|
||||
|
||||
EOFLOGObjectLevelArgs(@"EOEntity", @"objectToken: '%@'",
|
||||
|
@ -4088,7 +4094,7 @@ toDestinationAttributeInLastComponentOfRelationshipPath: (NSString*)path
|
|||
EOFLOGObjectLevelArgs(@"EOEntity", @"addObject I Token: '%@'",
|
||||
objectToken);
|
||||
|
||||
GDL2AddObjectWithImpPtr(expressionArray,&eaAO,objectToken);
|
||||
GDL2_AddObjectWithImpPtr(expressionArray,&eaAO,objectToken);
|
||||
}
|
||||
|
||||
/* Determines an O token. */
|
||||
|
@ -4117,13 +4123,13 @@ toDestinationAttributeInLastComponentOfRelationshipPath: (NSString*)path
|
|||
|
||||
if (s != start)
|
||||
{
|
||||
objectToken = GDL2StringWithCStringAndLength(start,
|
||||
objectToken = GDL2_StringWithCStringAndLength(start,
|
||||
(unsigned)(s - start));
|
||||
|
||||
EOFLOGObjectLevelArgs(@"EOEntity", @"addObject O Token: '%@'",
|
||||
objectToken);
|
||||
|
||||
GDL2AddObjectWithImpPtr(expressionArray,&eaAO,objectToken);
|
||||
GDL2_AddObjectWithImpPtr(expressionArray,&eaAO,objectToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4480,7 +4486,7 @@ fromInsertionInEditingContext: (EOEditingContext *)context
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
relationship = GDL2ObjectAtIndexWithImpPtr(relationships,&relOAI,i);
|
||||
relationship = GDL2_ObjectAtIndexWithImpPtr(relationships,&relOAI,i);
|
||||
|
||||
if ([classProperties containsObject: relationship])
|
||||
{
|
||||
|
@ -4488,7 +4494,7 @@ fromInsertionInEditingContext: (EOEditingContext *)context
|
|||
{
|
||||
NSString *name = [relationship name];
|
||||
id relationshipValue =
|
||||
GDL2StoredValueForKeyWithImpPtr(object,&objectSVFK,name);
|
||||
GDL2_StoredValueForKeyWithImpPtr(object,&objectSVFK,name);
|
||||
|
||||
/* We put a value only if there's not already one */
|
||||
if (relationshipValue == nil)
|
||||
|
@ -4496,7 +4502,7 @@ fromInsertionInEditingContext: (EOEditingContext *)context
|
|||
/* [Ref: Assigns empty arrays to to-many
|
||||
relationship properties of newly inserted
|
||||
enterprise objects] */
|
||||
GDL2TakeStoredValueForKeyWithImpPtr(object,&objectTSVFK,
|
||||
GDL2_TakeStoredValueForKeyWithImpPtr(object,&objectTSVFK,
|
||||
[EOCheapCopyMutableArray array],
|
||||
name);
|
||||
}
|
||||
|
@ -4507,7 +4513,7 @@ fromInsertionInEditingContext: (EOEditingContext *)context
|
|||
{
|
||||
NSString *name = [relationship name];
|
||||
id relationshipValue
|
||||
= GDL2ValueForKeyWithImpPtr(object,&objectVFK,name);
|
||||
= GDL2_ValueForKeyWithImpPtr(object,&objectVFK,name);
|
||||
|
||||
if (relationshipValue == nil)
|
||||
{
|
||||
|
|
|
@ -33,12 +33,12 @@
|
|||
@class EODatabaseContext;
|
||||
|
||||
// ==== Classes ====
|
||||
GDL2ACCESS_EXPORT Class GDL2EODatabaseContextClass;
|
||||
GDL2ACCESS_EXPORT Class GDL2EOAttributeClass;
|
||||
GDL2ACCESS_EXPORT Class GDL2_EODatabaseContextClass;
|
||||
GDL2ACCESS_EXPORT Class GDL2_EOAttributeClass;
|
||||
|
||||
// ==== IMPs ====
|
||||
GDL2ACCESS_EXPORT IMP GDL2EODatabaseContext_snapshotForGlobalIDIMP;
|
||||
GDL2ACCESS_EXPORT IMP GDL2EODatabaseContext__globalIDForObjectIMP;
|
||||
GDL2ACCESS_EXPORT IMP GDL2_EODatabaseContext_snapshotForGlobalIDIMP;
|
||||
GDL2ACCESS_EXPORT IMP GDL2_EODatabaseContext__globalIDForObjectIMP;
|
||||
|
||||
// ==== Init Method ====
|
||||
GDL2ACCESS_EXPORT void GDL2_EOAccessPrivateInit();
|
||||
|
|
|
@ -48,12 +48,12 @@ RCS_ID("$Id$")
|
|||
#include "EOPrivate.h"
|
||||
|
||||
// ==== Classes ====
|
||||
Class GDL2EODatabaseContextClass=Nil;
|
||||
Class GDL2EOAttributeClass=Nil;
|
||||
Class GDL2_EODatabaseContextClass=Nil;
|
||||
Class GDL2_EOAttributeClass=Nil;
|
||||
|
||||
// ==== IMPs ====
|
||||
IMP GDL2EODatabaseContext_snapshotForGlobalIDIMP=NULL;
|
||||
IMP GDL2EODatabaseContext__globalIDForObjectIMP=NULL;
|
||||
IMP GDL2_EODatabaseContext_snapshotForGlobalIDIMP=NULL;
|
||||
IMP GDL2_EODatabaseContext__globalIDForObjectIMP=NULL;
|
||||
|
||||
// ==== Init Method ====
|
||||
void GDL2_EOAccessPrivateInit()
|
||||
|
@ -61,15 +61,15 @@ void GDL2_EOAccessPrivateInit()
|
|||
static BOOL initialized=NO;
|
||||
if (!initialized)
|
||||
{
|
||||
GDL2PrivInit();
|
||||
GDL2_PrivateInit();
|
||||
|
||||
// ==== Classes ====
|
||||
GDL2EODatabaseContextClass = [EODatabaseContext class];
|
||||
GDL2EOAttributeClass = [EOAttribute class];
|
||||
GDL2_EODatabaseContextClass = [EODatabaseContext class];
|
||||
GDL2_EOAttributeClass = [EOAttribute class];
|
||||
|
||||
GDL2EODatabaseContext_snapshotForGlobalIDIMP=[GDL2EODatabaseContextClass instanceMethodForSelector:@selector(snapshotForGlobalID:)];
|
||||
GDL2_EODatabaseContext_snapshotForGlobalIDIMP=[GDL2_EODatabaseContextClass instanceMethodForSelector:@selector(snapshotForGlobalID:)];
|
||||
|
||||
GDL2EODatabaseContext__globalIDForObjectIMP=[GDL2EODatabaseContextClass instanceMethodForSelector:@selector(_globalIDForObject:)];
|
||||
GDL2_EODatabaseContext__globalIDForObjectIMP=[GDL2_EODatabaseContextClass instanceMethodForSelector:@selector(_globalIDForObject:)];
|
||||
|
||||
};
|
||||
}
|
||||
|
@ -87,9 +87,9 @@ EODatabaseContext_snapshotForGlobalIDWithImpPtr(EODatabaseContext* dbContext,
|
|||
imp=*impPtr;
|
||||
if (!imp)
|
||||
{
|
||||
if (GSObjCClass(dbContext)==GDL2EODatabaseContextClass
|
||||
&& GDL2EODatabaseContext_snapshotForGlobalIDIMP)
|
||||
imp=GDL2EODatabaseContext_snapshotForGlobalIDIMP;
|
||||
if (GSObjCClass(dbContext)==GDL2_EODatabaseContextClass
|
||||
&& GDL2_EODatabaseContext_snapshotForGlobalIDIMP)
|
||||
imp=GDL2_EODatabaseContext_snapshotForGlobalIDIMP;
|
||||
else
|
||||
imp=[dbContext methodForSelector:@selector(snapshotForGlobalID:)];
|
||||
if (impPtr)
|
||||
|
@ -110,9 +110,9 @@ EOGlobalID* EODatabaseContext_globalIDForObjectWithImpPtr(EODatabaseContext* dbC
|
|||
imp=*impPtr;
|
||||
if (!imp)
|
||||
{
|
||||
if (GSObjCClass(dbContext)==GDL2EODatabaseContextClass
|
||||
&& GDL2EODatabaseContext__globalIDForObjectIMP)
|
||||
imp=GDL2EODatabaseContext__globalIDForObjectIMP;
|
||||
if (GSObjCClass(dbContext)==GDL2_EODatabaseContextClass
|
||||
&& GDL2_EODatabaseContext__globalIDForObjectIMP)
|
||||
imp=GDL2_EODatabaseContext__globalIDForObjectIMP;
|
||||
else
|
||||
imp=[dbContext methodForSelector:@selector(_globalIDForObject:)];
|
||||
if (impPtr)
|
||||
|
|
|
@ -367,7 +367,7 @@ NSString *EOBindVariableColumnKey = @"EOBindVariableColumnKey";
|
|||
currentEntity = entity;
|
||||
|
||||
if (i)
|
||||
GDL2AppendStringWithImp(entitiesString,
|
||||
GDL2_AppendStringWithImp(entitiesString,
|
||||
entitiesStringAppendStringIMP,@", ");
|
||||
else
|
||||
entitiesStringAppendStringIMP = [entitiesString methodForSelector:@selector(appendString:)];
|
||||
|
@ -387,7 +387,7 @@ NSString *EOBindVariableColumnKey = @"EOBindVariableColumnKey";
|
|||
@"No external name for entity %@",
|
||||
[currentEntity name]);
|
||||
|
||||
GDL2AppendStringWithImp(entitiesString,
|
||||
GDL2_AppendStringWithImp(entitiesString,
|
||||
entitiesStringAppendStringIMP,tableName);
|
||||
|
||||
if (_flags.useAliases)
|
||||
|
@ -435,7 +435,7 @@ NSString *EOBindVariableColumnKey = @"EOBindVariableColumnKey";
|
|||
@"No external name for entity %@",
|
||||
[currentEntity name]);
|
||||
|
||||
GDL2AppendStringWithImp(entitiesString,
|
||||
GDL2_AppendStringWithImp(entitiesString,
|
||||
entitiesStringAppendStringIMP,tableName);
|
||||
|
||||
if (_flags.useAliases)
|
||||
|
@ -443,9 +443,9 @@ NSString *EOBindVariableColumnKey = @"EOBindVariableColumnKey";
|
|||
NSString *alias = [_aliasesByRelationshipPath
|
||||
objectForKey: relationshipPath];
|
||||
|
||||
GDL2AppendStringWithImp(entitiesString,
|
||||
GDL2_AppendStringWithImp(entitiesString,
|
||||
entitiesStringAppendStringIMP,@" ");
|
||||
GDL2AppendStringWithImp(entitiesString,
|
||||
GDL2_AppendStringWithImp(entitiesString,
|
||||
entitiesStringAppendStringIMP,alias);
|
||||
|
||||
EOFLOGObjectLevelArgs(@"EOSQLExpression",
|
||||
|
@ -1229,9 +1229,9 @@ NSString *EOBindVariableColumnKey = @"EOBindVariableColumnKey";
|
|||
string = [value sqlString];
|
||||
|
||||
EOFLOGObjectLevelArgs(@"EOSQLExpression", @" value %p=%@ null %p=%@",
|
||||
value, value, GDL2EONull, GDL2EONull);
|
||||
value, value, GDL2_EONull, GDL2_EONull);
|
||||
|
||||
if (value == GDL2EONull)
|
||||
if (value == GDL2_EONull)
|
||||
formattedValue = string;
|
||||
else
|
||||
formattedValue = [self formatSQLString: [self formatStringValue:
|
||||
|
@ -1279,19 +1279,19 @@ NSString *EOBindVariableColumnKey = @"EOBindVariableColumnKey";
|
|||
switch (*(s + 1))
|
||||
{
|
||||
case '%':
|
||||
GDL2AppendStringWithImp(str,appendStringIMP,
|
||||
GDL2StringWithCStringAndLength(p,s-p+1));
|
||||
GDL2_AppendStringWithImp(str,appendStringIMP,
|
||||
GDL2_StringWithCStringAndLength(p,s-p+1));
|
||||
break;
|
||||
case 'P':
|
||||
if (s != p)
|
||||
GDL2AppendStringWithImp(str,appendStringIMP,
|
||||
GDL2StringWithCStringAndLength(p,s-p));
|
||||
GDL2_AppendStringWithImp(str,appendStringIMP,
|
||||
GDL2_StringWithCStringAndLength(p,s-p));
|
||||
[str appendString: sqlString];
|
||||
break;
|
||||
default:
|
||||
if (s != p)
|
||||
GDL2AppendStringWithImp(str,appendStringIMP,
|
||||
GDL2StringWithCStringAndLength(p,s-p));
|
||||
GDL2_AppendStringWithImp(str,appendStringIMP,
|
||||
GDL2_StringWithCStringAndLength(p,s-p));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1299,7 +1299,7 @@ NSString *EOBindVariableColumnKey = @"EOBindVariableColumnKey";
|
|||
}
|
||||
|
||||
if (*p)
|
||||
GDL2AppendStringWithImp(str,appendStringIMP,[NSString stringWithCString: p]);
|
||||
GDL2_AppendStringWithImp(str,appendStringIMP,[NSString stringWithCString: p]);
|
||||
|
||||
formatted = str;
|
||||
}
|
||||
|
@ -1753,14 +1753,14 @@ NSString *EOBindVariableColumnKey = @"EOBindVariableColumnKey";
|
|||
//seems OK
|
||||
if (sel_eq(selector, EOQualifierOperatorEqual))
|
||||
{
|
||||
if (value==GDL2EONull)
|
||||
if (value==GDL2_EONull)
|
||||
return @"is";
|
||||
else
|
||||
return @"=";
|
||||
}
|
||||
else if (sel_eq(selector, EOQualifierOperatorNotEqual))
|
||||
{
|
||||
if (value==GDL2EONull)
|
||||
if (value==GDL2_EONull)
|
||||
return @"is not";
|
||||
else
|
||||
return @"<>";
|
||||
|
@ -2103,47 +2103,47 @@ else if([anAttribute isDerived] == YES)
|
|||
{
|
||||
case '*':
|
||||
if (s != p)
|
||||
GDL2AppendStringWithImp(str,appendStringIMP,
|
||||
GDL2StringWithCStringAndLength(p,s-p));
|
||||
GDL2_AppendStringWithImp(str,appendStringIMP,
|
||||
GDL2_StringWithCStringAndLength(p,s-p));
|
||||
[str appendString: @"%"];
|
||||
p = s+1;
|
||||
break;
|
||||
case '?':
|
||||
if (s != p)
|
||||
GDL2AppendStringWithImp(str,appendStringIMP,
|
||||
GDL2StringWithCStringAndLength(p,s-p));
|
||||
GDL2AppendStringWithImp(str,appendStringIMP,@"_");
|
||||
GDL2_AppendStringWithImp(str,appendStringIMP,
|
||||
GDL2_StringWithCStringAndLength(p,s-p));
|
||||
GDL2_AppendStringWithImp(str,appendStringIMP,@"_");
|
||||
p = s+1;
|
||||
break;
|
||||
case '%':
|
||||
if (s != p)
|
||||
GDL2AppendStringWithImp(str,appendStringIMP,
|
||||
GDL2StringWithCStringAndLength(p,s-p));
|
||||
GDL2_AppendStringWithImp(str,appendStringIMP,
|
||||
GDL2_StringWithCStringAndLength(p,s-p));
|
||||
|
||||
if (s != init && *(s-1) == '[' && *(s+1) == ']')
|
||||
{
|
||||
GDL2AppendStringWithImp(str,appendStringIMP,@"%]");
|
||||
GDL2_AppendStringWithImp(str,appendStringIMP,@"%]");
|
||||
p = s+2; s++;
|
||||
}
|
||||
else
|
||||
{
|
||||
GDL2AppendStringWithImp(str,appendStringIMP,@"[%]");
|
||||
GDL2_AppendStringWithImp(str,appendStringIMP,@"[%]");
|
||||
p = s+1;
|
||||
}
|
||||
break;
|
||||
case '_':
|
||||
if (s != p)
|
||||
GDL2AppendStringWithImp(str,appendStringIMP,
|
||||
GDL2StringWithCStringAndLength(p,s-p));
|
||||
GDL2_AppendStringWithImp(str,appendStringIMP,
|
||||
GDL2_StringWithCStringAndLength(p,s-p));
|
||||
|
||||
if (s != init && *(s-1) == '[' && *(s+1) == ']')
|
||||
{
|
||||
GDL2AppendStringWithImp(str,appendStringIMP,@"_]");
|
||||
GDL2_AppendStringWithImp(str,appendStringIMP,@"_]");
|
||||
p = s+2; p++;
|
||||
}
|
||||
else
|
||||
{
|
||||
GDL2AppendStringWithImp(str,appendStringIMP,@"[_]");
|
||||
GDL2_AppendStringWithImp(str,appendStringIMP,@"[_]");
|
||||
p = s+1;
|
||||
}
|
||||
break;
|
||||
|
@ -2151,7 +2151,7 @@ else if([anAttribute isDerived] == YES)
|
|||
}
|
||||
|
||||
if (*p)
|
||||
GDL2AppendStringWithImp(str,appendStringIMP,[NSString stringWithCString: p]);
|
||||
GDL2_AppendStringWithImp(str,appendStringIMP,[NSString stringWithCString: p]);
|
||||
sqlPattern=str;
|
||||
};
|
||||
|
||||
|
@ -2175,47 +2175,47 @@ else if([anAttribute isDerived] == YES)
|
|||
{
|
||||
case '*':
|
||||
if (s != p)
|
||||
GDL2AppendStringWithImp(str,appendStringIMP,
|
||||
GDL2StringWithCStringAndLength(p,s-p));
|
||||
GDL2AppendStringWithImp(str,appendStringIMP,@"%");
|
||||
GDL2_AppendStringWithImp(str,appendStringIMP,
|
||||
GDL2_StringWithCStringAndLength(p,s-p));
|
||||
GDL2_AppendStringWithImp(str,appendStringIMP,@"%");
|
||||
p = s+1;
|
||||
break;
|
||||
case '?':
|
||||
if (s != p)
|
||||
GDL2AppendStringWithImp(str,appendStringIMP,
|
||||
GDL2StringWithCStringAndLength(p,s-p));
|
||||
GDL2AppendStringWithImp(str,appendStringIMP,@"_");
|
||||
GDL2_AppendStringWithImp(str,appendStringIMP,
|
||||
GDL2_StringWithCStringAndLength(p,s-p));
|
||||
GDL2_AppendStringWithImp(str,appendStringIMP,@"_");
|
||||
p = s+1;
|
||||
break;
|
||||
case '%':
|
||||
if (s != p)
|
||||
GDL2AppendStringWithImp(str,appendStringIMP,
|
||||
GDL2StringWithCStringAndLength(p,s-p));
|
||||
GDL2_AppendStringWithImp(str,appendStringIMP,
|
||||
GDL2_StringWithCStringAndLength(p,s-p));
|
||||
|
||||
if (s != init && *(s-1) == '[' && *(s+1) == ']')
|
||||
{
|
||||
GDL2AppendStringWithImp(str,appendStringIMP,@"%]");
|
||||
GDL2_AppendStringWithImp(str,appendStringIMP,@"%]");
|
||||
p = s+2; s++;
|
||||
}
|
||||
else
|
||||
{
|
||||
GDL2AppendStringWithImp(str,appendStringIMP,@"[%]");
|
||||
GDL2_AppendStringWithImp(str,appendStringIMP,@"[%]");
|
||||
p = s+1;
|
||||
}
|
||||
break;
|
||||
case '_':
|
||||
if (s != p)
|
||||
GDL2AppendStringWithImp(str,appendStringIMP,
|
||||
GDL2StringWithCStringAndLength(p,s-p));
|
||||
GDL2_AppendStringWithImp(str,appendStringIMP,
|
||||
GDL2_StringWithCStringAndLength(p,s-p));
|
||||
|
||||
if (s != init && *(s-1) == '[' && *(s+1) == ']')
|
||||
{
|
||||
GDL2AppendStringWithImp(str,appendStringIMP,@"_]");
|
||||
GDL2_AppendStringWithImp(str,appendStringIMP,@"_]");
|
||||
p = s+2; p++;
|
||||
}
|
||||
else
|
||||
{
|
||||
GDL2AppendStringWithImp(str,appendStringIMP,@"[_]");
|
||||
GDL2_AppendStringWithImp(str,appendStringIMP,@"[_]");
|
||||
p = s+1;
|
||||
}
|
||||
break;
|
||||
|
@ -2223,7 +2223,7 @@ else if([anAttribute isDerived] == YES)
|
|||
}
|
||||
|
||||
if (*p)
|
||||
GDL2AppendStringWithImp(str,appendStringIMP,[NSString stringWithCString:p]);
|
||||
GDL2_AppendStringWithImp(str,appendStringIMP,[NSString stringWithCString:p]);
|
||||
|
||||
return str;
|
||||
}
|
||||
|
|
|
@ -380,7 +380,7 @@ when flattened: ???
|
|||
tmpQualifier = [EOKeyValueQualifier
|
||||
qualifierWithKey: attributeName
|
||||
operatorSelector: sel
|
||||
value: (attributeValue ? attributeValue : GDL2EONull)];
|
||||
value: (attributeValue ? attributeValue : GDL2_EONull)];
|
||||
|
||||
if (qualifier)//Already a qualifier
|
||||
{
|
||||
|
|
|
@ -173,7 +173,7 @@ static NSString *NSObjectNotAvailableException = @"NSObjectNotAvailableException
|
|||
value, key, entityName);
|
||||
|
||||
if (!value)
|
||||
value=GDL2EONull;
|
||||
value=GDL2_EONull;
|
||||
|
||||
NSAssert(value, @"No Value"); //Transform it to EONull ?
|
||||
NSAssert(key, @"No Key");
|
||||
|
@ -514,7 +514,7 @@ static NSString *NSObjectNotAvailableException = @"NSObjectNotAvailableException
|
|||
{
|
||||
NSDictionary* pk;
|
||||
if (!value)
|
||||
value=GDL2EONull;
|
||||
value=GDL2_EONull;
|
||||
|
||||
pk = [NSDictionary dictionaryWithObject: value
|
||||
forKey: [(EOAttribute*)[primaryKeyAttributes
|
||||
|
@ -593,7 +593,7 @@ static NSString *NSObjectNotAvailableException = @"NSObjectNotAvailableException
|
|||
NSAssert([entityName length]>0,@"No entity name");
|
||||
|
||||
if (!value)
|
||||
value=GDL2EONull;
|
||||
value=GDL2_EONull;
|
||||
|
||||
valueDict = [NSDictionary dictionaryWithObject: value
|
||||
forKey: key];
|
||||
|
|
|
@ -119,7 +119,7 @@ static NSRecursiveLock *local_lock = nil;
|
|||
|
||||
initialized=YES;
|
||||
|
||||
GDL2PrivInit();
|
||||
GDL2_PrivateInit();
|
||||
|
||||
cls = NSClassFromString(@"EOModelGroup");
|
||||
|
||||
|
@ -332,8 +332,8 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
|
||||
for (i = 0; i < toManyCount; i++)
|
||||
{
|
||||
id key = GDL2ObjectAtIndexWithImpPtr(toManyRelationshipKeys,&oaiIMP,i);
|
||||
id value = GDL2StoredValueForKeyWithImpPtr(object,&objectSVFK,key);
|
||||
id key = GDL2_ObjectAtIndexWithImpPtr(toManyRelationshipKeys,&oaiIMP,i);
|
||||
id value = GDL2_StoredValueForKeyWithImpPtr(object,&objectSVFK,key);
|
||||
NSDebugMLLog(@"gsdb", @"key=%@ value=%@",key,value);
|
||||
|
||||
if (value)
|
||||
|
@ -342,7 +342,7 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
}
|
||||
else
|
||||
{
|
||||
GDL2TakeStoredValueForKeyWithImpPtr(object,&objectTSVFK,
|
||||
GDL2_TakeStoredValueForKeyWithImpPtr(object,&objectTSVFK,
|
||||
[EOCheapCopyMutableArray arrayWithCapacity: 2],
|
||||
key);
|
||||
}
|
||||
|
@ -400,14 +400,14 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
if (init && s == ckey && islower(*s))
|
||||
{
|
||||
c = toupper(*s);
|
||||
GDL2AppendStringWithImpPtr(str,&strAS,
|
||||
GDL2StringWithCStringAndLength(&c,1));
|
||||
GDL2_AppendStringWithImpPtr(str,&strAS,
|
||||
GDL2_StringWithCStringAndLength(&c,1));
|
||||
}
|
||||
else if (isupper(*s) && s != ckey)
|
||||
{
|
||||
GDL2AppendStringWithImpPtr(str,&strAS,
|
||||
GDL2StringWithCStringAndLength(ckey,s - ckey));
|
||||
GDL2AppendStringWithImpPtr(str,&strAS,@" ");
|
||||
GDL2_AppendStringWithImpPtr(str,&strAS,
|
||||
GDL2_StringWithCStringAndLength(ckey,s - ckey));
|
||||
GDL2_AppendStringWithImpPtr(str,&strAS,@" ");
|
||||
ckey = s;
|
||||
}
|
||||
|
||||
|
@ -416,8 +416,8 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
}
|
||||
|
||||
if (s != ckey)
|
||||
GDL2AppendStringWithImpPtr(str,&strAS,
|
||||
GDL2StringWithCStringAndLength(ckey,s - ckey));
|
||||
GDL2_AppendStringWithImpPtr(str,&strAS,
|
||||
GDL2_StringWithCStringAndLength(ckey,s - ckey));
|
||||
|
||||
return AUTORELEASE([key copy]);
|
||||
}
|
||||
|
@ -451,7 +451,7 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
|
||||
NSDebugMLLog(@"gsdb",@"object %p=%@", object, object);
|
||||
|
||||
if (object==GDL2EONull)
|
||||
if (object==GDL2_EONull)
|
||||
{
|
||||
NSWarnMLog(@"Warning: object is an EONull");
|
||||
}
|
||||
|
@ -470,7 +470,7 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
toRelArray = [object toOneRelationshipKeys];
|
||||
toRelEnum = [toRelArray objectEnumerator];
|
||||
|
||||
while ((key = GDL2NextObjectWithImpPtr(toRelEnum,&toRelEnumNO)))
|
||||
while ((key = GDL2_NextObjectWithImpPtr(toRelEnum,&toRelEnumNO)))
|
||||
{
|
||||
BOOL shouldPropagate = YES;
|
||||
|
||||
|
@ -486,7 +486,7 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
|
||||
if (shouldPropagate)
|
||||
{
|
||||
destination = GDL2StoredValueForKeyWithImpPtr(object,&objectSVFK,key);
|
||||
destination = GDL2_StoredValueForKeyWithImpPtr(object,&objectSVFK,key);
|
||||
NSDebugMLLog(@"gsdb", @"destination %p=%@",
|
||||
destination, destination);
|
||||
|
||||
|
@ -546,7 +546,7 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
toRelEnum = [toRelArray objectEnumerator];
|
||||
toRelEnumNO=NULL;
|
||||
|
||||
while ((key = GDL2NextObjectWithImpPtr(toRelEnum,&toRelEnumNO)))
|
||||
while ((key = GDL2_NextObjectWithImpPtr(toRelEnum,&toRelEnumNO)))
|
||||
{
|
||||
BOOL shouldPropagate = YES;
|
||||
|
||||
|
@ -565,7 +565,7 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
IMP toManyArrayLO=NULL;
|
||||
EODeleteRule deleteRule;
|
||||
|
||||
toManyArray = GDL2ValueForKeyWithImpPtr(object,&objectVFK,key);
|
||||
toManyArray = GDL2_ValueForKeyWithImpPtr(object,&objectVFK,key);
|
||||
NSDebugMLLog(@"gsdb", @"toManyArray %p=%@", toManyArray, toManyArray);
|
||||
|
||||
deleteRule = [object deleteRuleForRelationshipKey: key];
|
||||
|
@ -578,7 +578,7 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
NSDebugMLLog(@"gsdb", @"toManyArray %p=%@", toManyArray,
|
||||
toManyArray);
|
||||
|
||||
while ((destination = GDL2LastObjectWithImpPtr(toManyArray,&toManyArrayLO)))
|
||||
while ((destination = GDL2_LastObjectWithImpPtr(toManyArray,&toManyArrayLO)))
|
||||
{
|
||||
NSDebugMLLog(@"gsdb", @"destination %p=%@", destination,
|
||||
destination);
|
||||
|
@ -604,7 +604,7 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
NSDebugMLLog(@"gsdb", @"toManyArray %p=%@",
|
||||
toManyArray, toManyArray);
|
||||
|
||||
while ((destination = GDL2LastObjectWithImpPtr(toManyArray,&toManyArrayLO)))
|
||||
while ((destination = GDL2_LastObjectWithImpPtr(toManyArray,&toManyArrayLO)))
|
||||
{
|
||||
NSDebugMLLog(@"gsdb", @"destination %p=%@",
|
||||
destination, destination);
|
||||
|
@ -1015,12 +1015,12 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
|
||||
for (i = 0; i < keysCount; i++)
|
||||
{
|
||||
NSString *key = GDL2ObjectAtIndexWithImpPtr(keys,&oaiIMP,i);
|
||||
id value = GDL2ValueForKeyWithImpPtr(self,&selfVFK,key);
|
||||
NSString *key = GDL2_ObjectAtIndexWithImpPtr(keys,&oaiIMP,i);
|
||||
id value = GDL2_ValueForKeyWithImpPtr(self,&selfVFK,key);
|
||||
id newValue = value;
|
||||
BOOL isEqual=NO;
|
||||
|
||||
exception = GDL2ValidateValueForKeyWithImpPtr(self,&selfVVFK,&newValue,key);
|
||||
exception = GDL2_ValidateValueForKeyWithImpPtr(self,&selfVVFK,&newValue,key);
|
||||
if (exception)
|
||||
{
|
||||
if (!expArray)
|
||||
|
@ -1038,7 +1038,7 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
{
|
||||
NSDebugMLLog(@"gsdb", @"key=%@ newValue='%@' (class=%@) value='%@' (class=%@)",
|
||||
key,newValue,[newValue class],value,[value class]);
|
||||
GDL2TakeValueForKeyWithImpPtr(self,&selfTVFK,newValue,key);
|
||||
GDL2_TakeValueForKeyWithImpPtr(self,&selfTVFK,newValue,key);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -1114,7 +1114,7 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
|
||||
NSDebugMLLog(@"gsdb", @"self=%@", self);
|
||||
|
||||
if (self==GDL2EONull)
|
||||
if (self==GDL2_EONull)
|
||||
{
|
||||
static id emptyDict = nil;
|
||||
if (emptyDict == nil)
|
||||
|
@ -1145,9 +1145,11 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
attributeKeyCount, toOneRelationshipKeyCount,
|
||||
toManyRelationshipKeyCount);
|
||||
|
||||
snapshot = GDL2MutableDictionaryWithCapacity(attributeKeyCount +
|
||||
toOneRelationshipKeyCount +
|
||||
toManyRelationshipKeyCount);
|
||||
snapshot
|
||||
= AUTORELEASE([GDL2_alloc(NSMutableDictionary) initWithCapacity:
|
||||
(attributeKeyCount +
|
||||
toOneRelationshipKeyCount +
|
||||
toManyRelationshipKeyCount)]);
|
||||
NSDebugMLLog(@"gsdb", @"attributeKeys=%@", attributeKeys);
|
||||
|
||||
if (attributeKeyCount>0)
|
||||
|
@ -1156,15 +1158,15 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
|
||||
for (i = 0; i < attributeKeyCount; i++)
|
||||
{
|
||||
id key = GDL2ObjectAtIndexWithImpPtr(attributeKeys,&oaiIMP,i);
|
||||
id value = GDL2StoredValueForKeyWithImpPtr(self,&selfSVFK,key);
|
||||
id key = GDL2_ObjectAtIndexWithImpPtr(attributeKeys,&oaiIMP,i);
|
||||
id value = GDL2_StoredValueForKeyWithImpPtr(self,&selfSVFK,key);
|
||||
|
||||
if (!value)
|
||||
value = GDL2EONull;
|
||||
value = GDL2_EONull;
|
||||
|
||||
NSDebugMLLog(@"gsdb", @"snap=%p key=%@ ==> value %p=%@",
|
||||
snapshot, key, value, value);
|
||||
GDL2SetObjectForKeyWithImpPtr(snapshot,&snapshotSOFK,value,key);
|
||||
GDL2_SetObjectForKeyWithImpPtr(snapshot,&snapshotSOFK,value,key);
|
||||
}
|
||||
};
|
||||
NSDebugMLLog(@"gsdb",
|
||||
|
@ -1176,17 +1178,17 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
|
||||
for (i = 0; i < toOneRelationshipKeyCount; i++)
|
||||
{
|
||||
id key = GDL2ObjectAtIndexWithImpPtr(toOneRelationshipKeys,
|
||||
id key = GDL2_ObjectAtIndexWithImpPtr(toOneRelationshipKeys,
|
||||
&oaiIMP,i);
|
||||
id value = GDL2StoredValueForKeyWithImpPtr(self,&selfSVFK,key);
|
||||
id value = GDL2_StoredValueForKeyWithImpPtr(self,&selfSVFK,key);
|
||||
|
||||
if (!value)
|
||||
value = GDL2EONull;
|
||||
value = GDL2_EONull;
|
||||
|
||||
NSDebugMLLog(@"gsdb", @"TOONE snap=%p key=%@ ==> value %p=%@",
|
||||
snapshot, key, value, value);
|
||||
|
||||
GDL2SetObjectForKeyWithImpPtr(snapshot,&snapshotSOFK,value,key);
|
||||
GDL2_SetObjectForKeyWithImpPtr(snapshot,&snapshotSOFK,value,key);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1199,9 +1201,9 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
|
||||
for (i = 0; i < toManyRelationshipKeyCount; i++)
|
||||
{
|
||||
id key = GDL2ObjectAtIndexWithImpPtr(toManyRelationshipKeys,
|
||||
id key = GDL2_ObjectAtIndexWithImpPtr(toManyRelationshipKeys,
|
||||
&oaiIMP,i);
|
||||
id value = GDL2StoredValueForKeyWithImpPtr(self,&selfSVFK,key);
|
||||
id value = GDL2_StoredValueForKeyWithImpPtr(self,&selfSVFK,key);
|
||||
|
||||
if (value)
|
||||
{
|
||||
|
@ -1214,12 +1216,12 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
@"TOMANY snap=%p key=%@ ==> value %p=%@",
|
||||
snapshot, key, value, value);
|
||||
|
||||
GDL2SetObjectForKeyWithImpPtr(snapshot,&snapshotSOFK,
|
||||
GDL2_SetObjectForKeyWithImpPtr(snapshot,&snapshotSOFK,
|
||||
value,key);
|
||||
}
|
||||
/* //TODO-VERIFY or set it to eonull ?
|
||||
else
|
||||
value=GDL2EONull;
|
||||
value=GDL2_EONull;
|
||||
*/
|
||||
}
|
||||
};
|
||||
|
@ -1246,17 +1248,17 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
IMP snapshotOFK=NULL;
|
||||
IMP enumNO=NULL; // nextObject
|
||||
|
||||
while ((key = GDL2NextObjectWithImpPtr(snapshotEnum,&enumNO)))
|
||||
while ((key = GDL2_NextObjectWithImpPtr(snapshotEnum,&enumNO)))
|
||||
{
|
||||
val = GDL2ObjectForKeyWithImpPtr(snapshot,&snapshotOFK,key);
|
||||
val = GDL2_ObjectForKeyWithImpPtr(snapshot,&snapshotOFK,key);
|
||||
|
||||
if (val==GDL2EONull)
|
||||
if (val==GDL2_EONull)
|
||||
val = nil;
|
||||
|
||||
if ([val isKindOfClass: GDL2NSArrayClass])
|
||||
if ([val isKindOfClass: GDL2_NSArrayClass])
|
||||
val = AUTORELEASE([val mutableCopy]);
|
||||
|
||||
GDL2TakeStoredValueForKeyWithImpPtr(self,&selfTSVFK,val,key);
|
||||
GDL2_TakeStoredValueForKeyWithImpPtr(self,&selfTSVFK,val,key);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1267,7 +1269,7 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
NSString *relationship;
|
||||
IMP enumNO=NULL; // nextObject
|
||||
|
||||
while ((relationship = GDL2NextObjectWithImpPtr(toManyEnum,&enumNO)))
|
||||
while ((relationship = GDL2_NextObjectWithImpPtr(toManyEnum,&enumNO)))
|
||||
{
|
||||
if ([relationship isEqualToString: key])
|
||||
return YES;
|
||||
|
@ -1313,8 +1315,9 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
toOne = [self toOneRelationshipKeys];
|
||||
toMany = [self toManyRelationshipKeys];
|
||||
|
||||
ret = GDL2MutableArrayWithCapacity([attr count] +
|
||||
[toOne count] + [toMany count]);
|
||||
ret = AUTORELEASE([GDL2_alloc(NSMutableArray) initWithCapacity:
|
||||
[attr count] + [toOne count]
|
||||
+ [toMany count]]);
|
||||
|
||||
[ret addObjectsFromArray: attr];
|
||||
[ret addObjectsFromArray: toOne];
|
||||
|
@ -1340,15 +1343,15 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
relEnum = [toOne objectEnumerator];
|
||||
enumNO=NULL;
|
||||
|
||||
while ((key = GDL2NextObjectWithImpPtr(relEnum,&enumNO)))
|
||||
GDL2TakeStoredValueForKeyWithImpPtr(self,&selfTSVFK,nil,key);
|
||||
while ((key = GDL2_NextObjectWithImpPtr(relEnum,&enumNO)))
|
||||
GDL2_TakeStoredValueForKeyWithImpPtr(self,&selfTSVFK,nil,key);
|
||||
|
||||
|
||||
relEnum = [toMany objectEnumerator];
|
||||
enumNO=NULL;
|
||||
|
||||
while ((key = GDL2NextObjectWithImpPtr(relEnum,&enumNO)))
|
||||
GDL2TakeStoredValueForKeyWithImpPtr(self,&selfTSVFK,nil,key);
|
||||
while ((key = GDL2_NextObjectWithImpPtr(relEnum,&enumNO)))
|
||||
GDL2_TakeStoredValueForKeyWithImpPtr(self,&selfTSVFK,nil,key);
|
||||
|
||||
EOFLOGObjectFnStop();
|
||||
}
|
||||
|
@ -1381,19 +1384,19 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
NSMutableString *ret = [NSMutableString
|
||||
stringWithCapacity: 5 * [attrArray count]];
|
||||
|
||||
GDL2AppendStringWithImpPtr(ret,&retAS,
|
||||
GDL2_AppendStringWithImpPtr(ret,&retAS,
|
||||
[NSString stringWithFormat:@"<%@ (%p)",
|
||||
NSStringFromClass([self class]), self]);
|
||||
|
||||
while ((key = GDL2NextObjectWithImpPtr(attrEnum,&attrEnumNO)))
|
||||
while ((key = GDL2_NextObjectWithImpPtr(attrEnum,&attrEnumNO)))
|
||||
{
|
||||
GDL2AppendStringWithImpPtr(ret,&retAS,
|
||||
GDL2_AppendStringWithImpPtr(ret,&retAS,
|
||||
[NSString stringWithFormat: @" %@=%@",
|
||||
key,
|
||||
GDL2ValueForKeyWithImpPtr(self,&selfVFK,key)]);
|
||||
GDL2_ValueForKeyWithImpPtr(self,&selfVFK,key)]);
|
||||
}
|
||||
|
||||
GDL2AppendStringWithImpPtr(ret,&retAS,@">");
|
||||
GDL2_AppendStringWithImpPtr(ret,&retAS,@">");
|
||||
|
||||
return ret; //TODO
|
||||
}
|
||||
|
@ -1412,7 +1415,7 @@ toPropertyWithKey: (NSString *)key
|
|||
NSDebugMLLog(@"gsdb", @"object=%@", object);
|
||||
NSDebugMLLog(@"gsdb", @"key=%@", key);
|
||||
|
||||
if (self==GDL2EONull)
|
||||
if (self==GDL2_EONull)
|
||||
{
|
||||
NSWarnMLog(@"Warning: self is an EONull. key=%@ object=%@",key,object);
|
||||
}
|
||||
|
@ -1445,7 +1448,7 @@ toPropertyWithKey: (NSString *)key
|
|||
|
||||
sel = GSSelectorFromName(buf);
|
||||
|
||||
if (sel && GDL2RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == YES)
|
||||
if (sel && GDL2_RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == YES)
|
||||
{
|
||||
NSDebugMLLog(@"gsdb", @"selector=%@", NSStringFromSelector(sel));
|
||||
|
||||
|
@ -1471,7 +1474,7 @@ toPropertyWithKey: (NSString *)key
|
|||
}
|
||||
else
|
||||
{
|
||||
if ([val isKindOfClass: GDL2NSMutableArrayClass])
|
||||
if ([val isKindOfClass: GDL2_NSMutableArrayClass])
|
||||
{
|
||||
EOFLOGObjectLevel(@"gsdb", @"to many2");
|
||||
[self willChange];
|
||||
|
@ -1481,10 +1484,9 @@ toPropertyWithKey: (NSString *)key
|
|||
{
|
||||
NSMutableArray *relArray;
|
||||
|
||||
if (val)
|
||||
relArray = AUTORELEASE([val mutableCopy]);
|
||||
else
|
||||
relArray = GDL2MutableArrayWithCapacity(10);
|
||||
relArray = (val)
|
||||
? AUTORELEASE([val mutableCopy])
|
||||
: AUTORELEASE([GDL2_alloc(NSMutableArray) initWithCapacity: 10]);
|
||||
|
||||
NSDebugMLLog(@"gsdb", @"relArray=%@ (%@)",
|
||||
relArray, [relArray class]);
|
||||
|
@ -1525,7 +1527,7 @@ toPropertyWithKey: (NSString *)key
|
|||
NSDebugMLLog(@"gsdb", @"object=%@", object);
|
||||
NSDebugMLLog(@"gsdb", @"key=%@ class=%@", key, [key class]);
|
||||
|
||||
if (self==GDL2EONull)
|
||||
if (self==GDL2_EONull)
|
||||
{
|
||||
NSWarnMLog(@"Warning: self is an EONull. key=%@ object=%@",key,object);
|
||||
}
|
||||
|
@ -1558,7 +1560,7 @@ toPropertyWithKey: (NSString *)key
|
|||
|
||||
sel = GSSelectorFromName(buf);
|
||||
|
||||
if (sel && GDL2RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == YES)
|
||||
if (sel && GDL2_RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == YES)
|
||||
{
|
||||
EOFLOGObjectLevel(@"gsdb", @"responds=YES");
|
||||
[self performSelector: sel
|
||||
|
@ -1577,7 +1579,7 @@ toPropertyWithKey: (NSString *)key
|
|||
val = [self valueForKey: key];
|
||||
NSDebugMLLog(@"gsdb", @"val=%@", val);
|
||||
|
||||
if ([val isKindOfClass: GDL2NSMutableArrayClass])
|
||||
if ([val isKindOfClass: GDL2_NSMutableArrayClass])
|
||||
{
|
||||
[self willChange];
|
||||
[val removeObject: object];
|
||||
|
@ -1624,7 +1626,7 @@ forBothSidesOfRelationshipWithKey: (NSString*)key
|
|||
NSDebugMLLog(@"gsdb", @"object=%@", object);
|
||||
NSDebugMLLog(@"gsdb", @"key=%@", key);
|
||||
|
||||
if (self==GDL2EONull)
|
||||
if (self==GDL2_EONull)
|
||||
{
|
||||
NSWarnMLog(@"Warning: self is an EONull. key=%@ object=%@",key,object);
|
||||
}
|
||||
|
@ -1638,7 +1640,7 @@ forBothSidesOfRelationshipWithKey: (NSString*)key
|
|||
|
||||
if (inverseKey)
|
||||
{
|
||||
if (oldObject==GDL2EONull)
|
||||
if (oldObject==GDL2_EONull)
|
||||
{
|
||||
NSWarnMLog(@"Warning: oldObject is an EONull. self=%@ key=%@ object=%@",self,key,object);
|
||||
}
|
||||
|
@ -1692,7 +1694,7 @@ toBothSidesOfRelationshipWithKey: (NSString *)key
|
|||
NSDebugMLLog(@"gsdb", @"object=%@", object);
|
||||
NSDebugMLLog(@"gsdb", @"key=%@", key);
|
||||
|
||||
if (self==GDL2EONull)
|
||||
if (self==GDL2_EONull)
|
||||
{
|
||||
NSWarnMLog(@"Warning: self is an EONull. key=%@ object=%@",key,object);
|
||||
}
|
||||
|
@ -1718,7 +1720,7 @@ toBothSidesOfRelationshipWithKey: (NSString *)key
|
|||
|
||||
if (inverseKey) //if no inverse relation do nothing
|
||||
{
|
||||
if (object==GDL2EONull)
|
||||
if (object==GDL2_EONull)
|
||||
{
|
||||
NSWarnMLog(@"Warning: object is an EONull. self=%@ key=%@ object=%@",self,key,object);
|
||||
}
|
||||
|
@ -1770,7 +1772,7 @@ fromBothSidesOfRelationshipWithKey: (NSString *)key
|
|||
{
|
||||
EOFLOGObjectFnStart();
|
||||
|
||||
if (self==GDL2EONull)
|
||||
if (self==GDL2_EONull)
|
||||
{
|
||||
NSWarnMLog(@"Warning: self is an EONull. key=%@ object=%@",key,object);
|
||||
}
|
||||
|
@ -1783,7 +1785,7 @@ fromBothSidesOfRelationshipWithKey: (NSString *)key
|
|||
|
||||
if ((inverseKey = [self inverseForRelationshipKey: key]))
|
||||
{
|
||||
if (object==GDL2EONull)
|
||||
if (object==GDL2_EONull)
|
||||
{
|
||||
NSWarnMLog(@"Warning: object is an EONull. self=%@ key=%@",self,key);
|
||||
}
|
||||
|
@ -1907,8 +1909,10 @@ fromBothSidesOfRelationshipWithKey: (NSString *)key
|
|||
id propertiesList[2];
|
||||
NSArray *properties;
|
||||
int h, i, count;
|
||||
NSMutableArray *newKeys = GDL2MutableArrayWithCapacity(16);
|
||||
NSMutableArray *newVals = GDL2MutableArrayWithCapacity(16);
|
||||
NSMutableArray *newKeys
|
||||
= AUTORELEASE([GDL2_alloc(NSMutableArray) initWithCapacity: 16]);
|
||||
NSMutableArray *newVals
|
||||
= AUTORELEASE([GDL2_alloc(NSMutableArray) initWithCapacity: 16]);
|
||||
NSString *key;
|
||||
IMP selfSVFK=NULL; // storedValueForKey:
|
||||
IMP snapshotSVFK=NULL; // storedValueForKey:
|
||||
|
@ -1928,15 +1932,15 @@ fromBothSidesOfRelationshipWithKey: (NSString *)key
|
|||
|
||||
for(i = 0; i < count; i++)
|
||||
{
|
||||
key = GDL2ObjectAtIndexWithImpPtr(properties, &oaiIMP, i);
|
||||
val = GDL2StoredValueForKeyWithImpPtr(self, &selfSVFK, key);
|
||||
oldVal = GDL2StoredValueForKeyWithImpPtr(snapshot, &snapshotSVFK, key);
|
||||
key = GDL2_ObjectAtIndexWithImpPtr(properties, &oaiIMP, i);
|
||||
val = GDL2_StoredValueForKeyWithImpPtr(self, &selfSVFK, key);
|
||||
oldVal = GDL2_StoredValueForKeyWithImpPtr(snapshot, &snapshotSVFK, key);
|
||||
|
||||
if (val == oldVal || [val isEqual: oldVal] == YES)
|
||||
continue;
|
||||
|
||||
GDL2AddObjectWithImpPtr(newKeys,&newKeysAO,key);
|
||||
GDL2AddObjectWithImpPtr(newVals,&newValsAO,val);
|
||||
GDL2_AddObjectWithImpPtr(newKeys,&newKeysAO,key);
|
||||
GDL2_AddObjectWithImpPtr(newVals,&newValsAO,val);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1952,14 +1956,14 @@ fromBothSidesOfRelationshipWithKey: (NSString *)key
|
|||
NSArray *val, *oldVal;
|
||||
int valCount, oldValCount;
|
||||
|
||||
key = GDL2ObjectAtIndexWithImpPtr(properties, &oaiIMP, i);
|
||||
val = GDL2StoredValueForKeyWithImpPtr(self, &selfSVFK, key);
|
||||
oldVal = GDL2StoredValueForKeyWithImpPtr(snapshot, &snapshotSVFK, key);
|
||||
key = GDL2_ObjectAtIndexWithImpPtr(properties, &oaiIMP, i);
|
||||
val = GDL2_StoredValueForKeyWithImpPtr(self, &selfSVFK, key);
|
||||
oldVal = GDL2_StoredValueForKeyWithImpPtr(snapshot, &snapshotSVFK, key);
|
||||
|
||||
if ((id)val == GDL2EONull)
|
||||
if ((id)val == GDL2_EONull)
|
||||
val = nil;
|
||||
|
||||
if ((id)oldVal == GDL2EONull)
|
||||
if ((id)oldVal == GDL2_EONull)
|
||||
oldVal = nil;
|
||||
|
||||
if (!val && !oldVal)
|
||||
|
@ -1971,29 +1975,35 @@ fromBothSidesOfRelationshipWithKey: (NSString *)key
|
|||
if (valCount == 0 && oldValCount == 0)
|
||||
continue;
|
||||
|
||||
array = GDL2MutableArrayWithCapacity(2);
|
||||
array
|
||||
= AUTORELEASE([GDL2_alloc(NSMutableArray) initWithCapacity: 2]);
|
||||
|
||||
if (val && valCount>0)
|
||||
{
|
||||
objects = GDL2MutableArrayWithArray(val);
|
||||
objects
|
||||
= AUTORELEASE([GDL2_alloc(NSMutableArray) initWithArray: val]);
|
||||
[objects removeObjectsInArray: oldVal];
|
||||
}
|
||||
else
|
||||
objects = GDL2MutableArrayWithCapacity(1);
|
||||
objects
|
||||
= AUTORELEASE([GDL2_alloc(NSMutableArray) initWithCapacity: 1]);
|
||||
|
||||
[array addObject: objects];
|
||||
|
||||
if (val && valCount > 0)
|
||||
{
|
||||
objects = GDL2MutableArrayWithArray(oldVal);
|
||||
objects
|
||||
= AUTORELEASE([GDL2_alloc(NSMutableArray) initWithArray: oldVal]);
|
||||
[objects removeObjectsInArray: val];
|
||||
}
|
||||
else
|
||||
objects = GDL2MutableArrayWithCapacity(1);
|
||||
objects
|
||||
= AUTORELEASE([GDL2_alloc(NSMutableArray) initWithCapacity: 1]);
|
||||
|
||||
[array addObject: objects];
|
||||
|
||||
GDL2AddObjectWithImpPtr(newKeys,&newKeysAO,key);
|
||||
GDL2AddObjectWithImpPtr(newVals,&newValsAO,array);
|
||||
GDL2_AddObjectWithImpPtr(newKeys,&newKeysAO,key);
|
||||
GDL2_AddObjectWithImpPtr(newVals,&newValsAO,array);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -212,7 +212,7 @@ _mergeValueForKey(id obj, id value,
|
|||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
relObj = GDL2ObjectAtIndexWithImp(del,oaiIMP,i);
|
||||
relObj = GDL2_ObjectAtIndexWithImp(del,oaiIMP,i);
|
||||
|
||||
[obj removeObject: relObj
|
||||
fromPropertyWithKey: key];
|
||||
|
@ -226,7 +226,7 @@ _mergeValueForKey(id obj, id value,
|
|||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
relObj = GDL2ObjectAtIndexWithImp(add,oaiIMP,i);
|
||||
relObj = GDL2_ObjectAtIndexWithImp(add,oaiIMP,i);
|
||||
|
||||
[obj addObject: relObj
|
||||
toPropertyWithKey: key];
|
||||
|
@ -235,7 +235,7 @@ _mergeValueForKey(id obj, id value,
|
|||
|
||||
if (add == nil && del == nil)
|
||||
{
|
||||
value = (value == GDL2EONull) ? nil : value;
|
||||
value = (value == GDL2_EONull) ? nil : value;
|
||||
[obj takeStoredValue: value forKey: key];
|
||||
}
|
||||
}
|
||||
|
@ -416,7 +416,7 @@ _mergeValueForKey(id obj, id value,
|
|||
|
||||
for(i = 0; i < n; i++)
|
||||
{
|
||||
change = GDL2ObjectAtIndexWithImp(changes,oaiIMP,i);
|
||||
change = GDL2_ObjectAtIndexWithImp(changes,oaiIMP,i);
|
||||
key = [change objectForKey: EOConstKey];
|
||||
val = [change objectForKey: EOConstValue];
|
||||
if (val == nil)
|
||||
|
@ -470,7 +470,7 @@ _mergeValueForKey(id obj, id value,
|
|||
|
||||
for (j=0; j<cnt; j++)
|
||||
{
|
||||
EOGlobalID *gid = GDL2ObjectAtIndexWithImp(gids, oaiIMP, j);
|
||||
EOGlobalID *gid = GDL2_ObjectAtIndexWithImp(gids, oaiIMP, j);
|
||||
id obj = EOEditingContext_objectForGlobalIDWithImpPtr(self,&objectForGlobalIDIMP,gid);
|
||||
if (obj)
|
||||
{
|
||||
|
@ -555,7 +555,7 @@ _mergeValueForKey(id obj, id value,
|
|||
IMP oaiIMP=[deletedGIDs methodForSelector: @selector(objectAtIndex:)];
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
id obj = GDL2ObjectAtIndexWithImp(deletedGIDs,oaiIMP,i);
|
||||
id obj = GDL2_ObjectAtIndexWithImp(deletedGIDs,oaiIMP,i);
|
||||
[self _forgetObjectWithGlobalID: obj];
|
||||
}
|
||||
};
|
||||
|
@ -591,7 +591,7 @@ _mergeValueForKey(id obj, id value,
|
|||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
changeSet = GDL2ObjectAtIndexWithImp(updatedChanges,oaiIMP,i);
|
||||
changeSet = GDL2_ObjectAtIndexWithImp(updatedChanges,oaiIMP,i);
|
||||
obj = [changeSet objectForKey: EOConstObject];
|
||||
chgs = [changeSet objectForKey: EOConstChanges];
|
||||
|
||||
|
@ -639,7 +639,7 @@ _mergeValueForKey(id obj, id value,
|
|||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
EOGlobalID *globalID = GDL2ObjectAtIndexWithImp(globalIDs, oaiIMP, i);
|
||||
EOGlobalID *globalID = GDL2_ObjectAtIndexWithImp(globalIDs, oaiIMP, i);
|
||||
id obj = NSMapGet(_objectsByGID, globalID);
|
||||
|
||||
if (obj != nil && [EOFault isFault: obj] == NO)
|
||||
|
@ -704,18 +704,18 @@ _mergeValueForKey(id obj, id value,
|
|||
|
||||
for(i = 0; i < n; i++)
|
||||
{
|
||||
key = GDL2ObjectAtIndexWithImp(attribKeys,oaiIMP, i);
|
||||
key = GDL2_ObjectAtIndexWithImp(attribKeys,oaiIMP, i);
|
||||
objVal = [obj storedValueForKey: key];
|
||||
ssVal = [snapshot objectForKey: key];
|
||||
|
||||
objVal = (objVal == nil) ? GDL2EONull : objVal;
|
||||
objVal = (objVal == nil) ? GDL2_EONull : objVal;
|
||||
|
||||
if ([objVal isEqual: ssVal] == NO)
|
||||
{
|
||||
change = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
key, EOConstKey,
|
||||
objVal, EOConstValue, nil];
|
||||
GDL2AddObjectWithImp(chgs, chgsAddObjectIMP, change);
|
||||
GDL2_AddObjectWithImp(chgs, chgsAddObjectIMP, change);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -728,19 +728,19 @@ _mergeValueForKey(id obj, id value,
|
|||
|
||||
for(i = 0; i < n; i++)
|
||||
{
|
||||
key = GDL2ObjectAtIndexWithImp(toOneKeys, oaiIMP, i);
|
||||
key = GDL2_ObjectAtIndexWithImp(toOneKeys, oaiIMP, i);
|
||||
objVal = [obj storedValueForKey: key];
|
||||
ssVal = [snapshot objectForKey: key];
|
||||
if (objVal != nil)
|
||||
{
|
||||
EOGlobalID *gid = EOEditingContext_globalIDForObjectWithImpPtr(self, &globalIDForObjectIMP, objVal);
|
||||
objVal = (gid == nil) ? GDL2EONull : objVal;
|
||||
objVal = (gid == nil) ? GDL2_EONull : objVal;
|
||||
if (objVal != ssVal)
|
||||
{
|
||||
change = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
key, EOConstKey,
|
||||
objVal, EOConstValue, nil];
|
||||
GDL2AddObjectWithImp(chgs, chgsAddObjectIMP, change);
|
||||
GDL2_AddObjectWithImp(chgs, chgsAddObjectIMP, change);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -753,7 +753,7 @@ _mergeValueForKey(id obj, id value,
|
|||
|
||||
for(i = 0; i < n; i++)
|
||||
{
|
||||
key = GDL2ObjectAtIndexWithImp(toManyKeys, oaiIMP, i);
|
||||
key = GDL2_ObjectAtIndexWithImp(toManyKeys, oaiIMP, i);
|
||||
objVal = [obj storedValueForKey: key];
|
||||
ssVal = [snapshot objectForKey: key];
|
||||
if ([EOFault isFault: objVal] == NO
|
||||
|
@ -776,7 +776,7 @@ _mergeValueForKey(id obj, id value,
|
|||
addArr, EOConstAdd,
|
||||
delArr, EOConstDel,
|
||||
nil];
|
||||
GDL2AddObjectWithImp(chgs, chgsAddObjectIMP, change);
|
||||
GDL2_AddObjectWithImp(chgs, chgsAddObjectIMP, change);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -803,9 +803,9 @@ _mergeValueForKey(id obj, id value,
|
|||
|
||||
for (i=0; i<n; i++)
|
||||
{
|
||||
gid = GDL2ObjectAtIndexWithImp(array, oaiIMP, i);
|
||||
gid = GDL2_ObjectAtIndexWithImp(array, oaiIMP, i);
|
||||
obj = NSMapGet(_objectsByGID, gid);
|
||||
GDL2AddObjectWithImp(set, aoIMP, obj);
|
||||
GDL2_AddObjectWithImp(set, aoIMP, obj);
|
||||
}
|
||||
};
|
||||
return set;
|
||||
|
@ -845,11 +845,11 @@ _mergeValueForKey(id obj, id value,
|
|||
NSAssert(_objectsByGID, @"_objectsByGID does not exist!");
|
||||
NSAssert(_globalIDsByObject, @"_globalIDsByObject does not exist!");
|
||||
|
||||
while ((tempGID = GDL2NextObjectWithImpPtr(enumerator,&enumNO)))
|
||||
while ((tempGID = GDL2_NextObjectWithImpPtr(enumerator,&enumNO)))
|
||||
{
|
||||
EOFLOGObjectLevelArgs(@"EOEditingContext", @"tempGID=%@", tempGID);
|
||||
|
||||
gid = GDL2ObjectForKeyWithImpPtr(userInfo,&userInfoOFK,tempGID);
|
||||
gid = GDL2_ObjectForKeyWithImpPtr(userInfo,&userInfoOFK,tempGID);
|
||||
EOFLOGObjectLevelArgs(@"EOEditingContext", @"gid=%@", gid);
|
||||
|
||||
object = NSMapGet(_objectsByGID, tempGID);
|
||||
|
@ -1116,7 +1116,7 @@ _mergeValueForKey(id obj, id value,
|
|||
|
||||
for (i=0; i<count; i++)
|
||||
{
|
||||
EOGlobalID *gid = GDL2ObjectAtIndexWithImp(gids, oaiIMP, i);
|
||||
EOGlobalID *gid = GDL2_ObjectAtIndexWithImp(gids, oaiIMP, i);
|
||||
(*iowgidIMP)(self, iowgidSEL, gid);
|
||||
}
|
||||
};
|
||||
|
@ -1147,7 +1147,7 @@ _mergeValueForKey(id obj, id value,
|
|||
|
||||
for (i=0; i<count; i++)
|
||||
{
|
||||
EOGlobalID *gid = GDL2ObjectAtIndexWithImp(gids, oaiIMP, i);
|
||||
EOGlobalID *gid = GDL2_ObjectAtIndexWithImp(gids, oaiIMP, i);
|
||||
id obj = EOEditingContext_objectForGlobalIDWithImpPtr(self,&objectForGlobalIDIMP,gid);
|
||||
|
||||
if (obj != nil)
|
||||
|
@ -1156,14 +1156,14 @@ _mergeValueForKey(id obj, id value,
|
|||
{
|
||||
if (!insertedAddObjectIMP)
|
||||
insertedAddObjectIMP = [insertedObjects methodForSelector: @selector(addObject:)];
|
||||
GDL2AddObjectWithImp(insertedObjects, insertedAddObjectIMP, obj);
|
||||
GDL2_AddObjectWithImp(insertedObjects, insertedAddObjectIMP, obj);
|
||||
}
|
||||
|
||||
if (NSHashGet(_deletedObjects, obj))
|
||||
{
|
||||
if (!deletedAddObjectIMP)
|
||||
deletedAddObjectIMP = [deletedObjects methodForSelector: @selector(addObject:)];
|
||||
GDL2AddObjectWithImp(deletedObjects, deletedAddObjectIMP, obj);
|
||||
GDL2_AddObjectWithImp(deletedObjects, deletedAddObjectIMP, obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1726,7 +1726,7 @@ _mergeValueForKey(id obj, id value,
|
|||
|
||||
currEnum = [cumulativeChanges objectEnumerator];
|
||||
currEnumNO=NULL;
|
||||
while ((obj = GDL2NextObjectWithImpPtr(currEnum,&currEnumNO)))
|
||||
while ((obj = GDL2_NextObjectWithImpPtr(currEnum,&currEnumNO)))
|
||||
{
|
||||
if ([consolidatedInserts containsObject: obj])
|
||||
{
|
||||
|
@ -1753,7 +1753,7 @@ _mergeValueForKey(id obj, id value,
|
|||
that have not already been registered. */
|
||||
currEnum = [deletedAndChanged objectEnumerator];
|
||||
currEnumNO=NULL;
|
||||
while ((obj = GDL2NextObjectWithImpPtr(currEnum,&currEnumNO)))
|
||||
while ((obj = GDL2_NextObjectWithImpPtr(currEnum,&currEnumNO)))
|
||||
{
|
||||
[self registerUndoForModifiedObject: obj];
|
||||
}
|
||||
|
@ -2093,7 +2093,7 @@ _mergeValueForKey(id obj, id value,
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
NSString *relKey = GDL2ObjectAtIndexWithImp(toOneRelationshipKeys, oaiIMP, i);
|
||||
NSString *relKey = GDL2_ObjectAtIndexWithImp(toOneRelationshipKeys, oaiIMP, i);
|
||||
BOOL ownsDestinationObjects
|
||||
= [object ownsDestinationObjectsForRelationshipKey:relKey];
|
||||
|
||||
|
@ -2175,7 +2175,7 @@ _mergeValueForKey(id obj, id value,
|
|||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
NSString *relKey = GDL2ObjectAtIndexWithImp(toManyRelationshipKeys, oaiIMP, i);
|
||||
NSString *relKey = GDL2_ObjectAtIndexWithImp(toManyRelationshipKeys, oaiIMP, i);
|
||||
BOOL ownsDestinationObjects
|
||||
= [object ownsDestinationObjectsForRelationshipKey: relKey];
|
||||
|
||||
|
@ -2473,7 +2473,7 @@ _mergeValueForKey(id obj, id value,
|
|||
|
||||
enumerator = [NSAllHashTableObjects(_deletedObjects) objectEnumerator];
|
||||
enumNO=NULL;
|
||||
while ((object = GDL2NextObjectWithImpPtr(enumerator,&enumNO)))
|
||||
while ((object = GDL2_NextObjectWithImpPtr(enumerator,&enumNO)))
|
||||
{
|
||||
[self forgetObject: object];
|
||||
[object clearProperties];
|
||||
|
@ -2491,7 +2491,7 @@ _mergeValueForKey(id obj, id value,
|
|||
|
||||
enumerator = [[_snapshotsByGID allKeys] objectEnumerator];
|
||||
|
||||
while ((gid = GDL2NextObjectWithImpPtr(enumerator,&enumNO)))
|
||||
while ((gid = GDL2_NextObjectWithImpPtr(enumerator,&enumNO)))
|
||||
{
|
||||
id ofgid=EOEditingContext_objectForGlobalIDWithImpPtr(self,&objectForGlobalIDIMP,gid);
|
||||
id snapshot=[ofgid snapshot];
|
||||
|
@ -2535,7 +2535,7 @@ _mergeValueForKey(id obj, id value,
|
|||
|
||||
enumerator = [_editors objectEnumerator];
|
||||
|
||||
while ((object = GDL2NextObjectWithImpPtr(enumerator,&enumNO)))
|
||||
while ((object = GDL2_NextObjectWithImpPtr(enumerator,&enumNO)))
|
||||
[object editingContextWillSaveChanges: self];
|
||||
|
||||
if (_delegateRespondsTo.willSaveChanges)
|
||||
|
@ -2623,7 +2623,7 @@ _mergeValueForKey(id obj, id value,
|
|||
IMP enumNO=NULL; // nextObject
|
||||
|
||||
enumerator = [_eventSnapshotsByGID keyEnumerator];
|
||||
while ((gid = GDL2NextObjectWithImpPtr(enumerator,&enumNO)))
|
||||
while ((gid = GDL2_NextObjectWithImpPtr(enumerator,&enumNO)))
|
||||
{
|
||||
id ofgid=EOEditingContext_objectForGlobalIDWithImpPtr(self,&objectForGlobalIDIMP,gid);
|
||||
[ofgid updateFromSnapshot: [_eventSnapshotsByGID objectForKey: gid]];
|
||||
|
@ -3139,7 +3139,7 @@ modified state of the object.**/
|
|||
|
||||
objsEnum = [objs objectEnumerator];
|
||||
|
||||
while ((obj = GDL2NextObjectWithImpPtr(objsEnum,&enumNO)))
|
||||
while ((obj = GDL2_NextObjectWithImpPtr(objsEnum,&enumNO)))
|
||||
{
|
||||
EOGlobalID* gid=EOEditingContext_globalIDForObjectWithImpPtr(self,&globalIDForObjectIMP,obj);
|
||||
[self refaultObject: obj
|
||||
|
@ -3414,7 +3414,7 @@ modified state of the object.**/
|
|||
|
||||
objsEnum = [objects objectEnumerator];
|
||||
enumNO=NULL;
|
||||
while ((object = GDL2NextObjectWithImpPtr(objsEnum,&enumNO)))
|
||||
while ((object = GDL2_NextObjectWithImpPtr(objsEnum,&enumNO)))
|
||||
{
|
||||
gid=EOEditingContext_globalIDForObjectWithImpPtr(context,&globalIDForObjectIMP,object);
|
||||
|
||||
|
@ -3435,7 +3435,7 @@ modified state of the object.**/
|
|||
|
||||
objsEnum = [objects objectEnumerator];
|
||||
enumNO=NULL;
|
||||
while ((object = GDL2NextObjectWithImpPtr(objsEnum,&enumNO)))
|
||||
while ((object = GDL2_NextObjectWithImpPtr(objsEnum,&enumNO)))
|
||||
{
|
||||
gid=EOEditingContext_globalIDForObjectWithImpPtr(context,&globalIDForObjectIMP,object);
|
||||
localObject = EOEditingContext_objectForGlobalIDWithImpPtr(self,&objectForGlobalIDIMP,gid);
|
||||
|
@ -3447,7 +3447,7 @@ modified state of the object.**/
|
|||
|
||||
objsEnum = [objects objectEnumerator];
|
||||
enumNO=NULL;
|
||||
while ((object = GDL2NextObjectWithImpPtr(objsEnum,&enumNO)))
|
||||
while ((object = GDL2_NextObjectWithImpPtr(objsEnum,&enumNO)))
|
||||
{
|
||||
gid=EOEditingContext_globalIDForObjectWithImpPtr(context,&globalIDForObjectIMP,object);
|
||||
localObject = EOEditingContext_objectForGlobalIDWithImpPtr(self,&objectForGlobalIDIMP,gid);
|
||||
|
@ -3793,7 +3793,7 @@ static BOOL usesContextRelativeEncoding = NO;
|
|||
{
|
||||
if (ecDeallocHT && NSHashGet(ecDeallocHT, self))
|
||||
{
|
||||
[GDL2EOEditingContextClass objectDeallocated: self];
|
||||
[GDL2_EOEditingContextClass objectDeallocated: self];
|
||||
}
|
||||
if (assocDeallocHT && NSHashGet(assocDeallocHT, self))
|
||||
{
|
||||
|
|
|
@ -116,7 +116,7 @@ static NSRecursiveLock *allGenericRecordsLock = nil;
|
|||
{
|
||||
initialized=YES;
|
||||
|
||||
GDL2PrivInit();
|
||||
GDL2_PrivateInit();
|
||||
|
||||
allGenericRecords = NSCreateHashTable(NSNonOwnedPointerHashCallBacks,
|
||||
1000);
|
||||
|
@ -230,7 +230,7 @@ static const char _c_id[2] = { _C_ID, 0 };
|
|||
|
||||
if (!ok)
|
||||
{
|
||||
NSString* name=(stringName ? stringName : GDL2StringWithCString(cStringName));
|
||||
NSString* name=(stringName ? stringName : GDL2_StringWithCString(cStringName));
|
||||
|
||||
EOFLOGObjectLevelArgs(@"EOGenericRecordKVC",
|
||||
@"dictionary: %p eoMKKDInitializer: %p",
|
||||
|
@ -356,7 +356,7 @@ static const char _c_id[2] = { _C_ID, 0 };
|
|||
forKey: key];
|
||||
EOFLOGObjectFnStopOrCond(@"EOGenericRecord");
|
||||
//
|
||||
// if(value == nil || value == GDL2EONull)
|
||||
// if(value == nil || value == GDL2_EONull)
|
||||
// [dictionary removeObjectForKey:key];
|
||||
// else
|
||||
// {
|
||||
|
@ -472,7 +472,7 @@ inline BOOL infoForInstanceVariableWithImpPtr(id object,GDL2IMP_BOOL* impPtr,
|
|||
sel = GSSelectorFromName(buf);
|
||||
|
||||
if (sel == 0 ||
|
||||
GDL2RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == NO)
|
||||
GDL2_RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == NO)
|
||||
{
|
||||
// test _key
|
||||
buf[3]='_';
|
||||
|
@ -484,7 +484,7 @@ inline BOOL infoForInstanceVariableWithImpPtr(id object,GDL2IMP_BOOL* impPtr,
|
|||
sel = GSSelectorFromName(&buf[3]);
|
||||
|
||||
if (sel == 0 ||
|
||||
GDL2RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == NO)
|
||||
GDL2_RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == NO)
|
||||
{
|
||||
sel = 0;
|
||||
}
|
||||
|
@ -542,7 +542,7 @@ inline BOOL infoForInstanceVariableWithImpPtr(id object,GDL2IMP_BOOL* impPtr,
|
|||
aKey, &buf[1]);
|
||||
sel = GSSelectorFromName(&buf[1]);
|
||||
if (sel == 0 ||
|
||||
GDL2RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == NO)
|
||||
GDL2_RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == NO)
|
||||
{
|
||||
// test key
|
||||
buf[4]=lo;
|
||||
|
@ -553,7 +553,7 @@ inline BOOL infoForInstanceVariableWithImpPtr(id object,GDL2IMP_BOOL* impPtr,
|
|||
sel = GSSelectorFromName(&buf[4]);
|
||||
|
||||
if (sel == 0 ||
|
||||
GDL2RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == NO)
|
||||
GDL2_RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == NO)
|
||||
{
|
||||
sel = 0;
|
||||
}
|
||||
|
@ -634,7 +634,7 @@ inline BOOL infoForInstanceVariableWithImpPtr(id object,GDL2IMP_BOOL* impPtr,
|
|||
sel = GSSelectorFromName(buf);
|
||||
|
||||
if (sel == 0 ||
|
||||
GDL2RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == NO)
|
||||
GDL2_RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == NO)
|
||||
{
|
||||
sel = 0;
|
||||
|
||||
|
@ -695,7 +695,7 @@ inline BOOL infoForInstanceVariableWithImpPtr(id object,GDL2IMP_BOOL* impPtr,
|
|||
sel = GSSelectorFromName(&buf[1]);
|
||||
|
||||
if (sel == 0 ||
|
||||
GDL2RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == NO)
|
||||
GDL2_RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == NO)
|
||||
{
|
||||
sel = 0;
|
||||
}
|
||||
|
@ -799,7 +799,7 @@ inline BOOL infoForInstanceVariableWithImpPtr(id object,GDL2IMP_BOOL* impPtr,
|
|||
aKey, &buf[1]);
|
||||
sel = GSSelectorFromName(&buf[1]);
|
||||
|
||||
if (sel == 0 || GDL2RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == NO)
|
||||
if (sel == 0 || GDL2_RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == NO)
|
||||
{
|
||||
// Try _setKey:
|
||||
EOFLOGObjectLevelArgs(@"EOGenericRecordKVC",
|
||||
|
@ -808,7 +808,7 @@ inline BOOL infoForInstanceVariableWithImpPtr(id object,GDL2IMP_BOOL* impPtr,
|
|||
sel = GSSelectorFromName(buf);
|
||||
|
||||
if (sel == 0 ||
|
||||
GDL2RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == NO)
|
||||
GDL2_RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == NO)
|
||||
{
|
||||
sel = 0;
|
||||
|
||||
|
@ -906,7 +906,7 @@ inline BOOL infoForInstanceVariableWithImpPtr(id object,GDL2IMP_BOOL* impPtr,
|
|||
sel = GSSelectorFromName(&buf[1]);
|
||||
|
||||
if (sel == 0 ||
|
||||
GDL2RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == NO)
|
||||
GDL2_RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == NO)
|
||||
{
|
||||
//Test key
|
||||
buf[4] = lo;
|
||||
|
@ -917,7 +917,7 @@ inline BOOL infoForInstanceVariableWithImpPtr(id object,GDL2IMP_BOOL* impPtr,
|
|||
sel = GSSelectorFromName(&buf[4]);
|
||||
|
||||
if (sel == 0 ||
|
||||
GDL2RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == NO)
|
||||
GDL2_RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == NO)
|
||||
{
|
||||
//Test _getKey
|
||||
buf[4] = hi;
|
||||
|
@ -928,7 +928,7 @@ inline BOOL infoForInstanceVariableWithImpPtr(id object,GDL2IMP_BOOL* impPtr,
|
|||
sel = GSSelectorFromName(buf);
|
||||
|
||||
if (sel == 0 ||
|
||||
GDL2RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == NO)
|
||||
GDL2_RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == NO)
|
||||
{
|
||||
// Test _key
|
||||
buf[3] = '_';
|
||||
|
@ -940,7 +940,7 @@ inline BOOL infoForInstanceVariableWithImpPtr(id object,GDL2IMP_BOOL* impPtr,
|
|||
sel = GSSelectorFromName(&buf[3]);
|
||||
|
||||
if (sel == 0 ||
|
||||
GDL2RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == NO)
|
||||
GDL2_RespondsToSelectorWithImpPtr(self,&rtsIMP,sel) == NO)
|
||||
{
|
||||
sel = 0;
|
||||
}
|
||||
|
@ -1044,7 +1044,7 @@ inline BOOL infoForInstanceVariableWithImpPtr(id object,GDL2IMP_BOOL* impPtr,
|
|||
[dictionary setObject: value
|
||||
forKey: key];
|
||||
else
|
||||
// [dictionary setObject: GDL2EONull
|
||||
// [dictionary setObject: GDL2_EONull
|
||||
// forKey: key];
|
||||
[dictionary removeObjectForKey: key];
|
||||
|
||||
|
@ -1072,18 +1072,18 @@ infinite loop in description **/
|
|||
toOneKeys = [classDescription toOneRelationshipKeys];
|
||||
dict = [NSMutableDictionary dictionaryWithCapacity: [dictionary count]];
|
||||
|
||||
while ((key = GDL2NextObjectWithImpPtr(enumerator,&enumNO)))
|
||||
while ((key = GDL2_NextObjectWithImpPtr(enumerator,&enumNO)))
|
||||
{
|
||||
obj = EOMKKD_objectForKeyWithImpPtr(dictionary,&ofkIMP,key);
|
||||
if (!obj)
|
||||
GDL2SetObjectForKeyWithImpPtr(dict,&dictSOFK,@"(null)",key);
|
||||
GDL2_SetObjectForKeyWithImpPtr(dict,&dictSOFK,@"(null)",key);
|
||||
else
|
||||
{
|
||||
// print out only simple values
|
||||
if ([toManyKeys containsObject: key] == NO
|
||||
&& [toOneKeys containsObject: key] == NO)
|
||||
{
|
||||
GDL2SetObjectForKeyWithImpPtr(dict,&dictSOFK,obj,key);
|
||||
GDL2_SetObjectForKeyWithImpPtr(dict,&dictSOFK,obj,key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1112,20 +1112,20 @@ infinite loop in description **/
|
|||
|
||||
dict = [NSMutableDictionary dictionaryWithCapacity: [dictionary count]];
|
||||
|
||||
while ((key = GDL2NextObjectWithImpPtr(enumerator,&enumNO)))
|
||||
while ((key = GDL2_NextObjectWithImpPtr(enumerator,&enumNO)))
|
||||
{
|
||||
obj = EOMKKD_objectForKeyWithImpPtr(dictionary,&ofkIMP,key);
|
||||
|
||||
if (!obj)
|
||||
GDL2SetObjectForKeyWithImpPtr(dict,&dictSOFK,@"(null)",key);
|
||||
GDL2_SetObjectForKeyWithImpPtr(dict,&dictSOFK,@"(null)",key);
|
||||
else if (_isFault(obj) == YES)
|
||||
{
|
||||
GDL2SetObjectForKeyWithImpPtr(dict,&dictSOFK,
|
||||
GDL2_SetObjectForKeyWithImpPtr(dict,&dictSOFK,
|
||||
[obj description],key);
|
||||
}
|
||||
else if (obj==GDL2EONull)
|
||||
else if (obj==GDL2_EONull)
|
||||
{
|
||||
GDL2SetObjectForKeyWithImpPtr(dict,&dictSOFK,@"(null)",key);
|
||||
GDL2_SetObjectForKeyWithImpPtr(dict,&dictSOFK,@"(null)",key);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1137,10 +1137,10 @@ infinite loop in description **/
|
|||
IMP toManyEnumNO=NULL;
|
||||
IMP arrayAO=NULL;
|
||||
|
||||
array = GDL2MutableArrayWithCapacity(8);
|
||||
array = AUTORELEASE([GDL2_alloc(NSMutableArray) initWithCapacity: 8]);
|
||||
toManyEnum = [obj objectEnumerator];
|
||||
|
||||
while ((rel = GDL2NextObjectWithImpPtr(toManyEnum,&toManyEnumNO)))
|
||||
while ((rel = GDL2_NextObjectWithImpPtr(toManyEnum,&toManyEnumNO)))
|
||||
{
|
||||
NSString* relDescr=nil;
|
||||
// Avoid infinit loop
|
||||
|
@ -1149,13 +1149,13 @@ infinite loop in description **/
|
|||
else
|
||||
relDescr=[rel description];
|
||||
|
||||
GDL2AddObjectWithImpPtr(array,&arrayAO,
|
||||
GDL2_AddObjectWithImpPtr(array,&arrayAO,
|
||||
[NSString
|
||||
stringWithFormat: @"<%@ %p>",
|
||||
relDescr, NSStringFromClass([rel class])]);
|
||||
}
|
||||
|
||||
GDL2SetObjectForKeyWithImpPtr(dict,&dictSOFK,
|
||||
GDL2_SetObjectForKeyWithImpPtr(dict,&dictSOFK,
|
||||
[NSString stringWithFormat:
|
||||
@"<%p %@ : %@>",
|
||||
obj, [obj class], array],
|
||||
|
@ -1163,7 +1163,7 @@ infinite loop in description **/
|
|||
}
|
||||
else if ([toOneKeys containsObject: key] != NO)
|
||||
{
|
||||
GDL2SetObjectForKeyWithImpPtr(dict,&dictSOFK,
|
||||
GDL2_SetObjectForKeyWithImpPtr(dict,&dictSOFK,
|
||||
[NSString
|
||||
stringWithFormat: @"<%p %@: classDescription=%@>",
|
||||
obj,
|
||||
|
@ -1173,7 +1173,7 @@ infinite loop in description **/
|
|||
}
|
||||
else
|
||||
{
|
||||
GDL2SetObjectForKeyWithImpPtr(dict,&dictSOFK,obj,key);
|
||||
GDL2_SetObjectForKeyWithImpPtr(dict,&dictSOFK,obj,key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ RCS_ID("$Id$")
|
|||
static BOOL initialized=NO;
|
||||
if (!initialized)
|
||||
{
|
||||
GDL2PrivInit();
|
||||
GDL2_PrivateInit();
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ initialize(void)
|
|||
{
|
||||
initialized=YES;
|
||||
strictWO = GSUseStrictWO451Compatibility(nil);
|
||||
GDL2PrivInit();
|
||||
GDL2_PrivateInit();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,7 @@ initialize(void)
|
|||
{
|
||||
result = [self resultsOfPerformingSelector: @selector(valueForKey:)
|
||||
withObject: key
|
||||
defaultResult: GDL2EONull];
|
||||
defaultResult: GDL2_EONull];
|
||||
}
|
||||
|
||||
EOFLOGObjectFnStopCond(@"EOKVC");
|
||||
|
@ -325,7 +325,7 @@ initialize(void)
|
|||
for (i=0; i<count; i++)
|
||||
{
|
||||
left = result;
|
||||
right = [[GDL2ObjectAtIndexWithImp(self,oaiIMP,i) valueForKey: key] decimalValue];
|
||||
right = [[GDL2_ObjectAtIndexWithImp(self,oaiIMP,i) valueForKey: key] decimalValue];
|
||||
NSDecimalAdd(&result, &left, &right, mode);
|
||||
}
|
||||
};
|
||||
|
@ -363,7 +363,7 @@ initialize(void)
|
|||
for (i=0; i<count; i++)
|
||||
{
|
||||
left = result;
|
||||
right = [[GDL2ObjectAtIndexWithImp(self,oaiIMP,i) valueForKey: key] decimalValue];
|
||||
right = [[GDL2_ObjectAtIndexWithImp(self,oaiIMP,i) valueForKey: key] decimalValue];
|
||||
NSDecimalAdd(&result, &left, &right, mode);
|
||||
}
|
||||
};
|
||||
|
@ -407,17 +407,17 @@ initialize(void)
|
|||
id currentVal = nil;
|
||||
IMP oaiIMP = [self methodForSelector: @selector(objectAtIndex:)];
|
||||
|
||||
for(i=0; i<count && (resultVal == nil || resultVal == GDL2EONull); i++)
|
||||
for(i=0; i<count && (resultVal == nil || resultVal == GDL2_EONull); i++)
|
||||
{
|
||||
result = GDL2ObjectAtIndexWithImp(self,oaiIMP,i);
|
||||
result = GDL2_ObjectAtIndexWithImp(self,oaiIMP,i);
|
||||
resultVal = [result valueForKey: key];
|
||||
}
|
||||
for (; i<count; i++)
|
||||
{
|
||||
current = GDL2ObjectAtIndexWithImp(self,oaiIMP,i);
|
||||
current = GDL2_ObjectAtIndexWithImp(self,oaiIMP,i);
|
||||
currentVal = [current valueForKey: key];
|
||||
|
||||
if (currentVal == nil || currentVal == GDL2EONull)
|
||||
if (currentVal == nil || currentVal == GDL2_EONull)
|
||||
continue;
|
||||
|
||||
if ([(NSObject *)resultVal compare: currentVal] == NSOrderedAscending)
|
||||
|
@ -450,17 +450,17 @@ initialize(void)
|
|||
unsigned int i = 0;
|
||||
IMP oaiIMP = [self methodForSelector: @selector(objectAtIndex:)];
|
||||
|
||||
for(i=0; i<count && (resultVal == nil || resultVal == GDL2EONull); i++)
|
||||
for(i=0; i<count && (resultVal == nil || resultVal == GDL2_EONull); i++)
|
||||
{
|
||||
result = GDL2ObjectAtIndexWithImp(self,oaiIMP,i);
|
||||
result = GDL2_ObjectAtIndexWithImp(self,oaiIMP,i);
|
||||
resultVal = [result valueForKey: key];
|
||||
}
|
||||
for (; i<count; i++)
|
||||
{
|
||||
current = GDL2ObjectAtIndexWithImp(self,oaiIMP,i);
|
||||
current = GDL2_ObjectAtIndexWithImp(self,oaiIMP,i);
|
||||
currentVal = [current valueForKey: key];
|
||||
|
||||
if (currentVal == nil || currentVal == GDL2EONull) continue;
|
||||
if (currentVal == nil || currentVal == GDL2_EONull) continue;
|
||||
|
||||
if ([(NSObject *)resultVal compare: currentVal] == NSOrderedDescending)
|
||||
{
|
||||
|
@ -1073,7 +1073,7 @@ initialize(void)
|
|||
|
||||
if (val == nil)
|
||||
{
|
||||
val = GDL2EONull;
|
||||
val = GDL2_EONull;
|
||||
}
|
||||
|
||||
[newKeyPaths addObject: keyPath];
|
||||
|
@ -1191,7 +1191,7 @@ initialize(void)
|
|||
NS_ENDHANDLER;
|
||||
|
||||
if (val == nil)
|
||||
val = GDL2EONull;
|
||||
val = GDL2_EONull;
|
||||
|
||||
[newKeyPaths addObject: keyPath];
|
||||
[newVals addObject: val];
|
||||
|
|
|
@ -91,7 +91,7 @@ RCS_ID("$Id$")
|
|||
{
|
||||
initialized=YES;
|
||||
|
||||
GDL2PrivInit();
|
||||
GDL2_PrivateInit();
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,7 @@ RCS_ID("$Id$")
|
|||
ASSIGNCOPY(_key, key);
|
||||
if (value == nil)
|
||||
{
|
||||
value = GDL2EONull;
|
||||
value = GDL2_EONull;
|
||||
}
|
||||
ASSIGN(_value, value);
|
||||
}
|
||||
|
@ -216,11 +216,11 @@ RCS_ID("$Id$")
|
|||
|
||||
if (objectValue == nil)
|
||||
{
|
||||
objectValue = GDL2EONull;
|
||||
objectValue = GDL2_EONull;
|
||||
}
|
||||
if (selfValue == nil)
|
||||
{
|
||||
selfValue = GDL2EONull;
|
||||
selfValue = GDL2_EONull;
|
||||
}
|
||||
|
||||
imp = (BOOL (*)(id, SEL, id))[objectValue methodForSelector: _selector];
|
||||
|
@ -238,36 +238,36 @@ RCS_ID("$Id$")
|
|||
}
|
||||
else if (sel_eq(_selector, EOQualifierOperatorLessThan) == YES)
|
||||
{
|
||||
if (objectValue==GDL2EONull)
|
||||
return ((selfValue==GDL2EONull) ? NO : YES);
|
||||
else if (selfValue==GDL2EONull)
|
||||
if (objectValue==GDL2_EONull)
|
||||
return ((selfValue==GDL2_EONull) ? NO : YES);
|
||||
else if (selfValue==GDL2_EONull)
|
||||
return NO;
|
||||
else
|
||||
return [objectValue compare: selfValue] == NSOrderedAscending;
|
||||
}
|
||||
else if (sel_eq(_selector, EOQualifierOperatorGreaterThan) == YES)
|
||||
{
|
||||
if (objectValue==GDL2EONull)
|
||||
if (objectValue==GDL2_EONull)
|
||||
return NO;
|
||||
else if (selfValue==GDL2EONull)
|
||||
else if (selfValue==GDL2_EONull)
|
||||
return YES;
|
||||
else
|
||||
return [objectValue compare: selfValue] == NSOrderedDescending;
|
||||
}
|
||||
else if (sel_eq(_selector, EOQualifierOperatorLessThanOrEqualTo) == YES)
|
||||
{
|
||||
if (objectValue==GDL2EONull)
|
||||
if (objectValue==GDL2_EONull)
|
||||
return YES;
|
||||
else if (selfValue==GDL2EONull)
|
||||
else if (selfValue==GDL2_EONull)
|
||||
return NO;
|
||||
else
|
||||
return [objectValue compare: selfValue] != NSOrderedDescending;
|
||||
}
|
||||
else if (sel_eq(_selector, EOQualifierOperatorGreaterThanOrEqualTo) == YES)
|
||||
{
|
||||
if (objectValue==GDL2EONull)
|
||||
return ((selfValue==GDL2EONull) ? YES : NO);
|
||||
else if (selfValue==GDL2EONull)
|
||||
if (objectValue==GDL2_EONull)
|
||||
return ((selfValue==GDL2_EONull) ? YES : NO);
|
||||
else if (selfValue==GDL2_EONull)
|
||||
return YES;
|
||||
else
|
||||
return [objectValue compare: selfValue] != NSOrderedAscending;
|
||||
|
@ -276,9 +276,9 @@ RCS_ID("$Id$")
|
|||
{
|
||||
//Philosophical question: does nil contains nil ??
|
||||
|
||||
if (objectValue==GDL2EONull) // Let's say nil does contain nothing (even not nil)
|
||||
if (objectValue==GDL2_EONull) // Let's say nil does contain nothing (even not nil)
|
||||
return NO;
|
||||
else if (selfValue==GDL2EONull) // Let's say nil is contained by nothing
|
||||
else if (selfValue==GDL2_EONull) // Let's say nil is contained by nothing
|
||||
return NO;
|
||||
else
|
||||
return [(NSString*)objectValue rangeOfString:
|
||||
|
@ -294,9 +294,9 @@ RCS_ID("$Id$")
|
|||
{
|
||||
NSEmitTODO(); //TODO
|
||||
//How to handle nil like ?
|
||||
if (objectValue==GDL2EONull)
|
||||
return ((selfValue==GDL2EONull) ? YES : NO);
|
||||
else if (selfValue==GDL2EONull)
|
||||
if (objectValue==GDL2_EONull)
|
||||
return ((selfValue==GDL2_EONull) ? YES : NO);
|
||||
else if (selfValue==GDL2_EONull)
|
||||
return NO;
|
||||
else
|
||||
return [(id)objectValue caseInsensitiveCompare:
|
||||
|
|
|
@ -67,7 +67,7 @@ RCS_ID("$Id$")
|
|||
if (!initialized)
|
||||
{
|
||||
initialized=YES;
|
||||
GDL2PrivInit();
|
||||
GDL2_PrivateInit();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -270,7 +270,7 @@ RCS_ID("$Id$")
|
|||
|
||||
for (i = 0; i < keyCount; i++)
|
||||
{
|
||||
NSString *key = GDL2ObjectAtIndexWithImp(keys,objectAtIndexIMP,i);
|
||||
NSString *key = GDL2_ObjectAtIndexWithImp(keys,objectAtIndexIMP,i);
|
||||
int destinationIndex = EOMKKDInitializer_indexForKeyWithImpPtr(self,&indexForKeyIMP,key);
|
||||
|
||||
|
||||
|
@ -318,11 +318,11 @@ RCS_ID("$Id$")
|
|||
int sourceIndex = 0;
|
||||
|
||||
sourceKey =
|
||||
GDL2ObjectAtIndexWithImp(sourceKeys,sourceObjectAtIndexIMP,i);
|
||||
GDL2_ObjectAtIndexWithImp(sourceKeys,sourceObjectAtIndexIMP,i);
|
||||
EOFLOGObjectLevelArgs(@"EOMKKD", @"sourceKey=%@", sourceKey);
|
||||
|
||||
destinationKey =
|
||||
GDL2ObjectAtIndexWithImp(destinationKeys,destinationObjectAtIndexIMP,i);
|
||||
GDL2_ObjectAtIndexWithImp(destinationKeys,destinationObjectAtIndexIMP,i);
|
||||
EOFLOGObjectLevelArgs(@"EOMKKD", @"destinationKey=%@", destinationKey);
|
||||
|
||||
destinationIndex =
|
||||
|
@ -572,7 +572,7 @@ RCS_ID("$Id$")
|
|||
if (!initialized)
|
||||
{
|
||||
initialized=YES;
|
||||
GDL2PrivInit();
|
||||
GDL2_PrivateInit();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,59 +41,63 @@ typedef BOOL (*GDL2IMP_BOOL)(id, SEL, ...);
|
|||
typedef NSStringEncoding (*GDL2IMP_NSStringEncoding)(id, SEL, ...);
|
||||
|
||||
// ==== Classes ====
|
||||
GDL2CONTROL_EXPORT Class GDL2NSArrayClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2NSMutableArrayClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2NSDictionaryClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2NSMutableDictionaryClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2NSStringClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2NSNumberClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2NSDecimalNumberClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2NSCalendarDateClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2NSDateClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2NSAutoreleasePoolClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2NSDataClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2EOFaultClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2MKKDClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2EOMKKDInitializerClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2EOEditingContextClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2_NSArrayClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2_NSMutableArrayClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2_NSDictionaryClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2_NSMutableDictionaryClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2_NSStringClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2_NSNumberClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2_NSDecimalNumberClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2_NSCalendarDateClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2_NSDateClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2_NSAutoreleasePoolClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2_NSDataClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2_EOFaultClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2_MKKDClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2_EOMKKDInitializerClass;
|
||||
GDL2CONTROL_EXPORT Class GDL2_EOEditingContextClass;
|
||||
|
||||
// ==== IMPs ====
|
||||
GDL2CONTROL_EXPORT IMP GDL2NSAutoreleasePool_newIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2NSNumber_allocWithZoneIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2NSDecimalNumber_allocWithZoneIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2NSString_allocWithZoneIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2NSCalendarDate_allocWithZoneIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2NSData_allocWithZoneIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2NSData_dataWithBytes_lengthIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2_NSAutoreleasePool_newIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2_NSNumber_allocWithZoneIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2_NSDecimalNumber_allocWithZoneIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2_NSString_allocWithZoneIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2_NSCalendarDate_allocWithZoneIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2_NSData_allocWithZoneIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2_NSMutableArray_allocWithZoneIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2_NSMutableDictionary_allocWithZoneIMP;
|
||||
|
||||
GDL2CONTROL_EXPORT IMP GDL2NSString_stringWithCString_lengthIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2NSString_stringWithCStringIMP;
|
||||
GDL2CONTROL_EXPORT GDL2IMP_NSStringEncoding GDL2NSString_defaultCStringEncodingIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2_NSData_dataWithBytes_lengthIMP;
|
||||
|
||||
GDL2CONTROL_EXPORT IMP GDL2MKKD_objectForKeyIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2MKKD_setObjectForKeyIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2MKKD_removeObjectForKeyIMP;
|
||||
GDL2CONTROL_EXPORT GDL2IMP_BOOL GDL2MKKD_hasKeyIMP;
|
||||
GDL2CONTROL_EXPORT GDL2IMP_UINT GDL2MKKD_indexForKeyIMP;
|
||||
GDL2CONTROL_EXPORT GDL2IMP_UINT GDL2EOMKKDInitializer_indexForKeyIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2_NSString_stringWithCString_lengthIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2_NSString_stringWithCStringIMP;
|
||||
GDL2CONTROL_EXPORT GDL2IMP_NSStringEncoding GDL2_NSString_defaultCStringEncodingIMP;
|
||||
|
||||
GDL2CONTROL_EXPORT IMP GDL2EOEditingContext_recordObjectGlobalIDIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2EOEditingContext_objectForGlobalIDIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2EOEditingContext_globalIDForObjectIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2_MKKD_objectForKeyIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2_MKKD_setObjectForKeyIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2_MKKD_removeObjectForKeyIMP;
|
||||
GDL2CONTROL_EXPORT GDL2IMP_BOOL GDL2_MKKD_hasKeyIMP;
|
||||
GDL2CONTROL_EXPORT GDL2IMP_UINT GDL2_MKKD_indexForKeyIMP;
|
||||
GDL2CONTROL_EXPORT GDL2IMP_UINT GDL2_EOMKKDInitializer_indexForKeyIMP;
|
||||
|
||||
GDL2CONTROL_EXPORT IMP GDL2NSMutableArray_arrayWithCapacityIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2NSMutableArray_arrayWithArrayIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2NSMutableArray_arrayIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2NSArray_arrayIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2NSMutableDictionary_dictionaryWithCapacityIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2_EOEditingContext_recordObjectGlobalIDIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2_EOEditingContext_objectForGlobalIDIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2_EOEditingContext_globalIDForObjectIMP;
|
||||
|
||||
GDL2CONTROL_EXPORT IMP GDL2_NSMutableArray_arrayWithCapacityIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2_NSMutableArray_arrayWithArrayIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2_NSMutableArray_arrayIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2_NSArray_arrayIMP;
|
||||
GDL2CONTROL_EXPORT IMP GDL2_NSMutableDictionary_dictionaryWithCapacityIMP;
|
||||
|
||||
// ==== Constants ====
|
||||
GDL2CONTROL_EXPORT NSNumber* GDL2NSNumberBool_Yes;
|
||||
GDL2CONTROL_EXPORT NSNumber* GDL2NSNumberBool_No;
|
||||
GDL2CONTROL_EXPORT EONull* GDL2EONull;
|
||||
GDL2CONTROL_EXPORT NSNumber* GDL2_NSNumberBool_Yes;
|
||||
GDL2CONTROL_EXPORT NSNumber* GDL2_NSNumberBool_No;
|
||||
GDL2CONTROL_EXPORT EONull* GDL2_EONull;
|
||||
GDL2CONTROL_EXPORT NSArray* GDL2_NSArray;
|
||||
|
||||
// ==== Init Method ====
|
||||
GDL2CONTROL_EXPORT void GDL2PrivInit();
|
||||
GDL2CONTROL_EXPORT void GDL2_PrivateInit();
|
||||
|
||||
// ==== IMP Helpers ====
|
||||
|
||||
|
@ -102,19 +106,24 @@ _isNilOrEONull(id obj) __attribute__ ((unused));
|
|||
static inline BOOL
|
||||
_isNilOrEONull(id obj)
|
||||
{
|
||||
if (GDL2EONull == nil) GDL2PrivInit();
|
||||
return (obj == nil || obj == GDL2EONull) ? YES : NO;
|
||||
if (GDL2_EONull == nil) GDL2_PrivateInit();
|
||||
return (obj == nil || obj == GDL2_EONull) ? YES : NO;
|
||||
}
|
||||
|
||||
//See also EOControl/EOFault.m
|
||||
#define _isFault(v) \
|
||||
(((v)==nil) ? NO : ((((EOFault*)(v))->isa == GDL2EOFaultClass) ? YES : NO))
|
||||
(((v)==nil) ? NO : ((((EOFault*)(v))->isa == GDL2_EOFaultClass) ? YES : NO))
|
||||
|
||||
// ---- +alloc/+allocWithZone: ----
|
||||
#define GDL2_alloc(CLASS_NAME) \
|
||||
(*GDL2_##CLASS_NAME##_allocWithZoneIMP) \
|
||||
(GDL2_##CLASS_NAME##Class,@selector(allocWithZone:),NULL)
|
||||
|
||||
// ---- NSMutableString appendString: ----
|
||||
#define GDL2AppendStringWithImp(string,methodIMP,aString) \
|
||||
#define GDL2_AppendStringWithImp(string,methodIMP,aString) \
|
||||
(*(methodIMP))((string),@selector(appendString:),(aString))
|
||||
|
||||
static inline void GDL2AppendStringWithImpPtr(NSMutableString* object,IMP* impPtr,NSString* string)
|
||||
static inline void GDL2_AppendStringWithImpPtr(NSMutableString* object,IMP* impPtr,NSString* string)
|
||||
{
|
||||
if (object)
|
||||
{
|
||||
|
@ -125,10 +134,10 @@ static inline void GDL2AppendStringWithImpPtr(NSMutableString* object,IMP* impPt
|
|||
};
|
||||
|
||||
// ---- NSMutableArray addObject: ----
|
||||
#define GDL2AddObjectWithImp(array,methodIMP,anObject) \
|
||||
#define GDL2_AddObjectWithImp(array,methodIMP,anObject) \
|
||||
(*(methodIMP))((array),@selector(addObject:),(anObject))
|
||||
|
||||
static inline void GDL2AddObjectWithImpPtr(id object,IMP* impPtr,id objectToAdd)
|
||||
static inline void GDL2_AddObjectWithImpPtr(id object,IMP* impPtr,id objectToAdd)
|
||||
{
|
||||
if (object)
|
||||
{
|
||||
|
@ -139,10 +148,10 @@ static inline void GDL2AddObjectWithImpPtr(id object,IMP* impPtr,id objectToAdd)
|
|||
};
|
||||
|
||||
// ---- NSArray objectAtIndex: ----
|
||||
#define GDL2ObjectAtIndexWithImp(array,methodIMP,index) \
|
||||
#define GDL2_ObjectAtIndexWithImp(array,methodIMP,index) \
|
||||
(*(methodIMP))((array),@selector(objectAtIndex:),(index))
|
||||
|
||||
static inline id GDL2ObjectAtIndexWithImpPtr(id object,IMP* impPtr,int index)
|
||||
static inline id GDL2_ObjectAtIndexWithImpPtr(id object,IMP* impPtr,int index)
|
||||
{
|
||||
if (object)
|
||||
{
|
||||
|
@ -155,15 +164,15 @@ static inline id GDL2ObjectAtIndexWithImpPtr(id object,IMP* impPtr,int index)
|
|||
};
|
||||
|
||||
// ---- NSArray indexOfObjectIdenticalTo: ----
|
||||
#define GDL2IndexOfObjectIdenticalToWithImp(array,methodIMP,anObject) \
|
||||
#define GDL2_IndexOfObjectIdenticalToWithImp(array,methodIMP,anObject) \
|
||||
(*(methodIMP))((array),@selector(indexOfObjectIdenticalTo:),(anObject))
|
||||
|
||||
|
||||
// ---- NSArray lastObject ----
|
||||
#define GDL2LastObjectWithImp(array,methodIMP) \
|
||||
#define GDL2_LastObjectWithImp(array,methodIMP) \
|
||||
(*(methodIMP))((array),@selector(lastObject))
|
||||
|
||||
static inline id GDL2LastObjectWithImpPtr(id object,IMP* impPtr)
|
||||
static inline id GDL2_LastObjectWithImpPtr(id object,IMP* impPtr)
|
||||
{
|
||||
if (object)
|
||||
{
|
||||
|
@ -176,10 +185,10 @@ static inline id GDL2LastObjectWithImpPtr(id object,IMP* impPtr)
|
|||
};
|
||||
|
||||
// ---- NSEnumerator nextObject ----
|
||||
#define GDL2NextObjectWithImp(enumerator,methodIMP) \
|
||||
#define GDL2_NextObjectWithImp(enumerator,methodIMP) \
|
||||
(*(methodIMP))((enumerator),@selector(nextObject))
|
||||
|
||||
static inline id GDL2NextObjectWithImpPtr(id object,IMP* impPtr)
|
||||
static inline id GDL2_NextObjectWithImpPtr(id object,IMP* impPtr)
|
||||
{
|
||||
if (object)
|
||||
{
|
||||
|
@ -192,10 +201,10 @@ static inline id GDL2NextObjectWithImpPtr(id object,IMP* impPtr)
|
|||
};
|
||||
|
||||
// ---- KVC storedValueForKey: ----
|
||||
#define GDL2StoredValueForKeyWithImp(object,methodIMP,value,key) \
|
||||
#define GDL2_StoredValueForKeyWithImp(object,methodIMP,value,key) \
|
||||
(*methodIMP)((object),@selector(storedValueForKey:),value,key)
|
||||
|
||||
static inline id GDL2StoredValueForKeyWithImpPtr(id object,IMP* impPtr,id key)
|
||||
static inline id GDL2_StoredValueForKeyWithImpPtr(id object,IMP* impPtr,id key)
|
||||
{
|
||||
if (object)
|
||||
{
|
||||
|
@ -208,10 +217,10 @@ static inline id GDL2StoredValueForKeyWithImpPtr(id object,IMP* impPtr,id key)
|
|||
};
|
||||
|
||||
// ---- KVC takeStoredValue:forKey: ----
|
||||
#define GDL2TakeStoredValueForKeyWithImp(object,methodIMP,value,key) \
|
||||
#define GDL2_TakeStoredValueForKeyWithImp(object,methodIMP,value,key) \
|
||||
(*methodIMP)((object),@selector(takeStoredValue:forKey:),value,key)
|
||||
|
||||
static inline void GDL2TakeStoredValueForKeyWithImpPtr(id object,IMP* impPtr,id value, id key)
|
||||
static inline void GDL2_TakeStoredValueForKeyWithImpPtr(id object,IMP* impPtr,id value, id key)
|
||||
{
|
||||
if (object)
|
||||
{
|
||||
|
@ -222,10 +231,10 @@ static inline void GDL2TakeStoredValueForKeyWithImpPtr(id object,IMP* impPtr,id
|
|||
};
|
||||
|
||||
// ---- KVC valueForKey: ----
|
||||
#define GDL2ValueForKeyWithImp(object,methodIMP,value,key) \
|
||||
#define GDL2_ValueForKeyWithImp(object,methodIMP,value,key) \
|
||||
(*methodIMP)((object),@selector(valueForKey:),value,key)
|
||||
|
||||
static inline id GDL2ValueForKeyWithImpPtr(id object,IMP* impPtr,id key)
|
||||
static inline id GDL2_ValueForKeyWithImpPtr(id object,IMP* impPtr,id key)
|
||||
{
|
||||
if (object)
|
||||
{
|
||||
|
@ -238,10 +247,10 @@ static inline id GDL2ValueForKeyWithImpPtr(id object,IMP* impPtr,id key)
|
|||
};
|
||||
|
||||
// ---- KVC takeValue:forKey: ----
|
||||
#define GDL2TakeValueForKeyWithImp(object,methodIMP,value,key) \
|
||||
#define GDL2_TakeValueForKeyWithImp(object,methodIMP,value,key) \
|
||||
(*methodIMP)((object),@selector(takeValue:forKey:),value,key)
|
||||
|
||||
static inline void GDL2TakeValueForKeyWithImpPtr(id object,IMP* impPtr,id value, id key)
|
||||
static inline void GDL2_TakeValueForKeyWithImpPtr(id object,IMP* impPtr,id value, id key)
|
||||
{
|
||||
if (object)
|
||||
{
|
||||
|
@ -252,10 +261,10 @@ static inline void GDL2TakeValueForKeyWithImpPtr(id object,IMP* impPtr,id value,
|
|||
};
|
||||
|
||||
// ---- KVC validateValue:forKey: ----
|
||||
#define GDL2ValidateValueForKeyWithImp(object,methodIMP,valuePtr,key) \
|
||||
#define GDL2_ValidateValueForKeyWithImp(object,methodIMP,valuePtr,key) \
|
||||
(*methodIMP)((object),@selector(validateValue:forKey:),valuePtr,key)
|
||||
|
||||
static inline id GDL2ValidateValueForKeyWithImpPtr(id object,IMP* impPtr,id* valuePtr,id key)
|
||||
static inline id GDL2_ValidateValueForKeyWithImpPtr(id object,IMP* impPtr,id* valuePtr,id key)
|
||||
{
|
||||
if (object)
|
||||
{
|
||||
|
@ -268,10 +277,10 @@ static inline id GDL2ValidateValueForKeyWithImpPtr(id object,IMP* impPtr,id* val
|
|||
};
|
||||
|
||||
// ---- Dictionary objectForKey: ----
|
||||
#define GDL2ObjectForKeyWithImp(object,methodIMP,value,key) \
|
||||
#define GDL2_ObjectForKeyWithImp(object,methodIMP,value,key) \
|
||||
(*methodIMP)((object),@selector(objectForKey:),value,key)
|
||||
|
||||
static inline id GDL2ObjectForKeyWithImpPtr(id object,IMP* impPtr,id key)
|
||||
static inline id GDL2_ObjectForKeyWithImpPtr(id object,IMP* impPtr,id key)
|
||||
{
|
||||
if (object)
|
||||
{
|
||||
|
@ -284,10 +293,10 @@ static inline id GDL2ObjectForKeyWithImpPtr(id object,IMP* impPtr,id key)
|
|||
};
|
||||
|
||||
// ---- Dictionary setObject:forKey: ----
|
||||
#define GDL2SetObjectForKeyWithImp(object,methodIMP,value,key) \
|
||||
#define GDL2_SetObjectForKeyWithImp(object,methodIMP,value,key) \
|
||||
(*methodIMP)((object),@selector(setObject:forKey:),value,key)
|
||||
|
||||
static inline void GDL2SetObjectForKeyWithImpPtr(id object,IMP* impPtr,id value, id key)
|
||||
static inline void GDL2_SetObjectForKeyWithImpPtr(id object,IMP* impPtr,id value, id key)
|
||||
{
|
||||
if (object)
|
||||
{
|
||||
|
@ -298,67 +307,27 @@ static inline void GDL2SetObjectForKeyWithImpPtr(id object,IMP* impPtr,id value,
|
|||
};
|
||||
|
||||
// ---- NSString stringWithCString:length: ----
|
||||
#define GDL2StringWithCStringAndLength(cString,len) \
|
||||
(*GDL2NSString_stringWithCString_lengthIMP)(GDL2NSStringClass,@selector(stringWithCString:length:),(const char*)(cString),(unsigned)(len))
|
||||
#define GDL2_StringWithCStringAndLength(cString,len) \
|
||||
(*GDL2_NSString_stringWithCString_lengthIMP)(GDL2_NSStringClass,@selector(stringWithCString:length:),(const char*)(cString),(unsigned)(len))
|
||||
|
||||
// ---- NSString stringWithCString: ----
|
||||
#define GDL2StringWithCString(cString) \
|
||||
(*GDL2NSString_stringWithCStringIMP)(GDL2NSStringClass,@selector(stringWithCString:),(const char*)(cString))
|
||||
#define GDL2_StringWithCString(cString) \
|
||||
(*GDL2_NSString_stringWithCStringIMP)(GDL2_NSStringClass,@selector(stringWithCString:),(const char*)(cString))
|
||||
|
||||
// ---- NSString +defaultCStringEncoding ----
|
||||
#define GDL2StringDefaultCStringEncoding() \
|
||||
(*GDL2NSString_defaultCStringEncodingIMP)(GDL2NSStringClass,@selector(defaultCStringEncoding))
|
||||
#define GDL2_StringDefaultCStringEncoding() \
|
||||
(*GDL2_NSString_defaultCStringEncodingIMP)(GDL2_NSStringClass,@selector(defaultCStringEncoding))
|
||||
|
||||
// ---- NSAutoreleasePool +new ----
|
||||
#define GDL2NSAutoreleasePool_new() \
|
||||
(*GDL2NSAutoreleasePool_newIMP)(GDL2NSAutoreleasePoolClass,@selector(new))
|
||||
|
||||
// ---- NSString +alloc ----
|
||||
#define GDL2NSString_alloc() \
|
||||
(*GDL2NSString_allocWithZoneIMP)(GDL2NSStringClass,@selector(allocWithZone:),NULL)
|
||||
|
||||
// ---- NSDecimalNumber +alloc ----
|
||||
#define GDL2NSDecimalNumber_alloc() \
|
||||
(*GDL2NSDecimalNumber_allocWithZoneIMP)(GDL2NSDecimalNumberClass,@selector(allocWithZone:),NULL)
|
||||
|
||||
// ---- NSNumber +alloc ----
|
||||
#define GDL2NSNumber_alloc() \
|
||||
(*GDL2NSNumber_allocWithZoneIMP)(GDL2NSNumberClass,@selector(allocWithZone:),NULL)
|
||||
|
||||
// ---- NSCalendarDate +alloc ----
|
||||
#define GDL2NSCalendarDate_alloc() \
|
||||
(*GDL2NSCalendarDate_allocWithZoneIMP)(GDL2NSCalendarDateClass,@selector(allocWithZone:),NULL)
|
||||
|
||||
// ---- NSData +alloc ----
|
||||
#define GDL2NSData_alloc() \
|
||||
(*GDL2NSData_allocWithZoneIMP)(GDL2NSDataClass,@selector(allocWithZone:),NULL)
|
||||
#define GDL2_NSAutoreleasePool_new() \
|
||||
(*GDL2_NSAutoreleasePool_newIMP)(GDL2_NSAutoreleasePoolClass,@selector(new))
|
||||
|
||||
// ---- NSData dataWithBytes:length: ----
|
||||
#define GDL2DataWithBytesAndLength(bytes,length) \
|
||||
(*GDL2NSData_dataWithBytes_lengthIMP)(GDL2NSDataClass,@selector(dataWithBytes:length:),(const void*)(bytes),(int)(length))
|
||||
|
||||
// ---- NSMutableArray +arrayWithCapacity: ----
|
||||
#define GDL2MutableArrayWithCapacity(capacity) \
|
||||
(*GDL2NSMutableArray_arrayWithCapacityIMP)(GDL2NSMutableArrayClass,@selector(arrayWithCapacity:),capacity)
|
||||
|
||||
// ---- NSMutableArray +arrayWithArray: ----
|
||||
#define GDL2MutableArrayWithArray(array) \
|
||||
(*GDL2NSMutableArray_arrayWithArrayIMP)(GDL2NSMutableArrayClass,@selector(arrayWithArray:),array)
|
||||
|
||||
// ---- NSMutableArray +array ----
|
||||
#define GDL2MutableArray() \
|
||||
(*GDL2NSMutableArray_arrayIMP)(GDL2NSMutableArrayClass,(array))
|
||||
|
||||
// ---- NSArray +array ----
|
||||
#define GDL2Array() \
|
||||
(*GDL2NSArray_arrayIMP)(GDL2NSArrayClass,@selector(array))
|
||||
|
||||
// ---- NSMutableDictionary +dictionaryWithCapacity: ----
|
||||
#define GDL2MutableDictionaryWithCapacity(capacity) \
|
||||
(*GDL2NSMutableDictionary_dictionaryWithCapacityIMP)(GDL2NSMutableDictionaryClass,@selector(dictionaryWithCapacity:),capacity)
|
||||
#define GDL2_DataWithBytesAndLength(bytes,length) \
|
||||
(*GDL2_NSData_dataWithBytes_lengthIMP)(GDL2_NSDataClass,@selector(dataWithBytes:length:),(const void*)(bytes),(int)(length))
|
||||
|
||||
// ---- NSObject respondsToSelector: ----
|
||||
static inline BOOL GDL2RespondsToSelectorWithImpPtr(id object,GDL2IMP_BOOL* impPtr,SEL sel)
|
||||
static inline BOOL GDL2_RespondsToSelectorWithImpPtr(id object,GDL2IMP_BOOL* impPtr,SEL sel)
|
||||
{
|
||||
if (object)
|
||||
{
|
||||
|
|
|
@ -48,144 +48,155 @@ RCS_ID("$Id$")
|
|||
#include "EOPrivate.h"
|
||||
|
||||
// ==== Classes ====
|
||||
Class GDL2NSArrayClass=Nil;
|
||||
Class GDL2NSMutableArrayClass=Nil;
|
||||
Class GDL2NSDictionaryClass=Nil;
|
||||
Class GDL2NSMutableDictionaryClass=Nil;
|
||||
Class GDL2NSStringClass=Nil;
|
||||
Class GDL2NSNumberClass=Nil;
|
||||
Class GDL2NSDecimalNumberClass=Nil;
|
||||
Class GDL2NSCalendarDateClass=Nil;
|
||||
Class GDL2NSDateClass=Nil;
|
||||
Class GDL2NSAutoreleasePoolClass=Nil;
|
||||
Class GDL2NSDataClass=Nil;
|
||||
Class GDL2EOFaultClass=Nil;
|
||||
Class GDL2MKKDClass=Nil;
|
||||
Class GDL2EOMKKDInitializerClass=Nil;
|
||||
Class GDL2EOEditingContextClass=Nil;
|
||||
Class GDL2_NSArrayClass=Nil;
|
||||
Class GDL2_NSMutableArrayClass=Nil;
|
||||
Class GDL2_NSDictionaryClass=Nil;
|
||||
Class GDL2_NSMutableDictionaryClass=Nil;
|
||||
Class GDL2_NSStringClass=Nil;
|
||||
Class GDL2_NSNumberClass=Nil;
|
||||
Class GDL2_NSDecimalNumberClass=Nil;
|
||||
Class GDL2_NSCalendarDateClass=Nil;
|
||||
Class GDL2_NSDateClass=Nil;
|
||||
Class GDL2_NSAutoreleasePoolClass=Nil;
|
||||
Class GDL2_NSDataClass=Nil;
|
||||
Class GDL2_EOFaultClass=Nil;
|
||||
Class GDL2_MKKDClass=Nil;
|
||||
Class GDL2_EOMKKDInitializerClass=Nil;
|
||||
Class GDL2_EOEditingContextClass=Nil;
|
||||
|
||||
// ==== IMPs ====
|
||||
IMP GDL2NSAutoreleasePool_newIMP=NULL;
|
||||
IMP GDL2NSNumber_allocWithZoneIMP=NULL;
|
||||
IMP GDL2NSDecimalNumber_allocWithZoneIMP=NULL;
|
||||
IMP GDL2NSString_allocWithZoneIMP=NULL;
|
||||
IMP GDL2NSCalendarDate_allocWithZoneIMP=NULL;
|
||||
IMP GDL2NSData_allocWithZoneIMP=NULL;
|
||||
IMP GDL2NSData_dataWithBytes_lengthIMP=NULL;
|
||||
IMP GDL2_NSAutoreleasePool_newIMP=NULL;
|
||||
IMP GDL2_NSNumber_allocWithZoneIMP=NULL;
|
||||
IMP GDL2_NSDecimalNumber_allocWithZoneIMP=NULL;
|
||||
IMP GDL2_NSString_allocWithZoneIMP=NULL;
|
||||
IMP GDL2_NSCalendarDate_allocWithZoneIMP=NULL;
|
||||
IMP GDL2_NSData_allocWithZoneIMP=NULL;
|
||||
IMP GDL2_NSMutableArray_allocWithZoneIMP=NULL;
|
||||
IMP GDL2_NSMutableDictionary_allocWithZoneIMP=NULL;
|
||||
|
||||
IMP GDL2NSString_stringWithCString_lengthIMP=NULL;
|
||||
IMP GDL2NSString_stringWithCStringIMP=NULL;
|
||||
GDL2IMP_NSStringEncoding GDL2NSString_defaultCStringEncodingIMP=NULL;
|
||||
IMP GDL2_NSData_dataWithBytes_lengthIMP=NULL;
|
||||
|
||||
IMP GDL2MKKD_objectForKeyIMP=NULL;
|
||||
IMP GDL2MKKD_setObjectForKeyIMP=NULL;
|
||||
IMP GDL2MKKD_removeObjectForKeyIMP=NULL;
|
||||
GDL2IMP_BOOL GDL2MKKD_hasKeyIMP=NULL;
|
||||
GDL2IMP_UINT GDL2MKKD_indexForKeyIMP=NULL;
|
||||
GDL2IMP_UINT GDL2EOMKKDInitializer_indexForKeyIMP=NULL;
|
||||
IMP GDL2_NSString_stringWithCString_lengthIMP=NULL;
|
||||
IMP GDL2_NSString_stringWithCStringIMP=NULL;
|
||||
GDL2IMP_NSStringEncoding GDL2_NSString_defaultCStringEncodingIMP=NULL;
|
||||
|
||||
IMP GDL2EOEditingContext_recordObjectGlobalIDIMP=NULL;
|
||||
IMP GDL2EOEditingContext_objectForGlobalIDIMP=NULL;
|
||||
IMP GDL2EOEditingContext_globalIDForObjectIMP=NULL;
|
||||
IMP GDL2_MKKD_objectForKeyIMP=NULL;
|
||||
IMP GDL2_MKKD_setObjectForKeyIMP=NULL;
|
||||
IMP GDL2_MKKD_removeObjectForKeyIMP=NULL;
|
||||
GDL2IMP_BOOL GDL2_MKKD_hasKeyIMP=NULL;
|
||||
GDL2IMP_UINT GDL2_MKKD_indexForKeyIMP=NULL;
|
||||
GDL2IMP_UINT GDL2_EOMKKDInitializer_indexForKeyIMP=NULL;
|
||||
|
||||
IMP GDL2NSMutableArray_arrayWithCapacityIMP=NULL;
|
||||
IMP GDL2NSMutableArray_arrayWithArrayIMP=NULL;
|
||||
IMP GDL2NSMutableArray_arrayIMP=NULL;
|
||||
IMP GDL2NSArray_arrayIMP=NULL;
|
||||
IMP GDL2_EOEditingContext_recordObjectGlobalIDIMP=NULL;
|
||||
IMP GDL2_EOEditingContext_objectForGlobalIDIMP=NULL;
|
||||
IMP GDL2_EOEditingContext_globalIDForObjectIMP=NULL;
|
||||
|
||||
IMP GDL2NSMutableDictionary_dictionaryWithCapacityIMP=NULL;
|
||||
IMP GDL2_NSMutableArray_arrayWithCapacityIMP=NULL;
|
||||
IMP GDL2_NSMutableArray_arrayWithArrayIMP=NULL;
|
||||
IMP GDL2_NSMutableArray_arrayIMP=NULL;
|
||||
IMP GDL2_NSArray_arrayIMP=NULL;
|
||||
|
||||
IMP GDL2_NSMutableDictionary_dictionaryWithCapacityIMP=NULL;
|
||||
|
||||
// ==== Constants ====
|
||||
NSNumber* GDL2NSNumberBool_Yes=nil;
|
||||
NSNumber* GDL2NSNumberBool_No=nil;
|
||||
NSNumber* GDL2_NSNumberBool_Yes=nil;
|
||||
NSNumber* GDL2_NSNumberBool_No=nil;
|
||||
|
||||
EONull* GDL2EONull=nil;
|
||||
EONull* GDL2_EONull=nil;
|
||||
NSArray* GDL2_NSArray=nil;
|
||||
|
||||
// ==== Init Method ====
|
||||
void GDL2PrivInit()
|
||||
void GDL2_PrivateInit()
|
||||
{
|
||||
static BOOL initialized=NO;
|
||||
if (!initialized)
|
||||
{
|
||||
// ==== Classes ====
|
||||
GDL2NSArrayClass=[NSArray class];
|
||||
GDL2NSMutableArrayClass=[NSMutableArray class];
|
||||
GDL2NSDictionaryClass=[NSDictionary class];
|
||||
GDL2NSMutableDictionaryClass=[NSMutableDictionary class];
|
||||
GDL2NSStringClass=[NSString class];
|
||||
GDL2NSNumberClass=[NSNumber class];
|
||||
GDL2NSDecimalNumberClass=[NSDecimalNumber class];
|
||||
GDL2NSCalendarDateClass=[NSCalendarDate class];
|
||||
GDL2NSDateClass = [NSDate class];
|
||||
GDL2NSAutoreleasePoolClass = [NSAutoreleasePool class];
|
||||
GDL2NSDataClass = [NSData class];
|
||||
GDL2EOFaultClass = [EOFault class];
|
||||
GDL2MKKDClass = [EOMutableKnownKeyDictionary class];
|
||||
GDL2EOMKKDInitializerClass = [EOMKKDInitializer class];
|
||||
GDL2EOEditingContextClass = [EOEditingContext class];
|
||||
GDL2_NSArrayClass=[NSArray class];
|
||||
GDL2_NSMutableArrayClass=[NSMutableArray class];
|
||||
GDL2_NSDictionaryClass=[NSDictionary class];
|
||||
GDL2_NSMutableDictionaryClass=[NSMutableDictionary class];
|
||||
GDL2_NSStringClass=[NSString class];
|
||||
GDL2_NSNumberClass=[NSNumber class];
|
||||
GDL2_NSDecimalNumberClass=[NSDecimalNumber class];
|
||||
GDL2_NSCalendarDateClass=[NSCalendarDate class];
|
||||
GDL2_NSDateClass = [NSDate class];
|
||||
GDL2_NSAutoreleasePoolClass = [NSAutoreleasePool class];
|
||||
GDL2_NSDataClass = [NSData class];
|
||||
GDL2_EOFaultClass = [EOFault class];
|
||||
GDL2_MKKDClass = [EOMutableKnownKeyDictionary class];
|
||||
GDL2_EOMKKDInitializerClass = [EOMKKDInitializer class];
|
||||
GDL2_EOEditingContextClass = [EOEditingContext class];
|
||||
|
||||
// ==== IMPs ====
|
||||
GDL2NSAutoreleasePool_newIMP=
|
||||
[GDL2NSAutoreleasePoolClass methodForSelector:@selector(new)];
|
||||
GDL2_NSAutoreleasePool_newIMP=
|
||||
[GDL2_NSAutoreleasePoolClass methodForSelector:@selector(new)];
|
||||
|
||||
GDL2NSNumber_allocWithZoneIMP=
|
||||
[GDL2NSNumberClass methodForSelector:@selector(allocWithZone:)];
|
||||
GDL2_NSNumber_allocWithZoneIMP=
|
||||
[GDL2_NSNumberClass methodForSelector:@selector(allocWithZone:)];
|
||||
|
||||
GDL2NSDecimalNumber_allocWithZoneIMP=
|
||||
[GDL2NSDecimalNumberClass methodForSelector:@selector(allocWithZone:)];
|
||||
GDL2_NSDecimalNumber_allocWithZoneIMP=
|
||||
[GDL2_NSDecimalNumberClass methodForSelector:@selector(allocWithZone:)];
|
||||
|
||||
GDL2NSString_allocWithZoneIMP=
|
||||
[GDL2NSStringClass methodForSelector:@selector(allocWithZone:)];
|
||||
GDL2_NSString_allocWithZoneIMP=
|
||||
[GDL2_NSStringClass methodForSelector:@selector(allocWithZone:)];
|
||||
|
||||
GDL2NSCalendarDate_allocWithZoneIMP=
|
||||
[GDL2NSCalendarDateClass methodForSelector:@selector(allocWithZone:)];
|
||||
GDL2_NSCalendarDate_allocWithZoneIMP=
|
||||
[GDL2_NSCalendarDateClass methodForSelector:@selector(allocWithZone:)];
|
||||
|
||||
GDL2NSData_allocWithZoneIMP=
|
||||
[GDL2NSDataClass methodForSelector:@selector(allocWithZone:)];
|
||||
GDL2_NSData_allocWithZoneIMP=
|
||||
[GDL2_NSDataClass methodForSelector:@selector(allocWithZone:)];
|
||||
|
||||
GDL2NSData_dataWithBytes_lengthIMP=
|
||||
[GDL2NSDataClass methodForSelector:@selector(dataWithBytes:length:)];
|
||||
GDL2_NSMutableArray_allocWithZoneIMP=
|
||||
[GDL2_NSMutableArrayClass methodForSelector:@selector(allocWithZone:)];
|
||||
|
||||
GDL2NSString_stringWithCString_lengthIMP=
|
||||
[GDL2NSStringClass methodForSelector:@selector(stringWithCString:length:)];
|
||||
GDL2_NSMutableDictionary_allocWithZoneIMP=
|
||||
[GDL2_NSMutableDictionaryClass methodForSelector:@selector(allocWithZone:)];
|
||||
|
||||
GDL2NSString_stringWithCStringIMP=
|
||||
[GDL2NSStringClass methodForSelector:@selector(stringWithCString:)];
|
||||
GDL2_NSData_dataWithBytes_lengthIMP=
|
||||
[GDL2_NSDataClass methodForSelector:@selector(dataWithBytes:length:)];
|
||||
|
||||
GDL2NSString_defaultCStringEncodingIMP=
|
||||
(GDL2IMP_NSStringEncoding)[GDL2NSStringClass methodForSelector:@selector(defaultCStringEncoding)];
|
||||
GDL2_NSString_stringWithCString_lengthIMP=
|
||||
[GDL2_NSStringClass methodForSelector:@selector(stringWithCString:length:)];
|
||||
|
||||
GDL2MKKD_objectForKeyIMP=[GDL2MKKDClass instanceMethodForSelector:@selector(objectForKey:)];
|
||||
GDL2MKKD_setObjectForKeyIMP=[GDL2MKKDClass instanceMethodForSelector:@selector(setObject:forKey:)];
|
||||
GDL2MKKD_removeObjectForKeyIMP=[GDL2MKKDClass instanceMethodForSelector:@selector(removeObjectForKey:)];
|
||||
GDL2MKKD_hasKeyIMP=(GDL2IMP_BOOL)[GDL2MKKDClass instanceMethodForSelector:@selector(hasKey:)];
|
||||
GDL2MKKD_indexForKeyIMP=(GDL2IMP_UINT)[GDL2MKKDClass instanceMethodForSelector:@selector(indexForKey:)];
|
||||
GDL2EOMKKDInitializer_indexForKeyIMP=(GDL2IMP_UINT)[GDL2EOMKKDInitializerClass instanceMethodForSelector:@selector(indexForKey:)];
|
||||
GDL2_NSString_stringWithCStringIMP=
|
||||
[GDL2_NSStringClass methodForSelector:@selector(stringWithCString:)];
|
||||
|
||||
GDL2EOEditingContext_recordObjectGlobalIDIMP==[GDL2EOEditingContextClass instanceMethodForSelector:@selector(recordObject:globalID:)];
|
||||
GDL2EOEditingContext_objectForGlobalIDIMP=[GDL2EOEditingContextClass instanceMethodForSelector:@selector(objectForGlobalID:)];
|
||||
GDL2EOEditingContext_globalIDForObjectIMP=[GDL2EOEditingContextClass instanceMethodForSelector:@selector(globalIDForObject:)];
|
||||
GDL2_NSString_defaultCStringEncodingIMP=
|
||||
(GDL2IMP_NSStringEncoding)[GDL2_NSStringClass methodForSelector:@selector(defaultCStringEncoding)];
|
||||
|
||||
GDL2NSMutableArray_arrayWithCapacityIMP=[GDL2NSMutableArrayClass
|
||||
GDL2_MKKD_objectForKeyIMP=[GDL2_MKKDClass instanceMethodForSelector:@selector(objectForKey:)];
|
||||
GDL2_MKKD_setObjectForKeyIMP=[GDL2_MKKDClass instanceMethodForSelector:@selector(setObject:forKey:)];
|
||||
GDL2_MKKD_removeObjectForKeyIMP=[GDL2_MKKDClass instanceMethodForSelector:@selector(removeObjectForKey:)];
|
||||
GDL2_MKKD_hasKeyIMP=(GDL2IMP_BOOL)[GDL2_MKKDClass instanceMethodForSelector:@selector(hasKey:)];
|
||||
GDL2_MKKD_indexForKeyIMP=(GDL2IMP_UINT)[GDL2_MKKDClass instanceMethodForSelector:@selector(indexForKey:)];
|
||||
GDL2_EOMKKDInitializer_indexForKeyIMP=(GDL2IMP_UINT)[GDL2_EOMKKDInitializerClass instanceMethodForSelector:@selector(indexForKey:)];
|
||||
|
||||
GDL2_EOEditingContext_recordObjectGlobalIDIMP==[GDL2_EOEditingContextClass instanceMethodForSelector:@selector(recordObject:globalID:)];
|
||||
GDL2_EOEditingContext_objectForGlobalIDIMP=[GDL2_EOEditingContextClass instanceMethodForSelector:@selector(objectForGlobalID:)];
|
||||
GDL2_EOEditingContext_globalIDForObjectIMP=[GDL2_EOEditingContextClass instanceMethodForSelector:@selector(globalIDForObject:)];
|
||||
|
||||
GDL2_NSMutableArray_arrayWithCapacityIMP=[GDL2_NSMutableArrayClass
|
||||
methodForSelector:@selector(arrayWithCapacity:)];
|
||||
|
||||
GDL2NSMutableArray_arrayWithArrayIMP=[GDL2NSMutableArrayClass
|
||||
GDL2_NSMutableArray_arrayWithArrayIMP=[GDL2_NSMutableArrayClass
|
||||
methodForSelector:@selector(arrayWithArray:)];
|
||||
|
||||
GDL2NSMutableArray_arrayIMP=[GDL2NSMutableArrayClass
|
||||
GDL2_NSMutableArray_arrayIMP=[GDL2_NSMutableArrayClass
|
||||
methodForSelector:@selector(array)];
|
||||
|
||||
GDL2NSArray_arrayIMP=[GDL2NSArrayClass
|
||||
GDL2_NSArray_arrayIMP=[GDL2_NSArrayClass
|
||||
methodForSelector:@selector(array)];
|
||||
|
||||
GDL2NSMutableDictionary_dictionaryWithCapacityIMP=[GDL2NSMutableDictionaryClass
|
||||
GDL2_NSMutableDictionary_dictionaryWithCapacityIMP=[GDL2_NSMutableDictionaryClass
|
||||
methodForSelector:@selector(dictionaryWithCapacity:)];
|
||||
|
||||
// ==== Constants ====
|
||||
ASSIGN(GDL2NSNumberBool_Yes,[GDL2NSNumberClass numberWithBool:YES]);
|
||||
ASSIGN(GDL2NSNumberBool_No,[GDL2NSNumberClass numberWithBool:NO]);
|
||||
ASSIGN(GDL2_NSNumberBool_Yes,[GDL2_NSNumberClass numberWithBool:YES]);
|
||||
ASSIGN(GDL2_NSNumberBool_No,[GDL2_NSNumberClass numberWithBool:NO]);
|
||||
|
||||
ASSIGN(GDL2EONull,[EONull null]);
|
||||
ASSIGN(GDL2_EONull,[EONull null]);
|
||||
ASSIGN(GDL2_NSArray,[NSArray array]);
|
||||
|
||||
};
|
||||
}
|
||||
|
@ -204,9 +215,9 @@ EOMKKD_objectForKeyWithImpPtr(NSDictionary* mkkd,
|
|||
imp=*impPtr;
|
||||
if (!imp)
|
||||
{
|
||||
if (GSObjCClass(mkkd)==GDL2MKKDClass
|
||||
&& GDL2MKKD_objectForKeyIMP)
|
||||
imp=GDL2MKKD_objectForKeyIMP;
|
||||
if (GSObjCClass(mkkd)==GDL2_MKKDClass
|
||||
&& GDL2_MKKD_objectForKeyIMP)
|
||||
imp=GDL2_MKKD_objectForKeyIMP;
|
||||
else
|
||||
imp=[mkkd methodForSelector:@selector(objectForKey:)];
|
||||
if (impPtr)
|
||||
|
@ -231,9 +242,9 @@ EOMKKD_setObjectForKeyWithImpPtr(NSDictionary* mkkd,
|
|||
imp=*impPtr;
|
||||
if (!imp)
|
||||
{
|
||||
if (GSObjCClass(mkkd)==GDL2MKKDClass
|
||||
&& GDL2MKKD_setObjectForKeyIMP)
|
||||
imp=GDL2MKKD_setObjectForKeyIMP;
|
||||
if (GSObjCClass(mkkd)==GDL2_MKKDClass
|
||||
&& GDL2_MKKD_setObjectForKeyIMP)
|
||||
imp=GDL2_MKKD_setObjectForKeyIMP;
|
||||
else
|
||||
imp=[mkkd methodForSelector:@selector(setObject:forKey:)];
|
||||
if (impPtr)
|
||||
|
@ -255,9 +266,9 @@ EOMKKD_removeObjectForKeyWithImpPtr(NSDictionary* mkkd,
|
|||
imp=*impPtr;
|
||||
if (!imp)
|
||||
{
|
||||
if (GSObjCClass(mkkd)==GDL2MKKDClass
|
||||
&& GDL2MKKD_removeObjectForKeyIMP)
|
||||
imp=GDL2MKKD_removeObjectForKeyIMP;
|
||||
if (GSObjCClass(mkkd)==GDL2_MKKDClass
|
||||
&& GDL2_MKKD_removeObjectForKeyIMP)
|
||||
imp=GDL2_MKKD_removeObjectForKeyIMP;
|
||||
else
|
||||
imp=[mkkd methodForSelector:@selector(removeObjectForKey:)];
|
||||
if (impPtr)
|
||||
|
@ -279,9 +290,9 @@ EOMKKD_hasKeyWithImpPtr(NSDictionary* mkkd,
|
|||
imp=*impPtr;
|
||||
if (!imp)
|
||||
{
|
||||
if (GSObjCClass(mkkd)==GDL2MKKDClass
|
||||
&& GDL2MKKD_hasKeyIMP)
|
||||
imp=GDL2MKKD_hasKeyIMP;
|
||||
if (GSObjCClass(mkkd)==GDL2_MKKDClass
|
||||
&& GDL2_MKKD_hasKeyIMP)
|
||||
imp=GDL2_MKKD_hasKeyIMP;
|
||||
else
|
||||
imp=(GDL2IMP_BOOL)[mkkd methodForSelector:@selector(hasKey:)];
|
||||
if (impPtr)
|
||||
|
@ -305,9 +316,9 @@ EOMKKD_indexForKeyWithImpPtr(EOMutableKnownKeyDictionary* mkkd,
|
|||
imp=*impPtr;
|
||||
if (!imp)
|
||||
{
|
||||
if (GSObjCClass(mkkd)==GDL2MKKDClass
|
||||
&& GDL2MKKD_indexForKeyIMP)
|
||||
imp=GDL2MKKD_indexForKeyIMP;
|
||||
if (GSObjCClass(mkkd)==GDL2_MKKDClass
|
||||
&& GDL2_MKKD_indexForKeyIMP)
|
||||
imp=GDL2_MKKD_indexForKeyIMP;
|
||||
else
|
||||
imp=(GDL2IMP_UINT)[mkkd methodForSelector:@selector(indexForKey:)];
|
||||
if (impPtr)
|
||||
|
@ -331,9 +342,9 @@ EOMKKDInitializer_indexForKeyWithImpPtr(EOMKKDInitializer* mkkdInit,
|
|||
imp=*impPtr;
|
||||
if (!imp)
|
||||
{
|
||||
if (GSObjCClass(mkkdInit)==GDL2EOMKKDInitializerClass
|
||||
&& GDL2EOMKKDInitializer_indexForKeyIMP)
|
||||
imp=GDL2EOMKKDInitializer_indexForKeyIMP;
|
||||
if (GSObjCClass(mkkdInit)==GDL2_EOMKKDInitializerClass
|
||||
&& GDL2_EOMKKDInitializer_indexForKeyIMP)
|
||||
imp=GDL2_EOMKKDInitializer_indexForKeyIMP;
|
||||
else
|
||||
imp=(GDL2IMP_UINT)[mkkdInit methodForSelector:@selector(indexForKey:)];
|
||||
if (impPtr)
|
||||
|
@ -359,9 +370,9 @@ EOEditingContext_objectForGlobalIDWithImpPtr(EOEditingContext *edContext,
|
|||
imp=*impPtr;
|
||||
if (!imp)
|
||||
{
|
||||
if (GSObjCClass(edContext)==GDL2EOEditingContextClass
|
||||
&& GDL2EOEditingContext_objectForGlobalIDIMP)
|
||||
imp=GDL2EOEditingContext_objectForGlobalIDIMP;
|
||||
if (GSObjCClass(edContext)==GDL2_EOEditingContextClass
|
||||
&& GDL2_EOEditingContext_objectForGlobalIDIMP)
|
||||
imp=GDL2_EOEditingContext_objectForGlobalIDIMP;
|
||||
else
|
||||
imp=[edContext methodForSelector:@selector(objectForGlobalID:)];
|
||||
if (impPtr)
|
||||
|
@ -385,9 +396,9 @@ EOEditingContext_globalIDForObjectWithImpPtr(EOEditingContext *edContext,
|
|||
imp=*impPtr;
|
||||
if (!imp)
|
||||
{
|
||||
if (GSObjCClass(edContext)==GDL2EOEditingContextClass
|
||||
&& GDL2EOEditingContext_globalIDForObjectIMP)
|
||||
imp=GDL2EOEditingContext_globalIDForObjectIMP;
|
||||
if (GSObjCClass(edContext)==GDL2_EOEditingContextClass
|
||||
&& GDL2_EOEditingContext_globalIDForObjectIMP)
|
||||
imp=GDL2_EOEditingContext_globalIDForObjectIMP;
|
||||
else
|
||||
imp=[edContext methodForSelector:@selector(globalIDForObject:)];
|
||||
if (impPtr)
|
||||
|
@ -412,9 +423,9 @@ EOEditingContext_recordObjectGlobalIDWithImpPtr(EOEditingContext *edContext,
|
|||
imp=*impPtr;
|
||||
if (!imp)
|
||||
{
|
||||
if (GSObjCClass(edContext)==GDL2EOEditingContextClass
|
||||
&& GDL2EOEditingContext_recordObjectGlobalIDIMP)
|
||||
imp=GDL2EOEditingContext_recordObjectGlobalIDIMP;
|
||||
if (GSObjCClass(edContext)==GDL2_EOEditingContextClass
|
||||
&& GDL2_EOEditingContext_recordObjectGlobalIDIMP)
|
||||
imp=GDL2_EOEditingContext_recordObjectGlobalIDIMP;
|
||||
else
|
||||
imp=[edContext methodForSelector:@selector(recordObject:globalID:)];
|
||||
if (impPtr)
|
||||
|
|
|
@ -64,7 +64,7 @@ RCS_ID("$Id$")
|
|||
{
|
||||
initialized=YES;
|
||||
|
||||
GDL2PrivInit();
|
||||
GDL2_PrivateInit();
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -206,15 +206,15 @@ compareUsingSortOrderings(id left,
|
|||
NSComparisonResult (*imp)(id, SEL, id);
|
||||
|
||||
/* Use EONull instead of nil. */
|
||||
leftVal = (leftVal != nil)?(leftVal) :(GDL2EONull);
|
||||
rightVal = (rightVal != nil)?(rightVal):(GDL2EONull);
|
||||
leftVal = (leftVal != nil)?(leftVal) :(GDL2_EONull);
|
||||
rightVal = (rightVal != nil)?(rightVal):(GDL2_EONull);
|
||||
|
||||
/* Insure that EONull is not the parameter for
|
||||
comparisons with other classes. */
|
||||
if (rightVal == GDL2EONull)
|
||||
if (rightVal == GDL2_EONull)
|
||||
{
|
||||
rightVal = leftVal;
|
||||
leftVal = GDL2EONull;
|
||||
leftVal = GDL2_EONull;
|
||||
inverted = YES;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue