internal override int GetInheritLevel( ) { ValuePhoClassType classType = Parent; int total = 0; while (classType != null) { total++; classType = classType.Parent; } return(total); }
internal bool GetVirtualMember(int nameKey, out Value v) { v = Value.Nil; ValuePhoClassType ct = this; while (ct != null) { if (ct._member.TryGetValue(nameKey, out v)) { return(true); } ct = ct.Parent; } return(false); }
internal override void Compile(CompileParameter param) { _class = new ValuePhoClassType(param.Pkg, new ObjectName(param.Pkg.Name, Name.Name)); _class.ID = param.Exe.GenPersistantID(); foreach (var m in Member) { var ki = param.Constants.AddString(m.Name); _class.AddMemeber(ki, m.Name); } param.Exe.AddClassType(_class); if (ParentName != null && !ResolveParent(param, 1)) { param.NextPassToResolve(this); } }
internal ValuePhoClassIns(ValuePhoClassType t) { _type = t; }
internal override void OnSerializeDone(Executable exe) { Parent = exe.FindClassByPersistantID(ParentID); }