public static TableMetaData CreateRamTableWithDimension(XElement xel, string storageType, ECUMetaData def, TableMetaData basetable, string id) { TableMetaData tempTable = null; string type = null; if (xel.Attribute("type") != null) { type = xel.Attribute("type").Value.ToString(); } else if (basetable != null && basetable.type != null) { type = basetable.type; } if (type != null) { switch (type) { case "1D": tempTable = new RamTable1DMetaData(xel, def, basetable); break; case "2D": tempTable = new RamTable2DMetaData(xel, def, basetable); break; case "3D": tempTable = new RamTable3DMetaData(xel, def, basetable); break; default: tempTable = new RamTable(xel, def, basetable); break; } } if (tempTable == null) { tempTable = new RamTable(xel, def, basetable); } tempTable.storageTypeString = storageType; tempTable.id = id; return(tempTable); }
public static TableMetaData CreateRamTableWithDimension(XElement xel, string storageType, ECUMetaData def, TableMetaData basetable) { TableMetaData tempTable = null; string type = null; if (xel.Attribute("type") != null) type = xel.Attribute("type").Value.ToString(); else if (basetable != null && basetable.type != null) type = basetable.type; if (type != null) { switch (type) { case "1D": tempTable = new RamTable1DMetaData(xel, def, basetable); break; case "2D": tempTable = new RamTable2DMetaData(xel, def, basetable); break; case "3D": tempTable = new RamTable3DMetaData(xel, def, basetable); break; default: tempTable = new RamTable(xel, def, basetable); break; } } if (tempTable == null) tempTable = new RamTable(xel, def, basetable); tempTable.storageTypeString = storageType; return tempTable; }