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()); }
internal override void Read(ModuleReader reader, MemberHeader header) { // Get the module. ChelaModule module = GetModule(); // Read the type. actualType = module.GetType(reader.ReadUInt()); }
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()); }
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)); }
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)); }