+ if (!_tied)
+ return false;
+
+ switch (_type) {
+ case BOOL: {
+ bool val = getBoolValue();
+ clear_value();
+ _type = BOOL;
+ _value.bool_val = new SGRawValueInternal<bool>;
+ SET_BOOL(val);
+ break;
+ }
+ case INT: {
+ int val = getIntValue();
+ clear_value();
+ _type = INT;
+ _value.int_val = new SGRawValueInternal<int>;
+ SET_INT(val);
+ break;
+ }
+ case LONG: {
+ long val = getLongValue();
+ clear_value();
+ _type = LONG;
+ _value.long_val = new SGRawValueInternal<long>;
+ SET_LONG(val);
+ break;
+ }
+ case FLOAT: {
+ float val = getFloatValue();
+ clear_value();
+ _type = FLOAT;
+ _value.float_val = new SGRawValueInternal<float>;
+ SET_FLOAT(val);
+ break;
+ }
+ case DOUBLE: {
+ double val = getDoubleValue();
+ clear_value();
+ _type = DOUBLE;
+ _value.double_val = new SGRawValueInternal<double>;
+ SET_DOUBLE(val);
+ break;
+ }
+ case STRING: {
+ string val = getStringValue();
+ clear_value();
+ _type = STRING;
+ _value.string_val = new SGRawValueInternal<string>;
+ SET_STRING(val);
+ break;
+ }
+ }
+
+ _tied = false;
+ return true;