-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathApplicationContainer.cpp
More file actions
27 lines (22 loc) · 906 Bytes
/
ApplicationContainer.cpp
File metadata and controls
27 lines (22 loc) · 906 Bytes
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
//
// Created by 张程易 on 12/06/2017.
//
#include "ApplicationContainer.h"
ApplicationContainer::ApplicationContainer() {
Configuration::initialize();
fileService = new FileService();
blockService = new BlockService(fileService);
recordService = new RecordService(blockService);
metaDataService = new MetaDataService(fileService, blockService);
interpreterService = new InterpreterService(recordService, metaDataService, blockService);
}
ApplicationContainer::~ApplicationContainer() {
if(blockService != nullptr)delete blockService;
if(fileService != nullptr)delete fileService;
if(metaDataService != nullptr)delete metaDataService;
if(recordService != nullptr)delete recordService;
if(interpreterService != nullptr)delete interpreterService;
}
InterpreterService *ApplicationContainer::getInterpreterService() const {
return interpreterService;
}