MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / create

Function create

src/ifcparse/IfcFile.h:412–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

410
411 template <typename T>
412 T* create() {
413 return std::visit([](auto& m) -> T* {
414 if constexpr (std::is_same_v<std::decay_t<decltype(m)>, impl::in_memory_file_storage> ||
415 std::is_same_v<std::decay_t<decltype(m)>, impl::rocks_db_file_storage>)
416 {
417 return m.template create<T>();
418 } else {
419 return nullptr;
420 }
421 }, storage_);
422 }
423
424 IfcUtil::IfcBaseClass* create(const IfcParse::declaration* decl) {
425 return std::visit([decl](auto& m) -> IfcUtil::IfcBaseClass* {

Callers 3

addRelatedObjectFunction · 0.70
initializeMethod · 0.50
nextMethod · 0.50

Calls 2

visitFunction · 0.50
createMethod · 0.45

Tested by

no test coverage detected