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

  1. #ifndef lint
  2. static char *sccsid = "@(#)helper.c 1.3 1/22/92 16:10:13 [1/26/92] (c)IBM Corp. 1992";
  3. #endif
  4.  
  5. /*
  6.  * This class is adapted from the book
  7.  *   Class Construction in C and C++, Object Oriented Fundamentals
  8.  *   by Roger Sessions, Copyright (c) 1992 Prentice Hall.
  9.  * Reprinted with permission.
  10.  */
  11.  
  12. /* File: helper.c */
  13.  
  14. #include "helper.h"
  15. #include <stdio.h>
  16. #include <stdlib.h>
  17.  
  18. /* ************************************************************ */
  19. void shouldHaveOverridden(SOMObject * thisObject, char *methodName)
  20. {
  21.     char *class = _somGetClassName(thisObject);
  22.  
  23.     printf("RUN TIME ERROR\n");
  24.     printf("method: %s invoked on object of class: %s\n", methodName, class);
  25.     printf("%s MUST override %s, and has not.\n", class, methodName);
  26.     exit(1);
  27. }
  28.