TTConversionLauncher.cc 1.05 KB
/*
 * 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;
	return lMain.main(argc, argv, ttConversion, true); //Skip plugin load
}