34 lines
616 B
C
34 lines
616 B
C
|
|
#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
|