export class BaseDataDefinition {
    constructor(name) {
        this.name = '';
        this.list = false;
        this.valueIsDefault = false;
        if (name)
            this.name = name;
    }
    getValue() {
        if (this.name && this.owner)
            return this.owner.getValueObject()[this.name];
        return;
    }
    setValue(value) {
        if (this.name && this.owner) {
            this.owner.getValueObject()[this.name] = value;
        }
    }
    getListValue() {
        if (this.name && this.owner)
            return this.owner.getValueObject()[this.name];
        return;
    }
    setListValue(value) {
        if (this.name && this.owner)
            this.owner.getValueObject()[this.name] = value;
    }
    getStorageData() {
        let object = {};
        Reflect.set(object, '__type', this.type);
        Reflect.set(object, 'name', this.name);
        Reflect.set(object, 'list', this.list);
        Reflect.set(object, 'description', this.description);
        Reflect.set(object, 'valueIsDefault', this.valueIsDefault);
        if (this.name && this.owner) {
            Reflect.set(object, 'owner', this.owner);
        }
        return object;
    }
    setStorageData(data) {
        this.name = Reflect.get(data, 'name');
        this.list = Reflect.get(data, 'list');
        this.description = Reflect.get(data, 'description');
        this.valueIsDefault = Reflect.get(data, 'valueIsDefault');
    }
}
//# sourceMappingURL=BaseDataDefinition.js.map