* EOControl/EOPriv.h/m: Split into...

* EOControl/EOPrivat.h/m: ... and ...
        * EOAccess/EOPrivat.h/m: ... files.
        * EOAccess/EOAdaptorChannel.m: Include new privat header.
        * EOAccess/EOAttribute.m, EOAccess/EODatabase.m,
        * EOAccess/EODatabaseChannel.m, EOAccess/EOEntity.m,
        * EOAccess/EORelationship.m, EOAccess/EOSQLExpression.m,
        * EOAccess/EOSQLQualifier.m, EOAccess/EOUtilities.m: Ditto.
        (+initialize): Call new private function.
        * EOAccess/EODatabaseContext.m: Ditto.
        (EODatabaseContext_snapshotForGlobalIDWithImpPtr)
        (EODatabaseContext_globalIDForObjectWithImpPtr): Move to
        EOPrivate.m.
        * EOAccess/EODatabaseContextPriv.h:
        (EODatabaseContext_snapshotForGlobalIDWithImpPtr)
        (EODatabaseContext_globalIDForObjectWithImpPtr): Move to
        EOPrivate.h.
        * EOAccess/GNUmakefile: Compile EOPrivate.m.

        * EOControl/EOClassDescription.m, EOControl/EOGenericRecord.m
        * EOControl/EOKeyGlobalID.m, EOControl/EOKeyValueCoding.m
        * EOControl/EOKeyValueQualifier.m, EOControl/EONSAddOns.m
        * EOControl/EOSortOrdering.m: Include new private header.
        * EOControl/EOEditingContext.h/m: Ditto.
        (EOEditingContext_objectForGlobalIDWithImpPtr)
        (EOEditingContext_recordObjectGlobalIDWithImpPtr): Move to
        EOPrivate.h/m.
        * EOControl/EOMutableKnownKeyDictionary.h/m: Include new
        private header.
        (EOMKKD_objectForKeyWithImpPtr, EOMKKD_setObjectForKeyWithImpPtr)
        (EOMKKD_removeObjectForKeyWithImpPtr, EOMKKD_hasKeyWithImpPtr)
        (EOMKKD_indexForKeyWithImpPtr)
        (EOMKKDInitializer_indexForKeyWithImpPtr): Move to EOPrivate.m
        * EOControl/EOFault.m: (+isFault:): Update comment.
        * EOControl/GNUmakefile: Build EOPrivate.m instead of EOPriv.m.
        Do not install private header.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20759 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
ayers 2005-02-20 10:52:57 +00:00
parent 8a74a3fb34
commit 3d9dbffe7f
29 changed files with 397 additions and 340 deletions

View file

@ -1,6 +1,43 @@
2005-02-20 David Ayers <d.ayers@inode.at>
* EOAccess/EOAccessFault.m: Include NSThread.h.
* EOControl/EOPriv.h/m: Split into...
* EOControl/EOPrivat.h/m: ... and ...
* EOAccess/EOPrivat.h/m: ... files.
* EOAccess/EOAdaptorChannel.m: Include new privat header.
* EOAccess/EOAttribute.m, EOAccess/EODatabase.m,
* EOAccess/EODatabaseChannel.m, EOAccess/EOEntity.m,
* EOAccess/EORelationship.m, EOAccess/EOSQLExpression.m,
* EOAccess/EOSQLQualifier.m, EOAccess/EOUtilities.m: Ditto.
(+initialize): Call new private function.
* EOAccess/EODatabaseContext.m: Ditto.
(EODatabaseContext_snapshotForGlobalIDWithImpPtr)
(EODatabaseContext_globalIDForObjectWithImpPtr): Move to
EOPrivate.m.
* EOAccess/EODatabaseContextPriv.h:
(EODatabaseContext_snapshotForGlobalIDWithImpPtr)
(EODatabaseContext_globalIDForObjectWithImpPtr): Move to
EOPrivate.h.
* EOAccess/GNUmakefile: Compile EOPrivate.m.
* EOControl/EOClassDescription.m, EOControl/EOGenericRecord.m
* EOControl/EOKeyGlobalID.m, EOControl/EOKeyValueCoding.m
* EOControl/EOKeyValueQualifier.m, EOControl/EONSAddOns.m
* EOControl/EOSortOrdering.m: Include new private header.
* EOControl/EOEditingContext.h/m: Ditto.
(EOEditingContext_objectForGlobalIDWithImpPtr)
(EOEditingContext_recordObjectGlobalIDWithImpPtr): Move to
EOPrivate.h/m.
* EOControl/EOMutableKnownKeyDictionary.h/m: Include new private
header.
(EOMKKD_objectForKeyWithImpPtr, EOMKKD_setObjectForKeyWithImpPtr)
(EOMKKD_removeObjectForKeyWithImpPtr, EOMKKD_hasKeyWithImpPtr)
(EOMKKD_indexForKeyWithImpPtr)
(EOMKKDInitializer_indexForKeyWithImpPtr): Move to EOPrivate.m
* EOControl/EOFault.m: (+isFault:): Update comment.
* EOControl/GNUmakefile: Build EOPrivate.m instead of EOPriv.m.
Do not install private header.
2005-02-19 David Ayers <d.ayers@inode.at>

View file

@ -53,7 +53,6 @@ RCS_ID("$Id$")
#include <GNUstepBase/GSCategories.h>
#endif
#include <EOControl/EOPriv.h>
#include <EOControl/EOMutableKnownKeyDictionary.h>
#include <EOControl/EOFetchSpecification.h>
#include <EOControl/EONSAddOns.h>
@ -67,6 +66,7 @@ RCS_ID("$Id$")
#include <EOAccess/EOSQLExpression.h>
#include <EOAccess/EODatabaseOperation.h>
#include "EOPrivate.h"
#include "EOEntityPriv.h"

View file

@ -66,7 +66,6 @@ RCS_ID("$Id$")
#include <EOControl/EONull.h>
#include <EOControl/EOObserver.h>
#include <EOControl/EODebug.h>
#include <EOControl/EOPriv.h>
#include <EOAccess/EOModel.h>
#include <EOAccess/EOEntity.h>
@ -77,6 +76,7 @@ RCS_ID("$Id$")
#include <string.h>
#include "EOPrivate.h"
#include "EOEntityPriv.h"
#include "EOAttributePriv.h"
@ -90,7 +90,7 @@ RCS_ID("$Id$")
{
initialized=YES;
GDL2PrivInit();
GDL2_EOAccessPrivateInit();
}
}

View file

@ -57,7 +57,6 @@ RCS_ID("$Id$")
#include <EOControl/EOKeyGlobalID.h>
#include <EOControl/EONull.h>
#include <EOControl/EODebug.h>
#include <EOControl/EOPriv.h>
#include <EOAccess/EOAccessFault.h>
#include <EOAccess/EOAdaptor.h>
@ -66,6 +65,7 @@ RCS_ID("$Id$")
#include <EOAccess/EODatabase.h>
#include <EOAccess/EODatabaseContext.h>
#include "EOPrivate.h"
/* TODO
Controllare il resultCache, ad ogni forget/invalidate deve essere
@ -90,7 +90,7 @@ static NSMutableArray *databaseInstances;
{
initialized=YES;
GDL2PrivInit();
GDL2_EOAccessPrivateInit();
// THREAD
databaseInstances = [NSMutableArray new];

View file

@ -63,7 +63,6 @@ RCS_ID("$Id$")
#include <EOControl/EOKeyGlobalID.h>
#include <EOControl/EOObjectStore.h>
#include <EOControl/EODebug.h>
#include <EOControl/EOPriv.h>
#include <EOAccess/EODatabaseChannel.h>
#include <EOAccess/EODatabaseContext.h>
@ -80,6 +79,7 @@ RCS_ID("$Id$")
#include <EOAccess/EOSQLExpression.h>
#include <EOAccess/EOSQLQualifier.h>
#include "EOPrivate.h"
#include "EOEntityPriv.h"
#include "EODatabaseContextPriv.h"
#include "EODatabaseChannelPriv.h"
@ -92,7 +92,7 @@ RCS_ID("$Id$")
if (!initialized)
{
initialized=YES;
GDL2PrivInit();
GDL2_EOAccessPrivateInit();
[[NSNotificationCenter defaultCenter]
addObserver: self
selector: @selector(_registerDatabaseChannel:)

View file

@ -71,7 +71,6 @@ RCS_ID("$Id$")
#include <EOControl/EOFetchSpecification.h>
#include <EOControl/EOSortOrdering.h>
#include <EOControl/EOKeyValueCoding.h>
#include <EOControl/EOPriv.h>
#include <EOControl/EOMutableKnownKeyDictionary.h>
#include <EOControl/EOCheapArray.h>
#include <EOControl/EONSAddOns.h>
@ -96,6 +95,7 @@ RCS_ID("$Id$")
#include <EOAccess/EOAccessFault.h>
#include <EOAccess/EOExpressionArray.h>
#include "EOPrivate.h"
#include "EOEntityPriv.h"
#include "EOAccessFaultPriv.h"
#include "EODatabaseContextPriv.h"
@ -132,7 +132,7 @@ static Class _contextClass = Nil;
{
initialized=YES;
GDL2PrivInit();
GDL2_EOAccessPrivateInit();
_contextClass = GDL2EODatabaseContextClass;
@ -7393,50 +7393,3 @@ If the object has been just inserted, the dictionary is empty.
}
@end
NSDictionary* EODatabaseContext_snapshotForGlobalIDWithImpPtr(EODatabaseContext* dbContext,IMP* impPtr,EOGlobalID* gid)
{
if (dbContext)
{
IMP imp=NULL;
if (impPtr)
imp=*impPtr;
if (!imp)
{
if (GSObjCClass(dbContext)==GDL2EODatabaseContextClass
&& GDL2EODatabaseContext_snapshotForGlobalIDIMP)
imp=GDL2EODatabaseContext_snapshotForGlobalIDIMP;
else
imp=[dbContext methodForSelector:GDL2_snapshotForGlobalIDSEL];
if (impPtr)
*impPtr=imp;
}
return (*imp)(dbContext,GDL2_snapshotForGlobalIDSEL,gid);
}
else
return nil;
};
EOGlobalID* EODatabaseContext_globalIDForObjectWithImpPtr(EODatabaseContext* dbContext,IMP* impPtr,id object)
{
if (dbContext)
{
IMP imp=NULL;
if (impPtr)
imp=*impPtr;
if (!imp)
{
if (GSObjCClass(dbContext)==GDL2EODatabaseContextClass
&& GDL2EODatabaseContext__globalIDForObjectIMP)
imp=GDL2EODatabaseContext__globalIDForObjectIMP;
else
imp=[dbContext methodForSelector:GDL2__globalIDForObjectSEL];
if (impPtr)
*impPtr=imp;
}
return (*imp)(dbContext,GDL2__globalIDForObjectSEL,object);
}
else
return nil;
};

View file

@ -73,7 +73,4 @@
@end
GDL2ACCESS_EXPORT NSDictionary* EODatabaseContext_snapshotForGlobalIDWithImpPtr(EODatabaseContext* dbContext,IMP* impPtr,EOGlobalID* gid);
GDL2ACCESS_EXPORT EOGlobalID* EODatabaseContext_globalIDForObjectWithImpPtr(EODatabaseContext* dbContext,IMP* impPtr,id object);
#endif /* __EODatabaseContextPriv_h__ */

View file

@ -70,7 +70,6 @@ RCS_ID("$Id$")
#include <EOControl/EOKeyGlobalID.h>
#include <EOControl/EOEditingContext.h>
#include <EOControl/EONull.h>
#include <EOControl/EOPriv.h>
#include <EOControl/EOMutableKnownKeyDictionary.h>
#include <EOControl/EONSAddOns.h>
#include <EOControl/EOCheapArray.h>
@ -83,6 +82,7 @@ RCS_ID("$Id$")
#include <EOAccess/EOStoredProcedure.h>
#include <EOAccess/EOExpressionArray.h>
#include "EOPrivate.h"
#include "EOEntityPriv.h"
#include "EOAttributePriv.h"
@ -106,7 +106,7 @@ NSString *EONextPrimaryKeyProcedureOperation = @"EONextPrimaryKeyProcedureOperat
{
initialized=YES;
GDL2PrivInit();
GDL2_EOAccessPrivateInit();
};
};

54
EOAccess/EOPrivate.h Normal file
View file

@ -0,0 +1,54 @@
/* -*-objc-*-
EOPrivat.h
Copyright (C) 2005 Free Software Foundation, Inc.
Author: Manuel Guesdon <mguesdon@orange-concept.com>
Date: Jan 2005
This file is part of the GNUstep Database Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __EOAccess_EOPrivat_h__
#define __EOAccess_EOPrivat_h__
#include "EODefines.h"
#include "../EOControl/EOPrivate.h"
@class EODatabaseContext;
// ==== Classes ====
GDL2ACCESS_EXPORT Class GDL2EODatabaseContextClass;
GDL2ACCESS_EXPORT Class GDL2EOAttributeClass;
// ==== Selectors =====
GDL2ACCESS_EXPORT SEL GDL2_snapshotForGlobalIDSEL;
GDL2ACCESS_EXPORT SEL GDL2__globalIDForObjectSEL;
// ==== IMPs ====
GDL2ACCESS_EXPORT IMP GDL2EODatabaseContext_snapshotForGlobalIDIMP;
GDL2ACCESS_EXPORT IMP GDL2EODatabaseContext__globalIDForObjectIMP;
// ==== Init Method ====
GDL2ACCESS_EXPORT void GDL2_EOAccessPrivateInit();
// ==== EODatabaseContext ====
GDL2ACCESS_EXPORT NSDictionary* EODatabaseContext_snapshotForGlobalIDWithImpPtr(EODatabaseContext* dbContext,IMP* impPtr,EOGlobalID* gid);
GDL2ACCESS_EXPORT EOGlobalID* EODatabaseContext_globalIDForObjectWithImpPtr(EODatabaseContext* dbContext,IMP* impPtr,id object);
#endif /* __EOAccess_EOPrivat_h__ */

View file

@ -54,7 +54,6 @@ RCS_ID("$Id$")
#endif
#include <EOControl/EOObserver.h>
#include <EOControl/EOPriv.h>
#include <EOControl/EOMutableKnownKeyDictionary.h>
#include <EOControl/EONSAddOns.h>
#include <EOControl/EODebug.h>
@ -67,6 +66,7 @@ RCS_ID("$Id$")
#include <EOAccess/EOJoin.h>
#include <EOAccess/EOExpressionArray.h>
#include "EOPrivate.h"
#include "EOAttributePriv.h"
#include "EOEntityPriv.h"

View file

@ -63,7 +63,6 @@ RCS_ID("$Id$")
#include <EOControl/EOSortOrdering.h>
#include <EOControl/EODebug.h>
#include <EOControl/EONull.h>
#include <EOControl/EOPriv.h>
#include <EOAccess/EOModel.h>
#include <EOAccess/EOEntity.h>
@ -78,6 +77,7 @@ RCS_ID("$Id$")
#include <EOAccess/EOExpressionArray.h>
#include <EOAccess/EOSchemaGeneration.h>
#include "EOPrivate.h"
#include "EOEntityPriv.h"
#include "EOAttributePriv.h"
#include "EOSQLExpressionPriv.h"
@ -100,7 +100,7 @@ NSString *EOBindVariableColumnKey = @"EOBindVariableColumnKey";
static BOOL initialized=NO;
if (!initialized)
{
GDL2PrivInit();
GDL2_EOAccessPrivateInit();
};
};

View file

@ -65,8 +65,8 @@ RCS_ID("$Id$")
#include <EOControl/EOObjectStoreCoordinator.h>
#include <EOControl/EONull.h>
#include <EOControl/EODebug.h>
#include <EOControl/EOPriv.h>
#include "EOPrivate.h"
#include "EOEntityPriv.h"
@implementation EOSQLQualifier
@ -272,7 +272,7 @@ RCS_ID("$Id$")
{
initialized=YES;
GDL2PrivInit();
GDL2_EOAccessPrivateInit();
};
};

View file

@ -57,7 +57,6 @@ RCS_ID("$Id$")
#include <EOControl/EONull.h>
#include <EOControl/EOGenericRecord.h>
#include <EOControl/EODebug.h>
#include <EOControl/EOPriv.h>
#include <EOAccess/EOAttribute.h>
#include <EOAccess/EORelationship.h>
@ -74,6 +73,7 @@ RCS_ID("$Id$")
#include <EOAccess/EOUtilities.h>
#include "EOPrivate.h"
static NSString *EOMoreThanOneException = @"EOMoreThanOneException";
static NSString *NSObjectNotAvailableException = @"NSObjectNotAvailableException";

View file

@ -57,7 +57,8 @@ EODatabaseChannel.m \
EODatabaseContext.m \
EOAccessFault.m \
EODatabaseDataSource.m \
EOUtilities.m
EOUtilities.m \
EOPrivate.m
libgnustep-db2_HEADER_FILES_DIR = .
libgnustep-db2_HEADER_FILES_INSTALL_DIR = /EOAccess

View file

@ -68,9 +68,10 @@ RCS_ID("$Id$")
#include <EOControl/EOCheapArray.h>
#include <EOControl/EONSAddOns.h>
#include <EOControl/EODebug.h>
#include <EOControl/EOPriv.h>
#include <EOControl/EOMutableKnownKeyDictionary.h>
#include "EOPrivate.h"
// NOTE: (stephane@sente.ch) Should we subclass NSClassDescription?
/*

View file

@ -365,8 +365,4 @@ shouldContinueFetchingWithCurrentObjectCount: (unsigned)count
@end
// Private
GDL2CONTROL_EXPORT id EOEditingContext_objectForGlobalIDWithImpPtr(EOEditingContext* edContext,IMP* impPtr,EOGlobalID* gid);
EOGlobalID* EOEditingContext_globalIDForObjectWithImpPtr(EOEditingContext* edContext,IMP* impPtr,id object);
GDL2CONTROL_EXPORT id EOEditingContext_recordObjectGlobalIDWithImpPtr(EOEditingContext* edContext,IMP* impPtr,id object,EOGlobalID* gid);
#endif

View file

@ -54,7 +54,8 @@ RCS_ID("$Id$")
#include <EOControl/EONSAddOns.h>
#include <EOControl/EODeprecated.h>
#include <EOControl/EODebug.h>
#include <EOControl/EOPriv.h>
#include "EOPrivate.h"
@class EOEntityClassDescription;
@ -3802,82 +3803,3 @@ static BOOL usesContextRelativeEncoding = NO;
NSDeallocateObject (self);
}
@end
id
EOEditingContext_objectForGlobalIDWithImpPtr(EOEditingContext *edContext,
IMP *impPtr,
EOGlobalID *gid)
{
if (edContext)
{
IMP imp=NULL;
if (impPtr)
imp=*impPtr;
if (!imp)
{
if (GSObjCClass(edContext)==GDL2EOEditingContextClass
&& GDL2EOEditingContext_objectForGlobalIDIMP)
imp=GDL2EOEditingContext_objectForGlobalIDIMP;
else
imp=[edContext methodForSelector:GDL2_objectForGlobalIDSEL];
if (impPtr)
*impPtr=imp;
}
return (*imp)(edContext,GDL2_objectForGlobalIDSEL,gid);
}
else
return nil;
};
EOGlobalID *
EOEditingContext_globalIDForObjectWithImpPtr(EOEditingContext *edContext,
IMP *impPtr,
id object)
{
if (edContext)
{
IMP imp=NULL;
if (impPtr)
imp=*impPtr;
if (!imp)
{
if (GSObjCClass(edContext)==GDL2EOEditingContextClass
&& GDL2EOEditingContext_globalIDForObjectIMP)
imp=GDL2EOEditingContext_globalIDForObjectIMP;
else
imp=[edContext methodForSelector:GDL2_globalIDForObjectSEL];
if (impPtr)
*impPtr=imp;
}
return (*imp)(edContext,GDL2_globalIDForObjectSEL,object);
}
else
return nil;
};
id
EOEditingContext_recordObjectGlobalIDWithImpPtr(EOEditingContext *edContext,
IMP *impPtr,
id object,
EOGlobalID *gid)
{
if (edContext)
{
IMP imp=NULL;
if (impPtr)
imp=*impPtr;
if (!imp)
{
if (GSObjCClass(edContext)==GDL2EOEditingContextClass
&& GDL2EOEditingContext_recordObjectGlobalIDIMP)
imp=GDL2EOEditingContext_recordObjectGlobalIDIMP;
else
imp=[edContext methodForSelector:GDL2_recordObjectGlobalIDSEL];
if (impPtr)
*impPtr=imp;
}
return (*imp)(edContext,GDL2_recordObjectGlobalIDSEL,object,gid);
}
else
return nil;
};

View file

@ -172,7 +172,7 @@ static Class EOFaultClass = NULL;
+ (BOOL)isFault: (id)object
{
//See also EOControl/EOPriv.h
//See also EOPrivat.h
// NSDebugFLLog(@"gsdb",@"object=%p",object);
if (object == nil)

View file

@ -63,7 +63,6 @@ RCS_ID("$Id$")
#include <EOControl/EONull.h>
#include <EOControl/EOObserver.h>
#include <EOControl/EOFault.h>
#include <EOControl/EOPriv.h>
#include <EOControl/EOMutableKnownKeyDictionary.h>
#include <EOControl/EODebug.h>
#include <EOControl/EOKeyValueCoding.h>
@ -74,6 +73,8 @@ RCS_ID("$Id$")
#include <limits.h>
#include "EOPrivate.h"
@interface NSObject (EOCalculateSize)
- (unsigned int)eoGetSize;
@end

View file

@ -53,7 +53,8 @@ RCS_ID("$Id$")
#include <EOControl/EOKeyGlobalID.h>
#include <EOControl/EODebug.h>
#include <EOControl/EONull.h>
#include <EOControl/EOPriv.h>
#include "EOPrivate.h"
@implementation EOKeyGlobalID

View file

@ -68,10 +68,11 @@ RCS_ID("$Id$")
#include <EOControl/EONSAddOns.h>
#include <EOControl/EODebug.h>
#include <EOControl/EONull.h>
#include <EOControl/EOPriv.h>
#include <GNUstepBase/GSObjCRuntime.h>
#include "EOPrivate.h"
static BOOL strictWO;
static BOOL initialized=NO;

View file

@ -61,7 +61,8 @@ RCS_ID("$Id$")
#include <EOControl/EOEditingContext.h>
#include <EOControl/EONull.h>
#include <EOControl/EODebug.h>
#include <EOControl/EOPriv.h>
#include "EOPrivate.h"
/*
This declaration is needed by the compiler to state that

View file

@ -171,13 +171,4 @@
@end
/** mkkkd can be a NSMutableKnownKey or another kind of dictionary **/
GDL2CONTROL_EXPORT id EOMKKD_objectForKeyWithImpPtr(NSDictionary* mkkd,IMP* impPtr,NSString* key);
GDL2CONTROL_EXPORT void EOMKKD_setObjectForKeyWithImpPtr(NSDictionary* mkkd,IMP* impPtr,id anObject,NSString* key);
GDL2CONTROL_EXPORT void EOMKKD_removeObjectForKeyWithImpPtr(NSDictionary* mkkd,IMP* impPtr,NSString* key);
GDL2CONTROL_EXPORT BOOL EOMKKD_hasKeyWithImpPtr(NSDictionary* mkkd,GDL2IMP_BOOL* impPtr,NSString* key);
GDL2CONTROL_EXPORT unsigned int EOMKKD_indexForKeyWithImpPtr(EOMutableKnownKeyDictionary* mkkd,GDL2IMP_UINT* impPtr,NSString* key);
GDL2CONTROL_EXPORT unsigned int EOMKKDInitializer_indexForKeyWithImpPtr(EOMKKDInitializer* mkkdInit,GDL2IMP_UINT* impPtr,NSString* key);
#endif

View file

@ -53,11 +53,11 @@ RCS_ID("$Id$")
#include <GNUstepBase/GSCategories.h>
#endif
#include <EOControl/EOPriv.h>
#include <EOControl/EOMutableKnownKeyDictionary.h>
#include <EOControl/EODebug.h>
#include <EOControl/EONull.h>
#include "EOPrivate.h"
@implementation EOMKKDInitializer
@ -1006,137 +1006,3 @@ RCS_ID("$Id$")
}
@end
id EOMKKD_objectForKeyWithImpPtr(NSDictionary* mkkd,IMP* impPtr,NSString* key)
{
if (mkkd)
{
IMP imp=NULL;
if (impPtr)
imp=*impPtr;
if (!imp)
{
if (GSObjCClass(mkkd)==GDL2MKKDClass
&& GDL2MKKD_objectForKeyIMP)
imp=GDL2MKKD_objectForKeyIMP;
else
imp=[mkkd methodForSelector:GDL2_objectForKeySEL];
if (impPtr)
*impPtr=imp;
}
return (*imp)(mkkd,GDL2_objectForKeySEL,key);
}
else
return nil;
};
void EOMKKD_setObjectForKeyWithImpPtr(NSDictionary* mkkd,IMP* impPtr,id anObject,NSString* key)
{
if (mkkd)
{
IMP imp=NULL;
if (impPtr)
imp=*impPtr;
if (!imp)
{
if (GSObjCClass(mkkd)==GDL2MKKDClass
&& GDL2MKKD_setObjectForKeyIMP)
imp=GDL2MKKD_setObjectForKeyIMP;
else
imp=[mkkd methodForSelector:GDL2_setObjectForKeySEL];
if (impPtr)
*impPtr=imp;
}
(*imp)(mkkd,GDL2_setObjectForKeySEL,anObject,key);
};
};
void EOMKKD_removeObjectForKeyWithImpPtr(NSDictionary* mkkd,IMP* impPtr,NSString* key)
{
if (mkkd)
{
IMP imp=NULL;
if (impPtr)
imp=*impPtr;
if (!imp)
{
if (GSObjCClass(mkkd)==GDL2MKKDClass
&& GDL2MKKD_removeObjectForKeyIMP)
imp=GDL2MKKD_removeObjectForKeyIMP;
else
imp=[mkkd methodForSelector:GDL2_removeObjectForKeySEL];
if (impPtr)
*impPtr=imp;
}
(*imp)(mkkd,GDL2_removeObjectForKeySEL,key);
};
};
BOOL EOMKKD_hasKeyWithImpPtr(NSDictionary* mkkd,GDL2IMP_BOOL* impPtr,NSString* key)
{
if (mkkd)
{
GDL2IMP_BOOL imp=NULL;
if (impPtr)
imp=*impPtr;
if (!imp)
{
if (GSObjCClass(mkkd)==GDL2MKKDClass
&& GDL2MKKD_hasKeyIMP)
imp=GDL2MKKD_hasKeyIMP;
else
imp=(GDL2IMP_BOOL)[mkkd methodForSelector:GDL2_hasKeySEL];
if (impPtr)
*impPtr=imp;
}
return (*imp)(mkkd,GDL2_hasKeySEL,key);
}
else
return NO;
};
unsigned int EOMKKD_indexForKeyWithImpPtr(EOMutableKnownKeyDictionary* mkkd,GDL2IMP_UINT* impPtr,NSString* key)
{
if (mkkd)
{
GDL2IMP_UINT imp=NULL;
if (impPtr)
imp=*impPtr;
if (!imp)
{
if (GSObjCClass(mkkd)==GDL2MKKDClass
&& GDL2MKKD_indexForKeyIMP)
imp=GDL2MKKD_indexForKeyIMP;
else
imp=(GDL2IMP_UINT)[mkkd methodForSelector:GDL2_indexForKeySEL];
if (impPtr)
*impPtr=imp;
}
return (*imp)(mkkd,GDL2_indexForKeySEL,key);
}
else
return 0;
};
unsigned int EOMKKDInitializer_indexForKeyWithImpPtr(EOMKKDInitializer* mkkdInit,GDL2IMP_UINT* impPtr,NSString* key)
{
if (mkkdInit)
{
GDL2IMP_UINT imp=NULL;
if (impPtr)
imp=*impPtr;
if (!imp)
{
if (GSObjCClass(mkkdInit)==GDL2EOMKKDInitializerClass
&& GDL2EOMKKDInitializer_indexForKeyIMP)
imp=GDL2EOMKKDInitializer_indexForKeyIMP;
else
imp=(GDL2IMP_UINT)[mkkdInit methodForSelector:GDL2_indexForKeySEL];
if (impPtr)
*impPtr=imp;
}
return (*imp)(mkkdInit,GDL2_indexForKeySEL,key);
}
else
return 0;
};

View file

@ -59,10 +59,12 @@ RCS_ID("$Id$")
#include <EOControl/EONSAddOns.h>
#include <EOControl/EODebug.h>
#include <EOControl/EOPriv.h>
#include <limits.h>
#include "EOPrivate.h"
static NSRecursiveLock *local_lock = nil;
static BOOL GSStrictWO451Flag = NO;

View file

@ -1,5 +1,5 @@
/* -*-objc-*-
EOPriv.h
EOPrivate.h
Copyright (C) 2005 Free Software Foundation, Inc.
@ -24,13 +24,17 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __EOPriv_h__
#define __EOPriv_h__
#ifndef __EOControl_EOPrivate_h__
#define __EOControl_EOPrivate_h__
#include <EOControl/EODefines.h>
#include "EODefines.h"
@class NSNumber;
@class EONull;
@class EOMutableKnownKeyDictionary;
@class EOMKKDInitializer;
@class EOEditingContext;
@class EOGlobalID;
typedef unsigned int (*GDL2IMP_UINT)(id, SEL, ...);
typedef BOOL (*GDL2IMP_BOOL)(id, SEL, ...);
@ -51,9 +55,7 @@ GDL2CONTROL_EXPORT Class GDL2NSDataClass;
GDL2CONTROL_EXPORT Class GDL2EOFaultClass;
GDL2CONTROL_EXPORT Class GDL2MKKDClass;
GDL2CONTROL_EXPORT Class GDL2EOMKKDInitializerClass;
GDL2CONTROL_EXPORT Class GDL2EODatabaseContextClass;
GDL2CONTROL_EXPORT Class GDL2EOEditingContextClass;
GDL2CONTROL_EXPORT Class GDL2EOAttributeClass;
// ==== Selectors ====
GDL2CONTROL_EXPORT SEL GDL2_newSEL;
@ -89,12 +91,9 @@ GDL2CONTROL_EXPORT SEL GDL2_takeValueForKeySEL;
GDL2CONTROL_EXPORT SEL GDL2_validateValueForKeySEL;
// ---- GDL2 Selectors ----
GDL2CONTROL_EXPORT SEL GDL2_snapshotForGlobalIDSEL;
GDL2CONTROL_EXPORT SEL GDL2_snapshotForGlobalIDSEL;
GDL2CONTROL_EXPORT SEL GDL2_recordObjectGlobalIDSEL;
GDL2CONTROL_EXPORT SEL GDL2_objectForGlobalIDSEL;
GDL2CONTROL_EXPORT SEL GDL2_globalIDForObjectSEL;
GDL2CONTROL_EXPORT SEL GDL2__globalIDForObjectSEL;
// ---- Dictionary Selectors ----
GDL2CONTROL_EXPORT SEL GDL2_objectForKeySEL;
@ -129,14 +128,10 @@ GDL2CONTROL_EXPORT GDL2IMP_BOOL GDL2MKKD_hasKeyIMP;
GDL2CONTROL_EXPORT GDL2IMP_UINT GDL2MKKD_indexForKeyIMP;
GDL2CONTROL_EXPORT GDL2IMP_UINT GDL2EOMKKDInitializer_indexForKeyIMP;
GDL2CONTROL_EXPORT IMP GDL2EODatabaseContext_snapshotForGlobalIDIMP;
GDL2CONTROL_EXPORT IMP GDL2EOEditingContext_recordObjectGlobalIDIMP;
GDL2CONTROL_EXPORT IMP GDL2EOEditingContext_objectForGlobalIDIMP;
GDL2CONTROL_EXPORT IMP GDL2EOEditingContext_globalIDForObjectIMP;
GDL2CONTROL_EXPORT IMP GDL2EODatabaseContext__globalIDForObjectIMP;
GDL2CONTROL_EXPORT IMP GDL2NSMutableArray_arrayWithCapacityIMP;
GDL2CONTROL_EXPORT IMP GDL2NSMutableArray_arrayWithArrayIMP;
GDL2CONTROL_EXPORT IMP GDL2NSMutableArray_arrayIMP;
@ -426,5 +421,22 @@ static inline BOOL GDL2RespondsToSelectorWithImpPtr(id object,GDL2IMP_BOOL* impP
return NO;
};
#endif /* __EOPriv_h__ */
// ==== EOMultipleKnownKeyDictionary ====
/** mkkkd can be a NSMutableKnownKey or another kind of dictionary **/
GDL2CONTROL_EXPORT id EOMKKD_objectForKeyWithImpPtr(NSDictionary* mkkd,IMP* impPtr,NSString* key);
GDL2CONTROL_EXPORT void EOMKKD_setObjectForKeyWithImpPtr(NSDictionary* mkkd,IMP* impPtr,id anObject,NSString* key);
GDL2CONTROL_EXPORT void EOMKKD_removeObjectForKeyWithImpPtr(NSDictionary* mkkd,IMP* impPtr,NSString* key);
GDL2CONTROL_EXPORT BOOL EOMKKD_hasKeyWithImpPtr(NSDictionary* mkkd,GDL2IMP_BOOL* impPtr,NSString* key);
GDL2CONTROL_EXPORT unsigned int EOMKKD_indexForKeyWithImpPtr(EOMutableKnownKeyDictionary* mkkd,GDL2IMP_UINT* impPtr,NSString* key);
GDL2CONTROL_EXPORT unsigned int EOMKKDInitializer_indexForKeyWithImpPtr(EOMKKDInitializer* mkkdInit,GDL2IMP_UINT* impPtr,NSString* key);
// ==== EOEditingContext ====
GDL2CONTROL_EXPORT id EOEditingContext_objectForGlobalIDWithImpPtr(EOEditingContext* edContext,IMP* impPtr,EOGlobalID* gid);
EOGlobalID* EOEditingContext_globalIDForObjectWithImpPtr(EOEditingContext* edContext,IMP* impPtr,id object);
GDL2CONTROL_EXPORT id EOEditingContext_recordObjectGlobalIDWithImpPtr(EOEditingContext* edContext,IMP* impPtr,id object,EOGlobalID* gid);
#endif /* __EOControl_EOPrivate_h__ */

View file

@ -1,5 +1,5 @@
/**
EOPriv.m <title>EOPriv: various definitions</title>
EOPrivate.m <title>EOPrivate: various definitions</title>
Copyright (C) 2005 Free Software Foundation, Inc.
@ -41,10 +41,11 @@ RCS_ID("$Id$")
#include <GNUstepBase/GSCategories.h>
#endif
#include <EOControl/EOPriv.h>
#include <EOControl/EOEditingContext.h>
#include <EOControl/EOFault.h>
#include <EOControl/EOMutableKnownKeyDictionary.h>
#include <EOAccess/EODatabaseContext.h>
#include "EOPrivate.h"
// ==== Classes ====
Class GDL2NSArrayClass=Nil;
@ -61,9 +62,7 @@ Class GDL2NSDataClass=Nil;
Class GDL2EOFaultClass=Nil;
Class GDL2MKKDClass=Nil;
Class GDL2EOMKKDInitializerClass=Nil;
Class GDL2EODatabaseContextClass=Nil;
Class GDL2EOEditingContextClass=Nil;
Class GDL2EOAttributeClass=Nil;
// ==== Selectors ====
SEL GDL2_newSEL=NULL;
@ -99,11 +98,9 @@ SEL GDL2_takeValueForKeySEL=NULL;
SEL GDL2_validateValueForKeySEL=NULL;
// ---- GDL2 Selectors ----
SEL GDL2_snapshotForGlobalIDSEL=NULL;
SEL GDL2_recordObjectGlobalIDSEL=NULL;
SEL GDL2_objectForGlobalIDSEL=NULL;
SEL GDL2_globalIDForObjectSEL=NULL;
SEL GDL2__globalIDForObjectSEL=NULL;
// ---- Dictionary Selectors ----
SEL GDL2_objectForKeySEL=NULL;
@ -138,13 +135,10 @@ GDL2IMP_BOOL GDL2MKKD_hasKeyIMP=NULL;
GDL2IMP_UINT GDL2MKKD_indexForKeyIMP=NULL;
GDL2IMP_UINT GDL2EOMKKDInitializer_indexForKeyIMP=NULL;
IMP GDL2EODatabaseContext_snapshotForGlobalIDIMP=NULL;
IMP GDL2EOEditingContext_recordObjectGlobalIDIMP=NULL;
IMP GDL2EOEditingContext_objectForGlobalIDIMP=NULL;
IMP GDL2EOEditingContext_globalIDForObjectIMP=NULL;
IMP GDL2EODatabaseContext__globalIDForObjectIMP=NULL;
IMP GDL2NSMutableArray_arrayWithCapacityIMP=NULL;
IMP GDL2NSMutableArray_arrayWithArrayIMP=NULL;
IMP GDL2NSMutableArray_arrayIMP=NULL;
@ -179,9 +173,7 @@ void GDL2PrivInit()
GDL2EOFaultClass = [EOFault class];
GDL2MKKDClass = [EOMutableKnownKeyDictionary class];
GDL2EOMKKDInitializerClass = [EOMKKDInitializer class];
GDL2EODatabaseContextClass = [EODatabaseContext class];
GDL2EOEditingContextClass = [EOEditingContext class];
GDL2EOAttributeClass = [EOAttribute class];
// ==== Selectors ====
GDL2_newSEL=@selector(new);
@ -217,12 +209,9 @@ void GDL2PrivInit()
GDL2_validateValueForKeySEL=@selector(validateValue:forKey:);
// ---- GDL2 Selectors ----
GDL2_snapshotForGlobalIDSEL=@selector(snapshotForGlobalID:);
GDL2_snapshotForGlobalIDSEL=@selector(snapshotForGlobalID:);
GDL2_recordObjectGlobalIDSEL=@selector(recordObject:globalID:);
GDL2_objectForGlobalIDSEL=@selector(objectForGlobalID:);
GDL2_globalIDForObjectSEL=@selector(globalIDForObject:);
GDL2__globalIDForObjectSEL=@selector(_globalIDForObject:);
// ---- Dictionary Selectors ----
GDL2_objectForKeySEL=@selector(objectForKey:);
@ -275,14 +264,10 @@ void GDL2PrivInit()
GDL2MKKD_indexForKeyIMP=(GDL2IMP_UINT)[GDL2MKKDClass instanceMethodForSelector:GDL2_indexForKeySEL];
GDL2EOMKKDInitializer_indexForKeyIMP=(GDL2IMP_UINT)[GDL2EOMKKDInitializerClass instanceMethodForSelector:GDL2_indexForKeySEL];
GDL2EODatabaseContext_snapshotForGlobalIDIMP=[GDL2EODatabaseContextClass instanceMethodForSelector:GDL2_snapshotForGlobalIDSEL];
GDL2EOEditingContext_recordObjectGlobalIDIMP==[GDL2EOEditingContextClass instanceMethodForSelector:GDL2_recordObjectGlobalIDSEL];
GDL2EOEditingContext_objectForGlobalIDIMP=[GDL2EOEditingContextClass instanceMethodForSelector:GDL2_objectForGlobalIDSEL];
GDL2EOEditingContext_globalIDForObjectIMP=[GDL2EOEditingContextClass instanceMethodForSelector:GDL2_globalIDForObjectSEL];
GDL2EODatabaseContext__globalIDForObjectIMP=[GDL2EODatabaseContextClass instanceMethodForSelector:GDL2__globalIDForObjectSEL];
GDL2NSMutableArray_arrayWithCapacityIMP=[GDL2NSMutableArrayClass
methodForSelector:GDL2_arrayWithCapacitySEL];
@ -306,3 +291,239 @@ void GDL2PrivInit()
};
}
/* EOMultipleKnownKeyDictionary */
id
EOMKKD_objectForKeyWithImpPtr(NSDictionary* mkkd,
IMP* impPtr,
NSString* key)
{
if (mkkd)
{
IMP imp=NULL;
if (impPtr)
imp=*impPtr;
if (!imp)
{
if (GSObjCClass(mkkd)==GDL2MKKDClass
&& GDL2MKKD_objectForKeyIMP)
imp=GDL2MKKD_objectForKeyIMP;
else
imp=[mkkd methodForSelector:GDL2_objectForKeySEL];
if (impPtr)
*impPtr=imp;
}
return (*imp)(mkkd,GDL2_objectForKeySEL,key);
}
else
return nil;
};
void
EOMKKD_setObjectForKeyWithImpPtr(NSDictionary* mkkd,
IMP* impPtr,
id anObject,
NSString* key)
{
if (mkkd)
{
IMP imp=NULL;
if (impPtr)
imp=*impPtr;
if (!imp)
{
if (GSObjCClass(mkkd)==GDL2MKKDClass
&& GDL2MKKD_setObjectForKeyIMP)
imp=GDL2MKKD_setObjectForKeyIMP;
else
imp=[mkkd methodForSelector:GDL2_setObjectForKeySEL];
if (impPtr)
*impPtr=imp;
}
(*imp)(mkkd,GDL2_setObjectForKeySEL,anObject,key);
};
};
void
EOMKKD_removeObjectForKeyWithImpPtr(NSDictionary* mkkd,
IMP* impPtr,
NSString* key)
{
if (mkkd)
{
IMP imp=NULL;
if (impPtr)
imp=*impPtr;
if (!imp)
{
if (GSObjCClass(mkkd)==GDL2MKKDClass
&& GDL2MKKD_removeObjectForKeyIMP)
imp=GDL2MKKD_removeObjectForKeyIMP;
else
imp=[mkkd methodForSelector:GDL2_removeObjectForKeySEL];
if (impPtr)
*impPtr=imp;
}
(*imp)(mkkd,GDL2_removeObjectForKeySEL,key);
};
};
BOOL
EOMKKD_hasKeyWithImpPtr(NSDictionary* mkkd,
GDL2IMP_BOOL* impPtr,
NSString* key)
{
if (mkkd)
{
GDL2IMP_BOOL imp=NULL;
if (impPtr)
imp=*impPtr;
if (!imp)
{
if (GSObjCClass(mkkd)==GDL2MKKDClass
&& GDL2MKKD_hasKeyIMP)
imp=GDL2MKKD_hasKeyIMP;
else
imp=(GDL2IMP_BOOL)[mkkd methodForSelector:GDL2_hasKeySEL];
if (impPtr)
*impPtr=imp;
}
return (*imp)(mkkd,GDL2_hasKeySEL,key);
}
else
return NO;
};
unsigned int
EOMKKD_indexForKeyWithImpPtr(EOMutableKnownKeyDictionary* mkkd,
GDL2IMP_UINT* impPtr,
NSString* key)
{
if (mkkd)
{
GDL2IMP_UINT imp=NULL;
if (impPtr)
imp=*impPtr;
if (!imp)
{
if (GSObjCClass(mkkd)==GDL2MKKDClass
&& GDL2MKKD_indexForKeyIMP)
imp=GDL2MKKD_indexForKeyIMP;
else
imp=(GDL2IMP_UINT)[mkkd methodForSelector:GDL2_indexForKeySEL];
if (impPtr)
*impPtr=imp;
}
return (*imp)(mkkd,GDL2_indexForKeySEL,key);
}
else
return 0;
};
unsigned int
EOMKKDInitializer_indexForKeyWithImpPtr(EOMKKDInitializer* mkkdInit,
GDL2IMP_UINT* impPtr,
NSString* key)
{
if (mkkdInit)
{
GDL2IMP_UINT imp=NULL;
if (impPtr)
imp=*impPtr;
if (!imp)
{
if (GSObjCClass(mkkdInit)==GDL2EOMKKDInitializerClass
&& GDL2EOMKKDInitializer_indexForKeyIMP)
imp=GDL2EOMKKDInitializer_indexForKeyIMP;
else
imp=(GDL2IMP_UINT)[mkkdInit methodForSelector:GDL2_indexForKeySEL];
if (impPtr)
*impPtr=imp;
}
return (*imp)(mkkdInit,GDL2_indexForKeySEL,key);
}
else
return 0;
};
/* EOEditingContext */
id
EOEditingContext_objectForGlobalIDWithImpPtr(EOEditingContext *edContext,
IMP *impPtr,
EOGlobalID *gid)
{
if (edContext)
{
IMP imp=NULL;
if (impPtr)
imp=*impPtr;
if (!imp)
{
if (GSObjCClass(edContext)==GDL2EOEditingContextClass
&& GDL2EOEditingContext_objectForGlobalIDIMP)
imp=GDL2EOEditingContext_objectForGlobalIDIMP;
else
imp=[edContext methodForSelector:GDL2_objectForGlobalIDSEL];
if (impPtr)
*impPtr=imp;
}
return (*imp)(edContext,GDL2_objectForGlobalIDSEL,gid);
}
else
return nil;
};
EOGlobalID *
EOEditingContext_globalIDForObjectWithImpPtr(EOEditingContext *edContext,
IMP *impPtr,
id object)
{
if (edContext)
{
IMP imp=NULL;
if (impPtr)
imp=*impPtr;
if (!imp)
{
if (GSObjCClass(edContext)==GDL2EOEditingContextClass
&& GDL2EOEditingContext_globalIDForObjectIMP)
imp=GDL2EOEditingContext_globalIDForObjectIMP;
else
imp=[edContext methodForSelector:GDL2_globalIDForObjectSEL];
if (impPtr)
*impPtr=imp;
}
return (*imp)(edContext,GDL2_globalIDForObjectSEL,object);
}
else
return nil;
};
id
EOEditingContext_recordObjectGlobalIDWithImpPtr(EOEditingContext *edContext,
IMP *impPtr,
id object,
EOGlobalID *gid)
{
if (edContext)
{
IMP imp=NULL;
if (impPtr)
imp=*impPtr;
if (!imp)
{
if (GSObjCClass(edContext)==GDL2EOEditingContextClass
&& GDL2EOEditingContext_recordObjectGlobalIDIMP)
imp=GDL2EOEditingContext_recordObjectGlobalIDIMP;
else
imp=[edContext methodForSelector:GDL2_recordObjectGlobalIDSEL];
if (impPtr)
*impPtr=imp;
}
return (*imp)(edContext,GDL2_recordObjectGlobalIDSEL,object,gid);
}
else
return nil;
};

View file

@ -52,7 +52,8 @@ RCS_ID("$Id$")
#include <EOControl/EOKeyValueCoding.h>
#include <EOControl/EOKeyValueArchiver.h>
#include <EOControl/EODebug.h>
#include <EOControl/EOPriv.h>
#include "EOPrivate.h"
@implementation EOSortOrdering

View file

@ -66,7 +66,7 @@ EONSAddOns.m \
EOCheapArray.m \
EOArrayDataSource.m \
EODebug.m \
EOPriv.m
EOPrivate.m
libgnustep-db2control_HEADER_FILES_DIR = .
libgnustep-db2control_HEADER_FILES_INSTALL_DIR = /EOControl
@ -94,8 +94,7 @@ EODebug.h \
EONSAddOns.h \
EODefines.h \
EODeprecated.h \
EOControl.h \
EOPriv.h
EOControl.h
DOCUMENT_NAME = EOControl
EOControl_AUTOGSDOC_HEADERS = $(libgnustep-db2control_HEADER_FILES)