MCPcopy Create free account
hub / github.com/AbyssEngine/AbyssEngineOld / CASCStream

Class CASCStream

src/Abyss/FileSystem/CASC.cpp:15–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13namespace Abyss::FileSystem {
14
15class CASCStream final : public SizeableStreambuf {
16 public:
17 CASCStream(void *casc, const std::string& fileName);
18
19 ~CASCStream() override;
20
21 protected:
22 int underflow() override;
23 pos_type seekpos(pos_type pos, std::ios_base::openmode which) override;
24 pos_type seekoff(off_type off, std::ios_base::seekdir dir, std::ios_base::openmode which) override;
25 [[nodiscard]] std::streamsize size() const override;
26
27 private:
28 void *_file = nullptr;
29 std::streamsize _startOfBlock = 0;
30 char _buffer[2048] = {};
31};
32
33CASCStream::CASCStream(HANDLE storage, const std::string& fileName) {
34 if (!CascOpenFile(storage, fileName.c_str(), 0, CASC_OPEN_BY_NAME, &_file)) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected