ctpbee-opt-api 0.1.0__cp310-cp310-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ctpbee_api/__init__.py +17 -0
- ctpbee_api/ctp/__init__.py +3 -0
- ctpbee_api/ctp/ctp_constant.py +1253 -0
- ctpbee_api/ctp/generator/concat.py +93 -0
- ctpbee_api/ctp/generator/const.py +325 -0
- ctpbee_api/ctp/generator/ctp_constant.py +1274 -0
- ctpbee_api/ctp/generator/ctp_md_header_define.h +13 -0
- ctpbee_api/ctp/generator/ctp_md_header_function.h +6 -0
- ctpbee_api/ctp/generator/ctp_md_header_on.h +26 -0
- ctpbee_api/ctp/generator/ctp_md_header_process.h +26 -0
- ctpbee_api/ctp/generator/ctp_md_source_function.cpp +42 -0
- ctpbee_api/ctp/generator/ctp_md_source_module.cpp +18 -0
- ctpbee_api/ctp/generator/ctp_md_source_on.cpp +156 -0
- ctpbee_api/ctp/generator/ctp_md_source_process.cpp +282 -0
- ctpbee_api/ctp/generator/ctp_md_source_switch.cpp +78 -0
- ctpbee_api/ctp/generator/ctp_md_source_task.cpp +211 -0
- ctpbee_api/ctp/generator/ctp_struct.py +5640 -0
- ctpbee_api/ctp/generator/ctp_td_header_define.h +130 -0
- ctpbee_api/ctp/generator/ctp_td_header_function.h +174 -0
- ctpbee_api/ctp/generator/ctp_td_header_on.h +260 -0
- ctpbee_api/ctp/generator/ctp_td_header_process.h +260 -0
- ctpbee_api/ctp/generator/ctp_td_source_function.cpp +1456 -0
- ctpbee_api/ctp/generator/ctp_td_source_module.cpp +222 -0
- ctpbee_api/ctp/generator/ctp_td_source_on.cpp +1572 -0
- ctpbee_api/ctp/generator/ctp_td_source_process.cpp +5472 -0
- ctpbee_api/ctp/generator/ctp_td_source_switch.cpp +780 -0
- ctpbee_api/ctp/generator/ctp_td_source_task.cpp +2444 -0
- ctpbee_api/ctp/generator/ctp_typedef.py +800 -0
- ctpbee_api/ctp/generator/generate_api_functions.py +345 -0
- ctpbee_api/ctp/generator/generate_data_type.py +76 -0
- ctpbee_api/ctp/generator/generate_struct.py +84 -0
- ctpbee_api/ctp/include/mac/ctp/ThostFtdcMdApi.h +168 -0
- ctpbee_api/ctp/include/mac/ctp/ThostFtdcTraderApi.h +770 -0
- ctpbee_api/ctp/include/mac/ctp/ThostFtdcUserApiDataType.h +6878 -0
- ctpbee_api/ctp/include/mac/ctp/ThostFtdcUserApiStruct.h +10915 -0
- ctpbee_api/ctp/include/mac/pybind11/attr.h +690 -0
- ctpbee_api/ctp/include/mac/pybind11/buffer_info.h +208 -0
- ctpbee_api/ctp/include/mac/pybind11/cast.h +1704 -0
- ctpbee_api/ctp/include/mac/pybind11/chrono.h +225 -0
- ctpbee_api/ctp/include/mac/pybind11/common.h +2 -0
- ctpbee_api/ctp/include/mac/pybind11/complex.h +74 -0
- ctpbee_api/ctp/include/mac/pybind11/detail/class.h +743 -0
- ctpbee_api/ctp/include/mac/pybind11/detail/common.h +1255 -0
- ctpbee_api/ctp/include/mac/pybind11/detail/descr.h +171 -0
- ctpbee_api/ctp/include/mac/pybind11/detail/init.h +434 -0
- ctpbee_api/ctp/include/mac/pybind11/detail/internals.h +656 -0
- ctpbee_api/ctp/include/mac/pybind11/detail/type_caster_base.h +1177 -0
- ctpbee_api/ctp/include/mac/pybind11/detail/typeid.h +65 -0
- ctpbee_api/ctp/include/mac/pybind11/eigen/common.h +9 -0
- ctpbee_api/ctp/include/mac/pybind11/eigen/matrix.h +714 -0
- ctpbee_api/ctp/include/mac/pybind11/eigen/tensor.h +516 -0
- ctpbee_api/ctp/include/mac/pybind11/eigen.h +12 -0
- ctpbee_api/ctp/include/mac/pybind11/embed.h +316 -0
- ctpbee_api/ctp/include/mac/pybind11/eval.h +156 -0
- ctpbee_api/ctp/include/mac/pybind11/functional.h +137 -0
- ctpbee_api/ctp/include/mac/pybind11/gil.h +239 -0
- ctpbee_api/ctp/include/mac/pybind11/iostream.h +265 -0
- ctpbee_api/ctp/include/mac/pybind11/numpy.h +1998 -0
- ctpbee_api/ctp/include/mac/pybind11/operators.h +202 -0
- ctpbee_api/ctp/include/mac/pybind11/options.h +92 -0
- ctpbee_api/ctp/include/mac/pybind11/pybind11.h +2890 -0
- ctpbee_api/ctp/include/mac/pybind11/pytypes.h +2557 -0
- ctpbee_api/ctp/include/mac/pybind11/stl/filesystem.h +116 -0
- ctpbee_api/ctp/include/mac/pybind11/stl.h +447 -0
- ctpbee_api/ctp/include/mac/pybind11/stl_bind.h +851 -0
- ctpbee_api/ctp/include/mac/pybind11/type_caster_pyobject_ptr.h +61 -0
- ctpbee_api/ctp/include/new/ctp/ThostFtdcMdApi.h +168 -0
- ctpbee_api/ctp/include/new/ctp/ThostFtdcTraderApi.h +770 -0
- ctpbee_api/ctp/include/new/ctp/ThostFtdcUserApiDataType.h +6878 -0
- ctpbee_api/ctp/include/new/ctp/ThostFtdcUserApiStruct.h +10915 -0
- ctpbee_api/ctp/include/new/pybind11/attr.h +690 -0
- ctpbee_api/ctp/include/new/pybind11/buffer_info.h +208 -0
- ctpbee_api/ctp/include/new/pybind11/cast.h +1704 -0
- ctpbee_api/ctp/include/new/pybind11/chrono.h +225 -0
- ctpbee_api/ctp/include/new/pybind11/common.h +2 -0
- ctpbee_api/ctp/include/new/pybind11/complex.h +74 -0
- ctpbee_api/ctp/include/new/pybind11/detail/class.h +743 -0
- ctpbee_api/ctp/include/new/pybind11/detail/common.h +1255 -0
- ctpbee_api/ctp/include/new/pybind11/detail/descr.h +171 -0
- ctpbee_api/ctp/include/new/pybind11/detail/init.h +434 -0
- ctpbee_api/ctp/include/new/pybind11/detail/internals.h +656 -0
- ctpbee_api/ctp/include/new/pybind11/detail/type_caster_base.h +1177 -0
- ctpbee_api/ctp/include/new/pybind11/detail/typeid.h +65 -0
- ctpbee_api/ctp/include/new/pybind11/eigen/common.h +9 -0
- ctpbee_api/ctp/include/new/pybind11/eigen/matrix.h +714 -0
- ctpbee_api/ctp/include/new/pybind11/eigen/tensor.h +516 -0
- ctpbee_api/ctp/include/new/pybind11/eigen.h +12 -0
- ctpbee_api/ctp/include/new/pybind11/embed.h +316 -0
- ctpbee_api/ctp/include/new/pybind11/eval.h +156 -0
- ctpbee_api/ctp/include/new/pybind11/functional.h +137 -0
- ctpbee_api/ctp/include/new/pybind11/gil.h +239 -0
- ctpbee_api/ctp/include/new/pybind11/iostream.h +265 -0
- ctpbee_api/ctp/include/new/pybind11/numpy.h +1998 -0
- ctpbee_api/ctp/include/new/pybind11/operators.h +202 -0
- ctpbee_api/ctp/include/new/pybind11/options.h +92 -0
- ctpbee_api/ctp/include/new/pybind11/pybind11.h +2890 -0
- ctpbee_api/ctp/include/new/pybind11/pytypes.h +2557 -0
- ctpbee_api/ctp/include/new/pybind11/stl/filesystem.h +116 -0
- ctpbee_api/ctp/include/new/pybind11/stl.h +447 -0
- ctpbee_api/ctp/include/new/pybind11/stl_bind.h +851 -0
- ctpbee_api/ctp/include/new/pybind11/type_caster_pyobject_ptr.h +61 -0
- ctpbee_api/ctp/include/previous/ctp/ThostFtdcMdApi.h +168 -0
- ctpbee_api/ctp/include/previous/ctp/ThostFtdcTraderApi.h +770 -0
- ctpbee_api/ctp/include/previous/ctp/ThostFtdcUserApiDataType.h +6878 -0
- ctpbee_api/ctp/include/previous/ctp/ThostFtdcUserApiStruct.h +10915 -0
- ctpbee_api/ctp/include/previous/pybind11/attr.h +489 -0
- ctpbee_api/ctp/include/previous/pybind11/buffer_info.h +108 -0
- ctpbee_api/ctp/include/previous/pybind11/cast.h +2067 -0
- ctpbee_api/ctp/include/previous/pybind11/chrono.h +162 -0
- ctpbee_api/ctp/include/previous/pybind11/common.h +2 -0
- ctpbee_api/ctp/include/previous/pybind11/complex.h +61 -0
- ctpbee_api/ctp/include/previous/pybind11/detail/class.h +626 -0
- ctpbee_api/ctp/include/previous/pybind11/detail/common.h +803 -0
- ctpbee_api/ctp/include/previous/pybind11/detail/descr.h +185 -0
- ctpbee_api/ctp/include/previous/pybind11/detail/init.h +335 -0
- ctpbee_api/ctp/include/previous/pybind11/detail/internals.h +285 -0
- ctpbee_api/ctp/include/previous/pybind11/detail/typeid.h +53 -0
- ctpbee_api/ctp/include/previous/pybind11/eigen.h +604 -0
- ctpbee_api/ctp/include/previous/pybind11/embed.h +194 -0
- ctpbee_api/ctp/include/previous/pybind11/eval.h +117 -0
- ctpbee_api/ctp/include/previous/pybind11/functional.h +85 -0
- ctpbee_api/ctp/include/previous/pybind11/iostream.h +200 -0
- ctpbee_api/ctp/include/previous/pybind11/numpy.h +1601 -0
- ctpbee_api/ctp/include/previous/pybind11/operators.h +168 -0
- ctpbee_api/ctp/include/previous/pybind11/options.h +65 -0
- ctpbee_api/ctp/include/previous/pybind11/pybind11.h +1965 -0
- ctpbee_api/ctp/include/previous/pybind11/pytypes.h +1332 -0
- ctpbee_api/ctp/include/previous/pybind11/stl.h +376 -0
- ctpbee_api/ctp/include/previous/pybind11/stl_bind.h +599 -0
- ctpbee_api/ctp/libs/libcomunicationkey.a +0 -0
- ctpbee_api/ctp/libs/libcrypto.a +0 -0
- ctpbee_api/ctp/libs/libssl.a +0 -0
- ctpbee_api/ctp/libs/thostmduserapi_se.lib +0 -0
- ctpbee_api/ctp/libs/thosttraderapi_se.lib +0 -0
- ctpbee_api/ctp/libthostmduserapi_se.so +0 -0
- ctpbee_api/ctp/libthosttraderapi_se.so +0 -0
- ctpbee_api/ctp/thostmduserapi_se.dll +0 -0
- ctpbee_api/ctp/thosttraderapi_se.dll +0 -0
- ctpbee_api/ctp/vnctp/vnctp.h +189 -0
- ctpbee_api/ctp/vnctp/vnctp.sln +41 -0
- ctpbee_api/ctp/vnctp/vnctpmd/dllmain.cpp +19 -0
- ctpbee_api/ctp/vnctp/vnctpmd/stdafx.cpp +1 -0
- ctpbee_api/ctp/vnctp/vnctpmd/stdafx.h +17 -0
- ctpbee_api/ctp/vnctp/vnctpmd/targetver.h +8 -0
- ctpbee_api/ctp/vnctp/vnctpmd/vnctpmd.cpp +953 -0
- ctpbee_api/ctp/vnctp/vnctpmd/vnctpmd.h +209 -0
- ctpbee_api/ctp/vnctp/vnctpmd/vnctpmd.vcxproj +200 -0
- ctpbee_api/ctp/vnctp/vnctpmd/vnctpmd.vcxproj.filters +54 -0
- ctpbee_api/ctp/vnctp/vnctpmd/vnctpmd.vcxproj.user +4 -0
- ctpbee_api/ctp/vnctp/vnctptd/dllmain.cpp +19 -0
- ctpbee_api/ctp/vnctp/vnctptd/stdafx.cpp +1 -0
- ctpbee_api/ctp/vnctp/vnctptd/stdafx.h +16 -0
- ctpbee_api/ctp/vnctp/vnctptd/targetver.h +8 -0
- ctpbee_api/ctp/vnctp/vnctptd/vnctptd.cpp +12148 -0
- ctpbee_api/ctp/vnctp/vnctptd/vnctptd.h +1329 -0
- ctpbee_api/ctp/vnctp/vnctptd/vnctptd.vcxproj +198 -0
- ctpbee_api/ctp/vnctp/vnctptd/vnctptd.vcxproj.filters +54 -0
- ctpbee_api/ctp/vnctp/vnctptd/vnctptd.vcxproj.user +4 -0
- ctpbee_api/ctp/vnctpmd.cp310-win_amd64.pyd +0 -0
- ctpbee_api/ctp/vnctptd.cp310-win_amd64.pyd +0 -0
- ctpbee_api/ctp_mini/__init__.py +3 -0
- ctpbee_api/ctp_mini/generator/generate_api_functions.py +343 -0
- ctpbee_api/ctp_mini/generator/generate_data_type.py +76 -0
- ctpbee_api/ctp_mini/generator/generate_struct.py +85 -0
- ctpbee_api/ctp_mini/generator/mini_constant.py +1186 -0
- ctpbee_api/ctp_mini/generator/mini_md_header_define.h +13 -0
- ctpbee_api/ctp_mini/generator/mini_md_header_function.h +4 -0
- ctpbee_api/ctp_mini/generator/mini_md_header_on.h +26 -0
- ctpbee_api/ctp_mini/generator/mini_md_header_process.h +26 -0
- ctpbee_api/ctp_mini/generator/mini_md_source_function.cpp +29 -0
- ctpbee_api/ctp_mini/generator/mini_md_source_module.cpp +17 -0
- ctpbee_api/ctp_mini/generator/mini_md_source_on.cpp +156 -0
- ctpbee_api/ctp_mini/generator/mini_md_source_process.cpp +264 -0
- ctpbee_api/ctp_mini/generator/mini_md_source_switch.cpp +78 -0
- ctpbee_api/ctp_mini/generator/mini_md_source_task.cpp +203 -0
- ctpbee_api/ctp_mini/generator/mini_struct.py +4599 -0
- ctpbee_api/ctp_mini/generator/mini_td_header_define.h +63 -0
- ctpbee_api/ctp_mini/generator/mini_td_header_function.h +84 -0
- ctpbee_api/ctp_mini/generator/mini_td_header_on.h +126 -0
- ctpbee_api/ctp_mini/generator/mini_td_header_process.h +126 -0
- ctpbee_api/ctp_mini/generator/mini_td_source_function.cpp +663 -0
- ctpbee_api/ctp_mini/generator/mini_td_source_module.cpp +107 -0
- ctpbee_api/ctp_mini/generator/mini_td_source_on.cpp +756 -0
- ctpbee_api/ctp_mini/generator/mini_td_source_process.cpp +2492 -0
- ctpbee_api/ctp_mini/generator/mini_td_source_switch.cpp +378 -0
- ctpbee_api/ctp_mini/generator/mini_td_source_task.cpp +1193 -0
- ctpbee_api/ctp_mini/generator/mini_typedef.py +755 -0
- ctpbee_api/ctp_mini/generator/package/vnminimd.cpp +886 -0
- ctpbee_api/ctp_mini/generator/package/vnminimd.h +205 -0
- ctpbee_api/ctp_mini/include/new/mini/ThostFtdcMdApi.h +148 -0
- ctpbee_api/ctp_mini/include/new/mini/ThostFtdcTraderApi.h +419 -0
- ctpbee_api/ctp_mini/include/new/mini/ThostFtdcUserApiDataType.h +6458 -0
- ctpbee_api/ctp_mini/include/new/mini/ThostFtdcUserApiStruct.h +8890 -0
- ctpbee_api/ctp_mini/include/new/pybind11/attr.h +690 -0
- ctpbee_api/ctp_mini/include/new/pybind11/buffer_info.h +208 -0
- ctpbee_api/ctp_mini/include/new/pybind11/cast.h +1704 -0
- ctpbee_api/ctp_mini/include/new/pybind11/chrono.h +225 -0
- ctpbee_api/ctp_mini/include/new/pybind11/common.h +2 -0
- ctpbee_api/ctp_mini/include/new/pybind11/complex.h +74 -0
- ctpbee_api/ctp_mini/include/new/pybind11/detail/class.h +743 -0
- ctpbee_api/ctp_mini/include/new/pybind11/detail/common.h +1255 -0
- ctpbee_api/ctp_mini/include/new/pybind11/detail/descr.h +171 -0
- ctpbee_api/ctp_mini/include/new/pybind11/detail/init.h +434 -0
- ctpbee_api/ctp_mini/include/new/pybind11/detail/internals.h +656 -0
- ctpbee_api/ctp_mini/include/new/pybind11/detail/type_caster_base.h +1177 -0
- ctpbee_api/ctp_mini/include/new/pybind11/detail/typeid.h +65 -0
- ctpbee_api/ctp_mini/include/new/pybind11/eigen/common.h +9 -0
- ctpbee_api/ctp_mini/include/new/pybind11/eigen/matrix.h +714 -0
- ctpbee_api/ctp_mini/include/new/pybind11/eigen/tensor.h +516 -0
- ctpbee_api/ctp_mini/include/new/pybind11/eigen.h +12 -0
- ctpbee_api/ctp_mini/include/new/pybind11/embed.h +316 -0
- ctpbee_api/ctp_mini/include/new/pybind11/eval.h +156 -0
- ctpbee_api/ctp_mini/include/new/pybind11/functional.h +137 -0
- ctpbee_api/ctp_mini/include/new/pybind11/gil.h +239 -0
- ctpbee_api/ctp_mini/include/new/pybind11/iostream.h +265 -0
- ctpbee_api/ctp_mini/include/new/pybind11/numpy.h +1998 -0
- ctpbee_api/ctp_mini/include/new/pybind11/operators.h +202 -0
- ctpbee_api/ctp_mini/include/new/pybind11/options.h +92 -0
- ctpbee_api/ctp_mini/include/new/pybind11/pybind11.h +2890 -0
- ctpbee_api/ctp_mini/include/new/pybind11/pytypes.h +2557 -0
- ctpbee_api/ctp_mini/include/new/pybind11/stl/filesystem.h +116 -0
- ctpbee_api/ctp_mini/include/new/pybind11/stl.h +447 -0
- ctpbee_api/ctp_mini/include/new/pybind11/stl_bind.h +851 -0
- ctpbee_api/ctp_mini/include/new/pybind11/type_caster_pyobject_ptr.h +61 -0
- ctpbee_api/ctp_mini/include/previous/mini/ThostFtdcMdApi.h +148 -0
- ctpbee_api/ctp_mini/include/previous/mini/ThostFtdcTraderApi.h +419 -0
- ctpbee_api/ctp_mini/include/previous/mini/ThostFtdcUserApiDataType.h +6458 -0
- ctpbee_api/ctp_mini/include/previous/mini/ThostFtdcUserApiStruct.h +8890 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/attr.h +489 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/buffer_info.h +108 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/cast.h +2067 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/chrono.h +162 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/common.h +2 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/complex.h +61 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/detail/class.h +626 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/detail/common.h +803 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/detail/descr.h +185 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/detail/init.h +335 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/detail/internals.h +285 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/detail/typeid.h +53 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/eigen.h +604 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/embed.h +194 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/eval.h +117 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/functional.h +85 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/iostream.h +200 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/numpy.h +1601 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/operators.h +168 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/options.h +65 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/pybind11.h +1965 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/pytypes.h +1332 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/stl.h +376 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/stl_bind.h +599 -0
- ctpbee_api/ctp_mini/libs/thostmduserapi.lib +0 -0
- ctpbee_api/ctp_mini/libs/thosttraderapi.lib +0 -0
- ctpbee_api/ctp_mini/libthostmduserapi.so +0 -0
- ctpbee_api/ctp_mini/libthosttraderapi.so +0 -0
- ctpbee_api/ctp_mini/mini_constant.py +1186 -0
- ctpbee_api/ctp_mini/thostmduserapi.dll +0 -0
- ctpbee_api/ctp_mini/thosttraderapi.dll +0 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_mini.h +146 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_mini.sln +41 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minimd/dllmain.cpp +0 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minimd/stdafx.cpp +0 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minimd/stdafx.h +0 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minimd/targetver.h +0 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minimd/vnctp_minimd.cpp +886 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minimd/vnctp_minimd.h +203 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minimd/vnctp_minimd.vcxproj +183 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minimd/vnctp_minimd.vcxproj.filters +54 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minimd/vnctp_minimd.vcxproj.user +4 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minitd/dllmain.cpp +0 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minitd/stdafx.cpp +0 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minitd/stdafx.h +0 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minitd/targetver.h +0 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minitd/vnctp_minitd.cpp +5716 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minitd/vnctp_minitd.h +680 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minitd/vnctp_minitd.vcxproj +180 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minitd/vnctp_minitd.vcxproj.filters +54 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minitd/vnctp_minitd.vcxproj.user +4 -0
- ctpbee_api/ctp_mini/vnctp_minimd.cp310-win_amd64.pyd +0 -0
- ctpbee_api/ctp_mini/vnctp_minitd.cp310-win_amd64.pyd +0 -0
- ctpbee_api/ctp_mini/vnctp_minitd.lib +0 -0
- ctpbee_api/rohon/RohonBaseV64.dll +0 -0
- ctpbee_api/rohon/WinDataCollect.dll +0 -0
- ctpbee_api/rohon/__init__.py +3 -0
- ctpbee_api/rohon/generator/generate_api_functions.py +348 -0
- ctpbee_api/rohon/generator/generate_data_type.py +76 -0
- ctpbee_api/rohon/generator/generate_struct.py +84 -0
- ctpbee_api/rohon/generator/rohon_constant.py +1242 -0
- ctpbee_api/rohon/generator/rohon_md_header_define.h +13 -0
- ctpbee_api/rohon/generator/rohon_md_header_function.h +6 -0
- ctpbee_api/rohon/generator/rohon_md_header_on.h +26 -0
- ctpbee_api/rohon/generator/rohon_md_header_process.h +26 -0
- ctpbee_api/rohon/generator/rohon_md_source_function.cpp +40 -0
- ctpbee_api/rohon/generator/rohon_md_source_module.cpp +18 -0
- ctpbee_api/rohon/generator/rohon_md_source_on.cpp +156 -0
- ctpbee_api/rohon/generator/rohon_md_source_process.cpp +271 -0
- ctpbee_api/rohon/generator/rohon_md_source_switch.cpp +78 -0
- ctpbee_api/rohon/generator/rohon_md_source_task.cpp +211 -0
- ctpbee_api/rohon/generator/rohon_struct.py +4958 -0
- ctpbee_api/rohon/generator/rohon_td_header_define.h +125 -0
- ctpbee_api/rohon/generator/rohon_td_header_function.h +164 -0
- ctpbee_api/rohon/generator/rohon_td_header_on.h +250 -0
- ctpbee_api/rohon/generator/rohon_td_header_process.h +250 -0
- ctpbee_api/rohon/generator/rohon_td_source_function.cpp +1338 -0
- ctpbee_api/rohon/generator/rohon_td_source_module.cpp +209 -0
- ctpbee_api/rohon/generator/rohon_td_source_on.cpp +1500 -0
- ctpbee_api/rohon/generator/rohon_td_source_process.cpp +5125 -0
- ctpbee_api/rohon/generator/rohon_td_source_switch.cpp +750 -0
- ctpbee_api/rohon/generator/rohon_td_source_task.cpp +2339 -0
- ctpbee_api/rohon/generator/rohon_typedef.py +781 -0
- ctpbee_api/rohon/include/new/pybind11/attr.h +690 -0
- ctpbee_api/rohon/include/new/pybind11/buffer_info.h +208 -0
- ctpbee_api/rohon/include/new/pybind11/cast.h +1704 -0
- ctpbee_api/rohon/include/new/pybind11/chrono.h +225 -0
- ctpbee_api/rohon/include/new/pybind11/common.h +2 -0
- ctpbee_api/rohon/include/new/pybind11/complex.h +74 -0
- ctpbee_api/rohon/include/new/pybind11/detail/class.h +743 -0
- ctpbee_api/rohon/include/new/pybind11/detail/common.h +1255 -0
- ctpbee_api/rohon/include/new/pybind11/detail/descr.h +171 -0
- ctpbee_api/rohon/include/new/pybind11/detail/init.h +434 -0
- ctpbee_api/rohon/include/new/pybind11/detail/internals.h +656 -0
- ctpbee_api/rohon/include/new/pybind11/detail/type_caster_base.h +1177 -0
- ctpbee_api/rohon/include/new/pybind11/detail/typeid.h +65 -0
- ctpbee_api/rohon/include/new/pybind11/eigen/common.h +9 -0
- ctpbee_api/rohon/include/new/pybind11/eigen/matrix.h +714 -0
- ctpbee_api/rohon/include/new/pybind11/eigen/tensor.h +516 -0
- ctpbee_api/rohon/include/new/pybind11/eigen.h +12 -0
- ctpbee_api/rohon/include/new/pybind11/embed.h +316 -0
- ctpbee_api/rohon/include/new/pybind11/eval.h +156 -0
- ctpbee_api/rohon/include/new/pybind11/functional.h +137 -0
- ctpbee_api/rohon/include/new/pybind11/gil.h +239 -0
- ctpbee_api/rohon/include/new/pybind11/iostream.h +265 -0
- ctpbee_api/rohon/include/new/pybind11/numpy.h +1998 -0
- ctpbee_api/rohon/include/new/pybind11/operators.h +202 -0
- ctpbee_api/rohon/include/new/pybind11/options.h +92 -0
- ctpbee_api/rohon/include/new/pybind11/pybind11.h +2890 -0
- ctpbee_api/rohon/include/new/pybind11/pytypes.h +2557 -0
- ctpbee_api/rohon/include/new/pybind11/stl/filesystem.h +116 -0
- ctpbee_api/rohon/include/new/pybind11/stl.h +447 -0
- ctpbee_api/rohon/include/new/pybind11/stl_bind.h +851 -0
- ctpbee_api/rohon/include/new/pybind11/type_caster_pyobject_ptr.h +61 -0
- ctpbee_api/rohon/include/new/rohon/ThostFtdcMdApi.h +168 -0
- ctpbee_api/rohon/include/new/rohon/ThostFtdcTraderApi.h +739 -0
- ctpbee_api/rohon/include/new/rohon/ThostFtdcUserApiDataType.h +6708 -0
- ctpbee_api/rohon/include/new/rohon/ThostFtdcUserApiStruct.h +9580 -0
- ctpbee_api/rohon/include/previous/pybind11/attr.h +489 -0
- ctpbee_api/rohon/include/previous/pybind11/buffer_info.h +108 -0
- ctpbee_api/rohon/include/previous/pybind11/cast.h +2067 -0
- ctpbee_api/rohon/include/previous/pybind11/chrono.h +162 -0
- ctpbee_api/rohon/include/previous/pybind11/common.h +2 -0
- ctpbee_api/rohon/include/previous/pybind11/complex.h +61 -0
- ctpbee_api/rohon/include/previous/pybind11/detail/class.h +626 -0
- ctpbee_api/rohon/include/previous/pybind11/detail/common.h +803 -0
- ctpbee_api/rohon/include/previous/pybind11/detail/descr.h +185 -0
- ctpbee_api/rohon/include/previous/pybind11/detail/init.h +335 -0
- ctpbee_api/rohon/include/previous/pybind11/detail/internals.h +285 -0
- ctpbee_api/rohon/include/previous/pybind11/detail/typeid.h +53 -0
- ctpbee_api/rohon/include/previous/pybind11/eigen.h +604 -0
- ctpbee_api/rohon/include/previous/pybind11/embed.h +194 -0
- ctpbee_api/rohon/include/previous/pybind11/eval.h +117 -0
- ctpbee_api/rohon/include/previous/pybind11/functional.h +85 -0
- ctpbee_api/rohon/include/previous/pybind11/iostream.h +200 -0
- ctpbee_api/rohon/include/previous/pybind11/numpy.h +1601 -0
- ctpbee_api/rohon/include/previous/pybind11/operators.h +168 -0
- ctpbee_api/rohon/include/previous/pybind11/options.h +65 -0
- ctpbee_api/rohon/include/previous/pybind11/pybind11.h +1965 -0
- ctpbee_api/rohon/include/previous/pybind11/pytypes.h +1332 -0
- ctpbee_api/rohon/include/previous/pybind11/stl.h +376 -0
- ctpbee_api/rohon/include/previous/pybind11/stl_bind.h +599 -0
- ctpbee_api/rohon/include/previous/rohon/ThostFtdcMdApi.h +168 -0
- ctpbee_api/rohon/include/previous/rohon/ThostFtdcTraderApi.h +739 -0
- ctpbee_api/rohon/include/previous/rohon/ThostFtdcUserApiDataType.h +6708 -0
- ctpbee_api/rohon/include/previous/rohon/ThostFtdcUserApiStruct.h +9580 -0
- ctpbee_api/rohon/libLinuxDataCollect.so +0 -0
- ctpbee_api/rohon/librohonbase.so +0 -0
- ctpbee_api/rohon/librohonbase.so.1.1 +0 -0
- ctpbee_api/rohon/librohonbase.so.1.1.0.1 +0 -0
- ctpbee_api/rohon/libs/thostmduserapi_se.lib +0 -0
- ctpbee_api/rohon/libs/thosttraderapi_se.lib +0 -0
- ctpbee_api/rohon/libthostmduserapi_se.so +0 -0
- ctpbee_api/rohon/libthosttraderapi_se.so +0 -0
- ctpbee_api/rohon/rohon_constant.py +1242 -0
- ctpbee_api/rohon/thostmduserapi_se.dll +0 -0
- ctpbee_api/rohon/thosttraderapi_se.dll +0 -0
- ctpbee_api/rohon/vnrohon/.vs/vnrohon/v15/.suo +0 -0
- ctpbee_api/rohon/vnrohon/.vs/vnrohon/v15/Browse.VC.db +0 -0
- ctpbee_api/rohon/vnrohon/.vs/vnrohon/v15/Solution.VC.db +0 -0
- ctpbee_api/rohon/vnrohon/vnrohon.h +147 -0
- ctpbee_api/rohon/vnrohon/vnrohon.sln +41 -0
- ctpbee_api/rohon/vnrohon/vnrohonmd/dllmain.cpp +19 -0
- ctpbee_api/rohon/vnrohon/vnrohonmd/framework.h +5 -0
- ctpbee_api/rohon/vnrohon/vnrohonmd/pch.cpp +5 -0
- ctpbee_api/rohon/vnrohon/vnrohonmd/pch.h +13 -0
- ctpbee_api/rohon/vnrohon/vnrohonmd/vnrohonmd.cpp +931 -0
- ctpbee_api/rohon/vnrohon/vnrohonmd/vnrohonmd.h +207 -0
- ctpbee_api/rohon/vnrohon/vnrohonmd/vnrohonmd.vcxproj +188 -0
- ctpbee_api/rohon/vnrohon/vnrohonmd/vnrohonmd.vcxproj.filters +54 -0
- ctpbee_api/rohon/vnrohon/vnrohonmd/vnrohonmd.vcxproj.user +4 -0
- ctpbee_api/rohon/vnrohon/vnrohontd/dllmain.cpp +19 -0
- ctpbee_api/rohon/vnrohon/vnrohontd/framework.h +5 -0
- ctpbee_api/rohon/vnrohon/vnrohontd/pch.cpp +5 -0
- ctpbee_api/rohon/vnrohon/vnrohontd/pch.h +13 -0
- ctpbee_api/rohon/vnrohon/vnrohontd/vnrohontd.cpp +11395 -0
- ctpbee_api/rohon/vnrohon/vnrohontd/vnrohontd.h +1259 -0
- ctpbee_api/rohon/vnrohon/vnrohontd/vnrohontd.vcxproj +188 -0
- ctpbee_api/rohon/vnrohon/vnrohontd/vnrohontd.vcxproj.filters +54 -0
- ctpbee_api/rohon/vnrohon/vnrohontd/vnrohontd.vcxproj.user +4 -0
- ctpbee_api/rohon/vnrohonmd.cp310-win_amd64.pyd +0 -0
- ctpbee_api/rohon/vnrohontd.cp310-win_amd64.pyd +0 -0
- ctpbee_opt_api-0.1.0.dist-info/METADATA +46 -0
- ctpbee_opt_api-0.1.0.dist-info/RECORD +414 -0
- ctpbee_opt_api-0.1.0.dist-info/WHEEL +5 -0
- ctpbee_opt_api-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/*
|
|
2
|
+
pybind11/operator.h: Metatemplates for operator overloading
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>
|
|
5
|
+
|
|
6
|
+
All rights reserved. Use of this source code is governed by a
|
|
7
|
+
BSD-style license that can be found in the LICENSE file.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#pragma once
|
|
11
|
+
|
|
12
|
+
#include "pybind11.h"
|
|
13
|
+
|
|
14
|
+
PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
|
|
15
|
+
PYBIND11_NAMESPACE_BEGIN(detail)
|
|
16
|
+
|
|
17
|
+
/// Enumeration with all supported operator types
|
|
18
|
+
enum op_id : int {
|
|
19
|
+
op_add,
|
|
20
|
+
op_sub,
|
|
21
|
+
op_mul,
|
|
22
|
+
op_div,
|
|
23
|
+
op_mod,
|
|
24
|
+
op_divmod,
|
|
25
|
+
op_pow,
|
|
26
|
+
op_lshift,
|
|
27
|
+
op_rshift,
|
|
28
|
+
op_and,
|
|
29
|
+
op_xor,
|
|
30
|
+
op_or,
|
|
31
|
+
op_neg,
|
|
32
|
+
op_pos,
|
|
33
|
+
op_abs,
|
|
34
|
+
op_invert,
|
|
35
|
+
op_int,
|
|
36
|
+
op_long,
|
|
37
|
+
op_float,
|
|
38
|
+
op_str,
|
|
39
|
+
op_cmp,
|
|
40
|
+
op_gt,
|
|
41
|
+
op_ge,
|
|
42
|
+
op_lt,
|
|
43
|
+
op_le,
|
|
44
|
+
op_eq,
|
|
45
|
+
op_ne,
|
|
46
|
+
op_iadd,
|
|
47
|
+
op_isub,
|
|
48
|
+
op_imul,
|
|
49
|
+
op_idiv,
|
|
50
|
+
op_imod,
|
|
51
|
+
op_ilshift,
|
|
52
|
+
op_irshift,
|
|
53
|
+
op_iand,
|
|
54
|
+
op_ixor,
|
|
55
|
+
op_ior,
|
|
56
|
+
op_complex,
|
|
57
|
+
op_bool,
|
|
58
|
+
op_nonzero,
|
|
59
|
+
op_repr,
|
|
60
|
+
op_truediv,
|
|
61
|
+
op_itruediv,
|
|
62
|
+
op_hash
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
enum op_type : int {
|
|
66
|
+
op_l, /* base type on left */
|
|
67
|
+
op_r, /* base type on right */
|
|
68
|
+
op_u /* unary operator */
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
struct self_t {};
|
|
72
|
+
static const self_t self = self_t();
|
|
73
|
+
|
|
74
|
+
/// Type for an unused type slot
|
|
75
|
+
struct undefined_t {};
|
|
76
|
+
|
|
77
|
+
/// Don't warn about an unused variable
|
|
78
|
+
inline self_t __self() { return self; }
|
|
79
|
+
|
|
80
|
+
/// base template of operator implementations
|
|
81
|
+
template <op_id, op_type, typename B, typename L, typename R>
|
|
82
|
+
struct op_impl {};
|
|
83
|
+
|
|
84
|
+
/// Operator implementation generator
|
|
85
|
+
template <op_id id, op_type ot, typename L, typename R>
|
|
86
|
+
struct op_ {
|
|
87
|
+
static constexpr bool op_enable_if_hook = true;
|
|
88
|
+
template <typename Class, typename... Extra>
|
|
89
|
+
void execute(Class &cl, const Extra &...extra) const {
|
|
90
|
+
using Base = typename Class::type;
|
|
91
|
+
using L_type = conditional_t<std::is_same<L, self_t>::value, Base, L>;
|
|
92
|
+
using R_type = conditional_t<std::is_same<R, self_t>::value, Base, R>;
|
|
93
|
+
using op = op_impl<id, ot, Base, L_type, R_type>;
|
|
94
|
+
cl.def(op::name(), &op::execute, is_operator(), extra...);
|
|
95
|
+
}
|
|
96
|
+
template <typename Class, typename... Extra>
|
|
97
|
+
void execute_cast(Class &cl, const Extra &...extra) const {
|
|
98
|
+
using Base = typename Class::type;
|
|
99
|
+
using L_type = conditional_t<std::is_same<L, self_t>::value, Base, L>;
|
|
100
|
+
using R_type = conditional_t<std::is_same<R, self_t>::value, Base, R>;
|
|
101
|
+
using op = op_impl<id, ot, Base, L_type, R_type>;
|
|
102
|
+
cl.def(op::name(), &op::execute_cast, is_operator(), extra...);
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
#define PYBIND11_BINARY_OPERATOR(id, rid, op, expr) \
|
|
107
|
+
template <typename B, typename L, typename R> \
|
|
108
|
+
struct op_impl<op_##id, op_l, B, L, R> { \
|
|
109
|
+
static char const *name() { return "__" #id "__"; } \
|
|
110
|
+
static auto execute(const L &l, const R &r) -> decltype(expr) { return (expr); } \
|
|
111
|
+
static B execute_cast(const L &l, const R &r) { return B(expr); } \
|
|
112
|
+
}; \
|
|
113
|
+
template <typename B, typename L, typename R> \
|
|
114
|
+
struct op_impl<op_##id, op_r, B, L, R> { \
|
|
115
|
+
static char const *name() { return "__" #rid "__"; } \
|
|
116
|
+
static auto execute(const R &r, const L &l) -> decltype(expr) { return (expr); } \
|
|
117
|
+
static B execute_cast(const R &r, const L &l) { return B(expr); } \
|
|
118
|
+
}; \
|
|
119
|
+
inline op_<op_##id, op_l, self_t, self_t> op(const self_t &, const self_t &) { \
|
|
120
|
+
return op_<op_##id, op_l, self_t, self_t>(); \
|
|
121
|
+
} \
|
|
122
|
+
template <typename T> \
|
|
123
|
+
op_<op_##id, op_l, self_t, T> op(const self_t &, const T &) { \
|
|
124
|
+
return op_<op_##id, op_l, self_t, T>(); \
|
|
125
|
+
} \
|
|
126
|
+
template <typename T> \
|
|
127
|
+
op_<op_##id, op_r, T, self_t> op(const T &, const self_t &) { \
|
|
128
|
+
return op_<op_##id, op_r, T, self_t>(); \
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
#define PYBIND11_INPLACE_OPERATOR(id, op, expr) \
|
|
132
|
+
template <typename B, typename L, typename R> \
|
|
133
|
+
struct op_impl<op_##id, op_l, B, L, R> { \
|
|
134
|
+
static char const *name() { return "__" #id "__"; } \
|
|
135
|
+
static auto execute(L &l, const R &r) -> decltype(expr) { return expr; } \
|
|
136
|
+
static B execute_cast(L &l, const R &r) { return B(expr); } \
|
|
137
|
+
}; \
|
|
138
|
+
template <typename T> \
|
|
139
|
+
op_<op_##id, op_l, self_t, T> op(const self_t &, const T &) { \
|
|
140
|
+
return op_<op_##id, op_l, self_t, T>(); \
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
#define PYBIND11_UNARY_OPERATOR(id, op, expr) \
|
|
144
|
+
template <typename B, typename L> \
|
|
145
|
+
struct op_impl<op_##id, op_u, B, L, undefined_t> { \
|
|
146
|
+
static char const *name() { return "__" #id "__"; } \
|
|
147
|
+
static auto execute(const L &l) -> decltype(expr) { return expr; } \
|
|
148
|
+
static B execute_cast(const L &l) { return B(expr); } \
|
|
149
|
+
}; \
|
|
150
|
+
inline op_<op_##id, op_u, self_t, undefined_t> op(const self_t &) { \
|
|
151
|
+
return op_<op_##id, op_u, self_t, undefined_t>(); \
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
PYBIND11_BINARY_OPERATOR(sub, rsub, operator-, l - r)
|
|
155
|
+
PYBIND11_BINARY_OPERATOR(add, radd, operator+, l + r)
|
|
156
|
+
PYBIND11_BINARY_OPERATOR(mul, rmul, operator*, l *r)
|
|
157
|
+
PYBIND11_BINARY_OPERATOR(truediv, rtruediv, operator/, l / r)
|
|
158
|
+
PYBIND11_BINARY_OPERATOR(mod, rmod, operator%, l % r)
|
|
159
|
+
PYBIND11_BINARY_OPERATOR(lshift, rlshift, operator<<, l << r)
|
|
160
|
+
PYBIND11_BINARY_OPERATOR(rshift, rrshift, operator>>, l >> r)
|
|
161
|
+
PYBIND11_BINARY_OPERATOR(and, rand, operator&, l &r)
|
|
162
|
+
PYBIND11_BINARY_OPERATOR(xor, rxor, operator^, l ^ r)
|
|
163
|
+
PYBIND11_BINARY_OPERATOR(eq, eq, operator==, l == r)
|
|
164
|
+
PYBIND11_BINARY_OPERATOR(ne, ne, operator!=, l != r)
|
|
165
|
+
PYBIND11_BINARY_OPERATOR(or, ror, operator|, l | r)
|
|
166
|
+
PYBIND11_BINARY_OPERATOR(gt, lt, operator>, l > r)
|
|
167
|
+
PYBIND11_BINARY_OPERATOR(ge, le, operator>=, l >= r)
|
|
168
|
+
PYBIND11_BINARY_OPERATOR(lt, gt, operator<, l < r)
|
|
169
|
+
PYBIND11_BINARY_OPERATOR(le, ge, operator<=, l <= r)
|
|
170
|
+
// PYBIND11_BINARY_OPERATOR(pow, rpow, pow, std::pow(l, r))
|
|
171
|
+
PYBIND11_INPLACE_OPERATOR(iadd, operator+=, l += r)
|
|
172
|
+
PYBIND11_INPLACE_OPERATOR(isub, operator-=, l -= r)
|
|
173
|
+
PYBIND11_INPLACE_OPERATOR(imul, operator*=, l *= r)
|
|
174
|
+
PYBIND11_INPLACE_OPERATOR(itruediv, operator/=, l /= r)
|
|
175
|
+
PYBIND11_INPLACE_OPERATOR(imod, operator%=, l %= r)
|
|
176
|
+
PYBIND11_INPLACE_OPERATOR(ilshift, operator<<=, l <<= r)
|
|
177
|
+
PYBIND11_INPLACE_OPERATOR(irshift, operator>>=, l >>= r)
|
|
178
|
+
PYBIND11_INPLACE_OPERATOR(iand, operator&=, l &= r)
|
|
179
|
+
PYBIND11_INPLACE_OPERATOR(ixor, operator^=, l ^= r)
|
|
180
|
+
PYBIND11_INPLACE_OPERATOR(ior, operator|=, l |= r)
|
|
181
|
+
PYBIND11_UNARY_OPERATOR(neg, operator-, -l)
|
|
182
|
+
PYBIND11_UNARY_OPERATOR(pos, operator+, +l)
|
|
183
|
+
// WARNING: This usage of `abs` should only be done for existing STL overloads.
|
|
184
|
+
// Adding overloads directly in to the `std::` namespace is advised against:
|
|
185
|
+
// https://en.cppreference.com/w/cpp/language/extending_std
|
|
186
|
+
PYBIND11_UNARY_OPERATOR(abs, abs, std::abs(l))
|
|
187
|
+
PYBIND11_UNARY_OPERATOR(hash, hash, std::hash<L>()(l))
|
|
188
|
+
PYBIND11_UNARY_OPERATOR(invert, operator~, (~l))
|
|
189
|
+
PYBIND11_UNARY_OPERATOR(bool, operator!, !!l)
|
|
190
|
+
PYBIND11_UNARY_OPERATOR(int, int_, (int) l)
|
|
191
|
+
PYBIND11_UNARY_OPERATOR(float, float_, (double) l)
|
|
192
|
+
|
|
193
|
+
#undef PYBIND11_BINARY_OPERATOR
|
|
194
|
+
#undef PYBIND11_INPLACE_OPERATOR
|
|
195
|
+
#undef PYBIND11_UNARY_OPERATOR
|
|
196
|
+
PYBIND11_NAMESPACE_END(detail)
|
|
197
|
+
|
|
198
|
+
using detail::self;
|
|
199
|
+
// Add named operators so that they are accessible via `py::`.
|
|
200
|
+
using detail::hash;
|
|
201
|
+
|
|
202
|
+
PYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/*
|
|
2
|
+
pybind11/options.h: global settings that are configurable at runtime.
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>
|
|
5
|
+
|
|
6
|
+
All rights reserved. Use of this source code is governed by a
|
|
7
|
+
BSD-style license that can be found in the LICENSE file.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#pragma once
|
|
11
|
+
|
|
12
|
+
#include "detail/common.h"
|
|
13
|
+
|
|
14
|
+
PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
|
|
15
|
+
|
|
16
|
+
class options {
|
|
17
|
+
public:
|
|
18
|
+
// Default RAII constructor, which leaves settings as they currently are.
|
|
19
|
+
options() : previous_state(global_state()) {}
|
|
20
|
+
|
|
21
|
+
// Class is non-copyable.
|
|
22
|
+
options(const options &) = delete;
|
|
23
|
+
options &operator=(const options &) = delete;
|
|
24
|
+
|
|
25
|
+
// Destructor, which restores settings that were in effect before.
|
|
26
|
+
~options() { global_state() = previous_state; }
|
|
27
|
+
|
|
28
|
+
// Setter methods (affect the global state):
|
|
29
|
+
|
|
30
|
+
options &disable_user_defined_docstrings() & {
|
|
31
|
+
global_state().show_user_defined_docstrings = false;
|
|
32
|
+
return *this;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
options &enable_user_defined_docstrings() & {
|
|
36
|
+
global_state().show_user_defined_docstrings = true;
|
|
37
|
+
return *this;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
options &disable_function_signatures() & {
|
|
41
|
+
global_state().show_function_signatures = false;
|
|
42
|
+
return *this;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
options &enable_function_signatures() & {
|
|
46
|
+
global_state().show_function_signatures = true;
|
|
47
|
+
return *this;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
options &disable_enum_members_docstring() & {
|
|
51
|
+
global_state().show_enum_members_docstring = false;
|
|
52
|
+
return *this;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
options &enable_enum_members_docstring() & {
|
|
56
|
+
global_state().show_enum_members_docstring = true;
|
|
57
|
+
return *this;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Getter methods (return the global state):
|
|
61
|
+
|
|
62
|
+
static bool show_user_defined_docstrings() {
|
|
63
|
+
return global_state().show_user_defined_docstrings;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
static bool show_function_signatures() { return global_state().show_function_signatures; }
|
|
67
|
+
|
|
68
|
+
static bool show_enum_members_docstring() {
|
|
69
|
+
return global_state().show_enum_members_docstring;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// This type is not meant to be allocated on the heap.
|
|
73
|
+
void *operator new(size_t) = delete;
|
|
74
|
+
|
|
75
|
+
private:
|
|
76
|
+
struct state {
|
|
77
|
+
bool show_user_defined_docstrings = true; //< Include user-supplied texts in docstrings.
|
|
78
|
+
bool show_function_signatures = true; //< Include auto-generated function signatures
|
|
79
|
+
// in docstrings.
|
|
80
|
+
bool show_enum_members_docstring = true; //< Include auto-generated member list in enum
|
|
81
|
+
// docstrings.
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
static state &global_state() {
|
|
85
|
+
static state instance;
|
|
86
|
+
return instance;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
state previous_state;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
PYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)
|