Work towards v1.0 data model with encapsulated weak_ptr as basis for instances

This commit is contained in:
Thomas Krijnen
2026-01-04 10:40:02 +01:00
parent f09ca658f1
commit 7098beb819
210 changed files with 28269 additions and 26471 deletions
+27
View File
@@ -0,0 +1,27 @@
#include "express.h"
#include "InstanceData.h"
const IfcParse::declaration& express::Base::declaration() const {
return *data()->declaration();
}
uint32_t express::Base::identity() const { return data()->identity(); }
uint32_t express::Base::id() const { return data()->id(); }
const InstanceData* express::Base::data() const {
auto sp = data_.lock();
if (sp) {
return sp.get();
} else {
throw std::runtime_error("Trying to access deleted instance reference");
}
}
InstanceData* express::Base::data() {
auto sp = data_.lock();
if (sp) {
return sp.get();
} else {
throw std::runtime_error("Trying to access deleted instance reference");
}
}