feat(python-eos): work on python eos module

This commit is contained in:
2025-05-13 14:18:38 -04:00
parent bc36dd459d
commit b5980ea57a
9 changed files with 81 additions and 21 deletions

View File

@@ -1,12 +1,12 @@
# Define the library
eos_sources = files(
'private/helm.cpp',
'private/eosIO.cpp'
'private/EOSio.cpp'
)
eos_headers = files(
'public/helm.h',
'public/eosIO.h'
'public/EOSio.h'
)
dependencies = [

View File

@@ -43,8 +43,11 @@
using namespace std;
double** heap_allocate_contiguous_2D_memory(int rows, int cols) {
double **array = new double*[rows];
double** heap_allocate_contiguous_2D_memory(const int rows, const int cols) {
if (rows <= 0 || cols <= 0) {
throw std::invalid_argument("Rows and columns must be positive integers.");
}
auto array = new double*[rows];
array[0] = new double[rows * cols];
for (int i = 1; i < rows; i++) {

View File

@@ -46,7 +46,7 @@ public:
* @brief Constructs an EosIO object with the given filename.
* @param filename The filename of the EOS table.
*/
EOSio(std::string filename);
explicit EOSio(std::string filename);
/**
* @brief Default destructor.
@@ -64,4 +64,6 @@ public:
* @return A reference to the EOS table.
*/
EOSTable& getTable();
std::string getFilename() const { return m_filename; }
};