mirror of
https://github.com/gnustep/libs-steptalk.git
synced 2025-02-19 18:00:45 +00:00
Added GDL2 module
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/steptalk/trunk@15177 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
cc7ce2e97d
commit
20a3b93641
15 changed files with 424 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
|||
2002 Nov 29
|
||||
|
||||
* Added GDL2 module
|
||||
* STModule: more details on module loading fault
|
||||
|
||||
2002 Nov 11
|
||||
|
||||
* ObjectiveC module: added selectorsContainingString: and
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
{
|
||||
STClasses = (
|
||||
|
||||
GSHTMLParser,
|
||||
GSHTMLSAXHandler,
|
||||
GSMimeCodingContext,
|
||||
GSMimeDocument,
|
||||
GSMimeParser,
|
||||
GSSAXHandler,
|
||||
GSMimeHeader,
|
||||
|
||||
GSHTMLParser,
|
||||
GSHTMLSAXHandler,
|
||||
GSSAXHandler,
|
||||
GSXMLAttribute,
|
||||
GSXMLDocument,
|
||||
GSXMLNamespace,
|
||||
|
|
4
Modules/GDL2/GDL2Constants.list
Normal file
4
Modules/GDL2/GDL2Constants.list
Normal file
|
@ -0,0 +1,4 @@
|
|||
# GDL2 constants
|
||||
#
|
||||
|
||||
# None
|
80
Modules/GDL2/GDL2Constants.m
Normal file
80
Modules/GDL2/GDL2Constants.m
Normal file
|
@ -0,0 +1,80 @@
|
|||
/**
|
||||
GDL2Constants.m
|
||||
|
||||
NOTE: Do not edit this file, it is automaticaly generated.
|
||||
|
||||
Copyright (c) 2002 Free Software Foundation
|
||||
|
||||
This file is part of the StepTalk project.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NSDictionary *STGetGDL2Constants(void)
|
||||
{
|
||||
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
|
||||
Class numberClass = [NSNumber class];
|
||||
IMP numberWithInt;
|
||||
IMP numberWithFloat;
|
||||
IMP setObject_forKey;
|
||||
|
||||
SEL numberWithInt_sel = @selector(numberWithInt:);
|
||||
SEL numberWithFloat_sel = @selector(numberWithFloat:);
|
||||
SEL setObject_forKey_sel = @selector(setObject:forKey:);
|
||||
|
||||
numberWithInt = [NSNumber methodForSelector:numberWithInt_sel];
|
||||
numberWithFloat = [NSNumber methodForSelector:numberWithFloat_sel];
|
||||
setObject_forKey = [dict methodForSelector:setObject_forKey_sel];
|
||||
|
||||
#define ADD_id_OBJECT(obj, name) \
|
||||
setObject_forKey(dict, setObject_forKey_sel, obj, name)
|
||||
|
||||
#define ADD_int_OBJECT(obj, name) \
|
||||
setObject_forKey(dict, setObject_forKey_sel, \
|
||||
numberWithInt(numberClass, numberWithInt_sel, obj), \
|
||||
name)
|
||||
|
||||
#define ADD_float_OBJECT(obj, name) \
|
||||
setObject_forKey(dict, setObject_forKey_sel, \
|
||||
numberWithFloat(numberClass, numberWithInt_sel, obj), \
|
||||
name)
|
||||
|
||||
#define ADD_NSPoint_OBJECT(obj, name) \
|
||||
setObject_forKey(dict, setObject_forKey_sel, \
|
||||
[NSValue valueWithPoint:obj], \
|
||||
name)
|
||||
|
||||
#define ADD_NSRange_OBJECT(obj, name) \
|
||||
setObject_forKey(dict, setObject_forKey_sel, \
|
||||
[NSValue valueWithRange:obj], \
|
||||
name)
|
||||
|
||||
#define ADD_NSSize_OBJECT(obj, name) \
|
||||
setObject_forKey(dict, setObject_forKey_sel, \
|
||||
[NSValue valueWithSize:obj], \
|
||||
name)
|
||||
|
||||
#define ADD_NSRect_OBJECT(obj, name) \
|
||||
setObject_forKey(dict, setObject_forKey_sel, \
|
||||
[NSValue valueWithRect:obj], \
|
||||
name)
|
||||
|
||||
return dict;
|
||||
}
|
||||
|
||||
/* -- End of file -- */
|
78
Modules/GDL2/GDL2Info.plist
Normal file
78
Modules/GDL2/GDL2Info.plist
Normal file
|
@ -0,0 +1,78 @@
|
|||
{
|
||||
STClasses = (
|
||||
/* Classes from EOAccess */
|
||||
|
||||
EOAccessArrayFaultHandler,
|
||||
EOAccessFaultHandler,
|
||||
EOAccessGenericFaultHandler,
|
||||
EOAdaptor,
|
||||
EOAdaptor,
|
||||
EOAdaptorChannel,
|
||||
EOAdaptorContext,
|
||||
EOAdaptorOperation,
|
||||
EOAndQualifier,
|
||||
EOAttribute,
|
||||
EODatabase,
|
||||
EODatabaseChannel,
|
||||
EODatabaseContext,
|
||||
EODatabaseDataSource,
|
||||
EODatabaseOperation,
|
||||
EOEditingContext,
|
||||
EOEntity,
|
||||
EOEntityClassDescription,
|
||||
EOExpressionArray,
|
||||
EOJoin,
|
||||
EOKeyComparisonQualifier,
|
||||
EOKeyValueQualifier,
|
||||
/* EOLoginPanel, */
|
||||
EOModel,
|
||||
EOModelGroup,
|
||||
EONotQualifier,
|
||||
EOObjectStoreCoordinator,
|
||||
EOOrQualifier,
|
||||
EORelationship,
|
||||
EOSQLExpression,
|
||||
EOSQLQualifier,
|
||||
EOStoredProcedure,
|
||||
|
||||
/* Classees from EOControl */
|
||||
|
||||
EOAndQualifier,
|
||||
EOCheapCopyArray,
|
||||
EOCheapCopyMutableArray,
|
||||
EOClassDescription,
|
||||
EOCooperatingObjectStore,
|
||||
EODataSource,
|
||||
/* EODelayedObserver, */
|
||||
/* EODelayedObserverQueue, */
|
||||
EODetailDataSource,
|
||||
EOEditingContext,
|
||||
EOFault,
|
||||
EOFaultHandler,
|
||||
EOFetchSpecification,
|
||||
EOGenericRecord,
|
||||
EOGlobalID,
|
||||
EOKeyComparisonQualifier,
|
||||
EOKeyGlobalID,
|
||||
EOKeyValueArchiver,
|
||||
EOKeyValueQualifier,
|
||||
EOKeyValueUnarchiver,
|
||||
EOMKKDArrayMapping,
|
||||
EOMKKDInitializer,
|
||||
EOMKKDKeyEnumerator,
|
||||
EOMKKDSubsetMapping,
|
||||
EOMutableKnownKeyDictionary,
|
||||
EONotQualifier,
|
||||
EONull,
|
||||
EOObjectStore,
|
||||
EOObjectStoreCoordinator,
|
||||
EOObserverCenter,
|
||||
/* EOObserverProxy, */
|
||||
EOOrQualifier,
|
||||
EOQualifier,
|
||||
EOQualifierVariable,
|
||||
EOSortOrdering,
|
||||
EOTemporaryGlobalID,
|
||||
EOUndoManager
|
||||
);
|
||||
}
|
61
Modules/GDL2/GNUmakefile
Normal file
61
Modules/GDL2/GNUmakefile
Normal file
|
@ -0,0 +1,61 @@
|
|||
#
|
||||
# GDL2 module
|
||||
#
|
||||
# Copyright (C) 2002 Stefan Urbanek
|
||||
#
|
||||
# Author: Stefan Urbanek
|
||||
# Date: 2002 Nov 29
|
||||
#
|
||||
# This file is part of the StepTalk.
|
||||
#
|
||||
# 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; if not, write to the Free
|
||||
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02111, USA.
|
||||
#
|
||||
|
||||
GNUSTEP_MAKEFILES = $(GNUSTEP_SYSTEM_ROOT)/Makefiles
|
||||
|
||||
include $(GNUSTEP_MAKEFILES)/common.make
|
||||
|
||||
BUNDLE_NAME = GDL2
|
||||
|
||||
GDL2_OBJC_FILES = \
|
||||
STGDL2Module.m \
|
||||
GDL2Constants.m
|
||||
|
||||
GDL2_PRINCIPAL_CLASS = STGDL2Module
|
||||
|
||||
GDL2_BUNDLE_LIBS += -lStepTalk \
|
||||
-lgnustep-db2 \
|
||||
-lgnustep-db2control \
|
||||
-lgnustep-db2modeler
|
||||
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../../Source/Headers
|
||||
ADDITIONAL_LIB_DIRS += -L../../Source/$(GNUSTEP_OBJ_DIR)
|
||||
|
||||
BUNDLE_EXTENSION := .stmodule
|
||||
BUNDLE_INSTALL_DIR:=$(GNUSTEP_INSTALLATION_DIR)/Library/StepTalk/Modules
|
||||
|
||||
-include GNUmakefile.preamble
|
||||
include $(GNUSTEP_MAKEFILES)/bundle.make
|
||||
-include GNUMakefile.postamble
|
||||
|
||||
|
||||
GDL2Constants.m : GDL2Constants.list
|
||||
|
||||
%.m : %.list
|
||||
@( echo Creating $@ ...; \
|
||||
cat header.m | sed "s/@@NAME@@/`basename $< .list`/g" > $@; \
|
||||
cat $< | awk -f create_constants.awk >> $@;\
|
||||
cat footer.m >> $@; )
|
||||
|
34
Modules/GDL2/STGDL2Module.h
Normal file
34
Modules/GDL2/STGDL2Module.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
/**
|
||||
STGDL2Module.h
|
||||
GDL bindings
|
||||
|
||||
Copyright (c) 2002 Free Software Foundation
|
||||
|
||||
Written by: Stefan Urbanek <urbanek@host.sk>
|
||||
Date: 2002 Nov 29
|
||||
|
||||
This file is part of the StepTalk project.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
#import <StepTalk/STModule.h>
|
||||
|
||||
@interface STGDL2Module:STModule
|
||||
{
|
||||
}
|
||||
@end
|
||||
|
54
Modules/GDL2/STGDL2Module.m
Normal file
54
Modules/GDL2/STGDL2Module.m
Normal file
|
@ -0,0 +1,54 @@
|
|||
/**
|
||||
STGDL2Module.m
|
||||
GDL bindings
|
||||
|
||||
Copyright (c) 2002 Free Software Foundation
|
||||
|
||||
Written by: Stefan Urbanek <urbanek@host.sk>
|
||||
Date: 2002 Nov 29
|
||||
|
||||
This file is part of the StepTalk project.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
#import "STGDL2Module.h"
|
||||
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
extern NSDictionary *STGetGDL2Constants();
|
||||
|
||||
@class EODatabase;
|
||||
@class EOQualifier;
|
||||
|
||||
@implementation STGDL2Module
|
||||
+ (void)initialize
|
||||
{
|
||||
[EODatabase class];
|
||||
[EOQualifier class];
|
||||
}
|
||||
|
||||
- (NSDictionary *)namedObjects
|
||||
{
|
||||
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
|
||||
|
||||
[dict addEntriesFromDictionary:STGetGDL2Constants()];
|
||||
|
||||
return [dict copy]; /* get immutable copy */
|
||||
}
|
||||
@end
|
||||
|
5
Modules/GDL2/create_constants.awk
Normal file
5
Modules/GDL2/create_constants.awk
Normal file
|
@ -0,0 +1,5 @@
|
|||
($0 !~ /^[\t ]*#.*$/) && ($0 !~ /^[\t ]*$/) && (NF == 2) {
|
||||
|
||||
printf " ADD_%s_OBJECT(%s,@\"%s\");\n", $1, $2, $2
|
||||
|
||||
}
|
5
Modules/GDL2/footer.m
Normal file
5
Modules/GDL2/footer.m
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
return dict;
|
||||
}
|
||||
|
||||
/* -- End of file -- */
|
75
Modules/GDL2/header.m
Normal file
75
Modules/GDL2/header.m
Normal file
|
@ -0,0 +1,75 @@
|
|||
/**
|
||||
@@NAME@@.m
|
||||
|
||||
NOTE: Do not edit this file, it is automaticaly generated.
|
||||
|
||||
Copyright (c) 2002 Free Software Foundation
|
||||
|
||||
This file is part of the StepTalk project.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NSDictionary *STGet@@NAME@@(void)
|
||||
{
|
||||
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
|
||||
Class numberClass = [NSNumber class];
|
||||
IMP numberWithInt;
|
||||
IMP numberWithFloat;
|
||||
IMP setObject_forKey;
|
||||
|
||||
SEL numberWithInt_sel = @selector(numberWithInt:);
|
||||
SEL numberWithFloat_sel = @selector(numberWithFloat:);
|
||||
SEL setObject_forKey_sel = @selector(setObject:forKey:);
|
||||
|
||||
numberWithInt = [NSNumber methodForSelector:numberWithInt_sel];
|
||||
numberWithFloat = [NSNumber methodForSelector:numberWithFloat_sel];
|
||||
setObject_forKey = [dict methodForSelector:setObject_forKey_sel];
|
||||
|
||||
#define ADD_id_OBJECT(obj, name) \
|
||||
setObject_forKey(dict, setObject_forKey_sel, obj, name)
|
||||
|
||||
#define ADD_int_OBJECT(obj, name) \
|
||||
setObject_forKey(dict, setObject_forKey_sel, \
|
||||
numberWithInt(numberClass, numberWithInt_sel, obj), \
|
||||
name)
|
||||
|
||||
#define ADD_float_OBJECT(obj, name) \
|
||||
setObject_forKey(dict, setObject_forKey_sel, \
|
||||
numberWithFloat(numberClass, numberWithInt_sel, obj), \
|
||||
name)
|
||||
|
||||
#define ADD_NSPoint_OBJECT(obj, name) \
|
||||
setObject_forKey(dict, setObject_forKey_sel, \
|
||||
[NSValue valueWithPoint:obj], \
|
||||
name)
|
||||
|
||||
#define ADD_NSRange_OBJECT(obj, name) \
|
||||
setObject_forKey(dict, setObject_forKey_sel, \
|
||||
[NSValue valueWithRange:obj], \
|
||||
name)
|
||||
|
||||
#define ADD_NSSize_OBJECT(obj, name) \
|
||||
setObject_forKey(dict, setObject_forKey_sel, \
|
||||
[NSValue valueWithSize:obj], \
|
||||
name)
|
||||
|
||||
#define ADD_NSRect_OBJECT(obj, name) \
|
||||
setObject_forKey(dict, setObject_forKey_sel, \
|
||||
[NSValue valueWithRect:obj], \
|
||||
name)
|
|
@ -86,6 +86,7 @@ StepTalk_DOC_INSTALL_DIR = Developer
|
|||
StepTalk_HEADER_FILES_DIR = $(HEADER_DIR)
|
||||
StepTalk_AGSDOC_FILES = StepTalk.gsdoc $(STEPTALK_HEADER_FILES)
|
||||
StepTalk_AGSDOC_FLAGS = \
|
||||
-DocumentationDirectory ../Documentation/StepTalk \
|
||||
-HeaderDirectory Headers/StepTalk \
|
||||
-Up StepTalk \
|
||||
-Declared StepTalk
|
||||
|
@ -94,9 +95,6 @@ StepTalk_AGSDOC_FLAGS = \
|
|||
-include GNUmakefile.preamble
|
||||
|
||||
include $(GNUSTEP_MAKEFILES)/library.make
|
||||
|
||||
ifeq ($(doc),yes)
|
||||
include $(GNUSTEP_MAKEFILES)/documentation.make
|
||||
endif
|
||||
|
||||
-include GNUmakefile.postamble
|
||||
|
|
|
@ -162,10 +162,15 @@
|
|||
}
|
||||
|
||||
/**
|
||||
<p>
|
||||
Enable or disable creation of unknown objects. Normally you get nil if you
|
||||
request for non-existant object. If <var>flag</var> is YES
|
||||
then by requesting non-existant object, name for that object is created
|
||||
and it is set no STNil.
|
||||
</p>
|
||||
<p>
|
||||
Note: This method will be probably removed (moved to Smalltalk language bundle).
|
||||
</p>
|
||||
*/
|
||||
-(void)setCreatesUnknownObjects:(BOOL)flag
|
||||
{
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
{
|
||||
NSBundle *bundle;
|
||||
STModule *module;
|
||||
Class class;
|
||||
|
||||
bundle = [NSBundle bundleWithPath:modulePath];
|
||||
|
||||
|
@ -71,11 +72,20 @@
|
|||
|
||||
|
||||
NSDebugLog(@"Instantiating module '%@'", modulePath);
|
||||
module = [[[bundle principalClass] alloc] init];
|
||||
class = [bundle principalClass];
|
||||
|
||||
if(!class)
|
||||
{
|
||||
NSLog(@"Could not get pricipal class of module '%@'", modulePath);
|
||||
return nil;
|
||||
}
|
||||
|
||||
module = [[class alloc] init];
|
||||
|
||||
if(!module)
|
||||
{
|
||||
NSLog(@"Could not instantiate module '%@'", modulePath);
|
||||
NSLog(@"Could not instantiate class '%@' from module '%@'",
|
||||
[class className], modulePath);
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
|
|
@ -46,6 +46,6 @@
|
|||
|
||||
- (NSString *)stringValue
|
||||
{
|
||||
return [self description];
|
||||
return NSStringFromSelector(sel);
|
||||
}
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue