home *** CD-ROM | disk | FTP | other *** search
/ Best Objectech Shareware Selections / UNTITLED.iso / boss / grap / util / 020 / testpat.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-28  |  919 b   |  34 lines

  1. /*
  2.     TestPat.hpp version 1.0
  3.     by Robert Schmidt of Ztiff Zox Softwear 1993
  4.  
  5.     Declares the TestPatterns class which is further defined in
  6.         TestPat.cpp.
  7. */
  8.  
  9. #ifndef _TestPat_HPP
  10. #define _TestPat_HPP
  11.  
  12. class TestPatterns
  13.     {
  14. public:
  15.     // testType declares the possible types of screen patterns to test your
  16.     //    wonderful modes with.  Note that 'tests' is there just to provide a
  17.     //    constant equaling the number of tests.
  18.     enum testType
  19.         { testText16=0, testText8, test4x16, test1x256, test4x256, tests };
  20. private:
  21.     static char *string[tests];
  22.     testType testNo;
  23. public:
  24.     TestPatterns(testType t=testType(0)) { testNo = t; }
  25.     testType operator++()    { if (++testNo==tests) testNo=testType(0);
  26.                               return testNo; }
  27.     testType operator--()    { if (--testNo<testType(0)) testNo=tests-1;
  28.                               return testNo; }
  29.     testType getTest()        { return testNo; }
  30.     void run();
  31.     void tellTest();
  32.     };
  33.  
  34. #endif