TheChess
|
00001 /* 00002 * thechess, chess game web application written in C++ and based on Wt 00003 * Copyright (C) 2010 Boris Nagaev 00004 * 00005 * thechess is licensed under the GNU GPL Version 2. 00006 * Other versions of the GPL do not apply. 00007 * See the LICENSE file for terms of use. 00008 */ 00009 00010 #ifndef THECHESS_OPTIONS_HPP_ 00011 #define THECHESS_OPTIONS_HPP_ 00012 00013 #include <string> 00014 00015 #include <Wt/WServer> 00016 00017 namespace thechess { 00018 00019 class ThechessOptions { 00020 public: 00021 enum DatabaseType { 00022 Postgres, 00023 Sqlite3 00024 }; 00025 ThechessOptions(const Wt::WServer& server); 00026 00027 DatabaseType database_type() const; 00028 const std::string& database_value() const; 00029 int connections_in_pool() const; 00030 00031 private: 00032 const Wt::WServer& server_; 00033 00034 DatabaseType database_type_; 00035 std::string database_value_; 00036 int connections_in_pool_; 00037 00038 bool read_int_value(const std::string& name, int& value); 00039 }; 00040 00041 } 00042 00043 #endif 00044