示例#1
0
文件: Factory.cs 项目: Grieverwzn/NRM
 public static Factory GetInstance(Warpper _warpper)
 {
     if (null == factory)
     {
         factory         = new Factory();
         factory.warpper = _warpper;
     }
     return(factory);
 }
示例#2
0
        static void Main(string[] args)
        {
            //初始化容器
            Warpper warpper = new Warpper();
            Factory factory = Factory.GetInstance(warpper);
            string  cur     = "";

            if (args.Count() > 0)
            {
                string       path = args[0];
                StreamReader sr   = new StreamReader(path, Encoding.Default);
                cur = sr.ReadToEnd();
            }
#if DEBUG
            //cur = @"read -p C:\Users\yuanwuyang\Desktop\Net2.xls;arr -p C:\Users\yuanwuyang\Desktop\arr -n 20;cnn -i C:\Users\yuanwuyang\Desktop\arr -o C:\Users\yuanwuyang\Desktop\CNN -c C:\Users\yuanwuyang\Desktop\CNN.txt";
            cur = @"read -p C:\Users\yuanwuyang\Desktop\Net1.xls;gen -p C:\Users\yuanwuyang\Desktop\Net1.txt; arr -p C:\Users\yuanwuyang\Desktop\arr -n 20;sim -i C:\Users\yuanwuyang\Desktop\arr -o C:\Users\yuanwuyang\Desktop\BPC -c C:\Users\yuanwuyang\Desktop\Net1.txt;oac -i C:\Users\yuanwuyang\Desktop\arr -o C:\Users\yuanwuyang\Desktop\OAC";
            //cur = @"read -p C:\Users\yuanwuyang\Desktop\Net1.xls;anahead -o C:\Users\yuanwuyang\Desktop\res.txt;ana -i C:\Users\yuanwuyang\Desktop\arr -s C:\Users\yuanwuyang\Desktop\OAC\Sell -c C:\Users\yuanwuyang\Desktop\OAC\Control -o C:\Users\yuanwuyang\Desktop\res.txt";
#endif
            while (cur != "" || (cur = Console.ReadLine()) != "exit")
            {
                string[] r = cur.Split(new char[] { ';' });
                foreach (string s in r)
                {
                    args = s.Trim().Split(new char[] { ' ' });
                    if (args.Count() > 0)
                    {
                        if (args[0] == "exit")
                        {
                            return;
                        }
                        Command Command = factory.Create(args[0]);
                        ExecuteCommand(args, Command);
                    }
                }
                cur = "";
            }
        }
示例#3
0
 public ShowIndexsCommand(Warpper _warpper) : base(_warpper)
 {
 }
示例#4
0
 public AnalysisCommand(Warpper _warpper) : base(_warpper)
 {
 }
示例#5
0
 public ReadDataCommand(Warpper _warpper) : base(_warpper)
 {
 }
示例#6
0
 public SimCNNestingCommand(Warpper _warpper) : base(_warpper)
 {
 }
示例#7
0
 public SimOACCommand(Warpper _warpper) : base(_warpper)
 {
 }
示例#8
0
 public Command(Warpper _warpper)
 {
     this.warpper = _warpper;
 }
示例#9
0
 public SimArrCommand(Warpper _warpper) : base(_warpper)
 {
 }
示例#10
0
 public GenBidPriceCommand(Warpper _warpper) : base(_warpper)
 {
 }