swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swarm-Support] Now really close to fixing the warnings about inconsiste


From: Paul Johnson
Subject: [Swarm-Support] Now really close to fixing the warnings about inconsistent method declarations
Date: Tue, 15 Mar 2005 00:59:41 -0600
User-agent: Mozilla Thunderbird 0.9 (X11/20041127)

Nevertheless, the "forward reference" to protocols to be defined later is supposed to work, as described in this manual:

http://www.seat-1.com/IntarS_000002_Ressources/tables/homepage/ObjectiveC/moreobjc.htm


So in defobj.h I'm trying by inserting this:

@protocol OutputStream, HDF5;

RIGHT BEFORE this:

@protocol CreatedClass <Create, DefinedClass>

As I fiddle around, that gets me really really far past the compiler warnings. Now I can make the method names match, such as

- (void)lispOutShallow: (id <OutputStream>)stream;

in defobj.h and the collections library.

But then this thing with moduleMap happens and I don't know what it is about. Do you?

gcc -DHAVE_CONFIG_H -I. -I/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.2/src/defobj -I../.. -I../.. -I../../libobjc -I/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.2/libobjc -I../.. -I.. -I/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.2/src/defobj/.. -I/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.2/src/defobj/../collections -I/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.2/src/defobj/../misc -I/usr/java/j2sdk1.4.2_07/include -I/usr/java/j2sdk1.4.2_07/include/linux -I../../avcall -D_GNU_SOURCE -DBUILDING_SWARM -g -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -fgnu-runtime -fno-strict-aliasing -Werror -Wno-import -Wno-protocol -Wno-long-long -Wno-unknown-pragmas -Wno-unknown-pragmas -MT COM.lo -MD -MP -MF .deps/COM.Tpo -c /home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.2/src/defobj/COM.m -o COM.o >/dev/null 2>&1 MODULES="defobj collections activity objectbase random simtools gui simtoolsgui space analysis" TOP_BUILDDIR='/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.2/=with-hdf' BUILDDIR='/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.2/=with-hdf/src/defobj' SWARMSRCDIR='/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.2' /usr/bin/emacs -batch --eval '(setq *disable-gui* nil)' -l '/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.2/=with-hdf/src/defobj/modulemap.elc' -f generate-module-map Loading /usr/share/emacs/site-lisp/site-start.d/rpm-spec-mode-init.el (source)... Unrecognized text (protocol): address@hidden CreatedClass <Create, DefinedClass>] make[1]: *** [/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.2/src/defobj/modulemap.c] Error 255 make[1]: Leaving directory `/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.2/=with-hdf/src/defobj
pj

Paul Johnson wrote:
Bill Northcott wrote:

On 15/03/2005, at 4:13 AM, Paul Johnson wrote:

I need help with one piece of syntax. Recall you can tell the compiler that a class exists, although it has not been presented yet, with the directive

@class TheClassName

IF you do that, then you can use (TheClassName *) as a return type and the compiler does not bother you.

What is the equivalent declaration for a protocol?



 From the Objective-C language manual syntax definitions:

    protocol-declaration:
    @protocol protocol-name
    [ protocol-reference-list ]
    [ interface-declaration-list ]
    @end

    protocol-declaration-list:
    @protocol < protocol-list  > ;

    class-declaration-list:
    @class class-list ;

Which is hopefully self-explanatory.  So I guess you need:
@protocol < SomeProtocol SomeOtherProtocol >;


--
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66044-3177           FAX: (785) 864-5700


reply via email to

[Prev in Thread] Current Thread [Next in Thread]