コード例 #1
0
        public override IoObject clone(IoState state)
        {
            IoSeq proto  = state.protoWithInitFunc(name) as IoSeq;
            IoSeq result = new IoSeq();

            result.state = state;
            result.value = proto.value;
            result.createProtos();
            result.createSlots();
            result.protos.Add(proto);
            return(result);
        }
コード例 #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);
        }
コード例 #3
0
ファイル: IoSeq.cs プロジェクト: devaspot/io
        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;
        }
コード例 #4
0
ファイル: IoSeq.cs プロジェクト: devaspot/io
 public override IoObject clone(IoState state)
 {
     IoSeq proto = state.protoWithInitFunc(name) as IoSeq;
     IoSeq result = new IoSeq();
     result.state = state;
     result.value = proto.value;
     result.createProtos();
     result.createSlots();
     result.protos.Add(proto);
     return result;
 }