Changeset 162:df05d318ac78 in finroc_plugins_runtime_construction
- Timestamp:
- 08.04.2021 06:38:58 (2 weeks ago)
- Branch:
- 17.03
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tFinstructable.cpp
r160 r162 450 450 { 451 451 file = node->GetStringAttribute("file"); 452 auto created = new tIncludeElement(this->GetFrameworkElement(), file, file); 452 auto parent = this->GetFrameworkElement(); 453 if (node->HasAttribute("element")) 454 { 455 rrlib::uri::tURIElements uri_elements; 456 rrlib::uri::tURI uri(node->GetStringAttribute("element")); 457 uri.Parse(uri_elements); 458 parent = GetFrameworkElement()->GetDescendant(uri_elements.path); 459 if (!parent) 460 { 461 throw std::runtime_error("Element '" + node->GetStringAttribute("element") + "' not found"); 462 } 463 } 464 auto created = new tIncludeElement(parent, file, file); 453 465 origin_data.order = std::chrono::steady_clock::now().time_since_epoch().count(); 454 466 if (!include_instance) … … 474 486 { 475 487 tEditableInterfaces* editable_interfaces = GetFrameworkElement()->GetAnnotation<tEditableInterfaces>(); 488 auto include_instance = IncludeFinstructable(this); 489 core::tFrameworkElement* extended_element = nullptr; 490 if (include_instance && node->HasAttribute("element")) 491 { 492 rrlib::uri::tURIElements uri_elements; 493 rrlib::uri::tURI uri(node->GetStringAttribute("element")); 494 uri.Parse(uri_elements); 495 extended_element = GetFrameworkElement()->GetDescendant(uri_elements.path); 496 editable_interfaces = extended_element ? extended_element->GetAnnotation<tEditableInterfaces>() : nullptr; 497 } 476 498 if (editable_interfaces) 477 499 { 478 500 try 479 501 { 480 auto include_instance = IncludeFinstructable(this);481 502 core::tPortGroup& loaded_interface = editable_interfaces->LoadInterfacePorts(*node, !include_instance, include_instance ? include_instance->origin : nullptr); 482 503 … … 512 533 } 513 534 } 535 } 536 537 if (extended_element) 538 { 539 parameters::internal::tStaticParameterList::DoStaticParameterEvaluation(*extended_element); 514 540 } 515 541 }
Note: See TracChangeset
for help on using the changeset viewer.