dmpapplication.h
1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/**************************************************************************
* file: dmpapplication.h
* Author: wanzhongping
* Date: 2021-02-20 15:55:28
* Email: zhongpingw@chinadci.com
* copyright: 广州城市信息研究所有限公司
***************************************************************************/
#ifndef __dmpapplication_h__
#define __dmpapplication_h__
#include "dmap_core.h"
#include <boost/filesystem.hpp>
#include <boost/algorithm/string/trim.hpp>
#include <boost/algorithm/string/trim_all.hpp>
#include <string>
class CORE_EXPORT DmpApplication
{
public:
~DmpApplication();
static DmpApplication* Instance();
void initialize();
//static bool CreateDatabase();
std::string resolvePkgPath();
std::string applicationDirPath();
std::string dmapSettingsDirPath();
bool isRunningFromBuildDir();
std::string prefixPath();
void setPrefixPath(const std::string &prefixPath);
void setPluginPath(const std::string &pluginPath);
void setPkgDataPath( const std::string &pkgDataPath);
std::string libexecPath();
std::string pluginPath();
std::string pkgDataPath();
std::string libraryPath();
std::string buildOutputPath();
private:
DmpApplication();
bool searchFile(const boost::filesystem::path &dir, const std::string fileName, boost::filesystem::path &path);
std::string prefixPath_;
std::string libexecPath_;
std::string libraryPath_;
std::string pluginPath_;
std::string buildSourcePath_;
std::string buildOutputPath_;
std::string pkgDataPath_;
std::string iniFilePath_;
bool runningFromBuildDir_;
bool initialized_;
};
#endif //__dmpapplication_h__