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

Method create

src/ifcparse/IfcFile.cpp:776–785  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

774}
775
776IfcUtil::IfcBaseClass* IfcParse::impl::rocks_db_file_storage::create(const IfcParse::declaration* decl) {
777 if (decl->as_entity() || decl->as_type_declaration()) {
778 auto* inst = file->schema()->instantiate(decl, rocks_db_attribute_storage{});
779 // @todo maybe this needs to be set to file? In order to have a context (ie. rocksdb::db*) to write to?
780 inst->file_ = nullptr;
781 return file->addEntity(inst);
782 } else {
783 throw std::runtime_error("Requires and entity or type declaration");
784 }
785}
786
787IfcUtil::IfcBaseClass* IfcParse::impl::in_memory_file_storage::create(const IfcParse::declaration* decl) {
788 IfcUtil::IfcBaseClass* inst = nullptr;

Callers

nothing calls this directly

Calls 3

instantiateMethod · 0.80
addEntityMethod · 0.80
schemaMethod · 0.45

Tested by

no test coverage detected