home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / AOCE Sample Code / PowerTalk Access Modules / Sample SMSAM / SampleSMSAM Source / BuildingBlocks / BuildingBlocksTest.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-28  |  1.3 KB  |  68 lines  |  [TEXT/MPS ]

  1. #ifndef    __BUILDINGBLOCKSTEST__
  2. #define    __BUILDINGBLOCKSTEST__
  3.  
  4. #ifndef    __IOSTREAM__
  5. #include "IOStream.h"
  6. #endif
  7.  
  8. #ifndef    __STRING__
  9. #include "String.h"
  10. #endif
  11.  
  12. #ifndef    __DEBUGFLAG__
  13. #include "DebugFlag.h"
  14. #endif
  15.  
  16. #ifndef    __DEBUGASSERT__
  17. #include "DebugAssert.h"
  18. #endif
  19.  
  20. #ifndef    __DEBUGCONSTANTS__
  21. #include "DebugConstants.h"
  22. #endif
  23.  
  24. #ifndef    __DEBUGGINGGEAR__
  25. #include "DebuggingGear.h"
  26. #endif
  27.  
  28. #ifndef    __DIRECTOBJECT__
  29. #include "DirectObject.h"
  30. #endif
  31.  
  32. extern TDebugFlag chrisFlag;
  33.  
  34. #define    TEST_REPORT(F) chris << "#### " << #F << "\nFILE " << __FILE__ << "; LINE " << deco << __LINE__ << '\n'
  35.  
  36. /*
  37.     File:        BuildingBlocksTest.h
  38.  
  39.     Copyright:    © 1991-1994 by Apple Computer, Inc.
  40.                 All rights reserved.
  41.  
  42.     Part of the AOCE Sample SMSAM Package.  Consult the license
  43.     which came with this software for your specific legal rights.
  44.  
  45. */
  46.  
  47.  
  48.  
  49. class CLeakChecker : public TDirectObject
  50. {
  51. public:        CLeakChecker ( ostream& );
  52.     virtual    ~CLeakChecker ();
  53.  
  54.     virtual    void                    Remember ();
  55.     virtual    void                    ReportIfChanged ();
  56.             long                    GetDelta () const;
  57.  
  58.     virtual    ostream&                operator >> ( ostream& s ) const;
  59.  
  60. protected:    unsigned long            GetFreeBytes () const;
  61. private:    ostream&                fReportTo;
  62.             unsigned long            fRememberedFree;
  63. };
  64.  
  65. /***********************************|****************************************/
  66.  
  67. #endif    // __BUILDINGBLOCKSTEST__
  68.