X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fthecheat;a=blobdiff_plain;f=SearchResults.m;fp=SearchResults.m;h=8e1518066aaac3c6bf1d056df23bebff13793421;hp=0000000000000000000000000000000000000000;hb=42cf7bbe564d70233a0d73baee613f209eb00eb6;hpb=2d60a59a8ad195dd0af8f90c8d5b74a69ce7f4fa diff --git a/SearchResults.m b/SearchResults.m new file mode 100644 index 0000000..8e15180 --- /dev/null +++ b/SearchResults.m @@ -0,0 +1,68 @@ + +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Project: The Cheat +// +// File: SearchResults.m +// Created: Sat Oct 04 2003 +// +// Copyright: 2003 Chaz McGarvey. All rights reserved. +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +#import "SearchResults.h" + + +@implementation SearchResults + + ++ (id)resultsWithType:(TCtype)type size:(TCsize)size data:(TCaddress const *)data amount:(int)amount +{ + return [[[SearchResults alloc] initWithType:type size:size data:data amount:amount] autorelease]; +} + +- (id)initWithType:(TCtype)type size:(TCsize)size data:(TCaddress const *)data amount:(int)amount +{ + if ( self = [self init] ) + { + myType = type; + mySize = size; + myData = (TCaddress *)data; + myAmount = amount; + } + + return self; +} + + +- (TCtype)type +{ + return myType; +} + +- (TCsize)size +{ + return mySize; +} + +- (TCaddress *)data +{ + return myData; +} + +- (int)amount +{ + return myAmount; +} + + +- (void)dealloc +{ + if ( myData ) + { + free( myData ); + } + + [super dealloc]; +} + + +@end \ No newline at end of file