Example #1
0
        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.");
            }
        }
Example #2
0
 public Unit(char p_char) : this()
 {
     charValue     = p_char;
     heapUnitValue = TypeUnit.Char;
 }
Example #3
0
 public Unit(bool p_value) : this()
 {
     boolValue     = p_value;
     heapUnitValue = TypeUnit.Boolean;
 }
Example #4
0
 public Unit(String p_string) : this()
 {
     floatValue    = 0;
     heapUnitValue = new StringUnit(p_string);
 }
Example #5
0
 public Unit(Integer p_number) : this()
 {
     integerValue  = p_number;
     heapUnitValue = TypeUnit.Integer;
 }
Example #6
0
 public Unit(Float p_number) : this()
 {
     floatValue    = p_number;
     heapUnitValue = TypeUnit.Float;
 }
Example #7
0
 public Unit(HeapUnit p_value) : this()
 {
     floatValue    = 0;
     heapUnitValue = p_value;
 }
Example #8
0
 public void Set(Unit p_key, HeapUnit p_value)
 {
     Set(p_key, new Unit(p_value));
 }
Example #9
0
 public void Set(string p_key, HeapUnit p_value)
 {
     Set(new Unit(p_key), new Unit(p_value));
 }