home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.mdf / SourceCode / Database / OTC_EOFBetaExamples_V1.0 / EOFramework / DataSource / Motorcycle.m < prev    next >
Encoding:
Text File  |  1994-07-30  |  1.6 KB  |  105 lines

  1. /*--------------------------------------------------------------------------
  2.  *
  3.  *     You may freely copy, distribute, and reuse the code in this example.
  4.  *     SHL Systemhouse disclaims any warranty of any kind, expressed or  
  5.  *    implied, as to its fitness for any particular use.
  6.  *
  7.  *
  8.  *    Motorcycle
  9.  *
  10.  *    Inherits From:        NSObject
  11.  *
  12.  *    Conforms To:        None
  13.  *
  14.  *    Declared In:        Motorcycle.h
  15.  *
  16.  *
  17.  *------------------------------------------------------------------------*/
  18. #import "Motorcycle.h"
  19. #import <foundation/NSString.h>
  20. #import <appkit/NXImage.h>
  21. #import <appkit/Application.h>
  22.  
  23.  
  24.  
  25.  
  26.  
  27. @implementation Motorcycle
  28.  
  29. /*--------------------------------------------------------------------------
  30.  *    Initialization and Deallocation
  31.  *------------------------------------------------------------------------*/
  32. - init
  33. {
  34.     [super init];
  35.     return self;
  36. }
  37.  
  38.  
  39. - (void) dealloc
  40. {
  41.     [make release];
  42.     [model release];
  43.     [price release];
  44.     [picture free];
  45.     [super dealloc];
  46. }
  47.  
  48.  
  49. /*--------------------------------------------------------------------------
  50.  *    Accessors
  51.  *------------------------------------------------------------------------*/
  52. - make
  53. {
  54.     return make;
  55. }
  56.  
  57.  
  58. - model
  59. {
  60.     return model;
  61. }
  62.  
  63.  
  64. - price
  65. {
  66.     return price;
  67. }
  68.  
  69.  
  70. - picture
  71. {
  72.     return picture;
  73. }
  74.  
  75.  
  76. - (void) setMake: (NSString *) aString
  77. {
  78.     [make autorelease];
  79.     make = [aString retain];
  80. }
  81.  
  82.  
  83. - (void) setModel: (NSString *) aString
  84. {
  85.     [model autorelease];
  86.     model = [aString retain];
  87. }
  88.  
  89.  
  90. - (void) setPrice: (NSString *) aString
  91. {
  92.     [price autorelease];
  93.     price = [aString retain];
  94. }
  95.  
  96.  
  97. - (void) setPicture: (NXImage *) anImage
  98. {
  99.     [picture free];
  100.     picture = anImage;
  101. }
  102.  
  103.  
  104. @end
  105.