mirror of
https://github.com/NohamR/Reclass.git
synced 2026-05-10 19:59:21 +00:00
28 lines
645 B
C++
28 lines
645 B
C++
#pragma once
|
|
#include <QString>
|
|
#include <cstdint>
|
|
#include <functional>
|
|
|
|
namespace rcx {
|
|
|
|
struct AddressParseResult {
|
|
bool ok;
|
|
uint64_t value;
|
|
QString error;
|
|
int errorPos;
|
|
};
|
|
|
|
struct AddressParserCallbacks {
|
|
std::function<uint64_t(const QString& name, bool* ok)> resolveModule;
|
|
std::function<uint64_t(uint64_t addr, bool* ok)> readPointer;
|
|
};
|
|
|
|
class AddressParser {
|
|
public:
|
|
static AddressParseResult evaluate(const QString& formula, int ptrSize = 8,
|
|
const AddressParserCallbacks* cb = nullptr);
|
|
static QString validate(const QString& formula);
|
|
};
|
|
|
|
} // namespace rcx
|