예제 #1
0
        internal override void Read(ModuleReader reader, MemberHeader header)
        {
            // Get the module.
            ChelaModule module = GetModule();

            // Read the type.
            type = module.GetType(reader.ReadUInt());

            // Read the add modifier.
            addModifier = (Function)module.GetMember(reader.ReadUInt());

            // Read the remove modifier.
            removeModifier = (Function)module.GetMember(reader.ReadUInt());
        }
예제 #2
0
        internal override void Read(ModuleReader reader, MemberHeader header)
        {
            // Read the type and slot.
            uint typeId = reader.ReadUInt();

            slot = reader.ReadInt();

            // Load the field type.
            this.type = GetModule().GetType(typeId);

            uint initializerSize = header.memberSize - 8;

            if (!type.IsConstant() || IsExternal())
            {
                // Skip the initializer.
                reader.Skip(initializerSize);
            }
            else
            {
                // Load the initializer.
                initializer = ConstantValue.ReadQualified(GetModule(), reader);
            }
        }
예제 #3
0
        internal override void Read(ModuleReader reader, MemberHeader header)
        {
            // Read the type and slot.
            uint typeId = reader.ReadUInt();
            slot = reader.ReadInt();

            // Load the field type.
            this.type = GetModule().GetType(typeId);

            uint initializerSize = header.memberSize - 8;
            if(!type.IsConstant() || IsExternal())
            {
                // Skip the initializer.
                reader.Skip(initializerSize);
            }
            else
            {
                // Load the initializer.
                initializer = ConstantValue.ReadQualified(GetModule(), reader);
            }
        }
예제 #4
0
        internal override void Read(ModuleReader reader, MemberHeader header)
        {
            // Get the module.
            ChelaModule module = GetModule();

            // Read the type.
            type = module.GetType(reader.ReadUInt());

            // Read the add modifier.
            addModifier = (Function)module.GetMember(reader.ReadUInt());

            // Read the remove modifier.
            removeModifier = (Function)module.GetMember(reader.ReadUInt());
        }