OSDN Git Service

* {init_/done_}core() に引数を追加
[gikomona/libcore.git] / include / GikoMona.hpp
1 #ifndef GIKOMONA_CORE_GIKOMONA_HPP
2 #define GIKOMONA_CORE_GIKOMONA_HPP
3
4 #include <type_traits>
5
6 #include <boost/config.hpp>
7 #include <boost/filesystem/path.hpp>
8
9 /// @breif libbbs で string に関わる typedef を抑制する。@link libbbs/settings.hpp @endlink を見よ。
10 #define LIBBBS_USED_BY_GIKOMONA
11 #define LIBSQLITEXX_USED_BY_GIKOMONA
12
13 #include "string.hpp"
14
15 #include <sqlitexx.hpp>
16
17 #if __cplusplus < 201103L
18     #error "[GikoMona.libcore @pp-time] : sorry, this compiler does NOT support C++11."
19 #endif
20
21 namespace monazilla { namespace GikoMona {
22
23 namespace core {
24
25 namespace sqlite = caprice::sqlitexx;
26
27 bool init_core(const mona_string& app_name);
28 void done_core(const mona_string& app_name) noexcept ;
29 void optimize_database(const boost::filesystem::path& db_path);
30
31 // for std::enable_if<T>
32 extern void *enabler;
33     
34 template <typename T, typename U>
35 using enable_if_T_is_same_as_U
36     = typename std::enable_if<std::is_same<T, U>::value>::type*& ;
37
38 // for communication.hpp
39 typedef int communicate_id;
40 std::string to_string(const communicate_id val);
41     
42
43 }
44
45 } }
46
47
48 #define PROJECT_NAME "GikoMona project, powered by monazilla.org."
49 #define PROJECT_URL "http://sourceforge.jp/projects/gikomona/"
50
51 #endif