正在显示
1 个修改的文件
包含
58 行增加
和
0 行删除
src/core/dmpapplication.h
0 → 100644
1 | +/************************************************************************** | ||
2 | +* file: dmpapplication.h | ||
3 | + | ||
4 | +* Author: wanzhongping | ||
5 | +* Date: 2021-02-20 15:55:28 | ||
6 | +* Email: zhongpingw@chinadci.com | ||
7 | +* copyright: 广州城市信息研究所有限公司 | ||
8 | +***************************************************************************/ | ||
9 | + | ||
10 | +#ifndef __dmpapplication_h__ | ||
11 | +#define __dmpapplication_h__ | ||
12 | + | ||
13 | +#include "dmap_core.h" | ||
14 | +#include <boost/filesystem.hpp> | ||
15 | +#include <boost/algorithm/string/trim.hpp> | ||
16 | +#include <boost/algorithm/string/trim_all.hpp> | ||
17 | +#include <string> | ||
18 | + | ||
19 | +class CORE_EXPORT DmpApplication | ||
20 | +{ | ||
21 | +public: | ||
22 | + ~DmpApplication(); | ||
23 | + | ||
24 | + static DmpApplication& Instance(); | ||
25 | + static void Init(); | ||
26 | + static bool CreateDatabase(); | ||
27 | + static std::string ResolvePkgPath(); | ||
28 | + static std::string ApplicationDirPath(); | ||
29 | + static bool SearchFile(const boost::filesystem::path &dir, const std::string file_name, boost::filesystem::path &path); | ||
30 | + static bool IsRunningFromBuildDir(); | ||
31 | + static std::string DMapSettingsDirPath(); | ||
32 | + | ||
33 | + static std::string prefix_path(); | ||
34 | + static void set_prefix_path(const std::string &prefix_path); | ||
35 | + static void set_plugin_path(const std::string &plugin_path); | ||
36 | + static void set_pkg_data_path( const std::string &pkg_data_path); | ||
37 | + | ||
38 | + static std::string libexec_path(); | ||
39 | + static std::string plugin_path(); | ||
40 | + static std::string pkg_data_path(); | ||
41 | + static std::string library_path(); | ||
42 | + static std::string build_output_path(); | ||
43 | + | ||
44 | +private: | ||
45 | + DmpApplication(); | ||
46 | + | ||
47 | + static std::string prefix_path_; | ||
48 | + static std::string libexec_path_; | ||
49 | + static std::string library_path_; | ||
50 | + static std::string plugin_path_; | ||
51 | + static std::string build_source_path_; | ||
52 | + static std::string build_output_path_; | ||
53 | + static std::string pkg_data_path_; | ||
54 | + static bool running_from_build_dir_; | ||
55 | + static bool initialized_; | ||
56 | +}; | ||
57 | + | ||
58 | +#endif //__dmpapplication_h__ |
请
注册
或
登录
后发表评论