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 / ep.cs_ / ep.csc
Encoding:
Text File  |  1993-03-12  |  2.5 KB  |  104 lines

  1. #   @(#)ep.csc 1.3 1/22/92 16:08:51 [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 <somobj.sc>
  9.  
  10. class: envProcessor,
  11.   local;
  12.  
  13. parent: SOMObject;
  14.  
  15. /*
  16. ----------------------------------------------------
  17.   Class: envProcessor
  18.  
  19. Purpose: This is the most basic environment processor, from
  20.      which both the setUpEnvProcessor and txtEnvProcessor
  21.      is derived.  This class provides defaults for many
  22.      methods, but, with the exception of the get methods,
  23.      many will be overridden by later derivations.
  24.      This class will not be instantiated directly.
  25.      It will be used as the basis for further class
  26.      derivations.
  27. ---------------------------------------------------- */
  28.  
  29.  
  30. passthru: C.h;
  31. #include "page.h"
  32. #include "fm.h"
  33. #include "tpword.h"
  34. endpassthru;
  35.  
  36. data:
  37.  
  38.     page     *thisPage;
  39.     fileMgr     *thisFile;
  40.     envProcessor *previousEnv;
  41.  
  42. methods:
  43.  
  44. group: Initializers;
  45.  
  46.    void epInit1(envProcessor *lastEnv);
  47.    -- Used to initialize a new environment from an
  48.    -- existing environment.
  49.  
  50. group: ClassMethods;
  51.  
  52.   void epProcessEnvironment();
  53.   -- Defines what it means to process a given
  54.   -- environment.  This method MUST be overridden in
  55.   -- derived classes.
  56.  
  57.   void epStartUpNewEnvironment(TPWord *envName);
  58.   -- Defines what steps need to be taken at the start
  59.   -- of this environment.
  60.  
  61.   void epInitializeEnvironment();
  62.   -- Defines what steps need to be taken to initialize
  63.   -- a given environment.
  64.  
  65.   void epShutdownEnvironment();
  66.   -- Defines what steps need to be taken to shutdown this
  67.   -- environment.
  68.  
  69.   void epPrepareForNewEnvironment();
  70.   -- Defines what steps this environment should take as it
  71.   -- prepares to transfer control to a new environment.
  72.  
  73. group: GetMethods;
  74.  
  75.   int  epGetParagraphIndentation();
  76.   -- Get the indentation for a new paragraph for this environment.
  77.  
  78.   int  epGetLineIndentation();
  79.   -- Get the indentation for a new line for this environment.
  80.  
  81. group: InternalGetMethods;
  82.  
  83.   page      *epGetPage();
  84.  
  85.   fileMgr *epGetFileMgr();
  86.  
  87.   envProcessor *epGetPreviousEnv();
  88.  
  89.   char *epGetClassName();
  90.  
  91. group: SetMethods;
  92.  
  93.   void       epSetPage(page *newPage);
  94.  
  95.   void       epSetFileMgr(fileMgr *newFileMgr);
  96.  
  97. group: SystemMethodOverrides;
  98.  
  99.    override somInit;
  100.  
  101.    override somUninit;
  102.  
  103.    override somDumpSelfInt;
  104.