Application.h
1.03 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
#ifndef APPLICATION_H
#define APPLICATION_H
#include "../Common/Singleton.h"
#include "ApplicationConfig.h"
#include "ApplicationLogger.h"
using namespace TREPS::Common;
namespace TREPS
{
namespace Application
{
class ApplicationClass : public SingletonClass<ApplicationClass>
{
friend class SingletonClass<ApplicationClass>;
public:
ApplicationClass(void);
~ApplicationClass(void);
//Init application
//(load configuration file and create logger)
bool init(const char *confFile);
//Run a request
bool run(int argc, char *argv[]);
//Get a pointer to the application logger
ApplicationLoggerClass *getLog(void);
//current application path
string getApplicationPath(void);
//get application conf loader
ApplicationConfigClass *getConf(void);
private:
//pointer to the conf loader instance
ApplicationConfigClass *conf;
//pointer to the logger instance
ApplicationLoggerClass *log;
};
}
}
#endif