ParameterDescription.cc 502 Bytes
/*
 * ParameterDescription.cc
 *
 *  Created on: Nov 10, 2014
 *      Author: m.mazel
 */
#include "ParameterDescription.hh"
#include "TimeTableCatalogUtil.hh"

namespace TimeTableCatalog {

int ParameterDescription::getSizeAsInt() {
	if (_size.find("x") == std::string::npos) {
		return atoi(_size.c_str());
	}
	else {
		std::vector<std::string> operandes;
		split (_size, 'x', operandes);
		return (atoi (operandes[0].c_str()) * atoi (operandes[1].c_str()));
	}
}

} /* namespace TimeTableCatalog */