25 #include <pybind11/pybind11.h> 37 py::class_<Stream, std::shared_ptr<Stream>> clsStream(mod,
"Stream");
39 clsStream.def(py::init<std::istream *, std::ostream *>(),
"istream"_a,
"ostream"_a);
40 clsStream.def(py::init<>());
42 clsStream.def_property_readonly(
"isFits", &Stream::getIsFits);
43 clsStream.def_property_readonly(
"hasStdStream", &Stream::hasStdStream);
49 py::class_<FileStream, std::shared_ptr<FileStream>, Stream> clsFileStream(mod,
"FileStream");
51 clsFileStream.def(py::init<std::string const &, bool>(),
"path"_a,
"doWrite"_a =
false);
53 clsFileStream.def_property_readonly(
"path", &FileStream::getPath);
56 py::class_<StringStream, std::shared_ptr<StringStream>, Stream> clsStringStream(mod,
"StringStream");
58 clsStringStream.def(py::init<std::string const &>(),
"data"_a =
"");
60 clsStringStream.def(
"getSourceData", &StringStream::getSourceData);
61 clsStringStream.def(
"getSinkData", &StringStream::getSinkData);
62 clsStringStream.def(
"sinkToSource", &StringStream::sinkToSource);
void sink(const char *cstr)
Sink function that allows astChannel to sink to a Stream.
AST wrapper classes and functions.
PYBIND11_MODULE(camera, mod)
const char * source()
Source function that allows astChannel to source from a Stream.