public static FixedBuffer loadEntry(FStruct _struct, string name, List <string> fparams) { int width = Int32.Parse(fparams[1].Trim()); FixedBuffer f = new FixedBuffer(_struct, name, width); return(f); }
public static FField loadField(FStruct fs, String fname, List <String> parms) { FField f = null; //check for loaded struct FEntry ftype = fs.format.structs.getEntry(parms[0].ToLower()); if (ftype != null) { f = new StructField(fs, fname, (FStruct)ftype); } //else is a predefined struct else { switch (parms[0]) { case "int": f = IntField.loadEntry(fs, fname, parms); break; case "fixedstr": f = FixedString.loadEntry(fs, fname, parms); break; case "fixedbuf": f = FixedBuffer.loadEntry(fs, fname, parms); break; case "varbuf": f = VariableBuffer.loadEntry(fs, fname, parms); break; case "vartable": f = VariableTable.loadEntry(fs, fname, parms); break; case "sizebuftable": f = SizeBufferTable.loadEntry(fs, fname, parms); break; default: break; } } return(f); }