コード例 #1
0
 private void StackInitializeSuffixes()
 {
     AddSuffix("COPY", new NoArgsSuffix <StackValue <T> >       (() => new StackValue <T>(this)));
     AddSuffix("PUSH", new OneArgsSuffix <T>                  (toPush => InnerEnumerable.Push(toPush)));
     AddSuffix("POP", new NoArgsSuffix <T>                   (() => InnerEnumerable.Pop()));
     AddSuffix("PEEK", new NoArgsSuffix <T>                   (() => InnerEnumerable.Peek()));
     AddSuffix("CLEAR", new NoArgsVoidSuffix(() => InnerEnumerable.Clear()));
 }
コード例 #2
0
        public override void LoadDump(Dump dump)
        {
            InnerEnumerable.Clear();

            List <object> values = ((List <object>)dump[kOS.Safe.Dump.Items]);

            values.Reverse();

            foreach (object item in values)
            {
                InnerEnumerable.Push((T)Structure.FromPrimitive(item));
            }
        }
コード例 #3
0
 public void Push(T val)
 {
     InnerEnumerable.Push(val);
 }