Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
OTDebug.h
/* |
File: OTDebug.h |
Contains: Macros for debugging stuff |
Copyright: © 1994-1998 by Apple Computer, Inc., all rights reserved. |
*/ |
#ifndef __OTDEBUG__ |
#define __OTDEBUG__ |
#define kOTFatalErr "FB " |
#define kOTNonfatalErr "NB " |
#define kOTExtFatalErr "FX " |
#define kOTExtNonfatalErr "NX " |
#define kOTUserFatalErr "UF " |
#define kOTUserErr "UE " |
#define kOTUserNonfatalErr "UE " |
#define kOTInfoErr "IE " |
#define kOTInfoBreak "IN " |
pascal void OTDebugStr(const char* str); |
#if qDebug || qDebug2 |
#define OTDebugBreak(str) OTDebugStr(str) |
#define OTDebugTest(val, str) { if ( val ) OTDebugStr(str); } |
#define OTAssert(name, cond) \ |
if ( !(cond) ) \ |
{ \ |
OTDebugStr(#name " - Failed assertion:" #cond); \ |
} |
#else |
#define OTDebugBreak(str) |
#define OTDebugTest(val, str) |
#define OTAssert(name, cond) |
#endif // qDebug || qDebug2 |
#if qDebug > 1 || qDebug2 > 1 |
#define OTDebugBreak2(str) OTDebugStr(str) |
#define OTDebugTest2(val, str) { if ( val) OTDebugStr(str); } |
#else |
#define OTDebugBreak2(str) |
#define OTDebugTest2(val, str) |
#endif // qDebug > 1 || qDebug2 > 1 |
#endif // __OTDEBUG__ |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-07-22