OpenFOAM
9
The OpenFOAM Foundation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
defineDebugSwitch.H
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration | Website: https://openfoam.org
5
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
License
9
This file is part of OpenFOAM.
10
11
OpenFOAM is free software: you can redistribute it and/or modify it
12
under the terms of the GNU General Public License as published by
13
the Free Software Foundation, either version 3 of the License, or
14
(at your option) any later version.
15
16
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19
for more details.
20
21
You should have received a copy of the GNU General Public License
22
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23
24
Description
25
Macro definitions for debug switches.
26
27
\*---------------------------------------------------------------------------*/
28
29
#ifndef defineDebugSwitch_H
30
#define defineDebugSwitch_H
31
32
#include "
debug.H
"
33
#include "
label.H
"
34
35
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
36
37
//- Define the debug information, lookup as \a Name
38
#define defineDebugSwitchWithName(Type, Name, DebugSwitch) \
39
int Type::debug(::Foam::debug::debugSwitch(Name, DebugSwitch))
40
41
//- Define the debug information
42
#define defineDebugSwitch(Type, DebugSwitch) \
43
defineDebugSwitchWithName(Type, Type::typeName_(), DebugSwitch);
44
45
//- Define the debug information for templates, lookup as \a Name
46
#define defineTemplateDebugSwitchWithName(Type, Name, DebugSwitch) \
47
template<> \
48
defineDebugSwitchWithName(Type, Name, DebugSwitch);
49
50
//- Define the debug information for templates sub-classes, lookup as \a Name
51
#define defineTemplate2DebugSwitchWithName(Type, Name, DebugSwitch) \
52
template<> \
53
defineDebugSwitchWithName(Type, Name, DebugSwitch);
54
55
//- Define the debug information for templates
56
// Useful with typedefs
57
#define defineTemplateDebugSwitch(Type, DebugSwitch) \
58
defineTemplateDebugSwitchWithName(Type, #Type, DebugSwitch)
59
60
//- Define the debug information directly for templates
61
#define defineNamedTemplateDebugSwitch(Type, DebugSwitch) \
62
defineTemplateDebugSwitchWithName(Type, Type::typeName_(), DebugSwitch)
63
64
//- Define the debug information for templates
65
// Useful with typedefs
66
#define defineTemplate2DebugSwitch(Type, DebugSwitch) \
67
defineTemplate2DebugSwitchWithName(Type, #Type, DebugSwitch)
68
69
//- Define the debug information directly for templates
70
#define defineNamedTemplate2DebugSwitch(Type, DebugSwitch) \
71
defineTemplate2DebugSwitchWithName(Type, Type::typeName_(), DebugSwitch)
72
73
74
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
75
76
#endif
77
78
// ************************************************************************* //
debug.H
label.H
src
OpenFOAM
global
debug
defineDebugSwitch.H
Generated by
1.8.13