}
void
-SGPropertyNode::clear_value ()
+SGPropertyNode::clearValue ()
{
switch (_type) {
case NONE:
delete [] _display_name;
delete [] _path;
delete _path_cache;
- clear_value();
+ clearValue();
delete _listeners;
}
{
if (target == 0 || _type == ALIAS || _tied)
return false;
- clear_value();
+ clearValue();
_value.alias = target;
_type = ALIAS;
return true;
_removedChildren.push_back(node);
}
node->setAttribute(REMOVED, true);
+ node->clearValue();
ret = node;
fireChildRemoved(node);
}
bool result = false;
TEST_WRITE;
if (_type == NONE || _type == UNSPECIFIED) {
- clear_value();
+ clearValue();
_tied = false;
_type = BOOL;
}
bool result = false;
TEST_WRITE;
if (_type == NONE || _type == UNSPECIFIED) {
- clear_value();
+ clearValue();
_type = INT;
_local_val.int_val = 0;
}
bool result = false;
TEST_WRITE;
if (_type == NONE || _type == UNSPECIFIED) {
- clear_value();
+ clearValue();
_type = LONG;
_local_val.long_val = 0L;
}
bool result = false;
TEST_WRITE;
if (_type == NONE || _type == UNSPECIFIED) {
- clear_value();
+ clearValue();
_type = FLOAT;
_local_val.float_val = 0;
}
bool result = false;
TEST_WRITE;
if (_type == NONE || _type == UNSPECIFIED) {
- clear_value();
+ clearValue();
_local_val.double_val = value;
_type = DOUBLE;
}
bool result = false;
TEST_WRITE;
if (_type == NONE || _type == UNSPECIFIED) {
- clear_value();
+ clearValue();
_type = STRING;
}
bool result = false;
TEST_WRITE;
if (_type == NONE) {
- clear_value();
+ clearValue();
_type = UNSPECIFIED;
}
if (useDefault)
old_val = getBoolValue();
- clear_value();
+ clearValue();
_type = BOOL;
_tied = true;
_value.bool_val = rawValue.clone();
if (useDefault)
old_val = getIntValue();
- clear_value();
+ clearValue();
_type = INT;
_tied = true;
_value.int_val = rawValue.clone();
if (useDefault)
old_val = getLongValue();
- clear_value();
+ clearValue();
_type = LONG;
_tied = true;
_value.long_val = rawValue.clone();
if (useDefault)
old_val = getFloatValue();
- clear_value();
+ clearValue();
_type = FLOAT;
_tied = true;
_value.float_val = rawValue.clone();
if (useDefault)
old_val = getDoubleValue();
- clear_value();
+ clearValue();
_type = DOUBLE;
_tied = true;
_value.double_val = rawValue.clone();
if (useDefault)
old_val = getStringValue();
- clear_value();
+ clearValue();
_type = STRING;
_tied = true;
_value.string_val = rawValue.clone();
switch (_type) {
case BOOL: {
bool val = getBoolValue();
- clear_value();
+ clearValue();
_type = BOOL;
_local_val.bool_val = val;
break;
}
case INT: {
int val = getIntValue();
- clear_value();
+ clearValue();
_type = INT;
_local_val.int_val = val;
break;
}
case LONG: {
long val = getLongValue();
- clear_value();
+ clearValue();
_type = LONG;
_local_val.long_val = val;
break;
}
case FLOAT: {
float val = getFloatValue();
- clear_value();
+ clearValue();
_type = FLOAT;
_local_val.float_val = val;
break;
}
case DOUBLE: {
double val = getDoubleValue();
- clear_value();
+ clearValue();
_type = DOUBLE;
_local_val.double_val = val;
break;
case STRING:
case UNSPECIFIED: {
string val = getStringValue();
- clear_value();
+ clearValue();
_type = STRING;
_local_val.string_val = copy_string(val.c_str());
break;