2023-12-31 22:37:03 +08:00
|
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2019~2023, hikyuu.org
|
|
|
|
|
*
|
|
|
|
|
* History:
|
|
|
|
|
* 1. 20231231 added by fasiondog
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <pybind11/pybind11.h>
|
2024-04-02 17:00:36 +08:00
|
|
|
|
#include <pybind11/stl_bind.h>
|
2023-12-31 22:37:03 +08:00
|
|
|
|
#include <hikyuu/hikyuu.h>
|
|
|
|
|
|
|
|
|
|
using namespace hku;
|
|
|
|
|
|
|
|
|
|
// pybind stl 绑定必须在其他 type_caster 之前
|
|
|
|
|
|
2024-03-17 18:57:14 +08:00
|
|
|
|
// 让自定义的 vector 在 python 中表现的像 list 一样
|
|
|
|
|
// 简单类型的 vector 不再导出,只导出复杂的 structList,避免影响性能
|
2023-12-31 22:37:03 +08:00
|
|
|
|
// PYBIND11_MAKE_OPAQUE(StringList);
|
|
|
|
|
// PYBIND11_MAKE_OPAQUE(PriceList);
|
|
|
|
|
PYBIND11_MAKE_OPAQUE(DatetimeList);
|
|
|
|
|
PYBIND11_MAKE_OPAQUE(KRecordList);
|
2024-04-02 17:00:36 +08:00
|
|
|
|
// PYBIND11_MAKE_OPAQUE(StockList); // StockList 数据量不大,让 pybind 自动从 list 互转比较方便
|
2023-12-31 22:37:03 +08:00
|
|
|
|
PYBIND11_MAKE_OPAQUE(StockWeightList);
|
2024-03-17 18:57:14 +08:00
|
|
|
|
// PYBIND11_MAKE_OPAQUE(IndicatorList); // 无法编译
|
2023-12-31 22:37:03 +08:00
|
|
|
|
PYBIND11_MAKE_OPAQUE(TimeLineList);
|
|
|
|
|
PYBIND11_MAKE_OPAQUE(TransList);
|
2024-04-02 17:00:36 +08:00
|
|
|
|
// PYBIND11_MAKE_OPAQUE(BorrowRecordList);
|
|
|
|
|
// PYBIND11_MAKE_OPAQUE(LoanRecordList);
|
2024-04-05 16:39:21 +08:00
|
|
|
|
PYBIND11_MAKE_OPAQUE(PositionRecordList);
|
2024-04-02 17:00:36 +08:00
|
|
|
|
// PYBIND11_MAKE_OPAQUE(FundsList);
|
2024-04-05 16:39:21 +08:00
|
|
|
|
PYBIND11_MAKE_OPAQUE(TradeRecordList);
|
2023-12-31 22:37:03 +08:00
|
|
|
|
PYBIND11_MAKE_OPAQUE(SystemWeightList);
|
2024-04-02 17:00:36 +08:00
|
|
|
|
// PYBIND11_MAKE_OPAQUE(SystemList);
|
2024-03-17 23:30:24 +08:00
|
|
|
|
PYBIND11_MAKE_OPAQUE(ScoreRecordList);
|