void DumpTypeString(TypeDefinitionString tds, int level, System.Text.StringBuilder sb) { sb.AppendFormat("{0," + (level * 3 + tds.type.Length) + "} {1} flags=({2}, {3}, {4}, {5}, x{6:X})\r\n", tds.type, tds.identifier, tds.flags[0], tds.flags[1], tds.flags[2], tds.flags[3], tds.flags[4]); for (int i = 0; i < tds.children.Length; i++) { DumpTypeString(tds.children[i], level + 1, sb); } }
private void WriteType(BinaryWriter writer, TypeDefinitionString tds) { writer.WriteName0(tds.type); writer.WriteName0(tds.identifier); for (int i = 0; i < tds.flags.Length; i++) { writer.Write(tds.flags[i]); } writer.Write(tds.children.Length); for (int i = 0; i < tds.children.Length; i++) { WriteType(writer, tds.children[i]); } }
public TypeDefinitionString Clone() { TypeDefinitionString clone = new TypeDefinitionString(); clone.type = type; clone.identifier = identifier; clone.flags = (int[])flags.Clone(); clone.children = new TypeDefinitionString[children.Length]; for (int i = 0; i < children.Length; i++) { clone.children[i] = children[i].Clone(); } return(clone); }
private void ReadType(BinaryReader reader, TypeDefinitionString tds) { tds.type = reader.ReadName0(); tds.identifier = reader.ReadName0(); tds.flags = new int[5]; for (int i = 0; i < 5; i++) { tds.flags[i] = reader.ReadInt32(); } int numChildren = reader.ReadInt32(); tds.children = new TypeDefinitionString[numChildren]; for (int i = 0; i < numChildren; i++) { tds.children[i] = new TypeDefinitionString(); ReadType(reader, tds.children[i]); } }
public TypeDefinitionString Clone() { TypeDefinitionString clone = new TypeDefinitionString(); clone.type = type; clone.identifier = identifier; clone.flags = (int[])flags.Clone(); clone.children = new TypeDefinitionString[children.Length]; for (int i = 0; i < children.Length; i++) { clone.children[i] = children[i].Clone(); } return clone; }
private void WriteType(BinaryWriter writer, TypeDefinitionString tds) { writer.WriteName0(tds.type); writer.WriteName0(tds.identifier); for (int i = 0; i < tds.flags.Length; i++) { writer.Write(tds.flags[i]); } writer.Write(tds.children.Length); for (int i = 0; i < tds.children.Length; i++) { WriteType(writer, tds.children[i]); } }
private void ReadType(BinaryReader reader, TypeDefinitionString tds) { tds.type = reader.ReadName0(); tds.identifier = reader.ReadName0(); tds.flags = new int[5]; for (int i = 0; i < 5; i++) { tds.flags[i] = reader.ReadInt32(); } int numChildren = reader.ReadInt32(); tds.children = new TypeDefinitionString[numChildren]; for (int i = 0; i < numChildren; i++) { tds.children[i] = new TypeDefinitionString(); ReadType(reader, tds.children[i]); } }
void DumpTypeString(TypeDefinitionString tds, int level, System.Text.StringBuilder sb) { sb.AppendFormat("{0," + (level * 3 + tds.type.Length) + "} {1} flags=({2}, {3}, {4}, {5}, x{6:X})\r\n", tds.type, tds.identifier, tds.flags[0], tds.flags[1], tds.flags[2], tds.flags[3], tds.flags[4]); for (int i = 0; i < tds.children.Length; i++) { DumpTypeString(tds.children[i], level + 1, sb); } }