/* * StockWeight.cpp * * Created on: 2012-9-28 * Author: fasiondog */ /* * _MarketInfo.cpp * * Created on: 2012-9-27 * Author: fasiondog */ #include #include #include "pickle_support.h" using namespace boost::python; using namespace hku; void export_StockWeight() { class_("StockWeight", init<>()) .def(init()) .def(init()) .def(self_ns::str(self)) .add_property("datetime", &StockWeight::datetime) .add_property("countAsGift", &StockWeight::countAsGift) .add_property("countForSell", &StockWeight::countForSell) .add_property("priceForSell", &StockWeight::priceForSell) .add_property("bonus", &StockWeight::bonus) .add_property("increasement", &StockWeight::increasement) .add_property("totalCount", &StockWeight::totalCount) .add_property("freeCount", &StockWeight::freeCount) #if HKU_PYTHON_SUPPORT_PICKLE .def_pickle(normal_pickle_suite()) #endif ; StockWeightList::const_reference (StockWeightList::*weightList_at)(StockWeightList::size_type) const = &StockWeightList::at; class_("StockWeightList") .def("__iter__", iterator()) .def("size", &StockWeightList::size) .def("__len__", &StockWeightList::size) .def("__getitem__", weightList_at, return_value_policy()) #if HKU_PYTHON_SUPPORT_PICKLE .def_pickle(normal_pickle_suite()) #endif ; }