SIMLIB/C++
3.09
Toggle main menu visibility
Loading...
Searching...
No Matches
src
debug.cc
Go to the documentation of this file.
1
/////////////////////////////////////////////////////////////////////////////
2
//! \file debug.cc Some internal debugging tools
3
//
4
// Copyright (c) 1991-2004 Petr Peringer
5
//
6
// This library is licensed under GNU Library GPL. See the file COPYING.
7
//
8
9
//
10
// debugging facilities
11
//
12
13
14
////////////////////////////////////////////////////////////////////////////
15
//
16
// interface
17
//
18
19
#include "
simlib.h
"
20
#include "
internal.h
"
21
22
namespace
simlib3
{
23
24
////////////////////////////////////////////////////////////////////////////
25
//
26
// implementation
27
//
28
29
SIMLIB_IMPLEMENTATION
;
30
31
#ifndef NDEBUG
32
unsigned
long
SIMLIB_debug_flag
= 0UL;
// default = no debugging
33
#endif
34
35
// start debugging
36
void
DebugON
()
37
{
38
Debug
(~0UL);
39
}
40
41
// stop debugging
42
void
DebugOFF
()
43
{
44
Debug
(0UL);
45
}
46
47
// set debug mode flag
48
unsigned
long
Debug
(
unsigned
long
mode)
49
{
50
#ifdef NDEBUG
51
SIMLIB_warning
(
NoDebugErr
);
52
return
0;
53
#else
54
unsigned
long
tmp =
SIMLIB_debug_flag
;
55
SIMLIB_debug_flag
= mode;
56
return
tmp;
57
#endif
58
}
59
60
}
61
// end
62
internal.h
Internal header file for SIMLIB/C++.
simlib3
Implementation of class CalendarList interface is static - using global functions in SQS namespace.
Definition
algloop.cc:32
simlib3::DebugOFF
void DebugOFF()
stop debugging output
Definition
debug.cc:42
simlib3::SIMLIB_IMPLEMENTATION
SIMLIB_IMPLEMENTATION
Definition
algloop.cc:34
simlib3::DebugON
void DebugON()
start debugging output
Definition
debug.cc:36
simlib3::Debug
unsigned long Debug(unsigned long mode)
Definition
debug.cc:48
simlib3::SIMLIB_debug_flag
unsigned long SIMLIB_debug_flag
Definition
debug.cc:32
simlib3::SIMLIB_warning
void SIMLIB_warning(const enum _ErrEnum N)
print warning message and continue
Definition
error.cc:74
simlib3::NoDebugErr
@ NoDebugErr
Definition
errors.cc:88
simlib.h
Main SIMLIB/C++ interface.
Generated on
for SIMLIB/C++ by
1.18.0