fgms 0.11.8
The
FlightGear MultiPlayer Server
project
debug.hxx
Go to the documentation of this file.
1 //
2 // This program is free software; you can redistribute it and/or
3 // modify it under the terms of the GNU General Public License as
4 // published by the Free Software Foundation; either version 2 of the
5 // License, or (at your option) any later version.
6 //
7 // This program is distributed in the hope that it will be useful, but
8 // WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 // General Public License for more details.
11 //
12 // You should have received a copy of the GNU General Public License
13 // along with this program; if not, write to the Free Software
14 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, U$
15 //
16 // Copyright (C) 2011 Oliver Schroeder
17 //
18 
19 #if !defined CLI_DEBUG_H
20 #define CLI_DEBUG_H
21 
22 #define CLI_TRACE __FUNCTION__,__FILE__,__LINE__
23 
24 // #define DEBUG_OUTPUT
25 #ifdef DEBUG_OUTPUT
26  define DEBUG_OUT(X) printf(X)
27 #else
28  #define DEBUG_OUT(X)
29 #endif
30 
31 class DEBUG
32 {
33 public:
34  DEBUG ( const char* function, const char* filename, const int line );
35  void trace ( const char* function, const char* filename, const int line );
36  ~DEBUG ();
37 private:
38  static int depth;
39 
40  const char* filename;
41  const char* function;
42  int line;
43 };
44 
45 #endif
~DEBUG()
Definition: debug.cxx:59
DEBUG(const char *function, const char *filename, const int line)
Definition: debug.cxx:41
static int depth
Definition: debug.hxx:38
const char * filename
Definition: debug.hxx:40
void trace(const char *function, const char *filename, const int line)
Definition: debug.cxx:52
#define DEBUG_OUT(X)
Definition: debug.hxx:28
Definition: debug.hxx:31
int line
Definition: debug.hxx:42