feat(eosIO): added EosIO class to handle arbitrary eos data

EosIO class wraps all eos tables (like helm) so that they can be used in a more standard fashion
This commit is contained in:
2025-03-20 14:25:22 -04:00
parent efa4bdadff
commit 171fbf7961
4 changed files with 232 additions and 46 deletions

34
src/eos/public/eosIO.h Normal file
View File

@@ -0,0 +1,34 @@
#ifndef EOSIO_H
#define EOSIO_H
#include <string>
#include <variant>
#include <memory>
// EOS table format includes
#include "helm.h"
using EOSTable = std::variant<
std::unique_ptr<helmholtz::HELMTable>
>;
class EosIO {
private:
std::string m_filename;
bool m_loaded = false;
std::string m_format;
EOSTable m_table;
void load();
// Loaders for each format, right now just HELM
void loadHelm();
public:
EosIO(const std::string filename);
~EosIO() = default;
std::string getFormat() const;
EOSTable& getTable();
};
#endif // EOSIO_H