public static CellValue CheckCellVal(string v_type) { CellValue rtn = null; v_type = v_type.Trim(); switch (v_type) { case "int": rtn = new IntVal(); break; case "string": rtn = new StringVal(); break; case "cstring": rtn = new CStringVal(); break; case "number": rtn = new NumberVal(); break; case "prob": rtn = new ProbVal(); break; case "float": rtn = new FloatVal(); break; case "double": rtn = new DoubleVal(); break; case "percent": rtn = new PercentVal(); break; case "bool": rtn = new BoolVal(); break; case "table": rtn = new TableValue(); break; case "dataFromLuaFile": rtn = new DataFromLuaFileValue(); break; default: rtn = new IDVal(v_type); break; } return(rtn); }
public override bool Equals(CellValue v_other) { NumberVal obj = v_other as NumberVal; return(obj != null && obj._data == _data); }