Manually merged in aothms revisions for gradient curves and implicit_item taxonomy

This commit is contained in:
Richard Brice
2023-10-02 16:30:39 -07:00
parent ae09a1acac
commit 7b0e2c52ac
10 changed files with 1565 additions and 1336 deletions
+19 -3
View File
@@ -490,10 +490,26 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcStyledItem* inst) {
taxonomy::ptr mapping::map(const IfcBaseInterface* inst) {
// std::wcout << inst->data().toString().c_str() << std::endl;
auto iden = inst->as<IfcUtil::IfcBaseClass>()->identity();
auto it = cache_.find(iden);
if (it != cache_.end()) {
return it->second;
}
taxonomy::ptr item = nullptr;
// @todo we should check whether there is a notice performance impact on the large sequence
// of if-statements and whether a switch on e.g inst->declaration()->index_in_schema()
// isn't more efficient (which would disable inheritance though).
#include "bind_convert_impl.i"
Logger::Message(Logger::LOG_ERROR, "No operation defined for:", inst);
return nullptr;
if (item) {
cache_.insert({ iden, item });
}
else {
Logger::Message(Logger::LOG_ERROR, "No operation defined for:", inst);
}
return item;
}
namespace {