Esempio n. 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 number of indices.
            int numIndices = reader.ReadByte();

            if (numIndices > 0)
            {
                indices = new IChelaType[numIndices];
            }

            // Read the indices.
            for (int i = 0; i < numIndices; ++i)
            {
                indices[i] = module.GetType(reader.ReadUInt());
            }

            // Read the get accessor.
            getAccessor = (Function)module.GetMember(reader.ReadUInt());

            // Read the set accessor.
            setAccessor = (Function)module.GetMember(reader.ReadUInt());
        }
Esempio n. 2
0
        internal override void Read(ModuleReader reader, MemberHeader header)
        {
            // Get the module.
            ChelaModule module = GetModule();

            // Read the type.
            actualType = module.GetType(reader.ReadUInt());
        }
Esempio n. 3
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());
        }
Esempio n. 4
0
        public static GenericInstance Read(GenericPrototype prototype, ModuleReader reader, ChelaModule module)
        {
            // Read the type count.
            int count = reader.ReadByte();

            // Read the types.
            IChelaType[] types = new IChelaType[count];
            for (int i = 0; i < count; ++i)
            {
                types[i] = module.GetType(reader.ReadUInt());
            }

            // Create the readed instance.
            return(new GenericInstance(prototype, types));
        }
Esempio n. 5
0
        public static GenericPrototype Read(ModuleReader reader, ChelaModule module)
        {
            byte count;
            uint placeHolder;

            // Read the place holder count;
            reader.Read(out count);

            // Read the place holders.
            PlaceHolderType[] placeHolders = new PlaceHolderType[count];
            for (int i = 0; i < count; ++i)
            {
                reader.Read(out placeHolder);
                placeHolders[i] = (PlaceHolderType)module.GetType(placeHolder);
            }

            // Return the prototype.
            return(new GenericPrototype(placeHolders));
        }