From 9cd3ccffd5372dfde3af478e3f832f18db4be3f1 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 6 Apr 2013 13:14:41 +0200 Subject: tagging tags --- ychat-0.6/s_mman.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 ychat-0.6/s_mman.h (limited to 'ychat-0.6/s_mman.h') diff --git a/ychat-0.6/s_mman.h b/ychat-0.6/s_mman.h new file mode 100644 index 0000000..e6e3ff4 --- /dev/null +++ b/ychat-0.6/s_mman.h @@ -0,0 +1,38 @@ +#ifndef GMMAN_H +#define GMMAN_H + +#include "mman.h" +#include "s_conf.h" +#include "s_tool.h" + +using namespace std; + +class s_mman +{ +private: + static mman* obj; + +public: + static void init() + { + obj = new mman( s_tool::string2int(s_conf::get + ().get_val( "MIN_CONNECTIONS" )), s_tool::string2int(s_conf::get + ().get_val( "MAX_CONNECTIONS" ))); + obj->init( s_conf::get + ().get_val( "MYSQL_HOST" ), s_conf::get + ().get_val( "MYSQL_USER" ), s_conf::get + ().get_val( "MYSQL_PASS" ), + s_conf::get + ().get_val( "MYSQL_DB" ), s_tool::string2int(s_conf::get + ().get_val( "MYSQL_PORT" )) ); + } + + static mman& get + () + { + return *obj; + } +}; + + +#endif -- cgit v1.2.3