/*****************************************************************************
 * $LastChangedDate: 2011-04-08 21:16:21 -0400 (Fri, 08 Apr 2011) $
 * @file
 * @author  Jim E. Brooks  http://www.palomino3d.org
 * @brief   Debug support (unused because my code is always perfect).
 *//*
 * LEGAL:   COPYRIGHT (C) 2006 JIM E. BROOKS
 *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
 *          OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2).
 *****************************************************************************/

//#if DEBUG
#ifndef BASE_DEBUG_HH
#define BASE_DEBUG_HH 1

namespace base {

/// Macros that only expand code according to a #define
#if DEBUG
//#define DEBUG_CODE( CODE ) {{ CODE }}  // some vars needed outside block
#define DEBUG_CODE( CODE ) CODE
#else
#define DEBUG_CODE( CODE )
#endif

// Pedantic excruciatingly slow debug code.
#if DEBUG == 2
#define DEBUG2_CODE( CODE ) CODE
#else
#define DEBUG2_CODE( CODE )
#endif

// To mark where code needs implementing.
#define ASSERT_UNIMPLEMENTED() ASSERT(0)

unsigned long
MemoryUsed( void );

#if OS_UNIX
void
MeasureTime( void(*func)(long), long funcArg, const string& funcName );
#endif

} // namespace base

#endif // BASE_DEBUG_HH
//#endif // DEBUG
