2 #ifndef DYNAMIC_DEBUG_H
3 #define DYNAMIC_DEBUG_H
13 map
<string
,long> debug_functions
;
15 DynamicDebug(const char* DebugConfigFile
);
16 DynamicDebug(ifstream
& DebugConfigStream
);
17 #ifdef DEBUG_RETURNS_FALSE
18 inline long debug(const string
& s
) const { return 0; }
20 long debug(const string
& s
) const {
21 if (debug_functions
.find(s
) == debug_functions
.end())
24 return (*(debug_functions
.find(s
))).second
;
27 inline void add(const string
& s
, const long level
) { debug_functions
[s
] = level
; }
28 inline void remove(const string
& s
) { debug_functions
.erase(s
); }
29 map
<string
,long>::const_iterator
begin() const { return debug_functions
.begin(); }
30 map
<string
,long>::const_iterator
end() const { return debug_functions
.end(); }
33 extern DynamicDebug DebugBlackboard
;