#pragma once #include #include "../api/ThostFtdcMdApi.h" #include "../wrapper_helper.hpp" namespace autocxxpy { template struct spi_vector_wrapper { static constexpr auto value = [](CThostFtdcMdApi *instance, std::vector &arg) { return (instance->*method)(&arg.at(0), static_cast(arg.size())); }; }; #define DEF_SPI_VECTOR_CALLING_WRAPPER(method) \ template <>\ struct calling_wrapper \ : spi_vector_wrapper\ {}; DEF_SPI_VECTOR_CALLING_WRAPPER(&CThostFtdcMdApi::SubscribeMarketData) DEF_SPI_VECTOR_CALLING_WRAPPER(&CThostFtdcMdApi::UnSubscribeMarketData) DEF_SPI_VECTOR_CALLING_WRAPPER(&CThostFtdcMdApi::SubscribeForQuoteRsp) DEF_SPI_VECTOR_CALLING_WRAPPER(&CThostFtdcMdApi::UnSubscribeForQuoteRsp) //template <> //struct calling_wrapper<&CThostFtdcMdApi::SubscribeMarketData> // : spi_vector_wrapper<&CThostFtdcMdApi::SubscribeMarketData> //{}; }