feat(python-eos): work on python eos module
This commit is contained in:
@@ -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 = [
|
||||
|
||||
@@ -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++) {
|
||||
|
||||
@@ -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; }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user