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

ParseTable3D() static private method

static private ParseTable3D ( System.Xml.Linq.XElement el ) : Table3D
el System.Xml.Linq.XElement
return Tables.Denso.Table3D
        static Table3D ParseTable3D(XElement el)
        {
            Table3D table3D = new Table3D ();
            ParseCommon (el, table3D);

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

            subEl = el.Element (X_axisY);
            if (subEl != null) {
                ParseAxis (subEl, out address, out name, out unit);
                table3D.NameY = name;
                table3D.UnitY = unit;
                if (address.HasValue)
                    table3D.RangeY = new Util.Range (address.Value, 0);
            }

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

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

            return table3D;
        }