| 492 | } |
| 493 | |
| 494 | std::string TtlWktSerializer::ttl_object_id(const IfcGeom::Element* o, const char* const postfix) |
| 495 | { |
| 496 | using namespace ifcopenshell::geometry::settings; |
| 497 | auto oid = boost::replace_all_copy(object_id(o), "-", "_"); |
| 498 | if (oid.find('$') == std::string::npos) { |
| 499 | return "base:" + oid + (postfix ? postfix : (const char* const)""); |
| 500 | } else { |
| 501 | std::string base; |
| 502 | if (settings_.get<BaseUri>().has()) { |
| 503 | base = settings_.get<BaseUri>().get(); |
| 504 | } else { |
| 505 | base = "http://example.org/"; |
| 506 | } |
| 507 | return "<" + base + oid + (postfix ? postfix : (const char* const)"") + ">"; |
| 508 | } |
| 509 | } |
| 510 | |
| 511 | bool TtlWktSerializer::isTesselated() const { |
| 512 | using namespace ifcopenshell::geometry::settings; |