File:  [NeXTSTEP 3.3 examples] / Examples / EnterpriseObjects / SHLExamples / EnterpriseObject / Address.m
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:48:50 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.
 *
 *	Publisher
 *
 *	Inherits From:		NSObject
 *
 *	Conforms To:		None
 *
 *	Declared In:		Address.h
 *
 *------------------------------------------------------------------------*/
#import "Address.h"
#import <foundation/NSString.h>




@implementation Address

/*--------------------------------------------------------------------------
 *	Init and Dealloc
 *------------------------------------------------------------------------*/
- init
{
	[super init];
	return self;
}


- (void) dealloc
{
	[address autorelease];
	[city autorelease];
	[state autorelease];
	[zip autorelease];
	[super dealloc];
}


/*--------------------------------------------------------------------------
 *	Accessors
 *------------------------------------------------------------------------*/
- (NSString *) address
{
	return address;
}


- (NSString *) city
{
	return city;
}


- (NSString *) state
{
	return state;
}


- (NSString *) zip
{
	return zip;
}


- (void) setAddress: (NSString *)anAddress
{
	[address autorelease];
	address = [anAddress retain];
}


- (void) setCity: (NSString *)aCity;
{
	[city autorelease];
	city = [aCity retain];
}


- (void) setState: (NSString *)aState
{
	[state autorelease];
	state = [aState retain];
}


- (void) setZip: (NSString *)aZip
{
	[zip autorelease];
	zip = [aZip retain];
}


@end
	

unix.superglobalmegacorp.com

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