| 326 | } |
| 327 | |
| 328 | bool TestbenchElaboration::bindDataTypes_() { |
| 329 | Compiler* compiler = m_compileDesign->getCompiler(); |
| 330 | Design* design = compiler->getDesign(); |
| 331 | ClassNameClassDefinitionMultiMap classes = design->getClassDefinitions(); |
| 332 | |
| 333 | // Bind data types |
| 334 | for (const auto& [className, classDefinition] : classes) { |
| 335 | for (auto& datatype : classDefinition->getUsedDataTypeMap()) { |
| 336 | std::string dataTypeName = datatype.first; |
| 337 | DataType* dtype = datatype.second; |
| 338 | if (dtype->getDefinition()) continue; |
| 339 | VObjectType type = dtype->getType(); |
| 340 | if (type == VObjectType::slStringConst || |
| 341 | type == VObjectType::paNull_rule || |
| 342 | type == VObjectType::paClass_scope) { |
| 343 | const DataType* the_def = bindDataType_( |
| 344 | dataTypeName, dtype->getFileContent(), dtype->getNodeId(), |
| 345 | classDefinition, ErrorDefinition::COMP_UNDEFINED_TYPE); |
| 346 | if (the_def != dtype) dtype->setDefinition(the_def); |
| 347 | } |
| 348 | } |
| 349 | for (auto& func : classDefinition->getFunctionMap()) { |
| 350 | for (auto& datatype : func.second->getUsedDataTypeMap()) { |
| 351 | std::string dataTypeName = datatype.first; |
| 352 | DataType* dtype = datatype.second; |
| 353 | if (dtype->getDefinition()) continue; |
| 354 | VObjectType type = dtype->getType(); |
| 355 | if (type == VObjectType::slStringConst || |
| 356 | type == VObjectType::paNull_rule || |
| 357 | type == VObjectType::paClass_scope) { |
| 358 | const DataType* the_def = bindDataType_( |
| 359 | dataTypeName, dtype->getFileContent(), dtype->getNodeId(), |
| 360 | classDefinition, ErrorDefinition::COMP_UNDEFINED_TYPE); |
| 361 | if (the_def != dtype) dtype->setDefinition(the_def); |
| 362 | } |
| 363 | } |
| 364 | } |
| 365 | } |
| 366 | return true; |
| 367 | } |
| 368 | |
| 369 | bool TestbenchElaboration::bindFunctions_() { |
| 370 | bindFunctionReturnTypesAndParamaters_(); |
nothing calls this directly
no test coverage detected