CntrlComparison parsing
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user