summaryrefslogtreecommitdiff
path: root/s_mman.h
diff options
context:
space:
mode:
Diffstat (limited to 's_mman.h')
-rw-r--r--s_mman.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/s_mman.h b/s_mman.h
new file mode 100644
index 0000000..e6e3ff4
--- /dev/null
+++ b/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