| 53 | } |
| 54 | |
| 55 | IFC_SCHEMA IfcLoader::GetSchema() const |
| 56 | { |
| 57 | auto line = GetHeaderLinesWithType(schema::FILE_SCHEMA)[0]; |
| 58 | MoveToHeaderLineArgument(line, 0); |
| 59 | auto schemas = _schemaManager.GetAvailableSchemas(); |
| 60 | |
| 61 | while (!_tokenStream->IsAtEnd()) { |
| 62 | IfcTokenType t = static_cast<IfcTokenType>(_tokenStream->Read<char>()); |
| 63 | if (t == IfcTokenType::LINE_END) break; |
| 64 | if (t == IfcTokenType::LABEL) |
| 65 | { |
| 66 | std::string_view schemaName = _tokenStream->ReadString(); |
| 67 | for (size_t i = 0; i < schemas.size();i++) |
| 68 | { |
| 69 | if (_schemaManager.GetSchemaName(schemas[i]) == schemaName) return schemas[i]; |
| 70 | } |
| 71 | } |
| 72 | } |
| 73 | return IFC2X3; |
| 74 | } |
| 75 | |
| 76 | void IfcLoader::LoadFile(std::istream &requestData) |
| 77 | { |
nothing calls this directly
no test coverage detected