AbstractWriter.cc 688 Bytes
/*
 * AbstractWriter.cpp
 *
 *  Created on: 5 août 2013
 *      Author: CS
 */

#include "AbstractWriter.hh"

namespace TimeTableCatalog {

log4cxx::LoggerPtr AbstractWriter::logger(
		log4cxx::Logger::getLogger("AMDA-Kernel.TimeTableWriter"));

AbstractWriter::AbstractWriter(const std::string& ppath,
		const std::string& pName) :
		_path(ppath), _name(pName) {
}

AbstractWriter::~AbstractWriter() {
}

/**
 * Gets the tt file complete path
 */
const std::string AbstractWriter::getFile(const TimeTable& pTT) const {
	std::string fileName = _name;
	if (_name.empty()) {
		fileName = pTT._name + getExtension();
	}
	return _path + "/" + fileName;
}

} /* namespace TimeTableCatalog */