2019-05-28 00:40:09 +01:00
|
|
|
#ifndef VOXEL_STREAM_FILE_H
|
|
|
|
#define VOXEL_STREAM_FILE_H
|
|
|
|
|
2019-08-17 18:15:16 +01:00
|
|
|
#include "voxel_block_serializer.h"
|
2019-05-28 00:40:09 +01:00
|
|
|
#include "voxel_stream.h"
|
|
|
|
|
2019-08-14 20:34:06 +01:00
|
|
|
class FileAccess;
|
|
|
|
|
2021-01-17 17:18:05 +00:00
|
|
|
// TODO Might be removed in the future, it doesn't add much.
|
|
|
|
|
|
|
|
// Helper common base for some file streams.
|
2019-05-28 00:40:09 +01:00
|
|
|
class VoxelStreamFile : public VoxelStream {
|
|
|
|
GDCLASS(VoxelStreamFile, VoxelStream)
|
|
|
|
protected:
|
|
|
|
static void _bind_methods();
|
|
|
|
|
2019-08-18 16:10:40 +01:00
|
|
|
FileAccess *open_file(const String &fpath, int mode_flags, Error *err);
|
2021-01-16 13:34:45 +00:00
|
|
|
|
2021-01-17 17:18:05 +00:00
|
|
|
static thread_local VoxelBlockSerializerInternal _block_serializer;
|
2019-05-28 00:40:09 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // VOXEL_STREAM_FILE_H
|