File:  [NeXTSTEP 3.3 examples] / Examples / EnterpriseObjects / SHLExamples / DataSource / Motorcycle.m
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:48:51 2018 UTC (8 years, 1 month ago) by root
Branches: NeXT, MAIN
CVS tags: NeXTSTEP33, HEAD
Sample Programs from NeXSTEP 3.3

/*--------------------------------------------------------------------------
 *
 * 	You may freely copy, distribute, and reuse the code in this example.
 * 	SHL Systemhouse disclaims any warranty of any kind, expressed or  
 *	implied, as to its fitness for any particular use.
 *
 *
 *	Motorcycle
 *
 *	Inherits From:		NSObject
 *
 *	Conforms To:		None
 *
 *	Declared In:		Motorcycle.h
 *
 *
 *------------------------------------------------------------------------*/
#import "Motorcycle.h"
#import <foundation/NSString.h>
#import <appkit/NXImage.h>
#import <appkit/Application.h>





@implementation Motorcycle

/*--------------------------------------------------------------------------
 *	Initialization and Deallocation
 *------------------------------------------------------------------------*/
- init
{
	[super init];
	return self;
}


- (void) dealloc
{
	[make release];
	[model release];
	[price release];
	[picture free];
	[super dealloc];
}


/*--------------------------------------------------------------------------
 *	Accessors
 *------------------------------------------------------------------------*/
- make
{
	return make;
}


- model
{
	return model;
}


- price
{
	return price;
}


- picture
{
	return picture;
}


- (void) setMake: (NSString *) aString
{
	[make autorelease];
	make = [aString retain];
}


- (void) setModel: (NSString *) aString
{
	[model autorelease];
	model = [aString retain];
}


- (void) setPrice: (NSString *) aString
{
	[price autorelease];
	price = [aString retain];
}


- (void) setPicture: (NXImage *) anImage
{
	[picture free];
	picture = anImage;
}


@end

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.