| 53 | } |
| 54 | |
| 55 | std::string_view IfcTokenStream::ReadString() |
| 56 | { |
| 57 | if (!_cChunk->IsLoaded()) { |
| 58 | checkMemory(); |
| 59 | _activeChunks++; |
| 60 | } |
| 61 | auto length = _cChunk->Read<uint16_t>(_readPtr); |
| 62 | Forward(2); |
| 63 | if (length > 0) |
| 64 | { |
| 65 | auto str = _cChunk->ReadString(_readPtr,length); |
| 66 | Forward(length); |
| 67 | return str; |
| 68 | } |
| 69 | return ""; |
| 70 | } |
| 71 | |
| 72 | void IfcTokenStream::Forward(const size_t size) |
| 73 | { |