1 
2 // vim:sw=2:ai
3 
4 /*
5  * Copyright (C) 2010 DeNA Co.,Ltd.. All rights reserved.
6  * See COPYRIGHT.txt for details.
7  */
8 
9 #ifndef DENA_CONFIG_HPP
10 #define DENA_CONFIG_HPP
11 
12 #include <string>
13 #include <map>
14 
15 #define DENA_VERBOSE(lv, x) if (dena::verbose_level >= (lv)) { (x); }
16 
17 namespace dena {
18 
19 struct config : public std::map<std::string, std::string> {
20   std::string get_str(const std::string& key, const std::string& def = "")
21     const;
22   long long get_int(const std::string& key, long long def = 0) const;
23 };
24 
25 void parse_args(int argc, char **argv, config& conf);
26 
27 extern unsigned int verbose_level;
28 
29 };
30 
31 #endif
32 
33