public Unit(UnitType p_type) : this() { switch (p_type) { case UnitType.Null: heapUnitValue = TypeUnit.Null; break; case UnitType.Boolean: heapUnitValue = TypeUnit.Boolean; break; case UnitType.Float: heapUnitValue = TypeUnit.Float; break; case UnitType.Integer: heapUnitValue = TypeUnit.Integer; break; case UnitType.Char: heapUnitValue = TypeUnit.Char; break; default: throw new Exception("Trying to create a Unit of unknown type."); } }
public Unit(char p_char) : this() { charValue = p_char; heapUnitValue = TypeUnit.Char; }
public Unit(bool p_value) : this() { boolValue = p_value; heapUnitValue = TypeUnit.Boolean; }
public Unit(String p_string) : this() { floatValue = 0; heapUnitValue = new StringUnit(p_string); }
public Unit(Integer p_number) : this() { integerValue = p_number; heapUnitValue = TypeUnit.Integer; }
public Unit(Float p_number) : this() { floatValue = p_number; heapUnitValue = TypeUnit.Float; }
public Unit(HeapUnit p_value) : this() { floatValue = 0; heapUnitValue = p_value; }
public void Set(Unit p_key, HeapUnit p_value) { Set(p_key, new Unit(p_value)); }
public void Set(string p_key, HeapUnit p_value) { Set(new Unit(p_key), new Unit(p_value)); }