GridFire 0.0.1a General Purpose Nuclear Network

Loading...
Searching...
No Matches
bindings.cpp
Go to the documentation of this file.
1#include <pybind11/pybind11.h>
2#include <pybind11/stl.h> // Needed for vectors, maps, sets, strings
3#include <pybind11/stl_bind.h> // Needed for binding std::vector, std::map etc if needed directly
4
5#include <string_view>
6#include <vector>
7
8#include "bindings.h"
9
10#include "gridfire/io/io.h"
11#include "trampoline/py_io.h"
12
13 namespace py = pybind11;
14
15 void register_io_bindings(py::module &m) {
16 py::class_<gridfire::io::ParsedNetworkData>(m, "ParsedNetworkData");
17
18 py::class_<gridfire::io::NetworkFileParser, PyNetworkFileParser>(m, "NetworkFileParser");
19
20 py::class_<gridfire::io::SimpleReactionListFileParser, gridfire::io::NetworkFileParser>(m, "SimpleReactionListFileParser")
21 .def("parse", &gridfire::io::SimpleReactionListFileParser::parse,
22 py::arg("filename"),
23 "Parse a simple reaction list file and return a ParsedNetworkData object.");
24
25 // py::class_<gridfire::io::MESANetworkFileParser, gridfire::io::NetworkFileParser>(m, "MESANetworkFileParser")
26 // .def("parse", &gridfire::io::MESANetworkFileParser::parse,
27 // py::arg("filename"),
28 // "Parse a MESA network file and return a ParsedNetworkData object.");
29}
gridfire::io::SimpleReactionListFileParser::parse
ParsedNetworkData parse(const std::string &filename) const override
Parses a simple reaction list file.
Definition network_file.cpp:44
register_io_bindings
void register_io_bindings(py::module &m)
Definition bindings.cpp:15
bindings.h
io.h
py_io.h