Flatten src into model, edit and ui, with .h headers
Resources and utilities sit directly in src. The ImGui windows, wizards, popups and helpers are in ui. Headers that would shadow system ones are renamed: math_util, timestamp, subprocess, localization. Includes are written from src.
This commit is contained in:
1 parent
a515267e26
commit
7fb2c607c2
175 files changed
+537
-537
No files matched your search
+30
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
namespace anm2ed::util
|
||||
{
|
||||
class File
|
||||
{
|
||||
public:
|
||||
File() = default;
|
||||
File(const std::filesystem::path&, const char* mode);
|
||||
~File();
|
||||
|
||||
bool open(const std::filesystem::path&, const char* mode);
|
||||
int close();
|
||||
FILE* get() const;
|
||||
explicit operator bool() const;
|
||||
|
||||
private:
|
||||
FILE* handle{};
|
||||
};
|
||||
|
||||
namespace file
|
||||
{
|
||||
bool read_to_string(const std::filesystem::path&, std::string*, const char* mode = "rb");
|
||||
bool write_string(const std::filesystem::path&, std::string_view, const char* mode = "wb");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user