Esempio n. 1
0
 public override TypedValue DefaultValue()
 {
     if (_default == null)
     {
         _default = UserValue.Create(MakeDefaultValues(Heading), this);
     }
     return(_default);
 }
Esempio n. 2
0
        static public UserValue Create(TypedValue[] value, DataTypeUser datatype)
        {
            if (datatype.Name == "date")
            {
                return(Builtin.DateValue.Create(value[0] as TimeValue));
            }
            var ret = new UserValue {
                Value = value, _datatype = datatype
            };

            ret._hashcode = ret.CalcHashCode();
            return(ret);
        }
Esempio n. 3
0
        public void SetStructEnd()
        {
            var tuple = FilledValues();

            _valueholder = _valueholder._parent;
            var datatype = _valueholder.DataType;

            if (datatype is DataTypeUser)
            {
                _valueholder._values[_valueholder._colidx] = UserValue.Create(tuple, datatype as DataTypeUser);
            }
            else if (datatype is DataTypeTuple)
            {
                var row = DataRow.Create(datatype.Heading, tuple);
                _valueholder._values[_valueholder._colidx] = TupleValue.Create(row);
            }
            else
            {
                Logger.Assert(_valueholder.DataType is DataTypeRelation);
                _valueholder._list.Add(tuple);
            }
        }
Esempio n. 4
0
 // Create a value for this type
 public UserValue CreateValue(TypedValue[] values)
 {
     return(UserValue.Create(values, this));
 }
Esempio n. 5
0
 static UserValue()
 {
     Default = Create(new TypedValue[0], DataTypeUser.Empty);
 }