- SGValue *v = node.getValue( tokens[1] );
- if ( v != NULL ) {
- SGValue::Type type = v->getType();
- if ( type == SGValue::UNKNOWN ) {
- v->setUnknownValue( tokens[2] );
- } else if ( type == SGValue::BOOL ) {
- if ( tokens[2] == "true" ) {
- v->setBoolValue( true );
- } else if ( tokens[2] == "false" ) {
- v->setBoolValue( false );
- } else {
- v->setBoolValue( atoi( tokens[2].c_str() ) );
- }
- } else if ( type == SGValue::INT ) {
- v->setIntValue( atoi( tokens[2].c_str() ) );
- } else if ( type == SGValue::FLOAT ) {
- v->setFloatValue( atof( tokens[2].c_str() ) );
- } else if ( type == SGValue::DOUBLE ) {
- v->setDoubleValue( atof( tokens[2].c_str() ) );
- } else if ( type == SGValue::STRING ) {
- v->setStringValue( tokens[2] );
- }
+ string tmp = tokens[2];
+ for ( unsigned int i = 3; i < tokens.size() - 1; i++ ) {
+ tmp += " " + tokens[i];
+ }
+ node->getNode( tokens[1].c_str(), true )->setStringValue(tmp.c_str());