public override void RecursivelyResolve(Dictionary <string, DataDefinition> local, Dictionary <string, DataDefinition> global, Dictionary <string, Dictionary <string, DataDefinition> > referenceableDefinitions) { if (Key != null) { var key = Key.ToLower(); Dictionary <string, DataDefinition> defs = null; if (local.ContainsKey(key)) { defs = local; } else if (global.ContainsKey(key)) { defs = global; } if (defs != null) { var def = defs[key] as EnumDefinition; FlagValues = def.EnumValues; if (!FlagValues.Contains(Default)) { Default = FlagValues[0]; } } else { Message.Show("Failed to find key " + Key + "!", "Reference Resolve Failed", "Ok"); } } }
protected override void DoRecursivelyResolve(Dictionary <string, DataDefinition> local, Dictionary <string, DataDefinition> global, Dictionary <string, Dictionary <string, DataDefinition> > referenceableDefinitions) { if (Key != null) { var key = Key.ToLower(); Dictionary <string, DataDefinition> defs = null; if (local.ContainsKey(key)) { defs = local; } else if (global.ContainsKey(key)) { defs = global; } if (defs != null) { var def = defs[key] as EnumDefinition; FlagValues = def.EnumValues; if (!FlagValues.Contains(Default)) { Default = FlagValues[0]; } } else { throw new Exception("Failed to find key " + Key + "!"); } } }
public bool Bool(string key) { if (FlagValues.ContainsKey(key)) { return((bool)FlagValues[key]); } return(GlobalBool(key)); }
public int Int(string key) { if (FlagValues.ContainsKey(key)) { return((int)FlagValues[key]); } return(GlobalInt(key)); }
public string String(string key) { if (FlagValues.ContainsKey(key)) { return((string)FlagValues[key]); } return(GlobalString(key)); }
internal UnFunction(UnExport export, string name, FlagValues flags, byte[] bytecode, int nativeIndex, int operatorPrecedence) : base(export, bytecode) { _name = name; _flags = flags; _nativeIndex = nativeIndex; _operatorPrecedence = operatorPrecedence; }
public Function(byte[] raw, ExportEntry export, int clippingSize = 32) { this.export = export; memory = raw; memsize = raw.Length; flagint = GetFlagInt(); flags = new FlagValues(flagint, _flags); nativeindex = GetNatIdx(); Deserialize(clippingSize); }
public void SaveToMemory(IMemory memory, int firstAddress, int addressValue) { int i; for (i = 0; i < mRegisters.Length; i++) { memory[firstAddress + i].Magnitude = mRegisters[i].Magnitude; memory[firstAddress + i].Sign = mRegisters[i].Sign; } IFullWord composedWord = memory[firstAddress + i]; if (addressValue < 0) { composedWord.Sign = Word.Signs.Negative; addressValue = -addressValue; } else { composedWord.Sign = Word.Signs.Positive; } composedWord[addressByteIndex] = (addressValue >> MixByte.BitCount) & MixByte.MaxValue; composedWord[addressByteIndex + 1] = addressValue & MixByte.MaxValue; FlagValues flags = FlagValues.None; if (OverflowIndicator) { flags |= FlagValues.Overflow; } if (CompareIndicator == CompValues.Greater) { flags |= FlagValues.Greater; } else if (CompareIndicator == CompValues.Less) { flags |= FlagValues.Less; } composedWord[flagsByteIndex] = (byte)flags; composedWord[rJByteIndex] = RJ[0]; composedWord[rJByteIndex + 1] = RJ[1]; }
public UnClassProperty(UnExport export, int arraySize, FlagValues flags, int category, short repOffset) { _export = export; _arraySize = arraySize; _flags = flags; var categoryName = export.Package.Names[category]; if (categoryName.Name != "None") _category = categoryName; RepOffset = repOffset; }
public UnClassClassProperty(UnExport export, int arraySize, FlagValues flags, int category, UnPackageItem type1, UnPackageItem type2, short repOffset) : base(export, arraySize, flags, category, repOffset) { Type1 = type1; Type2 = type2; }
public UnTypedClassProperty(UnExport export, int arraySize, FlagValues flags, int category, UnPackageItem type, short repOffset) : base(export, arraySize, flags, category, repOffset) { Type = type; }
protected override UnClassProperty CreateProperty(UnExport export, int arraySize, FlagValues flags, int category, BinaryReader reader, short repOffset) { int typeId1 = reader.ReadInt32(); reader.ReadInt32(); var typeItem1 = export.Package.ResolveClassItem(typeId1); return(new UnDelegateClassProperty(export, arraySize, flags, category, typeItem1, repOffset)); }
protected virtual UnClassProperty CreateProperty(UnExport export, int arraySize, FlagValues flags, int category, BinaryReader reader, short repOffset) { return(new UnClassProperty(export, arraySize, flags, category, repOffset)); }
internal UnClass(UnExport self, int superIndex, UnPackageItem outerInstance, byte[] bytecode, FlagValues flags, UnPackageItem defaults, string config, List<string> hideCategories, List<UnPackageItem> interfaces) : base(self, superIndex, bytecode) { _outerInstance = outerInstance; _flags = flags; _defaults = defaults; _config = config; _hideCategories = hideCategories; _interfaces = interfaces; }