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