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

Method create

src/ifcparse/IfcFile.h:456–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

454
455template <typename T>
456T* IfcParse::impl::in_memory_file_storage::create() {
457 IfcUtil::IfcBaseClass* inst = nullptr;
458 if constexpr (std::is_same_v<std::decay_t<std::invoke_result_t<typename T::Class>>, IfcParse::entity>) {
459 inst = new T(in_memory_attribute_storage(T::Class().attribute_count()));
460 } else if constexpr (std::is_same_v<std::decay_t<std::invoke_result_t<typename T::Class>>, IfcParse::type_declaration>) {
461 inst = new T(in_memory_attribute_storage(1));
462 } else {
463 static_assert(dependent_false_v<T>, "Requires and entity or type declaration");
464 }
465 inst->file_ = file;
466 return file->addEntity(inst)->as<T>();
467}
468
469template <typename T>
470T* IfcParse::impl::rocks_db_file_storage::create() {

Callers 15

test_opening_unicodeFunction · 0.45
test_bug_2486_bFunction · 0.45
create_caseFunction · 0.45
test_get_alignmentFunction · 0.45
test_get_layout_curveFunction · 0.45
test_create_no_geometryFunction · 0.45
_test_horizontalFunction · 0.45

Calls 1

addEntityMethod · 0.80

Tested by 15

test_opening_unicodeFunction · 0.36
test_bug_2486_bFunction · 0.36
create_caseFunction · 0.36
test_get_alignmentFunction · 0.36
test_get_layout_curveFunction · 0.36
test_create_no_geometryFunction · 0.36
_test_horizontalFunction · 0.36