| 151 | } |
| 152 | |
| 153 | Function* DesignComponent::getFunction(std::string_view name) const { |
| 154 | FunctionMap::const_iterator itr = m_functions.find(name); |
| 155 | if (itr == m_functions.end()) { |
| 156 | const DesignComponent* parent = |
| 157 | valuedcomponenti_cast<const DesignComponent*>(getParentScope()); |
| 158 | if (parent) { |
| 159 | return parent->getFunction(name); |
| 160 | } else |
| 161 | return nullptr; |
| 162 | } else { |
| 163 | return (*itr).second; |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | void DesignComponent::insertFunction(Function* p) { |
| 168 | m_functions.emplace(p->getName(), p); |
no outgoing calls