mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
feat: Added ability to query provider information from pattern language
This commit is contained in:
@@ -34,7 +34,7 @@ namespace hex::plugin::builtin {
|
||||
void close() override;
|
||||
|
||||
[[nodiscard]] std::string getName() const override;
|
||||
[[nodiscard]] std::vector<std::pair<std::string, std::string>> getDataInformation() const override;
|
||||
[[nodiscard]] std::vector<std::pair<std::string, std::string>> getDataDescription() const override;
|
||||
|
||||
[[nodiscard]] bool hasLoadInterface() const override { return true; }
|
||||
void drawLoadInterface() override;
|
||||
@@ -47,6 +47,7 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
|
||||
[[nodiscard]] std::pair<Region, bool> getRegionValidity(u64 address) const override;
|
||||
std::variant<std::string, i128> queryInformation(const std::string &category, const std::string &argument) override;
|
||||
|
||||
protected:
|
||||
void reloadDrives();
|
||||
|
||||
@@ -47,7 +47,8 @@ namespace hex::plugin::builtin {
|
||||
void saveAs(const std::fs::path &path) override;
|
||||
|
||||
[[nodiscard]] std::string getName() const override;
|
||||
[[nodiscard]] std::vector<std::pair<std::string, std::string>> getDataInformation() const override;
|
||||
[[nodiscard]] std::vector<std::pair<std::string, std::string>> getDataDescription() const override;
|
||||
std::variant<std::string, i128> queryInformation(const std::string &category, const std::string &argument) override;
|
||||
|
||||
[[nodiscard]] bool hasFilePicker() const override { return true; }
|
||||
[[nodiscard]] bool handleFilePicker() override;
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace hex::plugin::builtin {
|
||||
void saveAs(const std::fs::path &path) override;
|
||||
|
||||
[[nodiscard]] std::string getName() const override;
|
||||
[[nodiscard]] std::vector<std::pair<std::string, std::string>> getDataInformation() const override;
|
||||
[[nodiscard]] std::vector<std::pair<std::string, std::string>> getDataDescription() const override;
|
||||
|
||||
[[nodiscard]] bool open() override;
|
||||
void close() override;
|
||||
@@ -50,6 +50,7 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
|
||||
[[nodiscard]] std::pair<Region, bool> getRegionValidity(u64 address) const override;
|
||||
std::variant<std::string, i128> queryInformation(const std::string &category, const std::string &argument) override;
|
||||
|
||||
protected:
|
||||
hex::Socket m_socket;
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace hex::plugin::builtin {
|
||||
void close() override;
|
||||
|
||||
[[nodiscard]] std::string getName() const override;
|
||||
[[nodiscard]] std::vector<std::pair<std::string, std::string>> getDataInformation() const override { return { }; }
|
||||
[[nodiscard]] std::vector<std::pair<std::string, std::string>> getDataDescription() const override { return { }; }
|
||||
|
||||
void loadSettings(const nlohmann::json &settings) override;
|
||||
[[nodiscard]] nlohmann::json storeSettings(nlohmann::json settings) const override;
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace hex::plugin::builtin {
|
||||
void saveAs(const std::fs::path &path) override;
|
||||
|
||||
[[nodiscard]] std::string getName() const override { return LangEntry("hex.builtin.provider.mem_file.unsaved"); }
|
||||
[[nodiscard]] std::vector<std::pair<std::string, std::string>> getDataInformation() const override { return { }; }
|
||||
[[nodiscard]] std::vector<std::pair<std::string, std::string>> getDataDescription() const override { return { }; }
|
||||
|
||||
[[nodiscard]] std::string getTypeName() const override {
|
||||
return "hex.builtin.provider.mem_file";
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace hex::plugin::builtin {
|
||||
[[nodiscard]] size_t getActualSize() const override { return 0x00; }
|
||||
|
||||
[[nodiscard]] std::string getName() const override { return "None"; }
|
||||
[[nodiscard]] std::vector<std::pair<std::string, std::string>> getDataInformation() const override { return { }; }
|
||||
[[nodiscard]] std::vector<std::pair<std::string, std::string>> getDataDescription() const override { return { }; }
|
||||
|
||||
void loadSettings(const nlohmann::json &settings) override { hex::unused(settings); }
|
||||
[[nodiscard]] nlohmann::json storeSettings(nlohmann::json settings) const override { return settings; }
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace hex::plugin::builtin {
|
||||
[[nodiscard]] size_t getActualSize() const override { return this->m_size; }
|
||||
|
||||
[[nodiscard]] std::string getName() const override { return hex::format("{} View", this->m_provider->getName()); }
|
||||
[[nodiscard]] std::vector<std::pair<std::string, std::string>> getDataInformation() const override { return this->m_provider->getDataInformation(); }
|
||||
[[nodiscard]] std::vector<std::pair<std::string, std::string>> getDataDescription() const override { return this->m_provider->getDataDescription(); }
|
||||
|
||||
void loadSettings(const nlohmann::json &settings) override { hex::unused(settings); }
|
||||
[[nodiscard]] nlohmann::json storeSettings(nlohmann::json settings) const override { return settings; }
|
||||
|
||||
Reference in New Issue
Block a user