home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional Developers Kit 1992 November / Disc01 / Disc01.mdf / os2tk20 / c / samples / tp / tpword.cs_ / TPWORD.CSC
Encoding:
Text File  |  1992-07-15  |  1.1 KB  |  47 lines

  1. #   @(#)tpword.csc 1.3 1/22/92 16:11:39 [1/26/92] (c)IBM Corp. 1992
  2.  
  3. -- This class is adapted from the book
  4. --   Class Construction in C and C++, Object Oriented Fundamentals
  5. --   by Roger Sessions, Copyright (c) 1992 Prentice Hall.
  6. -- Reprinted with permission.
  7.  
  8. include "word.sc"
  9.  
  10. class: TPWord,
  11.   local;
  12.  
  13. parent: word;
  14.  
  15. /*
  16. ----------------------------------------------------
  17.   Class: TPWord
  18.  
  19. Purpose: This is a more specialized class derived from
  20.      the generic Word class.  This is a word which
  21.      includes more functionality needed for text
  22.      processing, namely the concept of type.
  23.      This class also includes a definition for a
  24.      function, readToken, which returns a newly
  25.      read in TPWord object.
  26. ---------------------------------------------------- */
  27.  
  28.  
  29. passthru: C.h;
  30.   #include "fm.h"
  31.  
  32.   #define TP_WORD 0
  33.   #define TP_LINE_BREAK 1
  34.   #define TP_PARAGRAPH_BREAK 2
  35.   #define TP_TOKEN 3
  36.   #define TP_BLANK_SPACE 4
  37.   #define TP_EOF 5
  38.  
  39.   SOMAny *readToken(fileMgr *myFile);
  40. endpassthru;
  41.  
  42. methods:
  43.  
  44.   int tpwType();
  45.   -- Returns the type of a TPWord.
  46.  
  47.