mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
43 lines
737 B
C++
43 lines
737 B
C++
/*
|
|
* $Id$
|
|
*
|
|
* Edewm, window manager
|
|
* Part of Equinox Desktop Environment (EDE).
|
|
* Copyright (c) 2000-2006 EDE Authors.
|
|
*
|
|
* This program is licenced under terms of the
|
|
* GNU General Public Licence version 2 or newer.
|
|
* See COPYING for details.
|
|
*/
|
|
|
|
#ifndef __TRACERS_H__
|
|
#define __TRACERS_H__
|
|
|
|
#include "debug.h"
|
|
|
|
#ifdef _DEBUG
|
|
class FunctionTracer
|
|
{
|
|
private:
|
|
const char* func;
|
|
public:
|
|
FunctionTracer(const char* f) : func(f)
|
|
{
|
|
if(func)
|
|
EPRINTF("Function [+]: \"%s\"\n", func);
|
|
}
|
|
|
|
~FunctionTracer()
|
|
{
|
|
if(func)
|
|
EPRINTF("Function [-]: \"%s\"\n", func);
|
|
}
|
|
};
|
|
|
|
#define TRACE_FUNCTION(name) FunctionTracer foo(name)
|
|
#else
|
|
#define TRACE_FUNCTION(name) (void)0
|
|
#endif // _DEBUG
|
|
|
|
#endif
|