/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/ThirdParty/RmlUi/Source/Core/StreamFile.h
50 строк
1 KB
C-Core
Updated RmlUi to 6.2 and added some improvements (#1813)
10 фев 2026, 01:19
Не верифицирован
10 фев 2026, 01:19
58e2d41
Код
Авторство
О чём код?
#pragma once #include "../../Include/RmlUi/Core/Stream.h" #include "../../Include/RmlUi/Core/Types.h" namespace Rml { class StreamFile final : public Stream { public: StreamFile(); virtual ~StreamFile(); /// Attempts to open the stream pointing at a given location. bool Open(const String& path); /// Closes the stream. void Close() override; /// Returns the size of this stream (in bytes). size_t Length() const override; /// Returns the position of the stream pointer (in bytes). size_t Tell() const override; /// Sets the stream position (in bytes). bool Seek(long offset, int origin) const override; /// Read from the stream. size_t Read(void* buffer, size_t bytes) const override; using Stream::Read; /// Write to the stream at the current position. size_t Write(const void* buffer, size_t bytes) override; using Stream::Write; /// Truncate the stream to the specified length. size_t Truncate(size_t bytes) override; /// Returns true if the stream is ready for reading, false otherwise. bool IsReadReady() override; /// Returns false. bool IsWriteReady() override; private: // Determines the length of the stream. void GetLength(); FileHandle file_handle; size_t length; }; } // namespace Rml