ScoobyRom.DataFile.RomXml.ParseTable2D C# (CSharp) Method

ParseTable2D() static private method

static private ParseTable2D ( System.Xml.Linq.XElement el ) : Table2D
el System.Xml.Linq.XElement
return Tables.Denso.Table2D
        static Table2D ParseTable2D(XElement el)
        {
            Table2D table2D = new Table2D ();
            ParseCommon (el, table2D);

            int? address;
            string name, unit;
            XElement subEl;
            subEl = el.Element (X_axisX);
            if (subEl != null) {
                ParseAxis (subEl, out address, out name, out unit);
                table2D.NameX = name;
                table2D.UnitX = unit;
                if (address.HasValue)
                    table2D.RangeX = new Util.Range (address.Value, 0);
            }

            subEl = el.Element (X_values);
            if (subEl != null) {
                TableType? tableType;
                ParseValues (subEl, out address, out unit, out tableType);
                table2D.UnitY = unit;
                if (address.HasValue)
                    table2D.RangeY = new Util.Range (address.Value, 0);
                if (tableType.HasValue)
                    table2D.TableType = tableType.Value;
            }

            table2D.Description = (string)el.Element (X_description);

            return table2D;
        }