1
0
mirror of synced 2024-11-15 03:27:40 +01:00
ImHex/include/helpers/loader_script_handler.hpp
WerWolv e74c0f5cf5 sys: Tons of long overdue cleanup
- std::string -> const std::string& where needed
- Added a FileIO abstraction class
- Fixed recent files not updating
- Removed localization file from global include
- Renamed lang to pattern_language/pl
- Renamed EventFileDropped to RequestFileOpen
2021-09-08 15:18:24 +02:00

33 lines
986 B
C++

#pragma once
#include <string>
#include <string_view>
struct _object;
typedef struct _object PyObject;
namespace hex {
namespace prv { class Provider; }
class LoaderScript {
public:
LoaderScript() = delete;
static bool processFile(const std::string &scriptPath);
static void setFilePath(const std::string &filePath) { LoaderScript::s_filePath = filePath; }
static void setDataProvider(prv::Provider* provider) { LoaderScript::s_dataProvider = provider; }
private:
static inline std::string s_filePath;
static inline prv::Provider* s_dataProvider;
static PyObject* Py_getFilePath(PyObject *self, PyObject *args);
static PyObject* Py_addPatch(PyObject *self, PyObject *args);
static PyObject* Py_addBookmark(PyObject *self, PyObject *args);
static PyObject* Py_addStruct(PyObject *self, PyObject *args);
static PyObject* Py_addUnion(PyObject *self, PyObject *args);
};
}