- Include the eclipse_io.cpp file in existing extension library - do not create a new library. - Remove Python class EclFile - just expose the C++ through Pybind1, include some monkey-patching of the class to ensure proper Python strings for CHAR keywords. - Remove string based keyword lookup. - Use standard Python methods __len__, __getitem__ and __contains__; get() is an equivalent alternative to __getitem__(). - Add property arrays in addition to getListOfArrays()
28 lines
680 B
C++
28 lines
680 B
C++
#include <pybind11/pybind11.h>
|
|
#include "export.hpp"
|
|
|
|
|
|
void python::common::export_all(py::module& module) {
|
|
export_ParseContext(module);
|
|
export_Parser(module);
|
|
export_Deck(module);
|
|
export_DeckKeyword(module);
|
|
export_Schedule(module);
|
|
export_Well(module);
|
|
export_Group(module);
|
|
export_Connection(module);
|
|
export_EclipseConfig(module);
|
|
export_Eclipse3DProperties(module);
|
|
export_EclipseState(module);
|
|
export_TableManager(module);
|
|
export_EclipseGrid(module);
|
|
export_UnitSystem(module);
|
|
export_Log(module);
|
|
export_IO(module);
|
|
}
|
|
|
|
|
|
PYBIND11_MODULE(libopmcommon_python, module) {
|
|
python::common::export_all(module);
|
|
}
|