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

Method read

src/ifcparse/IfcParse.cpp:586–596  ·  view source on GitHub ↗

Reads an Entity from the list of Tokens at the specified offset in the file

Source from the content-addressed store, hash-verified

584// Reads an Entity from the list of Tokens at the specified offset in the file
585//
586IfcEntityInstanceData IfcParse::impl::in_memory_file_storage::read(unsigned int i) {
587 Token datatype = tokens->Next();
588 if (!TokenFunc::isKeyword(datatype)) {
589 throw IfcException("Unexpected token while parsing entity");
590 }
591 const IfcParse::declaration* ty = file->schema()->declaration_by_name(TokenFunc::asStringRef(datatype));
592 parse_context pc;
593 tokens->Next();
594 load(i, ty->as_entity(), pc, -1);
595 return IfcEntityInstanceData(pc.construct(i, *references_to_resolve, ty, boost::none, -1));
596}
597
598void IfcParse::impl::in_memory_file_storage::try_read_semicolon() const {
599 auto old_offset = tokens->stream->tell();

Callers 15

build_dependencyFunction · 0.45
tests.pyFile · 0.45
get_choco_package_infoFunction · 0.45
get_file_sha256_hashFunction · 0.45
choco_release.pyFile · 0.45
generateMethod · 0.45
get_secretsFunction · 0.45
initialize_db_workMethod · 0.45
upload_completionFunction · 0.45
__main__.pyFile · 0.45

Calls 5

loadFunction · 0.85
NextMethod · 0.45
schemaMethod · 0.45
constructMethod · 0.45