コード例 #1
0
ファイル: CurveInput.cpp プロジェクト: mjvogelsong/Heater
// Gets the time and temp information from the user, and
//  	loads it into the arrays
void CurveInput::loadUserCurve()
{
	printAssumption(); // assume time[0] = 25
	loadDefault(); // this will set the starting values for when the
	               // user inputs the times and temps
	getCurvePoints();
}
コード例 #2
0
ファイル: ParseIndiffCurves.cpp プロジェクト: josmartin/TAsK
void ParseIndiffCurves::parse(const std::string& fileName, IndiffCurveContainer& container) {
	FileReader reader(fileName);

	while (reader.isGood()) {
		std::string line(reader.getNextLine());
		if (!Utils::skipOneLineComment("//", line).empty()) {
			int odIndex = getODIndex(line);
			PointsContainer points;
			int nbPoints = getCurvePoints(line, points);
			container.addCurve(odIndex, createCurve(nbPoints, points, getCurveType(line)));
		}
	}
};