| 412 | } |
| 413 | |
| 414 | void BehaviorTreeDataModel::restore(const QJsonObject &modelJson) |
| 415 | { |
| 416 | if( registrationName() != modelJson["name"].toString() ) |
| 417 | { |
| 418 | throw std::runtime_error(" error restoring: different registration_name"); |
| 419 | } |
| 420 | QString alias = modelJson["alias"].toString(); |
| 421 | setInstanceName( alias ); |
| 422 | |
| 423 | for(auto it = modelJson.begin(); it != modelJson.end(); it++ ) |
| 424 | { |
| 425 | if( it.key() != "alias" && it.key() != "name") |
| 426 | { |
| 427 | setPortMapping( it.key(), it.value().toString() ); |
| 428 | } |
| 429 | } |
| 430 | |
| 431 | } |
| 432 | |
| 433 | void BehaviorTreeDataModel::lock(bool locked) |
| 434 | { |
nothing calls this directly
no outgoing calls
no test coverage detected