public override ValueSpecification clone() { LiteralInteger vs = new LiteralInteger(0); vs.CLASSTYPE = CLASSTYPE; vs.Type = this.Type; vs.iValue = iValue; return ((ValueSpecification)vs); }
public override ValueSpecification clone() { LiteralInteger vs = new LiteralInteger(0); vs.CLASSTYPE = CLASSTYPE; vs.Type = this.Type; vs.iValue = iValue; return((ValueSpecification)vs); }
public override ValueSpecification createValueFromString(string str) { ValueSpecification valueSpec = null; if (type == "real" || type == "double") { valueSpec = new LiteralReal(str); } else if (type == "integer") { valueSpec = new LiteralInteger(str); } else if (type == "string") { valueSpec = new LiteralString(str); } else if (type == "boolean") { valueSpec = new LiteralBoolean(str); } /*else if (type =="color") * valueSpec = new Color(str); * else if (type =="Vector3") * valueSpec = new Vector3(str);*/ else if (type == "rotation") { valueSpec = new RotationVector(str); } else if (type == "shape") { //valueSpec = (UnityShapeSpecification)ScriptableObject.CreateInstance("UnityShapeSpecification"); //((UnityShapeSpecification)valueSpec).instantiate(str); } else if (type == "point") { //valueSpec = (UnityPointSpecification)ScriptableObject.CreateInstance("UnityPointSpecification"); //((UnityPointSpecification)valueSpec).instantiate(str); } /*else if (type =="path") * valueSpec = new PathSpecification(str); * else if (type =="sound") * valueSpec = new UnitySoundSpecification(str); * else if (type =="animation") * valueSpec = new UnityAnimationSpecification(str);*/ else { Console.WriteLine("Default : value is string"); valueSpec = new LiteralString(str); } return(valueSpec); }
public override ValueSpecification createValueFromString(string str) { ValueSpecification valueSpec = null; if (type == "real" || type == "double" || type == "float") { valueSpec = new LiteralReal(str); } else if (type == "integer") { valueSpec = new LiteralInteger(str); } else if (type == "string") { valueSpec = new LiteralString(str); } else if (type == "boolean") { valueSpec = new LiteralBoolean(str); } /*else if (type =="color") valueSpec = new Color(str); else if (type =="Vector3") valueSpec = new Vector3(str);*/ else if (type == "rotation") { valueSpec = new RotationVector(str); } else if (type == "shape") { //valueSpec = (UnityShapeSpecification)ScriptableObject.CreateInstance("UnityShapeSpecification"); //((UnityShapeSpecification)valueSpec).instantiate(str); } else if (type == "point") { //valueSpec = (UnityPointSpecification)ScriptableObject.CreateInstance("UnityPointSpecification"); //((UnityPointSpecification)valueSpec).instantiate(str); } /*else if (type =="path") valueSpec = new PathSpecification(str); else if (type =="sound") valueSpec = new UnitySoundSpecification(str); else if (type =="animation") valueSpec = new UnityAnimationSpecification(str);*/ else { Console.WriteLine("Default : value is string"); valueSpec = new LiteralString(str); } return valueSpec; }
public override ValueSpecification createValueFromString(string str) { string type = unit.Classifier.name; ValueSpecification valueSpec = null; if (type == "real" || type == "double") { valueSpec = new LiteralReal(str); } else if (type == "integer") { valueSpec = new LiteralInteger(str); } else if (type == "string") { valueSpec = new LiteralString(str); } else if (type == "boolean") { valueSpec = new LiteralBoolean(str); } return valueSpec; }
public override ValueSpecification createValueFromString(string str) { string type = unit.Classifier.name; ValueSpecification valueSpec = null; if (type == "real" || type == "double") { valueSpec = new LiteralReal(str); } else if (type == "integer") { valueSpec = new LiteralInteger(str); } else if (type == "string") { valueSpec = new LiteralString(str); } else if (type == "boolean") { valueSpec = new LiteralBoolean(str); } return(valueSpec); }