OSDN Git Service

logging.hppのincludeを追加
[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 #include "logging.hpp"
15
16 #include <sqlitexx.hpp>
17
18 #if __cplusplus < 201103L
19     #error "error - [GikoMona.LibCore @pp-time] : sorry, this compiler does NOT support C++11."
20 #endif
21
22 namespace monazilla { namespace GikoMona {
23
24 namespace core {
25
26 namespace sqlite = caprice::sqlitexx;
27
28 bool init_core(const mona_string& app_name);
29 void done_core(const mona_string& app_name) noexcept ;
30 void optimize_database(const boost::filesystem::path& db_path);
31
32 // for std::enable_if<T>
33 extern void *enabler;
34     
35 template <typename T, typename U>
36 using enable_if_T_is_same_as_U
37     = typename std::enable_if<std::is_same<T, U>::value>::type*& ;
38
39 // for communication.hpp
40 typedef int communicate_id;
41 std::string to_string(const communicate_id val);
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