-
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VOXELFORMAT: refactored interface to work with archives and not on st…
…reams this allows us to support multi file formats in a better way Fixes issue #460
- Loading branch information
Showing
123 changed files
with
2,149 additions
and
1,775 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
* @file | ||
*/ | ||
|
||
#include "io/Archive.h" | ||
#include "io/Stream.h" | ||
|
||
namespace io { | ||
|
||
/** | ||
* @ingroup IO | ||
*/ | ||
class StreamArchive : public Archive { | ||
private: | ||
io::SeekableReadStream *_readStream; | ||
io::SeekableWriteStream *_writeStream; | ||
|
||
public: | ||
StreamArchive(io::SeekableReadStream *stream) : _readStream(stream) { | ||
} | ||
StreamArchive(io::SeekableWriteStream *stream) : _writeStream(stream) { | ||
} | ||
~StreamArchive() override = default; | ||
SeekableReadStream *readStream(const core::String &filePath) override { | ||
return _readStream; | ||
} | ||
SeekableWriteStream *writeStream(const core::String &filePath) override { | ||
return _writeStream; | ||
} | ||
}; | ||
|
||
} // namespace io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.