示例#1
0
 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);
     }
 }
示例#2
0
 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]);
     }
 }
示例#3
0
            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);
            }
示例#4
0
        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]);
            }
        }
示例#5
0
            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;
            }
示例#6
0
 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]);
     }
 }
示例#7
0
 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]);
     }
 }
示例#8
0
 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);
     }
 }