home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / os2tk21j / c / samples / animals / animeta.c__ / animeta.c
Encoding:
C/C++ Source or Header  |  1993-03-12  |  697 b   |  29 lines

  1. #ifndef lint
  2. static char *sccsid = "@(#)animeta.c 1.3 2/3/92 20:39:56 [2/3/92] (c)IBM Corp. 1992";
  3. #endif
  4.  
  5. /*
  6.  * Copyright (c) International Business Machines Corporation
  7.  *         1991, 1992
  8.  */
  9.  
  10. #define AnimalFactory_Class_Source
  11. #include "animeta.ih"
  12. #include "animal.h"
  13.  
  14. /*
  15.  *  Create an instance of an Animal with a specific sound.
  16.  */
  17.  
  18. SOM_Scope SOMAny *SOMLINK newAnimal(AnimalFactory * somSelf,
  19.                      char *sound)
  20. {
  21.     /* AnimalFactoryData *somThis = AnimalFactoryGetData(somSelf); */
  22.     Animal *newAnimal;
  23.     AnimalFactoryMethodDebug("AnimalFactory", "newAnimal");
  24.  
  25.     newAnimal = _somNew(somSelf);
  26.     _setSound(newAnimal, sound);
  27.     return (newAnimal);
  28. }
  29.