MCPcopy Create free account
hub / github.com/BehaviorTree/Groot / restore

Method restore

bt_editor/models/BehaviorTreeNodeModel.cpp:414–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412}
413
414void 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
433void BehaviorTreeDataModel::lock(bool locked)
434{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected