#pragma once #include #include #include #include namespace dbgui::data { struct TypeInfo { enum class Type { custom, u8, u16, u32, u64, i8, i16, i32, i64, f32, f64, // ptr, // arr, // complex, }; Type type; // std::variant add; bool operator==(const TypeInfo &rhs) const { return this->type == rhs.type; } }; struct DataSource { enum class Type : uint8_t { reg, // TODO: special IP/SP source? so that scope selection can apply to that? // variable, // const, }; struct Reg { // TODO: identify through names? uint16_t set; uint16_t idx; }; Type type; std::variant data; }; struct Disassemble { // Node that provides the address to disassemble // type must be integer size_t src_id; }; struct DataNode { enum class Type : uint8_t { data_source, disassemble, }; size_t id; Type type; std::variant data; }; // TODO: this should allow only updating part of arrays // and moving in it struct DataResult { // TODO: needs indicator that data was failed to be retrieved size_t id; bool success; TypeInfo type; std::vector data; }; } // namespace dbgui::data