mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 19:22:30 +00:00
chore: initial commit
This commit is contained in:
commit
70b00c5c38
965 changed files with 264882 additions and 0 deletions
31
src/util/SFile.hpp
Normal file
31
src/util/SFile.hpp
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#ifndef UTIL_S_FILE_HPP
|
||||
#define UTIL_S_FILE_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
class SArchive;
|
||||
struct SOVERLAPPED;
|
||||
struct TASYNCPARAMBLOCK;
|
||||
|
||||
class SFile {
|
||||
public:
|
||||
// Static functions
|
||||
static int32_t Close(SFile*);
|
||||
static size_t GetFileSize(SFile*, size_t*);
|
||||
static int32_t IsStreamingMode(void);
|
||||
static int32_t Load(SArchive*, const char*, void**, size_t*, size_t, uint32_t, SOVERLAPPED*);
|
||||
static int32_t Open(const char*, SFile**);
|
||||
static int32_t OpenEx(SArchive*, const char*, uint32_t, SFile**);
|
||||
static int32_t Read(SFile*, void*, size_t, size_t*, SOVERLAPPED*, TASYNCPARAMBLOCK*);
|
||||
static int32_t Unload(void*);
|
||||
|
||||
// Member variables
|
||||
const char* m_filename;
|
||||
std::ifstream* m_stream; // TODO Proper implementation
|
||||
std::streamsize m_size; // TODO Proper implementation
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue