io.IoList.proto C# (CSharp) 메소드

proto() 공개 메소드

public proto ( IoState state ) : IoObject
state IoState
리턴 IoObject
        public override IoObject proto(IoState state)
        {
            IoList pro = new IoList();
            pro.state = state;
             //   pro.tag.cloneFunc = new IoTagCloneFunc(pro.clone);
            pro.createSlots();
            pro.createProtos();
            pro.list = new IoObjectArrayList();
            state.registerProtoWithFunc(pro.name, new IoStateProto(pro.name, pro, new IoStateProtoFunc(pro.proto)));
            pro.protos.Add(state.protoWithInitFunc("Object"));

            IoCFunction[] methodTable = new IoCFunction[] {
                new IoCFunction("indexOf", new IoMethodFunc(IoList.slotIndexOf)),
                new IoCFunction("capacity", new IoMethodFunc(IoList.slotSize)),
                new IoCFunction("size", new IoMethodFunc(IoList.slotSize)),
                new IoCFunction("removeAll", new IoMethodFunc(IoList.slotRemoveAll)),
                new IoCFunction("append", new IoMethodFunc(IoList.slotAppend)),
                new IoCFunction("appendSeq", new IoMethodFunc(IoList.slotAppendSeq)),
                new IoCFunction("with", new IoMethodFunc(IoList.slotWith)),
                new IoCFunction("prepend", new IoMethodFunc(IoList.slotPrepend)),
                new IoCFunction("push", new IoMethodFunc(IoList.slotAppend)),
                new IoCFunction("at", new IoMethodFunc(IoList.slotAt)),
                new IoCFunction("last", new IoMethodFunc(IoList.slotLast)),
                new IoCFunction("pop", new IoMethodFunc(IoList.slotPop)),
                new IoCFunction("removeAt", new IoMethodFunc(IoList.slotRemoveAt)),
                new IoCFunction("reverseForeach", new IoMethodFunc(IoList.slotReverseForeach)),
            };

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

Usage Example

예제 #1
0
 public static new IoList createProto(IoState state)
 {
     IoList m = new IoList();
     return m.proto(state) as IoList;
 }
All Usage Examples Of io.IoList::proto