Пример #1
0
        internal override int GetInheritLevel( )
        {
            ValuePhoClassType classType = Parent;

            int total = 0;

            while (classType != null)
            {
                total++;

                classType = classType.Parent;
            }

            return(total);
        }
Пример #2
0
        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);
        }
Пример #3
0
        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);
            }
        }
Пример #4
0
 internal ValuePhoClassIns(ValuePhoClassType t)
 {
     _type = t;
 }
Пример #5
0
 internal override void OnSerializeDone(Executable exe)
 {
     Parent = exe.FindClassByPersistantID(ParentID);
 }