swarm-support
[Top][All Lists]
Advanced

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

subclassing again


From: Claudia Pahl
Subject: subclassing again
Date: Thu, 20 Jun 1996 10:43:58 +0200 (MET DST)

Hi,

I could not yet figure out what is going on and why the subclassing from
collections does not work anymore. I have defined a class NWList which is
implemented as a subclass of Linked_list. If I try to compile it I receive
now the following error message:

In file included from NWList.h:4,
                 from NWList.m:2;
/usr/local/swarm/include/collections/List_linked.h:12 warning: 'LINKED'
redefined
/usr/local/swarm/include/collections/List_GEN.h:21: warning: this is the
location of the previous definition
In file included from NW List.m 6:
NWList.h:8: Cannot find interface declaration for 'List_linked', superclass
of 'NWList'



*****  File NWList.h:  ********

#import <defobj.h>
#import <objc/Object.h>
#import <collections.h>
#import <collections/List_linked.h>

@interface NWList : List_linked

+ create: aZone;

- deepCopy;

- getNthObject : (int) position;

- getRandomObject;

- replaceNthObject : (int) position : (id) newObject;

- (void) addFirst: anObject;

- (void) addLast: anObject;

@end

*******  File NWList.m *********

#import <simtools.h>
#import "NWList.h"

@implementation NWList

+ create: aZone
{
  NWList  *newMyList;
  newMyList = [aZone allocIVars: self];
  newMyList->zone = aZone;
  return newMyList;
}

here follows the implementation of the different methods.....


as mentioned before this used to work fine with the older versions of
SWARM. Any suggestions where the problem could be?

Thanks

Claudia




____________________________________________________________________________
PD Dr. Claudia Pahl-Wostl                           e-mail: address@hidden
EAWAG, Switzerland                                  phone:    +41-1-823-5542
Environmental Physics                               fax:      +41-1-823-5210




reply via email to

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