gtsam
3.2.1
gtsam
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
debug.h
Go to the documentation of this file.
1
/* ----------------------------------------------------------------------------
2
3
* GTSAM Copyright 2010, Georgia Tech Research Corporation,
4
* Atlanta, Georgia 30332-0415
5
* All Rights Reserved
6
* Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7
8
* See LICENSE for the license information
9
10
* -------------------------------------------------------------------------- */
11
19
#include <
gtsam/base/FastMap.h
>
20
#include <
gtsam/global_includes.h
>
21
#include <string>
22
23
24
// This file defines granular debugging flags that may be switched on and off
25
// at run time. Typical usage is 'if(ISDEBUG("myFunction"))' to check if the
26
// 'myFunction' flag is enabled, and SETDEBUG("myFunction", true) to enable
27
// this flag, or SETDEBUG("myFunction", false) to disable it.
28
//
29
// Debug flags are created automatically as they are accessed, so they can be
30
// used immediately without explicitly creating them. Each flag defaults to
31
// 'false', i.e. disabled.
32
//
33
// For these macro to have any effect, granular debugging must be enabled by
34
// defining GTSAM_ENABLE_DEBUG. If NDEBUG is not defined, then
35
// GTSAM_ENABLE_DEBUG will be automatically defined and thus granular
36
// debugging enabled.
37
38
#ifndef NDEBUG
39
#ifndef GTSAM_ENABLE_DEBUG
40
#define GTSAM_ENABLE_DEBUG
41
#endif
42
#endif
43
44
namespace
gtsam {
45
GTSAM_EXTERN_EXPORT FastMap<std::string, ValueWithDefault<bool,false> > debugFlags;
46
}
47
48
#undef ISDEBUG
49
#undef SETDEBUG
50
51
#ifdef GTSAM_ENABLE_DEBUG
52
53
#define ISDEBUG(S) (gtsam::debugFlags[S])
54
#define SETDEBUG(S,V) ((void)(gtsam::debugFlags[S] = (V)))
55
56
#else
57
58
#define ISDEBUG(S) (false)
59
#define SETDEBUG(S,V) ((void)false)
60
61
#endif
62
global_includes.h
Included from all GTSAM files.
FastMap.h
A thin wrapper around std::map that uses boost's fast_pool_allocator.
gtsam
base
debug.h
Generated on Tue Jan 20 2015 22:51:52 for gtsam by
1.8.6