示例#1
0
 public void Serialize(CppBinaryWriter writer)
 {
     writer.Write(Name);
     writer.Write((byte)Modifiers);
     writer.Write(ParametersCount);
     ByteBlock.Serialize(writer);
 }
示例#2
0
        public void Serialize(CppBinaryWriter writer)
        {
            writer.Write(Symbols.Count);

            foreach (var pair in Symbols)
            {
                writer.Write(pair.Key);
                pair.Value.Serialize(writer);
            }
        }
示例#3
0
        public void Serialize(CppBinaryWriter writer)
        {
            writer.Write(m_table.Count);

            foreach (var symbol in m_table)
            {
                writer.Write(symbol.Key);
                symbol.Value.Serialize(writer);
            }
        }
示例#4
0
        public void Serialize(CppBinaryWriter writer)
        {
            //SymbolTable.Serialize(writer);

            int size = Instructions.Sum(x => x.GetSize() + 1);

            writer.Write(size);

            foreach (var code in Instructions)
            {
                writer.Write(code.OpId);
                code.Serialize(writer);
            }

            writer.Write(LocalsCount);
        }
示例#5
0
        public void Serialize(CppBinaryWriter writer)
        {
            writer.Write(HEADER);

            MainPointEntry.Serialize(writer);

            writer.Write(ByteClasses.Count);

            foreach (var pair in ByteClasses)
            {
                pair.Serialize(writer);
            }

            writer.Write(ConstantsTable.Count);

            foreach (var value in ConstantsTable)
            {
                if (value is string)
                {
                    writer.Write(1);
                    writer.Write(value.ToString());
                }
                else if (value is bool)
                {
                    writer.Write(2);
                    writer.Write((bool)value);
                }
                else
                {
                    throw new Exception("Unhandled constant serialization.");
                }
            }
        }
示例#6
0
        public void Serialize(CppBinaryWriter writer)
        {
            writer.Write(Name);

            writer.Write((byte)Type);

            writer.Write(Methods.Count);

            foreach (var method in Methods)
            {
                method.Serialize(writer);
            }

            writer.Write(Fields.Count);

            foreach (var field in Fields)
            {
                field.Serialize(writer);
            }
        }
示例#7
0
 public void Serialize(CppBinaryWriter writer)
 {
     writer.Write(constantId);
 }
示例#8
0
 public void Serialize(CppBinaryWriter writer)
 {
     writer.Write(parametersCount);
     writer.Write(methodId);
 }
示例#9
0
 public void Serialize(CppBinaryWriter writer)
 {
     writer.Write(nativeId);
 }
示例#10
0
 public void Serialize(CppBinaryWriter writer)
 {
     writer.Write(classId);
     writer.Write(fieldId);
 }
示例#11
0
 public void Serialize(CppBinaryWriter writer)
 {
     writer.Write(ClassIndex);
     writer.Write(MethodIndex);
 }
示例#12
0
 public void Serialize(CppBinaryWriter writer)
 {
     writer.Write(Name);
     writer.Write((byte)Modifiers);
     Meta.Serialize(writer);
 }
示例#13
0
 public void Serialize(CppBinaryWriter writer)
 {
     writer.Write(targetIndex);
 }
示例#14
0
 public void Serialize(CppBinaryWriter writer)
 {
     writer.Write(Id);
     writer.Write(Type);
 }
示例#15
0
 public void Serialize(CppBinaryWriter writer)
 {
     writer.Write(propertyId);
 }
示例#16
0
 public void Serialize(CppBinaryWriter writer)
 {
     writer.Write(variableId);
 }
示例#17
0
 public void Serialize(CppBinaryWriter writer)
 {
     writer.Write((int)type);
 }
示例#18
0
 public void Serialize(CppBinaryWriter writer)
 {
     writer.Write(value);
 }
 public void Serialize(CppBinaryWriter writer)
 {
     writer.Write(methodId);
 }