home *** CD-ROM | disk | FTP | other *** search
/ Dream 41 / Amiga_Dream_41.iso / Amiga / Programmation / c / gcc / objam02.lha / objam / test / fooObject.m < prev    next >
Encoding:
Text File  |  1995-04-16  |  478 b   |  37 lines

  1. #include <stdio.h>
  2. #include "fooObject.h"
  3.  
  4. @implementation FooObject
  5.  
  6. - setFoo:(unsigned int)val
  7. {
  8.   foo=val;
  9.   return self;
  10. }
  11.  
  12. - printFoo
  13. {
  14.   printf("FooObject [%s] contains [%d]\n",[self name],[self getFoo]);
  15. }
  16.  
  17. - (unsigned int)getFoo
  18. {
  19.   return foo;
  20. }
  21.  
  22. - read:(TypedStream*)stream
  23. {
  24.   [super read:stream];
  25.   objc_read_types(stream,"I",&foo);
  26.   return self;
  27. }
  28.  
  29. - write:(TypedStream*)stream
  30. {
  31.   [super write:stream];
  32.   objc_write_types(stream,"I",&foo);
  33.   return self;
  34. }
  35.  
  36. @end
  37.