public static Operator Create(String typeName)
        {
            typeName = typeName.ToLower();

            Operator op = null;
            if (typeName == "store")
            {
                op = new StoreOperator();
            }
            else if (typeName == "load")
            {
                op = new LoadOperator();
            }
            else if (typeName == "propagate")
            {
                op = new PropagateOperator();
            }
            else if (typeName == "export")
            {
                op = new ExportOperator();
            }
            else
            {
                Verkstan.OperatorBinding opBinding = Verkstan.OperatorBindingFactory.Create(typeName);
                if (opBinding == null)
                    throw new Exception("Unable to find an operator with name '" + typeName + "'");
                op = new CoreOperator(opBinding);
            }

            return op;
        }
Example #2
0
        public static Operator Create(String typeName)
        {
            typeName = typeName.ToLower();

            Operator op = null;
            if (typeName == "store")
            {
                op = new StoreOperator();
            }
            else if (typeName == "load")
            {
                op = new LoadOperator();
            }
            else if (typeName == "propagate")
            {
                op = new PropagateOperator();
            }
            else if (typeName == "timeline")
            {
                Verkstan.CoreOperator coreOp = Verkstan.CoreOperatorFactory.Create(typeName);
                op = new CoreOperator(coreOp);
                op.Timeline = new Timeline(op);
            }
            else
            {
                Verkstan.CoreOperator coreOp = Verkstan.CoreOperatorFactory.Create(typeName);
                op = new CoreOperator(coreOp);
            }

            return op;
        }