public void read(FStore.Input input) { if (input.fpod.m_fcodeVersion == null) throw new IOException("FStore.Input.version == null"); m_fields = new FField[input.u2()]; for (int i=0; i<m_fields.Length; i++) m_fields[i] = new FField().read(input); m_methods = new FMethod[input.u2()]; for (int i=0; i<m_methods.Length; i++) m_methods[i] = new FMethod().read(input); m_attrs = FAttrs.read(input); m_hollow = false; input.Close(); }
public void read(FStore.Input input) { if (input.fpod.m_fcodeVersion == null) { throw new IOException("FStore.Input.version == null"); } m_fields = new FField[input.u2()]; for (int i = 0; i < m_fields.Length; i++) { m_fields[i] = new FField().read(input); } m_methods = new FMethod[input.u2()]; for (int i = 0; i < m_methods.Length; i++) { m_methods[i] = new FMethod().read(input); } m_attrs = FAttrs.read(input); m_hollow = false; input.Close(); }
public void field(FField f) { WriteLine(" " + typeRef(f.m_type) + " " + f.m_name + " [" + StrUtil.flagsToString(f.m_flags).Trim() + "]"); attrs(f.m_attrs); WriteLine(); }
/// <summary> /// Map fcode field to a sys::Field. /// </summary> private Field map(FPod fpod, FField f) { string name = String.Intern(f.m_name); Type fieldType = m_pod.findType(f.m_type); Facets facets = Facets.mapFacets(m_pod, f.m_attrs.m_facets); return new Field(this, name, f.m_flags, facets, f.m_attrs.m_lineNum, fieldType); }
/// <summary> /// Emit a field. /// </summary> protected virtual void emit(FField f) { if ((f.m_flags & FConst.Storage) != 0) emitter.emitField("m_" + f.m_name, nname(f.m_type), fieldFlags(f.m_flags)); }
/// <summary> /// Only emit static fields (stored on body, not interface) /// </summary> protected override void emit(FField f) { if ((f.m_flags & FConst.Static) != 0) base.emit(f); }