/* * _KRecord.cpp * * Created on: 2019-1-27 * Author: fasiondog */ #include #include #include #include "pybind_utils.h" #include "pickle_support.h" using namespace boost::python; using namespace hku; #if defined(_MSC_VER) #pragma warning(disable : 4267) #endif void export_TimeLineReord() { class_("TimeLineRecord", "分时线记录,属性可读写", init<>()) .def(init()) .def(self_ns::str(self)) .def_readwrite("date", &TimeLineRecord::datetime, "日期时间") .def_readwrite("price", &TimeLineRecord::price, "价格") .def_readwrite("vol", &TimeLineRecord::vol, "成交量") .def(self == self) #if HKU_PYTHON_SUPPORT_PICKLE .def_pickle(normal_pickle_suite()) #endif ; class_("TimeLineList") .def(vector_indexing_suite()) #if HKU_PYTHON_SUPPORT_PICKLE .def_pickle(normal_pickle_suite()) #endif ; }