home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.mdf / SourceCode / Database / OTC_EOFBetaExamples_V1.0 / EOFramework / EnterpriseObject / Author.m < prev    next >
Encoding:
Text File  |  1994-06-16  |  1.7 KB  |  110 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.  *    Author
  8.  *
  9.  *    Inherits From:        NSObject
  10.  *
  11.  *    Conforms To:        None
  12.  *
  13.  *    Declared In:        Author.h
  14.  *
  15.  *------------------------------------------------------------------------*/
  16. #import "Author.h"
  17. #import "Address.h"
  18. #import <foundation/NSString.h>
  19.  
  20.  
  21.  
  22.  
  23. @implementation Author
  24.  
  25. /*--------------------------------------------------------------------------
  26.  *    Init and Dealloc
  27.  *------------------------------------------------------------------------*/
  28. - init
  29. {
  30.     [super init];
  31.     address = [[Address allocWithZone: [self zone]] init];
  32.     return self;
  33. }
  34.  
  35.  
  36. - (void) dealloc
  37. {
  38.     [au_id release];
  39.     [fullname release];
  40.     [address release];
  41.     [super dealloc];
  42. }
  43.  
  44.  
  45. /*--------------------------------------------------------------------------
  46.  *    Accessors
  47.  *------------------------------------------------------------------------*/
  48. - (NSString *) fullname
  49. {
  50.     return fullname;
  51. }
  52.  
  53.  
  54. - (NSString *) address
  55. {
  56.     return [address address];
  57. }
  58.  
  59.  
  60. - (NSString *) city
  61. {
  62.     return [address city];
  63. }
  64.  
  65.  
  66. - (NSString *) state
  67. {
  68.     return [address state];
  69. }
  70.  
  71.  
  72. - (NSString *) zip
  73. {
  74.     return [address zip];
  75. }
  76.  
  77.  
  78. - (void) setFullname: (NSString *)aName
  79. {
  80.     [fullname autorelease];
  81.     fullname = [aName retain];
  82. }
  83.  
  84.     
  85. - (void) setAddress: (NSString *)anAddress
  86. {
  87.     [address setAddress: anAddress];
  88. }
  89.  
  90.     
  91. - (void) setCity: (NSString *)aCity;
  92. {
  93.     [address setCity: aCity];
  94. }
  95.  
  96.     
  97. - (void) setState: (NSString *)aState
  98. {
  99.     [address setState: aState];
  100. }
  101.  
  102.  
  103. - (void) setZip: (NSString *)aZip
  104. {
  105.     [address setZip: aZip];
  106. }
  107.  
  108.  
  109. @end
  110.