| 187 | } |
| 188 | |
| 189 | const DataType* ClassDefinition::getBaseDataType(std::string_view name) const { |
| 190 | const DataTypeMap& dataTypes = getDataTypeMap(); |
| 191 | DataTypeMap::const_iterator itr = dataTypes.find(name); |
| 192 | if (itr == dataTypes.end()) { |
| 193 | for (const auto& parent : getBaseClassMap()) { |
| 194 | if (parent.second) { |
| 195 | const ClassDefinition* cparent = |
| 196 | datatype_cast<const ClassDefinition*>(parent.second); |
| 197 | if (cparent) { |
| 198 | const DataType* d = cparent->getBaseDataType(name); |
| 199 | if (d) return d; |
| 200 | } |
| 201 | } |
| 202 | } |
| 203 | return nullptr; |
| 204 | } else { |
| 205 | return (*itr).second; |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | bool ClassDefinition::hasCompleteBaseSpecification() const { |
| 210 | for (const auto& parent : getBaseClassMap()) { |