#ifdef BIND #undef BIND #endif #define BIND(T) \ if (inst->as()) { \ try { \ taxonomy::ptr item = map_impl(inst->as()); \ if (item != nullptr) { \ item->instance = inst; \ try { \ if (inst->as() && !inst->as() && \ /* @todo */ \ (item->kind() == taxonomy::SHELL || item->kind() == taxonomy::COLLECTION || item->kind() == taxonomy::EXTRUSION) \ ) { \ auto style = find_style(inst->as()); \ if (style) { \ taxonomy::cast(item)->surface_style = taxonomy::cast(map(style)); \ } \ } \ } catch (const std::exception& e) { \ Logger::Message(Logger::LOG_ERROR, std::string(e.what()) + "\nFailed to convert:", inst); \ } \ } else {\ Logger::Message(Logger::LOG_ERROR,"Failed to convert:", inst);\ } \ return item; \ } catch (const std::exception& e) { \ Logger::Message(Logger::LOG_ERROR, std::string(e.what()) + "\nFailed to convert:", inst); \ } \ return nullptr; \ } #include "mapping.i"