home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / som / somk / c / tp / helper.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-01-24  |  859 b   |  34 lines

  1. #ifndef lint
  2. static char *sccsid = "%Z% %I% %W% %G% %U% [%H% %T%] (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. #include "msgid.h"
  14. #include "nlsutil.h"
  15.  
  16. #if defined(_WIN32)
  17. #include "statcls.h"
  18. #endif
  19.  
  20. #include "helper.h"
  21. #include <stdio.h>
  22. #include <stdlib.h>
  23.  
  24. /* ************************************************************ */
  25. void shouldHaveOverridden(SOMObject * thisObject, char *methodName)
  26. {
  27.     char *class = _somGetClassName(thisObject);
  28.  
  29.     printf(NlsMsgGet(RunTimeErrorId1));
  30.     printf(NlsMsgGet(RunTimeErrorId2), methodName, class);
  31.     printf(NlsMsgGet(RunTimeErrorId3), class, methodName);
  32.     exit(1);
  33. }
  34.