27 #include <boost/tokenizer.hpp>
36 typedef std::map<const char*,uint64_t>
DebugMap;
70 cerr << prefix <<
": " << str;
83 typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
84 boost::char_separator<char> sep (
",");
85 tokenizer tokens (in_str, sep);
88 for (tokenizer::iterator tok_iter = tokens.begin(); tok_iter != tokens.end(); ++tok_iter) {
89 if (*tok_iter ==
"list") {
94 if (*tok_iter ==
"all") {
100 const char* cstr = (*tok_iter).c_str();
102 if (strncasecmp (cstr, i->first, strlen (cstr)) == 0) {
115 cout <<
_(
"The following debug options are available. Separate multiple options with commas.\nNames are case-insensitive and can be abbreviated.") << endl << endl;
116 cout <<
'\t' <<
X_(
"all") << endl;
118 vector<string> options;
121 options.push_back (i->first);
124 sort (options.begin(), options.end());
126 for (vector<string>::iterator i = options.begin(); i != options.end(); ++i) {
127 cout <<
"\t" << (*i) << endl;
std::map< const char *, uint64_t > DebugMap
LIBPBD_API void debug_print(const char *prefix, std::string str)
LIBPBD_API void set_debug_bits(uint64_t bits)
LIBPBD_API uint64_t FileManager
LIBPBD_API uint64_t Configuration
LIBPBD_API uint64_t Properties
LIBPBD_API uint64_t AbstractUI
LIBPBD_API uint64_t debug_bits
static uint64_t _debug_bit
LIBPBD_API void list_debug_options()
DebugMap & _debug_bit_map()
LIBPBD_API uint64_t Stateful
LIBPBD_API uint64_t EventLoop
LIBPBD_API uint64_t new_debug_bit(const char *name)
LIBPBD_API int parse_debug_options(const char *str)