-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
35 lines (29 loc) · 866 Bytes
/
main.cpp
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
#include <stdlib.h>
#include <unistd.h>
#include <sysexits.h>
#include "common/util/tesoptions.h"
#include "common/util/tesmappingstorage.h"
#include "common/tesprocessor.h"
using namespace std;
//-----------------------------------------------------------------------------
int main(int argc, char** argv)
{
// parse options
if (!TESOptions::getInstance()->parse(argc, argv)) {
delete TESOptions::getInstance();
exit(EX_USAGE);
}
// initialize mappings
if (!TESMappingStorage::getInstance()->initialize()) {
delete TESMappingStorage::getInstance();
delete TESOptions::getInstance();
exit(EX_USAGE);
}
// initialize worker and process
TesProcessor::getInstance()->process(argc, argv, optind);
// clean up
delete TesProcessor::getInstance();
delete TESMappingStorage::getInstance();
delete TESOptions::getInstance();
return EX_OK;
}