mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
Configurable pointer type; std::from_chars(); aggregate inverses in vector; skip parse_context
This commit is contained in:
@@ -9,19 +9,27 @@ uint32_t express::Base::identity() const { return data()->identity(); }
|
||||
uint32_t express::Base::id() const { return data()->id(); }
|
||||
|
||||
const instance_data* express::Base::data() const {
|
||||
#ifdef IFOPSH_SAFE_INSTANCE
|
||||
auto sp = data_.lock();
|
||||
if (sp) {
|
||||
return sp.get();
|
||||
} else {
|
||||
throw std::runtime_error("Trying to access deleted instance reference");
|
||||
}
|
||||
#else
|
||||
return data_;
|
||||
#endif
|
||||
}
|
||||
|
||||
instance_data* express::Base::data() {
|
||||
#ifdef IFOPSH_SAFE_INSTANCE
|
||||
auto sp = data_.lock();
|
||||
if (sp) {
|
||||
return sp.get();
|
||||
} else {
|
||||
throw std::runtime_error("Trying to access deleted instance reference");
|
||||
}
|
||||
#else
|
||||
return data_;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user