home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Apple Shared Library Manager / ASLM Developer Tools / Interfaces / CIncludes / TestTool.h < prev   
Encoding:
C/C++ Source or Header  |  1996-11-19  |  1.6 KB  |  70 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        TestTool.h
  3.  
  4.     Contains:    Declaration of a TTestTool
  5.  
  6.     Copyright:    © 1991-1994 by Apple Computer, Inc., all rights reserved.
  7.  
  8. */
  9.  
  10. #ifndef __TESTTOOL__
  11. #define __TESTTOOL__
  12.  
  13. #ifndef __LIBRARYMANAGERCLASSES__
  14. #include <LibraryManagerClasses.h>
  15. #endif
  16.  
  17. #define kTestToolPrefix        "appl:test$"
  18.  
  19. typedef int (*_CDECL PrintfFunc)(const char *, char*);
  20.  
  21. /**********************************************************************
  22. ** CLASS TTestTool
  23. ***********************************************************************/
  24.  
  25. #define kTTestToolID kTestToolPrefix "TTestTool,1.2"
  26.  
  27. class TTestTool : public TDynamic
  28. {
  29.     public:
  30.         virtual                ~_CDECL TTestTool();
  31.                             _CDECL TTestTool();
  32.                             _CDECL TTestTool(TStandardPool* thePool);
  33.  
  34. #ifndef USEMPW
  35.         virtual void        _CDECL SetPrintf(PrintfFunc);
  36. #endif
  37.         virtual void        _CDECL Printf(const char*, ...) const;
  38.         virtual void        _CDECL InitTest(BooleanParm verbose, BooleanParm debug, int argc, char** argv) = 0;        
  39.         virtual void        _CDECL RunTestIteration(BooleanParm verbose, BooleanParm debug)    = 0;
  40.         virtual void        _CDECL EndTest(BooleanParm verbose, BooleanParm debug)            = 0;
  41.  
  42.             void            SetPool(TStandardPool* thePool);
  43.             TStandardPool*     GetPool();
  44.         
  45.     private:
  46. #ifndef USEMPW
  47.         PrintfFunc            fPrint;
  48.         Ptr                    fPrintWorld;
  49. #endif
  50.         TStandardPool*         fPool;
  51. };
  52.  
  53.  
  54. /*    -----------------------------------------------------------------
  55.     Inline functions for TTestTool
  56.     ----------------------------------------------------------------- */
  57.  
  58.     inline void TTestTool::SetPool(TStandardPool* thePool)
  59.     {
  60.         fPool = thePool;
  61.     }
  62.     
  63.     inline TStandardPool* TTestTool::GetPool()
  64.     {
  65.         return fPool;
  66.     }
  67.  
  68.  
  69. #endif
  70.