2025-03-20 14:25:22 -04:00
|
|
|
#include <string>
|
2025-05-11 14:58:00 -04:00
|
|
|
#include <utility>
|
2025-03-20 14:25:22 -04:00
|
|
|
|
2025-05-11 14:58:00 -04:00
|
|
|
#include "EOSio.h"
|
2025-03-20 14:25:22 -04:00
|
|
|
#include "helm.h"
|
|
|
|
|
#include "debug.h"
|
|
|
|
|
|
2025-05-11 14:58:00 -04:00
|
|
|
EOSio::EOSio(std::string filename) : m_filename(std::move(filename)) {
|
2025-03-20 14:25:22 -04:00
|
|
|
load();
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-11 14:58:00 -04:00
|
|
|
std::string EOSio::getFormat() const {
|
2025-03-20 14:25:22 -04:00
|
|
|
return m_format;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2025-05-11 14:58:00 -04:00
|
|
|
EOSTable& EOSio::getTable() {
|
2025-03-20 14:25:22 -04:00
|
|
|
return m_table;
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-11 14:58:00 -04:00
|
|
|
void EOSio::load() {
|
2025-03-20 14:25:22 -04:00
|
|
|
// Load the EOS table from the file
|
|
|
|
|
// For now, just set the format to HELM
|
|
|
|
|
|
|
|
|
|
m_format = "helm";
|
|
|
|
|
if (m_format == "helm") {
|
|
|
|
|
loadHelm();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-11 14:58:00 -04:00
|
|
|
void EOSio::loadHelm() {
|
2025-03-20 14:25:22 -04:00
|
|
|
// Load the HELM table from the file
|
2025-05-11 14:58:00 -04:00
|
|
|
auto helmTabPtr = helmholtz::read_helm_table(m_filename);
|
|
|
|
|
m_table = std::move(helmTabPtr);
|
2025-03-20 14:25:22 -04:00
|
|
|
m_loaded = true;
|
|
|
|
|
}
|
|
|
|
|
|