CntrlComparison parsing

This commit is contained in:
2015-12-04 10:15:51 -05:00
parent 4d46f206ac
commit 685e8c8658
39 changed files with 820 additions and 491 deletions
+42
View File
@@ -0,0 +1,42 @@
using System.Collections.Generic;
using System.IO;
namespace LeafWeb.Core.Charter
{
public class CurveDataList
{
// Each element will be a PiscalCurve element that contains
// all of the output data for one curve.
public List<CurveData> CurveData { get; }
public CurveDataList()
{
CurveData = new List<CurveData>();
}
public bool ReadFromStream(StreamReader sr)
{
// Skip the first two lines.
sr.ReadLine();
sr.ReadLine();
var lineNbr = 2;
// Now, there should be one or more rows, delimited by a row that has
// CO2i in the first field. Read in all of these rows. The first field
// in each row is the curve ID (input filename).
var more = true;
while (more)
{
var curve = new CurveData(sr, ref lineNbr);
CurveData.Add(curve);
if (sr.EndOfStream)
more = false;
}
return true;
}
}
}