public MetadataTables GetIndexType(CodedIndices index, int v) { int sz = this.GetTagSize(index); int vv = (v >> sz) << sz; return(CodedIndex.Data[(int)index][v - vv]); }
public int GetToken(CodedIndices index, int v) { int sz = this.GetTagSize(index); int vv = v >> sz; return((((int)CodedIndex.Data[(int)index][v - (vv << sz)]) << 24) | vv); }
protected string GetInfo(int v, CodedIndices index, string desc) { int ad = this.ptr; StringBuilder sb = new StringBuilder(); if (this.IndexManager.IsInt32(index)) { sb.AppendFormat("{0:X8}", v); ptr += 4; } else { sb.AppendFormat("{0:X4}", v); ptr += 2; } if (v != 0) { MetadataTables tp = this.IndexManager.GetIndexType(index, v); int idx = this.IndexManager.GetIndex(index, v); ArrayList list = this.IndexManager.Tables[(int)tp]; if (0 < idx && idx <= list.Count) { sb.AppendFormat(" ({0})", (list[idx - 1] as TableBase).GetTitle()); } else { sb.AppendFormat(" ({0} {1:X} null)", tp, idx); } } while (sb.Length < 16) { sb.Append(' '); } return(string.Format("{0:X8}:{1} {2}\r\n", ad, sb, desc)); }
public int GetTagSize(CodedIndices index) { int ret = 0; for (int i = CodedIndex.Data[(int)index].Length - 1; i > 0; i >>= 1) { ret++; } return(ret); }
public bool IsInt32(CodedIndices index) { int max = 0; foreach (MetadataTables tbl in CodedIndex.Data[(int)index]) { int sz_tbl = this.TableRows[(int)tbl]; if (max < sz_tbl) { max = sz_tbl; } } return((max << this.GetTagSize(index)) > max16); }
public int GetIndex(CodedIndices index, int v) { return(v >> this.GetTagSize(index)); }
public bool IsInt32(CodedIndices index) { int max = 0; foreach (MetadataTables tbl in CodedIndex.Data[(int) index]) { int sz_tbl = this.TableRows[(int) tbl]; if (max < sz_tbl) max = sz_tbl; } return (max << this.GetTagSize(index)) > max16; }
public int GetToken(CodedIndices index, int v) { int sz = this.GetTagSize(index); int vv = v >> sz; return (((int) CodedIndex.Data[(int) index][v -(vv << sz)]) << 24) | vv; }
public int GetTagSize(CodedIndices index) { int ret = 0; for (int i = CodedIndex.Data[(int) index].Length - 1; i > 0; i >>= 1) ret++; return ret; }
public MetadataTables GetIndexType(CodedIndices index, int v) { int sz = this.GetTagSize(index); int vv =(v >> sz) << sz; return CodedIndex.Data[(int) index][v - vv]; }
public int GetIndex(CodedIndices index, int v) { return v >> this.GetTagSize(index); }
protected int ReadIndex(CodedIndices index) { return(this.IndexManager.IsInt32(index) ? this.ReadInt32(): this.ReadInt16()); }