libeditwl
Lightweight C++ library for Nintendo DS(i) formats
Loading...
Searching...
No Matches
fs_FileFormat.hpp
1
2#pragma once
3#include <twl/fs/fs_File.hpp>
4
5namespace twl::fs {
6
7 class FileFormat {
8 public:
9 virtual Result ReadValidateFrom(File &rf) = 0;
10 virtual Result ReadAllFrom(File &rf) = 0;
11 virtual Result WriteTo(File &wf) = 0;
12
13 inline Result ReadFrom(File &rf) {
14 TWL_R_TRY(this->ReadValidateFrom(rf));
15 TWL_R_TRY(this->ReadAllFrom(rf));
16 TWL_R_SUCCEED();
17 }
18 };
19
20}
Definition fs_FileFormat.hpp:7
Definition fs_File.hpp:232
Definition twl_Include.hpp:62