SharpTuneCore.TableMetaData.CreateECUFlashXML C# (CSharp) Method

CreateECUFlashXML() protected method

protected CreateECUFlashXML ( ) : System.Xml.Linq.XElement
return System.Xml.Linq.XElement
        protected virtual XElement CreateECUFlashXML()
        {
            XElement xel = new XElement("table");
            xel.SetAttributeValue("name",this.name);
            if (isBase)
            {
                xel.SetAttributeValue("elements",this.elements);
                xel.SetAttributeValue("type",this.type);
                xel.SetAttributeValue("category",this.category);
                xel.SetAttributeValue("scaling",this.scaling.name);
                XElement description = new XElement("description");
                description.SetValue(this.description);
                xel.Add(description);
            }
            else
            {

                xel.SetAttributeValue("address", this.address.ToString("X"));

                if (_elements != null && baseTable != null && baseTable.elements != null && _elements != baseTable.elements) //TODO FIX KLUDGE!
                    xel.SetAttributeValue("elements",_elements);

                if(_xAxis != null)
                {
                    xel.Add(_xAxis.CreateECUFlashXML());
                }
                if(_yAxis != null)
                {
                    xel.Add(_yAxis.CreateECUFlashXML());
                }
            }
            return xel;
        }