Blame view

src/TTConversion/TTConversionLauncher.cc 1.05 KB
81286aae   Elena.Budnik   TT conversion
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
/*
 * OperationsLauncher.cc
 *
 *  Created on: Feb 2017 
 *     
 */

#include <iostream>
#include <cstring>
#include "TimeTableCatalogFactory.hh"
#include "Application.hh"
#include <log4cxx/logger.h>

/**
 * Logger
 */
log4cxx::LoggerPtr _logger(
		log4cxx::Logger::getLogger("AMDA-Kernel.TTConversion"));

/**
 * Shows help on std::cout.
 */
void help() {
	std::cout << "Use : ttConversion InputFileName InputFileFormat OutputDir OutputFileName OutputFileFormat" << std::endl;
}	


/**
 * Main for ttConversion binary.
 */
int ttConversion(int argc, char *argv[], AMDA::helpers::Properties& /*properties*/) {

	// executable options
	if (argc < 6 || (argc > 1 && strcmp(argv[1], "--help") == 0)) {
		help();
		return -1;
	}
	
	TimeTableCatalog::TimeTable ttMgr;
		
	ttMgr.convert(std::string(argv[1]), std::string(argv[2]), std::string(argv[3]), std::string(argv[4]), std::string(argv[5]));

	return 0;
}

/**
 * Main function
 */
int main(int argc, char *argv[]) {

	AMDA::Common::Application lMain;
76a58853   Benjamin Renard   Skip pluggins loa...
52
	return lMain.main(argc, argv, ttConversion, true); //Skip plugin load
81286aae   Elena.Budnik   TT conversion
53
}