Exemple #1
0
        public override IoObject proto(IoState state)
        {
            IoSeq pro = new IoSeq();

            pro.state = state;
            //	pro.tag.cloneFunc = new IoTagCloneFunc(this.clone);
            //    pro.tag.compareFunc = new IoTagCompareFunc(this.compare);
            pro.createSlots();
            pro.createProtos();
            state.registerProtoWithFunc(name, new IoStateProto(name, pro, new IoStateProtoFunc(this.proto)));
            pro.protos.Add(state.protoWithInitFunc("Object"));

            IoCFunction[] methodTable = new IoCFunction[] {
                new IoCFunction("appendSeq", new IoMethodFunc(IoSeq.slotAppendSeq)),
                new IoCFunction("at", new IoMethodFunc(IoSeq.slotAt)),
                new IoCFunction("reverse", new IoMethodFunc(IoSeq.slotReverse)),
            };

            pro.addTaglessMethodTable(state, methodTable);
            return(pro);
        }
Exemple #2
0
        public override IoObject proto(IoState state)
        {
            IoSeq pro = new IoSeq();
            pro.state = state;
            //	pro.tag.cloneFunc = new IoTagCloneFunc(this.clone);
            //    pro.tag.compareFunc = new IoTagCompareFunc(this.compare);
            pro.createSlots();
            pro.createProtos();
            state.registerProtoWithFunc(name, new IoStateProto(name, pro, new IoStateProtoFunc(this.proto)));
            pro.protos.Add(state.protoWithInitFunc("Object"));

            IoCFunction[] methodTable = new IoCFunction[] {
                new IoCFunction("appendSeq", new IoMethodFunc(IoSeq.slotAppendSeq)),
                new IoCFunction("at", new IoMethodFunc(IoSeq.slotAt)),
                new IoCFunction("reverse", new IoMethodFunc(IoSeq.slotReverse)),
            };

            pro.addTaglessMethodTable(state, methodTable);
            return pro;
        }