/* * _KRecord.cpp * * Created on: 2019-1-27 * Author: fasiondog */ #include #include "pybind_utils.h" using namespace hku; namespace py = pybind11; #if defined(_MSC_VER) #pragma warning(disable : 4267) #endif void export_TimeLineReord(py::module& m) { py::class_(m, "TimeLineRecord", "分时线记录,属性可读写") .def(py::init<>()) .def(py::init()) .def("__str__", to_py_str) .def("__repr__", to_py_str) .def_readwrite("date", &TimeLineRecord::datetime, "日期时间") .def_readwrite("price", &TimeLineRecord::price, "价格") .def_readwrite("vol", &TimeLineRecord::vol, "成交量") .def(py::self == py::self) DEF_PICKLE(TimeLineRecord); }