[Mod] TapApi: use autocxxpy 0.3.1

detail:
[Fix] Fixed: return value of API which applied output_argument_transform is always empty(default value)
[Fix] Fixed: crash while calling some API which returns packaged str. Such as InsertOrder.
[Mod] Some types of constant was changed to str, which has a type of int originally. (these variables has a type of 'char' in c++)
This commit is contained in:
nanoric 2019-06-08 17:07:56 +08:00
parent fa590bf1f3
commit 1c661d07c4
14 changed files with 1717 additions and 2111 deletions

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# autocxxpy version: 0.2.6 # autocxxpy version: 0.3.1
python -m autocxxpy \ python -m autocxxpy \
vntap \ vntap \
iTapTradeAPI.h TapQuoteAPI.h TapAPIError.h iTapAPIError.h \ iTapTradeAPI.h TapQuoteAPI.h TapAPIError.h iTapAPIError.h \
@ -15,6 +15,8 @@ python -m autocxxpy \
"(.*API::.*(sessionID$|.*ClientBuyOrderNo$|.*ClientSellOrderNo$|.*ClientOrderNo$))|(.*Result)" \ "(.*API::.*(sessionID$|.*ClientBuyOrderNo$|.*ClientSellOrderNo$|.*ClientOrderNo$))|(.*Result)" \
\ \
--no-callback-pattern \ --no-callback-pattern \
".*API::.*" ".*API::.*" \
--no-transform-pattern \
".*Notify::On.*"
python generate_error_map.py # python generate_error_map.py

Binary file not shown.

View File

@ -35,7 +35,7 @@ class TapAPICommodity():
ExchangeNo: str ExchangeNo: str
CommodityType: int CommodityType: str
CommodityNo: str CommodityNo: str
@ -45,10 +45,10 @@ class TapAPIContract():
Commodity: TapAPICommodity Commodity: TapAPICommodity
ContractNo1: str ContractNo1: str
StrikePrice1: str StrikePrice1: str
CallOrPutFlag1: int CallOrPutFlag1: str
ContractNo2: str ContractNo2: str
StrikePrice2: str StrikePrice2: str
CallOrPutFlag2: int CallOrPutFlag2: str
class TapAPIExchangeInfo(): class TapAPIExchangeInfo():
@ -69,11 +69,11 @@ class TapAPIQuoteLoginAuth():
UserNo: str UserNo: str
ISModifyPassword: int ISModifyPassword: str
Password: str Password: str
NewPassword: str NewPassword: str
QuoteTempPassword: str QuoteTempPassword: str
ISDDA: int ISDDA: str
DDASerialNo: str DDASerialNo: str
@ -104,9 +104,9 @@ class TapAPIQuoteCommodityInfo():
ContractSize: float ContractSize: float
CommodityTickSize: float CommodityTickSize: float
CommodityDenominator: int CommodityDenominator: int
CmbDirect: int CmbDirect: str
CommodityContractLen: int CommodityContractLen: int
IsDST: int IsDST: str
RelateCommodity1: TapAPICommodity RelateCommodity1: TapAPICommodity
RelateCommodity2: TapAPICommodity RelateCommodity2: TapAPICommodity
@ -115,7 +115,7 @@ class TapAPIQuoteContractInfo():
Contract: TapAPIContract Contract: TapAPIContract
ContractType: int ContractType: str
QuoteUnderlyingContract: str QuoteUnderlyingContract: str
ContractName: str ContractName: str
ContractExpDate: str ContractExpDate: str
@ -128,7 +128,7 @@ class TapAPIQuoteWhole():
Contract: TapAPIContract Contract: TapAPIContract
CurrencyNo: str CurrencyNo: str
TradingState: int TradingState: str
DateTimeStamp: str DateTimeStamp: str
QPreClosingPrice: float QPreClosingPrice: float
QPreSettlePrice: float QPreSettlePrice: float
@ -186,13 +186,13 @@ class ITapQuoteAPINotify():
... ...
def OnDisconnect(self, reasonCode: int)->None: def OnDisconnect(self, reasonCode: int)->None:
... ...
def OnRspQryCommodity(self, sessionID: int, errorCode: int, isLast: int, info: TapAPIQuoteCommodityInfo)->None: def OnRspQryCommodity(self, sessionID: int, errorCode: int, isLast: str, info: TapAPIQuoteCommodityInfo)->None:
... ...
def OnRspQryContract(self, sessionID: int, errorCode: int, isLast: int, info: TapAPIQuoteContractInfo)->None: def OnRspQryContract(self, sessionID: int, errorCode: int, isLast: str, info: TapAPIQuoteContractInfo)->None:
... ...
def OnRspSubscribeQuote(self, sessionID: int, errorCode: int, isLast: int, info: TapAPIQuoteWhole)->None: def OnRspSubscribeQuote(self, sessionID: int, errorCode: int, isLast: str, info: TapAPIQuoteWhole)->None:
... ...
def OnRspUnSubscribeQuote(self, sessionID: int, errorCode: int, isLast: int, info: TapAPIContract)->None: def OnRspUnSubscribeQuote(self, sessionID: int, errorCode: int, isLast: str, info: TapAPIContract)->None:
... ...
def OnRtnQuote(self, info: TapAPIQuoteWhole)->None: def OnRtnQuote(self, info: TapAPIQuoteWhole)->None:
... ...
@ -228,7 +228,7 @@ TAPISTR_300 = str
TAPISTR_500 = str TAPISTR_500 = str
TAPISTR_2000 = str TAPISTR_2000 = str
TAPIAUTHCODE = str TAPIAUTHCODE = str
TAPICHAR = int TAPICHAR = str
TAPIINT32 = int TAPIINT32 = int
TAPIUINT32 = int TAPIUINT32 = int
TAPIINT64 = int TAPIINT64 = int
@ -236,47 +236,47 @@ TAPIUINT64 = int
TAPIUINT16 = int TAPIUINT16 = int
TAPIUINT8 = int TAPIUINT8 = int
TAPIREAL64 = float TAPIREAL64 = float
TAPIYNFLAG = int TAPIYNFLAG = str
TAPIDTSTAMP = str TAPIDTSTAMP = str
TAPIDATETIME = str TAPIDATETIME = str
TAPIDATE = str TAPIDATE = str
TAPITIME = str TAPITIME = str
TAPILOGLEVEL = int TAPILOGLEVEL = str
TAPICommodityType = int TAPICommodityType = str
TAPICallOrPutFlagType = int TAPICallOrPutFlagType = str
TAPIQPRICE = float TAPIQPRICE = float
TAPIQVOLUME = int TAPIQVOLUME = int
TAPIQDIFF = int TAPIQDIFF = int
APIYNFLAG_YES: int APIYNFLAG_YES: str
APIYNFLAG_NO: int APIYNFLAG_NO: str
APILOGLEVEL_NONE: int APILOGLEVEL_NONE: str
APILOGLEVEL_ERROR: int APILOGLEVEL_ERROR: str
APILOGLEVEL_WARNING: int APILOGLEVEL_WARNING: str
APILOGLEVEL_DEBUG: int APILOGLEVEL_DEBUG: str
TAPI_COMMODITY_TYPE_NONE: int TAPI_COMMODITY_TYPE_NONE: str
TAPI_COMMODITY_TYPE_SPOT: int TAPI_COMMODITY_TYPE_SPOT: str
TAPI_COMMODITY_TYPE_FUTURES: int TAPI_COMMODITY_TYPE_FUTURES: str
TAPI_COMMODITY_TYPE_OPTION: int TAPI_COMMODITY_TYPE_OPTION: str
TAPI_COMMODITY_TYPE_SPREAD_MONTH: int TAPI_COMMODITY_TYPE_SPREAD_MONTH: str
TAPI_COMMODITY_TYPE_SPREAD_COMMODITY: int TAPI_COMMODITY_TYPE_SPREAD_COMMODITY: str
TAPI_COMMODITY_TYPE_BUL: int TAPI_COMMODITY_TYPE_BUL: str
TAPI_COMMODITY_TYPE_BER: int TAPI_COMMODITY_TYPE_BER: str
TAPI_COMMODITY_TYPE_STD: int TAPI_COMMODITY_TYPE_STD: str
TAPI_COMMODITY_TYPE_STG: int TAPI_COMMODITY_TYPE_STG: str
TAPI_COMMODITY_TYPE_PRT: int TAPI_COMMODITY_TYPE_PRT: str
TAPI_COMMODITY_TYPE_BLT: int TAPI_COMMODITY_TYPE_BLT: str
TAPI_COMMODITY_TYPE_BRT: int TAPI_COMMODITY_TYPE_BRT: str
TAPI_COMMODITY_TYPE_DIRECTFOREX: int TAPI_COMMODITY_TYPE_DIRECTFOREX: str
TAPI_COMMODITY_TYPE_INDIRECTFOREX: int TAPI_COMMODITY_TYPE_INDIRECTFOREX: str
TAPI_COMMODITY_TYPE_CROSSFOREX: int TAPI_COMMODITY_TYPE_CROSSFOREX: str
TAPI_COMMODITY_TYPE_INDEX: int TAPI_COMMODITY_TYPE_INDEX: str
TAPI_COMMODITY_TYPE_STOCK: int TAPI_COMMODITY_TYPE_STOCK: str
TAPI_COMMODITY_TYPE_SPOT_TRADINGDEFER: int TAPI_COMMODITY_TYPE_SPOT_TRADINGDEFER: str
TAPI_COMMODITY_TYPE_FUTURE_LOCK: int TAPI_COMMODITY_TYPE_FUTURE_LOCK: str
TAPI_COMMODITY_TYPE_EFP: int TAPI_COMMODITY_TYPE_EFP: str
TAPI_CALLPUT_FLAG_CALL: int TAPI_CALLPUT_FLAG_CALL: str
TAPI_CALLPUT_FLAG_PUT: int TAPI_CALLPUT_FLAG_PUT: str
TAPI_CALLPUT_FLAG_NONE: int TAPI_CALLPUT_FLAG_NONE: str
TAPIERROR_SUCCEED: int TAPIERROR_SUCCEED: int
TAPIERROR_ConnectFail: int TAPIERROR_ConnectFail: int
TAPIERROR_LinkAuthFail: int TAPIERROR_LinkAuthFail: int
@ -445,7 +445,7 @@ def GetITapTradeAPIVersion()->str:
... ...
def SetITapTradeAPIDataPath(path: str)->int: def SetITapTradeAPIDataPath(path: str)->int:
... ...
def SetITapTradeAPILogLevel(level: int)->int: def SetITapTradeAPILogLevel(level: str)->int:
... ...
def GetITapErrorDescribe(errorCode: int)->str: def GetITapErrorDescribe(errorCode: int)->str:
... ...
@ -457,6 +457,6 @@ def GetTapQuoteAPIVersion()->str:
... ...
def SetTapQuoteAPIDataPath(path: str)->int: def SetTapQuoteAPIDataPath(path: str)->int:
... ...
def SetTapQuoteAPILogLevel(level: int)->int: def SetTapQuoteAPILogLevel(level: str)->int:
... ...

View File

@ -6,109 +6,168 @@
namespace autocxxpy namespace autocxxpy
{ {
// this method seems complicated and needs more code. Useful for code generator but not for human. // TapAPIOrderInfoNotice
//using namespace ITapTrade; struct FixedTapAPIOrderInfoNotice : ITapTrade::TapAPIOrderInfoNotice
//namespace arg_helper {
//{ ITapTrade::TapAPIOrderInfo order_info;
// struct FixedTapAPIOrderInfoNotice : TapAPIOrderInfoNotice
// {
// TapAPIOrderInfo order_info;
// // copy from original structure // copy from original structure
// FixedTapAPIOrderInfoNotice(const TapAPIOrderInfoNotice* info) FixedTapAPIOrderInfoNotice(const ITapTrade::TapAPIOrderInfoNotice* info)
// : TapAPIOrderInfoNotice(*info), order_info(*info->OrderInfo) : TapAPIOrderInfoNotice(*info), order_info(info->OrderInfo != nullptr ? *info->OrderInfo : ITapTrade::TapAPIOrderInfo{})
// { {
// this->OrderInfo = &this->order_info; // fix pointer if there is one
// } this->OrderInfo = info->OrderInfo != nullptr ? &this->order_info : nullptr;
}
// // copy constructor // copy constructor
// FixedTapAPIOrderInfoNotice(const FixedTapAPIOrderInfoNotice& fixed) FixedTapAPIOrderInfoNotice(const FixedTapAPIOrderInfoNotice& fixed)
// : TapAPIOrderInfoNotice(fixed), order_info(fixed.order_info) : TapAPIOrderInfoNotice(fixed), order_info(fixed.order_info)
// { {
// this->OrderInfo = &this->order_info; // fix pointer if there is one
// } this->OrderInfo = this->OrderInfo != nullptr ? &this->order_info : nullptr;
// }; }
// inline auto save(const TapAPIOrderInfoNotice* info) };
// { // match char [] // TapAPIPositionProfit
// return FixedTapAPIOrderInfoNotice(info); struct FixedTapAPIPositionProfitNotice : ITapTrade::TapAPIPositionProfitNotice
// } {
ITapTrade::TapAPIPositionProfit data;
// copy from original structure
FixedTapAPIPositionProfitNotice(const ITapTrade::TapAPIPositionProfitNotice* info)
: TapAPIPositionProfitNotice(*info), data(info->Data != nullptr ? *info->Data : ITapTrade::TapAPIPositionProfit{})
{
// fix pointer if there is one
this->Data = info->Data != nullptr ? &this->data : nullptr;
}
// copy constructor
FixedTapAPIPositionProfitNotice(const FixedTapAPIPositionProfitNotice& fixed)
: TapAPIPositionProfitNotice(fixed), data(fixed.data)
{
// fix pointer if there is one
this->Data = this->Data != nullptr ? &this->data : nullptr;
}
};
namespace arg_helper
{
inline auto save(const ITapTrade::TapAPIOrderInfoNotice* info)
{ // match char []
return FixedTapAPIOrderInfoNotice(info);
}
template <>
struct loader<ITapTrade::TapAPIOrderInfoNotice>
{
inline FixedTapAPIOrderInfoNotice operator ()(FixedTapAPIOrderInfoNotice& val)
{
return val;
}
};
inline auto save(const ITapTrade::TapAPIPositionProfitNotice* info)
{ // match char []
return FixedTapAPIPositionProfitNotice(info);
}
template <>
struct loader<ITapTrade::TapAPIPositionProfitNotice>
{
inline FixedTapAPIPositionProfitNotice operator ()(FixedTapAPIPositionProfitNotice& val)
{
return val;
}
};
}
//template<> //template<>
// struct loader<TapAPIOrderInfoNotice> //struct callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspOrderAction>
//{ //{
// inline FixedTapAPIOrderInfoNotice operator ()(FixedTapAPIOrderInfoNotice& val) // inline static void call(ITapTrade::ITapTradeAPINotify* instance, const char* py_func_name, ITapTrade::TAPIUINT32 sessionID, ITapTrade::TAPIINT32 errorCode, const ITapTrade::TapAPIOrderActionRsp* info)
// { // {
// return val; // ITapTrade::TapAPIOrderInfo orderInfo;
// if (info->OrderInfo != nullptr)
// {
// orderInfo = *info->OrderInfo;
// }
// ITapTrade::TapAPIOrderActionRsp copied_info = *info;
// auto task = [=]() mutable
// {
// if (copied_info.OrderInfo != nullptr)
// {
// copied_info.OrderInfo = &orderInfo; // ensure pointer is pointer to the correct address(address changes after constructed lambda)
// }
// try
// {
// return default_callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspOrderAction>::sync(instance, py_func_name, sessionID, errorCode, &copied_info);
// }
// catch (const async_dispatch_exception& e)
// {
// async_callback_exception_handler::handle_excepiton(e);
// }
// };
// dispatcher::instance().add(std::move(task));
// } // }
//}; //};
//template<>
//struct callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRtnOrder>
//{
// inline static void call(ITapTrade::ITapTradeAPINotify* instance, const char* py_func_name, const ITapTrade::TapAPIOrderInfoNotice* info)
// {
// ITapTrade::TapAPIOrderInfo orderInfo;
// if (info->OrderInfo != nullptr)
// {
// orderInfo = *info->OrderInfo;
// } // }
// ITapTrade::TapAPIOrderInfoNotice copied_info = *info;
// auto task = [=]() mutable
// {
// if (copied_info.OrderInfo != nullptr)
// {
// copied_info.OrderInfo = &orderInfo; // ensure pointer is pointer to the correct address(address changes after constructed lambda)
// }
// try
// {
// return default_callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRtnOrder>::sync(instance, py_func_name, &copied_info);
// }
// catch (const async_dispatch_exception& e)
// {
// async_callback_exception_handler::handle_excepiton(e);
// }
// };
// dispatcher::instance().add(std::move(task));
// }
//};
template<> //template<>
struct callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspOrderAction> //struct callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRtnPositionProfit>
{ //{
inline static void call(ITapTrade::ITapTradeAPINotify* instance, const char* py_func_name, ITapTrade::TAPIUINT32 sessionID, ITapTrade::TAPIINT32 errorCode, const ITapTrade::TapAPIOrderActionRsp* info) // inline static void call(ITapTrade::ITapTradeAPINotify* instance, const char* py_func_name, const ITapTrade::TapAPIPositionProfitNotice* info)
{ // {
ITapTrade::TapAPIOrderInfo orderInfo;
if (info->OrderInfo != nullptr)
{
orderInfo = *info->OrderInfo;
}
ITapTrade::TapAPIOrderActionRsp copied_info = *info;
auto task = [=]() mutable
{
if (copied_info.OrderInfo != nullptr)
{
copied_info.OrderInfo = &orderInfo; // ensure pointer is pointer to the correct address(address changes after constructed lambda)
}
return default_callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspOrderAction>::sync(instance, py_func_name, sessionID, errorCode, &copied_info);
};
dispatcher::instance().add(std::move(task));
}
};
template<>
struct callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRtnOrder>
{
inline static void call(ITapTrade::ITapTradeAPINotify* instance, const char* py_func_name, const ITapTrade::TapAPIOrderInfoNotice* info)
{
ITapTrade::TapAPIOrderInfo orderInfo;
if (info->OrderInfo != nullptr)
{
orderInfo = *info->OrderInfo;
}
ITapTrade::TapAPIOrderInfoNotice copied_info = *info;
auto task = [=]() mutable
{
if (copied_info.OrderInfo != nullptr)
{
copied_info.OrderInfo = &orderInfo; // ensure pointer is pointer to the correct address(address changes after constructed lambda)
}
return default_callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRtnOrder>::sync(instance, py_func_name, &copied_info);
};
dispatcher::instance().add(std::move(task));
}
};
template<> // ITapTrade::TapAPIPositionProfit profit;
struct callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRtnPositionProfit> // if (info->Data != nullptr)
{ // {
inline static void call(ITapTrade::ITapTradeAPINotify* instance, const char* py_func_name, const ITapTrade::TapAPIPositionProfitNotice* info) // profit = *info->Data;
{ // }
// ITapTrade::TapAPIPositionProfitNotice copied_info = *info;
ITapTrade::TapAPIPositionProfit profit; // auto task = [=]() mutable
if (info->Data != nullptr) // {
{ // if (copied_info.Data != nullptr)
profit = *info->Data; // {
} // copied_info.Data = &profit; // ensure pointer is pointer to the correct address(address changes after constructed lambda)
ITapTrade::TapAPIPositionProfitNotice copied_info = *info; // }
auto task = [=]() mutable // try
{ // {
if (copied_info.Data != nullptr) // return default_callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRtnPositionProfit>::sync(instance, py_func_name, &copied_info);
{ // }
copied_info.Data = &profit; // ensure pointer is pointer to the correct address(address changes after constructed lambda) // catch (const async_dispatch_exception& e)
} // {
return default_callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRtnPositionProfit>::sync(instance, py_func_name, &copied_info); // async_callback_exception_handler::handle_excepiton(e);
}; // }
dispatcher::instance().add(std::move(task)); // };
} // dispatcher::instance().add(std::move(task));
}; // }
//};
} }

View File

@ -45,57 +45,27 @@ void generate_vntap(pybind11::module & parent)
pybind11::call_guard<pybind11::gil_scoped_release>() pybind11::call_guard<pybind11::gil_scoped_release>()
); );
parent.def("FreeITapTradeAPI", parent.def("FreeITapTradeAPI",
autocxxpy::apply_function_transform< &FreeITapTradeAPI,
autocxxpy::function_constant<
&FreeITapTradeAPI
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference, pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>() pybind11::call_guard<pybind11::gil_scoped_release>()
); );
parent.def("GetITapTradeAPIVersion", parent.def("GetITapTradeAPIVersion",
autocxxpy::apply_function_transform< &GetITapTradeAPIVersion,
autocxxpy::function_constant<
&GetITapTradeAPIVersion
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference, pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>() pybind11::call_guard<pybind11::gil_scoped_release>()
); );
parent.def("SetITapTradeAPIDataPath", parent.def("SetITapTradeAPIDataPath",
autocxxpy::apply_function_transform< &SetITapTradeAPIDataPath,
autocxxpy::function_constant<
&SetITapTradeAPIDataPath
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference, pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>() pybind11::call_guard<pybind11::gil_scoped_release>()
); );
parent.def("SetITapTradeAPILogLevel", parent.def("SetITapTradeAPILogLevel",
autocxxpy::apply_function_transform< &SetITapTradeAPILogLevel,
autocxxpy::function_constant<
&SetITapTradeAPILogLevel
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference, pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>() pybind11::call_guard<pybind11::gil_scoped_release>()
); );
parent.def("GetITapErrorDescribe", parent.def("GetITapErrorDescribe",
autocxxpy::apply_function_transform< &GetITapErrorDescribe,
autocxxpy::function_constant<
&GetITapErrorDescribe
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference, pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>() pybind11::call_guard<pybind11::gil_scoped_release>()
); );
@ -112,46 +82,22 @@ void generate_vntap(pybind11::module & parent)
pybind11::call_guard<pybind11::gil_scoped_release>() pybind11::call_guard<pybind11::gil_scoped_release>()
); );
parent.def("FreeTapQuoteAPI", parent.def("FreeTapQuoteAPI",
autocxxpy::apply_function_transform< &FreeTapQuoteAPI,
autocxxpy::function_constant<
&FreeTapQuoteAPI
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference, pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>() pybind11::call_guard<pybind11::gil_scoped_release>()
); );
parent.def("GetTapQuoteAPIVersion", parent.def("GetTapQuoteAPIVersion",
autocxxpy::apply_function_transform< &GetTapQuoteAPIVersion,
autocxxpy::function_constant<
&GetTapQuoteAPIVersion
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference, pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>() pybind11::call_guard<pybind11::gil_scoped_release>()
); );
parent.def("SetTapQuoteAPIDataPath", parent.def("SetTapQuoteAPIDataPath",
autocxxpy::apply_function_transform< &SetTapQuoteAPIDataPath,
autocxxpy::function_constant<
&SetTapQuoteAPIDataPath
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference, pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>() pybind11::call_guard<pybind11::gil_scoped_release>()
); );
parent.def("SetTapQuoteAPILogLevel", parent.def("SetTapQuoteAPILogLevel",
autocxxpy::apply_function_transform< &SetTapQuoteAPILogLevel,
autocxxpy::function_constant<
&SetTapQuoteAPILogLevel
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference, pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>() pybind11::call_guard<pybind11::gil_scoped_release>()
); );

View File

@ -589,35 +589,3 @@ void generate_class_ITapTrade_TapAPIFundData(pybind11::object & parent)
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIFundData, c); AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIFundData, c);
module_vntap::objects.emplace("ITapTrade::TapAPIFundData", c); module_vntap::objects.emplace("ITapTrade::TapAPIFundData", c);
} }
void generate_class_ITapTrade_TapAPICommodityInfo(pybind11::object & parent)
{
pybind11::class_<ITapTrade::TapAPICommodityInfo> c(parent, "TapAPICommodityInfo");
if constexpr (std::is_default_constructible_v<ITapTrade::TapAPICommodityInfo>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "ExchangeNo", ExchangeNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CommodityType", CommodityType);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CommodityNo", CommodityNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CommodityName", CommodityName);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CommodityEngName", CommodityEngName);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "RelateExchangeNo", RelateExchangeNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "RelateCommodityType", RelateCommodityType);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "RelateCommodityNo", RelateCommodityNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "RelateExchangeNo2", RelateExchangeNo2);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "RelateCommodityType2", RelateCommodityType2);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "RelateCommodityNo2", RelateCommodityNo2);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CurrencyGroupNo", CurrencyGroupNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "TradeCurrency", TradeCurrency);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "ContractSize", ContractSize);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "OpenCloseMode", OpenCloseMode);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "StrikePriceTimes", StrikePriceTimes);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CommodityTickSize", CommodityTickSize);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CommodityDenominator", CommodityDenominator);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CmbDirect", CmbDirect);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "DeliveryMode", DeliveryMode);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "DeliveryDays", DeliveryDays);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "AddOneTime", AddOneTime);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CommodityTimeZone", CommodityTimeZone);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "IsAddOne", IsAddOne);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPICommodityInfo, c);
module_vntap::objects.emplace("ITapTrade::TapAPICommodityInfo", c);
}

View File

@ -14,6 +14,38 @@
#include "custom/custom_wrappers.hpp" #include "custom/custom_wrappers.hpp"
void generate_class_ITapTrade_TapAPICommodityInfo(pybind11::object & parent)
{
pybind11::class_<ITapTrade::TapAPICommodityInfo> c(parent, "TapAPICommodityInfo");
if constexpr (std::is_default_constructible_v<ITapTrade::TapAPICommodityInfo>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "ExchangeNo", ExchangeNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CommodityType", CommodityType);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CommodityNo", CommodityNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CommodityName", CommodityName);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CommodityEngName", CommodityEngName);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "RelateExchangeNo", RelateExchangeNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "RelateCommodityType", RelateCommodityType);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "RelateCommodityNo", RelateCommodityNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "RelateExchangeNo2", RelateExchangeNo2);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "RelateCommodityType2", RelateCommodityType2);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "RelateCommodityNo2", RelateCommodityNo2);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CurrencyGroupNo", CurrencyGroupNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "TradeCurrency", TradeCurrency);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "ContractSize", ContractSize);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "OpenCloseMode", OpenCloseMode);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "StrikePriceTimes", StrikePriceTimes);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CommodityTickSize", CommodityTickSize);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CommodityDenominator", CommodityDenominator);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CmbDirect", CmbDirect);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "DeliveryMode", DeliveryMode);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "DeliveryDays", DeliveryDays);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "AddOneTime", AddOneTime);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CommodityTimeZone", CommodityTimeZone);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "IsAddOne", IsAddOne);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPICommodityInfo, c);
module_vntap::objects.emplace("ITapTrade::TapAPICommodityInfo", c);
}
void generate_class_ITapTrade_TapAPITradeContractInfo(pybind11::object & parent) void generate_class_ITapTrade_TapAPITradeContractInfo(pybind11::object & parent)
{ {
pybind11::class_<ITapTrade::TapAPITradeContractInfo> c(parent, "TapAPITradeContractInfo"); pybind11::class_<ITapTrade::TapAPITradeContractInfo> c(parent, "TapAPITradeContractInfo");
@ -554,78 +586,3 @@ void generate_class_ITapTrade_TapAPIOrderMarketInsertRsp(pybind11::object & pare
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, c); AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, c);
module_vntap::objects.emplace("ITapTrade::TapAPIOrderMarketInsertRsp", c); module_vntap::objects.emplace("ITapTrade::TapAPIOrderMarketInsertRsp", c);
} }
void generate_class_ITapTrade_TapAPIOrderMarketDeleteReq(pybind11::object & parent)
{
pybind11::class_<ITapTrade::TapAPIOrderMarketDeleteReq> c(parent, "TapAPIOrderMarketDeleteReq");
if constexpr (std::is_default_constructible_v<ITapTrade::TapAPIOrderMarketDeleteReq>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketDeleteReq, "ServerFlag", ServerFlag);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketDeleteReq, "OrderBuyNo", OrderBuyNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketDeleteReq, "OrderSellNo", OrderSellNo);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIOrderMarketDeleteReq, c);
module_vntap::objects.emplace("ITapTrade::TapAPIOrderMarketDeleteReq", c);
}
void generate_class_ITapTrade_TapAPIOrderLocalRemoveReq(pybind11::object & parent)
{
pybind11::class_<ITapTrade::TapAPIOrderLocalRemoveReq> c(parent, "TapAPIOrderLocalRemoveReq");
if constexpr (std::is_default_constructible_v<ITapTrade::TapAPIOrderLocalRemoveReq>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalRemoveReq, "ServerFlag", ServerFlag);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalRemoveReq, "OrderNo", OrderNo);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIOrderLocalRemoveReq, c);
module_vntap::objects.emplace("ITapTrade::TapAPIOrderLocalRemoveReq", c);
}
void generate_class_ITapTrade_TapAPIOrderLocalRemoveRsp(pybind11::object & parent)
{
pybind11::class_<ITapTrade::TapAPIOrderLocalRemoveRsp> c(parent, "TapAPIOrderLocalRemoveRsp");
if constexpr (std::is_default_constructible_v<ITapTrade::TapAPIOrderLocalRemoveRsp>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalRemoveRsp, "req", req);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalRemoveRsp, "ClientLocalIP", ClientLocalIP);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalRemoveRsp, "ClientMac", ClientMac);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalRemoveRsp, "ClientIP", ClientIP);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIOrderLocalRemoveRsp, c);
module_vntap::objects.emplace("ITapTrade::TapAPIOrderLocalRemoveRsp", c);
}
void generate_class_ITapTrade_TapAPIOrderLocalInputReq(pybind11::object & parent)
{
pybind11::class_<ITapTrade::TapAPIOrderLocalInputReq> c(parent, "TapAPIOrderLocalInputReq");
if constexpr (std::is_default_constructible_v<ITapTrade::TapAPIOrderLocalInputReq>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "AccountNo", AccountNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "ExchangeNo", ExchangeNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "CommodityType", CommodityType);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "CommodityNo", CommodityNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "ContractNo", ContractNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "StrikePrice", StrikePrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "CallOrPutFlag", CallOrPutFlag);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "ContractNo2", ContractNo2);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "StrikePrice2", StrikePrice2);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "CallOrPutFlag2", CallOrPutFlag2);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderType", OrderType);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderSource", OrderSource);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "TimeInForce", TimeInForce);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "ExpireTime", ExpireTime);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "IsRiskOrder", IsRiskOrder);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderSide", OrderSide);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "PositionEffect", PositionEffect);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "PositionEffect2", PositionEffect2);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "InquiryNo", InquiryNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "HedgeFlag", HedgeFlag);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderPrice", OrderPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderPrice2", OrderPrice2);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "StopPrice", StopPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderQty", OrderQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderMinQty", OrderMinQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderSystemNo", OrderSystemNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderExchangeSystemNo", OrderExchangeSystemNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "UpperNo", UpperNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderMatchPrice", OrderMatchPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderMatchPrice2", OrderMatchPrice2);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderMatchQty", OrderMatchQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderMatchQty2", OrderMatchQty2);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderState", OrderState);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "IsAddOne", IsAddOne);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, c);
module_vntap::objects.emplace("ITapTrade::TapAPIOrderLocalInputReq", c);
}

File diff suppressed because it is too large Load Diff

View File

@ -14,539 +14,6 @@
#include "custom/custom_wrappers.hpp" #include "custom/custom_wrappers.hpp"
void generate_class_ITapTrade_ITapTradeAPI(pybind11::object & parent)
{
pybind11::class_<ITapTrade::ITapTradeAPI, PyITapTradeAPI> c(parent, "ITapTradeAPI");
if constexpr (std::is_default_constructible_v<PyITapTradeAPI>)
c.def(pybind11::init<>());
c.def("SetAPINotify",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::SetAPINotify
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("SetHostAddress",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::SetHostAddress
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("Login",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::Login
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("RequestVertificateCode",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::RequestVertificateCode
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("SetVertificateCode",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::SetVertificateCode
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("Disconnect",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::Disconnect
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("ChangePassword",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::ChangePassword
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("AuthPassword",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::AuthPassword
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("HaveCertainRight",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::HaveCertainRight
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryTradingDate",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::QryTradingDate
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("SetReservedInfo",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::SetReservedInfo
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryAccount",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::QryAccount
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryFund",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::QryFund
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryExchange",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::QryExchange
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryCommodity",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::QryCommodity
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryContract",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::QryContract
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("InsertOrder",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::InsertOrder
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>,
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("CancelOrder",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::CancelOrder
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("AmendOrder",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::AmendOrder
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("ActivateOrder",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::ActivateOrder
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryOrder",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::QryOrder
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryOrderProcess",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::QryOrderProcess
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryFill",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::QryFill
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryPosition",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::QryPosition
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryPositionSummary",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::QryPositionSummary
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryCurrency",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::QryCurrency
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryAccountCashAdjust",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::QryAccountCashAdjust
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryTradeMessage",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::QryTradeMessage
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryBill",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::QryBill
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryHisOrder",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::QryHisOrder
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryHisOrderProcess",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::QryHisOrderProcess
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryHisMatch",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::QryHisMatch
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryHisPosition",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::QryHisPosition
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryHisDelivery",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::QryHisDelivery
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryAccountFeeRent",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::QryAccountFeeRent
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryAccountMarginRent",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::QryAccountMarginRent
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("InsertHKMarketOrder",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::InsertHKMarketOrder
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>,
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>,
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("CancelHKMarketOrder",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::CancelHKMarketOrder
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("OrderLocalRemove",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::OrderLocalRemove
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("OrderLocalInput",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::OrderLocalInput
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("OrderLocalModify",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::OrderLocalModify
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("OrderLocalTransfer",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::OrderLocalTransfer
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("FillLocalInput",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::FillLocalInput
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("FillLocalRemove",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapTrade::ITapTradeAPI::FillLocalRemove
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::ITapTradeAPI, c);
module_vntap::objects.emplace("ITapTrade::ITapTradeAPI", c);
}
void generate_caster_ITapTrade(pybind11::object & parent) void generate_caster_ITapTrade(pybind11::object & parent)
{ {
struct caster: autocxxpy::caster{}; struct caster: autocxxpy::caster{};
@ -698,3 +165,355 @@ void generate_caster_ITapTrade(pybind11::object & parent)
autocxxpy::caster::try_generate<ITapTrade::TapAPIFillLocalInputRsp>(c, "toTapAPIFillLocalInputRsp)"); autocxxpy::caster::try_generate<ITapTrade::TapAPIFillLocalInputRsp>(c, "toTapAPIFillLocalInputRsp)");
autocxxpy::caster::try_generate<ITapTrade::TapAPIFillLocalRemoveRsp>(c, "toTapAPIFillLocalRemoveRsp)"); autocxxpy::caster::try_generate<ITapTrade::TapAPIFillLocalRemoveRsp>(c, "toTapAPIFillLocalRemoveRsp)");
} }
void generate_class_TapAPIApplicationInfo(pybind11::object & parent)
{
pybind11::class_<TapAPIApplicationInfo> c(parent, "TapAPIApplicationInfo");
if constexpr (std::is_default_constructible_v<TapAPIApplicationInfo>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIApplicationInfo, "AuthCode", AuthCode);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIApplicationInfo, "KeyOperationLogPath", KeyOperationLogPath);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, TapAPIApplicationInfo, c);
module_vntap::objects.emplace("TapAPIApplicationInfo", c);
}
void generate_class_TapAPICommodity(pybind11::object & parent)
{
pybind11::class_<TapAPICommodity> c(parent, "TapAPICommodity");
if constexpr (std::is_default_constructible_v<TapAPICommodity>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPICommodity, "ExchangeNo", ExchangeNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPICommodity, "CommodityType", CommodityType);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPICommodity, "CommodityNo", CommodityNo);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, TapAPICommodity, c);
module_vntap::objects.emplace("TapAPICommodity", c);
}
void generate_class_TapAPIContract(pybind11::object & parent)
{
pybind11::class_<TapAPIContract> c(parent, "TapAPIContract");
if constexpr (std::is_default_constructible_v<TapAPIContract>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIContract, "Commodity", Commodity);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIContract, "ContractNo1", ContractNo1);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIContract, "StrikePrice1", StrikePrice1);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIContract, "CallOrPutFlag1", CallOrPutFlag1);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIContract, "ContractNo2", ContractNo2);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIContract, "StrikePrice2", StrikePrice2);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIContract, "CallOrPutFlag2", CallOrPutFlag2);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, TapAPIContract, c);
module_vntap::objects.emplace("TapAPIContract", c);
}
void generate_class_TapAPIExchangeInfo(pybind11::object & parent)
{
pybind11::class_<TapAPIExchangeInfo> c(parent, "TapAPIExchangeInfo");
if constexpr (std::is_default_constructible_v<TapAPIExchangeInfo>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIExchangeInfo, "ExchangeNo", ExchangeNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIExchangeInfo, "ExchangeName", ExchangeName);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, TapAPIExchangeInfo, c);
module_vntap::objects.emplace("TapAPIExchangeInfo", c);
}
void generate_class_TapAPIChangePasswordReq(pybind11::object & parent)
{
pybind11::class_<TapAPIChangePasswordReq> c(parent, "TapAPIChangePasswordReq");
if constexpr (std::is_default_constructible_v<TapAPIChangePasswordReq>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIChangePasswordReq, "OldPassword", OldPassword);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIChangePasswordReq, "NewPassword", NewPassword);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, TapAPIChangePasswordReq, c);
module_vntap::objects.emplace("TapAPIChangePasswordReq", c);
}
void generate_class_TapAPIQuoteLoginAuth(pybind11::object & parent)
{
pybind11::class_<TapAPIQuoteLoginAuth> c(parent, "TapAPIQuoteLoginAuth");
if constexpr (std::is_default_constructible_v<TapAPIQuoteLoginAuth>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteLoginAuth, "UserNo", UserNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteLoginAuth, "ISModifyPassword", ISModifyPassword);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteLoginAuth, "Password", Password);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteLoginAuth, "NewPassword", NewPassword);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteLoginAuth, "QuoteTempPassword", QuoteTempPassword);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteLoginAuth, "ISDDA", ISDDA);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteLoginAuth, "DDASerialNo", DDASerialNo);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, TapAPIQuoteLoginAuth, c);
module_vntap::objects.emplace("TapAPIQuoteLoginAuth", c);
}
void generate_class_TapAPIQuotLoginRspInfo(pybind11::object & parent)
{
pybind11::class_<TapAPIQuotLoginRspInfo> c(parent, "TapAPIQuotLoginRspInfo");
if constexpr (std::is_default_constructible_v<TapAPIQuotLoginRspInfo>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "UserNo", UserNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "UserType", UserType);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "UserName", UserName);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "QuoteTempPassword", QuoteTempPassword);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "ReservedInfo", ReservedInfo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "LastLoginIP", LastLoginIP);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "LastLoginProt", LastLoginProt);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "LastLoginTime", LastLoginTime);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "LastLogoutTime", LastLogoutTime);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "TradeDate", TradeDate);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "LastSettleTime", LastSettleTime);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "StartTime", StartTime);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "InitTime", InitTime);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, TapAPIQuotLoginRspInfo, c);
module_vntap::objects.emplace("TapAPIQuotLoginRspInfo", c);
}
void generate_class_TapAPIQuoteCommodityInfo(pybind11::object & parent)
{
pybind11::class_<TapAPIQuoteCommodityInfo> c(parent, "TapAPIQuoteCommodityInfo");
if constexpr (std::is_default_constructible_v<TapAPIQuoteCommodityInfo>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "Commodity", Commodity);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "CommodityName", CommodityName);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "CommodityEngName", CommodityEngName);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "ContractSize", ContractSize);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "CommodityTickSize", CommodityTickSize);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "CommodityDenominator", CommodityDenominator);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "CmbDirect", CmbDirect);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "CommodityContractLen", CommodityContractLen);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "IsDST", IsDST);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "RelateCommodity1", RelateCommodity1);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "RelateCommodity2", RelateCommodity2);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, TapAPIQuoteCommodityInfo, c);
module_vntap::objects.emplace("TapAPIQuoteCommodityInfo", c);
}
void generate_class_TapAPIQuoteContractInfo(pybind11::object & parent)
{
pybind11::class_<TapAPIQuoteContractInfo> c(parent, "TapAPIQuoteContractInfo");
if constexpr (std::is_default_constructible_v<TapAPIQuoteContractInfo>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteContractInfo, "Contract", Contract);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteContractInfo, "ContractType", ContractType);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteContractInfo, "QuoteUnderlyingContract", QuoteUnderlyingContract);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteContractInfo, "ContractName", ContractName);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteContractInfo, "ContractExpDate", ContractExpDate);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteContractInfo, "LastTradeDate", LastTradeDate);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteContractInfo, "FirstNoticeDate", FirstNoticeDate);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, TapAPIQuoteContractInfo, c);
module_vntap::objects.emplace("TapAPIQuoteContractInfo", c);
}
void generate_class_TapAPIQuoteWhole(pybind11::object & parent)
{
pybind11::class_<TapAPIQuoteWhole> c(parent, "TapAPIQuoteWhole");
if constexpr (std::is_default_constructible_v<TapAPIQuoteWhole>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "Contract", Contract);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "CurrencyNo", CurrencyNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "TradingState", TradingState);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "DateTimeStamp", DateTimeStamp);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QPreClosingPrice", QPreClosingPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QPreSettlePrice", QPreSettlePrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QPrePositionQty", QPrePositionQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QOpeningPrice", QOpeningPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QLastPrice", QLastPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QHighPrice", QHighPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QLowPrice", QLowPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QHisHighPrice", QHisHighPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QHisLowPrice", QHisLowPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QLimitUpPrice", QLimitUpPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QLimitDownPrice", QLimitDownPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QTotalQty", QTotalQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QTotalTurnover", QTotalTurnover);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QPositionQty", QPositionQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QAveragePrice", QAveragePrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QClosingPrice", QClosingPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QSettlePrice", QSettlePrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QLastQty", QLastQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QBidPrice", QBidPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QBidQty", QBidQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QAskPrice", QAskPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QAskQty", QAskQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QImpliedBidPrice", QImpliedBidPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QImpliedBidQty", QImpliedBidQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QImpliedAskPrice", QImpliedAskPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QImpliedAskQty", QImpliedAskQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QPreDelta", QPreDelta);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QCurrDelta", QCurrDelta);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QInsideQty", QInsideQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QOutsideQty", QOutsideQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QTurnoverRate", QTurnoverRate);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "Q5DAvgQty", Q5DAvgQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QPERatio", QPERatio);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QTotalValue", QTotalValue);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QNegotiableValue", QNegotiableValue);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QPositionTrend", QPositionTrend);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QChangeSpeed", QChangeSpeed);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QChangeRate", QChangeRate);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QChangeValue", QChangeValue);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QSwing", QSwing);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QTotalBidQty", QTotalBidQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QTotalAskQty", QTotalAskQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "UnderlyContract", UnderlyContract);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, TapAPIQuoteWhole, c);
module_vntap::objects.emplace("TapAPIQuoteWhole", c);
}
void generate_class_ITapQuoteAPINotify(pybind11::object & parent)
{
pybind11::class_<ITapQuoteAPINotify, PyITapQuoteAPINotify> c(parent, "ITapQuoteAPINotify");
if constexpr (std::is_default_constructible_v<PyITapQuoteAPINotify>)
c.def(pybind11::init<>());
c.def("OnRspLogin",
&ITapQuoteAPINotify::OnRspLogin,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("OnAPIReady",
&ITapQuoteAPINotify::OnAPIReady,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("OnDisconnect",
&ITapQuoteAPINotify::OnDisconnect,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("OnRspQryCommodity",
&ITapQuoteAPINotify::OnRspQryCommodity,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("OnRspQryContract",
&ITapQuoteAPINotify::OnRspQryContract,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("OnRspSubscribeQuote",
&ITapQuoteAPINotify::OnRspSubscribeQuote,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("OnRspUnSubscribeQuote",
&ITapQuoteAPINotify::OnRspUnSubscribeQuote,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("OnRtnQuote",
&ITapQuoteAPINotify::OnRtnQuote,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapQuoteAPINotify, c);
module_vntap::objects.emplace("ITapQuoteAPINotify", c);
}
void generate_class_ITapQuoteAPI(pybind11::object & parent)
{
pybind11::class_<ITapQuoteAPI, PyITapQuoteAPI> c(parent, "ITapQuoteAPI");
if constexpr (std::is_default_constructible_v<PyITapQuoteAPI>)
c.def(pybind11::init<>());
c.def("SetAPINotify",
&ITapQuoteAPI::SetAPINotify,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("SetHostAddress",
&ITapQuoteAPI::SetHostAddress,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("Login",
&ITapQuoteAPI::Login,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("Disconnect",
&ITapQuoteAPI::Disconnect,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryCommodity",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapQuoteAPI::QryCommodity
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryContract",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapQuoteAPI::QryContract
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("SubscribeQuote",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapQuoteAPI::SubscribeQuote
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("UnSubscribeQuote",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapQuoteAPI::UnSubscribeQuote
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapQuoteAPI, c);
module_vntap::objects.emplace("ITapQuoteAPI", c);
}
void generate_caster_(pybind11::object & parent)
{
struct caster: autocxxpy::caster{};
auto c = autocxxpy::caster::bind<caster>(parent, "caster");
autocxxpy::caster::try_generate<TapAPIApplicationInfo>(c, "toTapAPIApplicationInfo)");
autocxxpy::caster::try_generate<TapAPICommodity>(c, "toTapAPICommodity)");
autocxxpy::caster::try_generate<TapAPIContract>(c, "toTapAPIContract)");
autocxxpy::caster::try_generate<TapAPIExchangeInfo>(c, "toTapAPIExchangeInfo)");
autocxxpy::caster::try_generate<TapAPIChangePasswordReq>(c, "toTapAPIChangePasswordReq)");
autocxxpy::caster::try_generate<TapAPIQuoteLoginAuth>(c, "toTapAPIQuoteLoginAuth)");
autocxxpy::caster::try_generate<TapAPIQuotLoginRspInfo>(c, "toTapAPIQuotLoginRspInfo)");
autocxxpy::caster::try_generate<TapAPIQuoteCommodityInfo>(c, "toTapAPIQuoteCommodityInfo)");
autocxxpy::caster::try_generate<TapAPIQuoteContractInfo>(c, "toTapAPIQuoteContractInfo)");
autocxxpy::caster::try_generate<TapAPIQuoteWhole>(c, "toTapAPIQuoteWhole)");
autocxxpy::caster::try_generate<ITapQuoteAPINotify>(c, "toITapQuoteAPINotify)");
autocxxpy::caster::try_generate<ITapQuoteAPI>(c, "toITapQuoteAPI)");
autocxxpy::caster::try_generate<TAPISTR_10>(c, "toTAPISTR_10)");
autocxxpy::caster::try_generate<TAPISTR_20>(c, "toTAPISTR_20)");
autocxxpy::caster::try_generate<TAPISTR_30>(c, "toTAPISTR_30)");
autocxxpy::caster::try_generate<TAPISTR_40>(c, "toTAPISTR_40)");
autocxxpy::caster::try_generate<TAPISTR_50>(c, "toTAPISTR_50)");
autocxxpy::caster::try_generate<TAPISTR_70>(c, "toTAPISTR_70)");
autocxxpy::caster::try_generate<TAPISTR_100>(c, "toTAPISTR_100)");
autocxxpy::caster::try_generate<TAPISTR_300>(c, "toTAPISTR_300)");
autocxxpy::caster::try_generate<TAPISTR_500>(c, "toTAPISTR_500)");
autocxxpy::caster::try_generate<TAPISTR_2000>(c, "toTAPISTR_2000)");
autocxxpy::caster::try_generate<TAPIAUTHCODE>(c, "toTAPIAUTHCODE)");
autocxxpy::caster::try_generate<TAPICHAR>(c, "toTAPICHAR)");
autocxxpy::caster::try_generate<TAPIINT32>(c, "toTAPIINT32)");
autocxxpy::caster::try_generate<TAPIUINT32>(c, "toTAPIUINT32)");
autocxxpy::caster::try_generate<TAPIINT64>(c, "toTAPIINT64)");
autocxxpy::caster::try_generate<TAPIUINT64>(c, "toTAPIUINT64)");
autocxxpy::caster::try_generate<TAPIUINT16>(c, "toTAPIUINT16)");
autocxxpy::caster::try_generate<TAPIUINT8>(c, "toTAPIUINT8)");
autocxxpy::caster::try_generate<TAPIREAL64>(c, "toTAPIREAL64)");
autocxxpy::caster::try_generate<TAPIYNFLAG>(c, "toTAPIYNFLAG)");
autocxxpy::caster::try_generate<TAPIDTSTAMP>(c, "toTAPIDTSTAMP)");
autocxxpy::caster::try_generate<TAPIDATETIME>(c, "toTAPIDATETIME)");
autocxxpy::caster::try_generate<TAPIDATE>(c, "toTAPIDATE)");
autocxxpy::caster::try_generate<TAPITIME>(c, "toTAPITIME)");
autocxxpy::caster::try_generate<TAPILOGLEVEL>(c, "toTAPILOGLEVEL)");
autocxxpy::caster::try_generate<TAPICommodityType>(c, "toTAPICommodityType)");
autocxxpy::caster::try_generate<TAPICallOrPutFlagType>(c, "toTAPICallOrPutFlagType)");
autocxxpy::caster::try_generate<TAPIQPRICE>(c, "toTAPIQPRICE)");
autocxxpy::caster::try_generate<TAPIQVOLUME>(c, "toTAPIQVOLUME)");
autocxxpy::caster::try_generate<TAPIQDIFF>(c, "toTAPIQDIFF)");
}

View File

@ -1,440 +0,0 @@
#include <iostream>
#include <string>
#include <pybind11/pybind11.h>
#include <autocxxpy/autocxxpy.hpp>
#include "module.hpp"
#include "wrappers.hpp"
#include "generated_functions.h"
#include "iTapTradeAPI.h"
#include "TapQuoteAPI.h"
#include "TapAPIError.h"
#include "iTapAPIError.h"
#include "custom/custom_wrappers.hpp"
void generate_class_TapAPIApplicationInfo(pybind11::object & parent)
{
pybind11::class_<TapAPIApplicationInfo> c(parent, "TapAPIApplicationInfo");
if constexpr (std::is_default_constructible_v<TapAPIApplicationInfo>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIApplicationInfo, "AuthCode", AuthCode);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIApplicationInfo, "KeyOperationLogPath", KeyOperationLogPath);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, TapAPIApplicationInfo, c);
module_vntap::objects.emplace("TapAPIApplicationInfo", c);
}
void generate_class_TapAPICommodity(pybind11::object & parent)
{
pybind11::class_<TapAPICommodity> c(parent, "TapAPICommodity");
if constexpr (std::is_default_constructible_v<TapAPICommodity>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPICommodity, "ExchangeNo", ExchangeNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPICommodity, "CommodityType", CommodityType);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPICommodity, "CommodityNo", CommodityNo);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, TapAPICommodity, c);
module_vntap::objects.emplace("TapAPICommodity", c);
}
void generate_class_TapAPIContract(pybind11::object & parent)
{
pybind11::class_<TapAPIContract> c(parent, "TapAPIContract");
if constexpr (std::is_default_constructible_v<TapAPIContract>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIContract, "Commodity", Commodity);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIContract, "ContractNo1", ContractNo1);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIContract, "StrikePrice1", StrikePrice1);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIContract, "CallOrPutFlag1", CallOrPutFlag1);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIContract, "ContractNo2", ContractNo2);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIContract, "StrikePrice2", StrikePrice2);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIContract, "CallOrPutFlag2", CallOrPutFlag2);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, TapAPIContract, c);
module_vntap::objects.emplace("TapAPIContract", c);
}
void generate_class_TapAPIExchangeInfo(pybind11::object & parent)
{
pybind11::class_<TapAPIExchangeInfo> c(parent, "TapAPIExchangeInfo");
if constexpr (std::is_default_constructible_v<TapAPIExchangeInfo>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIExchangeInfo, "ExchangeNo", ExchangeNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIExchangeInfo, "ExchangeName", ExchangeName);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, TapAPIExchangeInfo, c);
module_vntap::objects.emplace("TapAPIExchangeInfo", c);
}
void generate_class_TapAPIChangePasswordReq(pybind11::object & parent)
{
pybind11::class_<TapAPIChangePasswordReq> c(parent, "TapAPIChangePasswordReq");
if constexpr (std::is_default_constructible_v<TapAPIChangePasswordReq>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIChangePasswordReq, "OldPassword", OldPassword);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIChangePasswordReq, "NewPassword", NewPassword);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, TapAPIChangePasswordReq, c);
module_vntap::objects.emplace("TapAPIChangePasswordReq", c);
}
void generate_class_TapAPIQuoteLoginAuth(pybind11::object & parent)
{
pybind11::class_<TapAPIQuoteLoginAuth> c(parent, "TapAPIQuoteLoginAuth");
if constexpr (std::is_default_constructible_v<TapAPIQuoteLoginAuth>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteLoginAuth, "UserNo", UserNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteLoginAuth, "ISModifyPassword", ISModifyPassword);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteLoginAuth, "Password", Password);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteLoginAuth, "NewPassword", NewPassword);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteLoginAuth, "QuoteTempPassword", QuoteTempPassword);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteLoginAuth, "ISDDA", ISDDA);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteLoginAuth, "DDASerialNo", DDASerialNo);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, TapAPIQuoteLoginAuth, c);
module_vntap::objects.emplace("TapAPIQuoteLoginAuth", c);
}
void generate_class_TapAPIQuotLoginRspInfo(pybind11::object & parent)
{
pybind11::class_<TapAPIQuotLoginRspInfo> c(parent, "TapAPIQuotLoginRspInfo");
if constexpr (std::is_default_constructible_v<TapAPIQuotLoginRspInfo>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "UserNo", UserNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "UserType", UserType);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "UserName", UserName);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "QuoteTempPassword", QuoteTempPassword);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "ReservedInfo", ReservedInfo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "LastLoginIP", LastLoginIP);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "LastLoginProt", LastLoginProt);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "LastLoginTime", LastLoginTime);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "LastLogoutTime", LastLogoutTime);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "TradeDate", TradeDate);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "LastSettleTime", LastSettleTime);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "StartTime", StartTime);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "InitTime", InitTime);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, TapAPIQuotLoginRspInfo, c);
module_vntap::objects.emplace("TapAPIQuotLoginRspInfo", c);
}
void generate_class_TapAPIQuoteCommodityInfo(pybind11::object & parent)
{
pybind11::class_<TapAPIQuoteCommodityInfo> c(parent, "TapAPIQuoteCommodityInfo");
if constexpr (std::is_default_constructible_v<TapAPIQuoteCommodityInfo>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "Commodity", Commodity);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "CommodityName", CommodityName);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "CommodityEngName", CommodityEngName);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "ContractSize", ContractSize);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "CommodityTickSize", CommodityTickSize);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "CommodityDenominator", CommodityDenominator);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "CmbDirect", CmbDirect);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "CommodityContractLen", CommodityContractLen);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "IsDST", IsDST);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "RelateCommodity1", RelateCommodity1);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "RelateCommodity2", RelateCommodity2);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, TapAPIQuoteCommodityInfo, c);
module_vntap::objects.emplace("TapAPIQuoteCommodityInfo", c);
}
void generate_class_TapAPIQuoteContractInfo(pybind11::object & parent)
{
pybind11::class_<TapAPIQuoteContractInfo> c(parent, "TapAPIQuoteContractInfo");
if constexpr (std::is_default_constructible_v<TapAPIQuoteContractInfo>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteContractInfo, "Contract", Contract);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteContractInfo, "ContractType", ContractType);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteContractInfo, "QuoteUnderlyingContract", QuoteUnderlyingContract);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteContractInfo, "ContractName", ContractName);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteContractInfo, "ContractExpDate", ContractExpDate);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteContractInfo, "LastTradeDate", LastTradeDate);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteContractInfo, "FirstNoticeDate", FirstNoticeDate);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, TapAPIQuoteContractInfo, c);
module_vntap::objects.emplace("TapAPIQuoteContractInfo", c);
}
void generate_class_TapAPIQuoteWhole(pybind11::object & parent)
{
pybind11::class_<TapAPIQuoteWhole> c(parent, "TapAPIQuoteWhole");
if constexpr (std::is_default_constructible_v<TapAPIQuoteWhole>)
c.def(pybind11::init<>());
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "Contract", Contract);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "CurrencyNo", CurrencyNo);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "TradingState", TradingState);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "DateTimeStamp", DateTimeStamp);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QPreClosingPrice", QPreClosingPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QPreSettlePrice", QPreSettlePrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QPrePositionQty", QPrePositionQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QOpeningPrice", QOpeningPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QLastPrice", QLastPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QHighPrice", QHighPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QLowPrice", QLowPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QHisHighPrice", QHisHighPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QHisLowPrice", QHisLowPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QLimitUpPrice", QLimitUpPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QLimitDownPrice", QLimitDownPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QTotalQty", QTotalQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QTotalTurnover", QTotalTurnover);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QPositionQty", QPositionQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QAveragePrice", QAveragePrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QClosingPrice", QClosingPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QSettlePrice", QSettlePrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QLastQty", QLastQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QBidPrice", QBidPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QBidQty", QBidQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QAskPrice", QAskPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QAskQty", QAskQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QImpliedBidPrice", QImpliedBidPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QImpliedBidQty", QImpliedBidQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QImpliedAskPrice", QImpliedAskPrice);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QImpliedAskQty", QImpliedAskQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QPreDelta", QPreDelta);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QCurrDelta", QCurrDelta);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QInsideQty", QInsideQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QOutsideQty", QOutsideQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QTurnoverRate", QTurnoverRate);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "Q5DAvgQty", Q5DAvgQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QPERatio", QPERatio);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QTotalValue", QTotalValue);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QNegotiableValue", QNegotiableValue);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QPositionTrend", QPositionTrend);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QChangeSpeed", QChangeSpeed);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QChangeRate", QChangeRate);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QChangeValue", QChangeValue);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QSwing", QSwing);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QTotalBidQty", QTotalBidQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QTotalAskQty", QTotalAskQty);
c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "UnderlyContract", UnderlyContract);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, TapAPIQuoteWhole, c);
module_vntap::objects.emplace("TapAPIQuoteWhole", c);
}
void generate_class_ITapQuoteAPINotify(pybind11::object & parent)
{
pybind11::class_<ITapQuoteAPINotify, PyITapQuoteAPINotify> c(parent, "ITapQuoteAPINotify");
if constexpr (std::is_default_constructible_v<PyITapQuoteAPINotify>)
c.def(pybind11::init<>());
c.def("OnRspLogin",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapQuoteAPINotify::OnRspLogin
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("OnAPIReady",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapQuoteAPINotify::OnAPIReady
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("OnDisconnect",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapQuoteAPINotify::OnDisconnect
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("OnRspQryCommodity",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapQuoteAPINotify::OnRspQryCommodity
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("OnRspQryContract",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapQuoteAPINotify::OnRspQryContract
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("OnRspSubscribeQuote",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapQuoteAPINotify::OnRspSubscribeQuote
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("OnRspUnSubscribeQuote",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapQuoteAPINotify::OnRspUnSubscribeQuote
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("OnRtnQuote",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapQuoteAPINotify::OnRtnQuote
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapQuoteAPINotify, c);
module_vntap::objects.emplace("ITapQuoteAPINotify", c);
}
void generate_class_ITapQuoteAPI(pybind11::object & parent)
{
pybind11::class_<ITapQuoteAPI, PyITapQuoteAPI> c(parent, "ITapQuoteAPI");
if constexpr (std::is_default_constructible_v<PyITapQuoteAPI>)
c.def(pybind11::init<>());
c.def("SetAPINotify",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapQuoteAPI::SetAPINotify
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("SetHostAddress",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapQuoteAPI::SetHostAddress
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("Login",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapQuoteAPI::Login
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("Disconnect",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapQuoteAPI::Disconnect
>,
brigand::list<
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryCommodity",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapQuoteAPI::QryCommodity
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("QryContract",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapQuoteAPI::QryContract
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("SubscribeQuote",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapQuoteAPI::SubscribeQuote
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
c.def("UnSubscribeQuote",
autocxxpy::apply_function_transform<
autocxxpy::function_constant<
&ITapQuoteAPI::UnSubscribeQuote
>,
brigand::list<
autocxxpy::indexed_transform_holder<autocxxpy::output_argument_transform, 0 + 1/*self*/>
>
>::value,
pybind11::return_value_policy::reference,
pybind11::call_guard<pybind11::gil_scoped_release>()
);
AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapQuoteAPI, c);
module_vntap::objects.emplace("ITapQuoteAPI", c);
}
void generate_caster_(pybind11::object & parent)
{
struct caster: autocxxpy::caster{};
auto c = autocxxpy::caster::bind<caster>(parent, "caster");
autocxxpy::caster::try_generate<TapAPIApplicationInfo>(c, "toTapAPIApplicationInfo)");
autocxxpy::caster::try_generate<TapAPICommodity>(c, "toTapAPICommodity)");
autocxxpy::caster::try_generate<TapAPIContract>(c, "toTapAPIContract)");
autocxxpy::caster::try_generate<TapAPIExchangeInfo>(c, "toTapAPIExchangeInfo)");
autocxxpy::caster::try_generate<TapAPIChangePasswordReq>(c, "toTapAPIChangePasswordReq)");
autocxxpy::caster::try_generate<TapAPIQuoteLoginAuth>(c, "toTapAPIQuoteLoginAuth)");
autocxxpy::caster::try_generate<TapAPIQuotLoginRspInfo>(c, "toTapAPIQuotLoginRspInfo)");
autocxxpy::caster::try_generate<TapAPIQuoteCommodityInfo>(c, "toTapAPIQuoteCommodityInfo)");
autocxxpy::caster::try_generate<TapAPIQuoteContractInfo>(c, "toTapAPIQuoteContractInfo)");
autocxxpy::caster::try_generate<TapAPIQuoteWhole>(c, "toTapAPIQuoteWhole)");
autocxxpy::caster::try_generate<ITapQuoteAPINotify>(c, "toITapQuoteAPINotify)");
autocxxpy::caster::try_generate<ITapQuoteAPI>(c, "toITapQuoteAPI)");
autocxxpy::caster::try_generate<TAPISTR_10>(c, "toTAPISTR_10)");
autocxxpy::caster::try_generate<TAPISTR_20>(c, "toTAPISTR_20)");
autocxxpy::caster::try_generate<TAPISTR_30>(c, "toTAPISTR_30)");
autocxxpy::caster::try_generate<TAPISTR_40>(c, "toTAPISTR_40)");
autocxxpy::caster::try_generate<TAPISTR_50>(c, "toTAPISTR_50)");
autocxxpy::caster::try_generate<TAPISTR_70>(c, "toTAPISTR_70)");
autocxxpy::caster::try_generate<TAPISTR_100>(c, "toTAPISTR_100)");
autocxxpy::caster::try_generate<TAPISTR_300>(c, "toTAPISTR_300)");
autocxxpy::caster::try_generate<TAPISTR_500>(c, "toTAPISTR_500)");
autocxxpy::caster::try_generate<TAPISTR_2000>(c, "toTAPISTR_2000)");
autocxxpy::caster::try_generate<TAPIAUTHCODE>(c, "toTAPIAUTHCODE)");
autocxxpy::caster::try_generate<TAPICHAR>(c, "toTAPICHAR)");
autocxxpy::caster::try_generate<TAPIINT32>(c, "toTAPIINT32)");
autocxxpy::caster::try_generate<TAPIUINT32>(c, "toTAPIUINT32)");
autocxxpy::caster::try_generate<TAPIINT64>(c, "toTAPIINT64)");
autocxxpy::caster::try_generate<TAPIUINT64>(c, "toTAPIUINT64)");
autocxxpy::caster::try_generate<TAPIUINT16>(c, "toTAPIUINT16)");
autocxxpy::caster::try_generate<TAPIUINT8>(c, "toTAPIUINT8)");
autocxxpy::caster::try_generate<TAPIREAL64>(c, "toTAPIREAL64)");
autocxxpy::caster::try_generate<TAPIYNFLAG>(c, "toTAPIYNFLAG)");
autocxxpy::caster::try_generate<TAPIDTSTAMP>(c, "toTAPIDTSTAMP)");
autocxxpy::caster::try_generate<TAPIDATETIME>(c, "toTAPIDATETIME)");
autocxxpy::caster::try_generate<TAPIDATE>(c, "toTAPIDATE)");
autocxxpy::caster::try_generate<TAPITIME>(c, "toTAPITIME)");
autocxxpy::caster::try_generate<TAPILOGLEVEL>(c, "toTAPILOGLEVEL)");
autocxxpy::caster::try_generate<TAPICommodityType>(c, "toTAPICommodityType)");
autocxxpy::caster::try_generate<TAPICallOrPutFlagType>(c, "toTAPICallOrPutFlagType)");
autocxxpy::caster::try_generate<TAPIQPRICE>(c, "toTAPIQPRICE)");
autocxxpy::caster::try_generate<TAPIQVOLUME>(c, "toTAPIQVOLUME)");
autocxxpy::caster::try_generate<TAPIQDIFF>(c, "toTAPIQDIFF)");
}

View File

@ -17,28 +17,43 @@
namespace autocxxpy namespace autocxxpy
{ {
template<class T>
struct is_string_type : std::false_type {};
template<>
struct is_string_type<char*> : std::true_type {};
template<size_t size>
struct is_string_type<literal_array<char, size>> : std::true_type {};
template <class T>
constexpr bool is_string_type_v = is_string_type<T>::value;
template <class method_constant, class ret_t, class base_t, class ... Ls, class ... Rs> template <class method_constant, class ret_t, class base_t, class ... Ls, class ... Rs>
inline constexpr auto wrap_pointer_argument_as_output_impl(brigand::list<Ls...>, brigand::list <Rs...>) inline constexpr auto wrap_pointer_argument_as_output_impl(brigand::list<Ls...>, brigand::list <Rs...>)
{ {
namespace ct = boost::callable_traits; namespace ct = boost::callable_traits;
return [](Ls ... ls, Rs ... rs) return [](Ls ... ls, Rs ... rs)
{ {
base_t arg; base_t arg{};
constexpr auto method = method_constant::value; constexpr auto method = method_constant::value;
auto stdmethod = std::function<ct::function_type_t<decltype(method)>>(method); auto stdmethod = std::function<ct::function_type_t<decltype(method)>>(method);
using converted_arg_t = std::conditional_t<is_string_type_v<base_t>, std::string, base_t>;
if constexpr (std::is_void_v<ret_t>) if constexpr (std::is_void_v<ret_t>)
{ {
stdmethod(std::forward<Ls>(ls)..., &arg, std::forward<Rs>(rs)...); stdmethod(std::forward<Ls>(ls)..., &arg, std::forward<Rs>(rs)...);
return std::move(arg); return converted_arg_t(std::move(arg));
} }
else else
{ {
return append_as_tuple(stdmethod( auto retv_left = stdmethod(
std::forward<Ls>(ls)..., std::forward<Ls>(ls)...,
&arg, &arg,
std::forward<Rs>(rs)... std::forward<Rs>(rs)...
), std::move(arg)); );
auto retv = append_as_tuple(std::move(retv_left), converted_arg_t(std::move(arg)));
return std::move(retv); // make debugging easier
} }
}; };
} }
@ -48,22 +63,26 @@ namespace autocxxpy
namespace ct = boost::callable_traits; namespace ct = boost::callable_traits;
return [](Ls ... ls, Rs ... rs) return [](Ls ... ls, Rs ... rs)
{ {
base_t arg; base_t arg{};
constexpr auto method = method_constant::value; constexpr auto method = method_constant::value;
auto stdmethod = std::function<ct::function_type_t<decltype(method)>>(method); auto stdmethod = std::function<ct::function_type_t<decltype(method)>>(method);
using converted_arg_t = std::conditional_t<is_string_type_v<base_t>, std::string, base_t>;
if constexpr (std::is_void_v<ret_t>) if constexpr (std::is_void_v<ret_t>)
{ {
stdmethod(std::forward<Ls>(ls)..., arg, std::forward<Rs>(rs)...); stdmethod(std::forward<Ls>(ls)..., arg, std::forward<Rs>(rs)...);
return arg; return converted_arg_t(std::move(arg));
} }
else else
{ {
return append_as_tuple(stdmethod( auto retv_left = stdmethod(
std::forward<Ls>(ls)..., std::forward<Ls>(ls)...,
arg, arg,
std::forward<Rs>(rs)... std::forward<Rs>(rs)...
), arg); );
auto retv = append_as_tuple(std::move(retv_left), converted_arg_t(std::move(arg))
);
return std::move(retv); // make debugging easier
} }
}; };
} }

View File

@ -20,6 +20,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="custom\custom_wrappers.hpp" /> <ClInclude Include="custom\custom_wrappers.hpp" />
<ClInclude Include="generated_files\generated_functions.h" />
<ClInclude Include="generated_files\module.hpp" /> <ClInclude Include="generated_files\module.hpp" />
<ClInclude Include="generated_files\wrappers.hpp" /> <ClInclude Include="generated_files\wrappers.hpp" />
<ClInclude Include="include\iTapAPICommDef.h" /> <ClInclude Include="include\iTapAPICommDef.h" />
@ -38,7 +39,6 @@
<ClCompile Include="generated_files\generated_functions_2.cpp" /> <ClCompile Include="generated_files\generated_functions_2.cpp" />
<ClCompile Include="generated_files\generated_functions_3.cpp" /> <ClCompile Include="generated_files\generated_functions_3.cpp" />
<ClCompile Include="generated_files\generated_functions_4.cpp" /> <ClCompile Include="generated_files\generated_functions_4.cpp" />
<ClCompile Include="generated_files\generated_functions_5.cpp" />
<ClCompile Include="generated_files\module.cpp" /> <ClCompile Include="generated_files\module.cpp" />
<ClCompile Include="pch.cpp"> <ClCompile Include="pch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
@ -145,6 +145,7 @@
<ForcedIncludeFiles>pch.h</ForcedIncludeFiles> <ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<LanguageStandard>stdcpp17</LanguageStandard> <LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
@ -164,6 +165,7 @@
<LanguageStandard>stdcpp17</LanguageStandard> <LanguageStandard>stdcpp17</LanguageStandard>
<ForcedIncludeFiles>pch.h</ForcedIncludeFiles> <ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
@ -186,6 +188,7 @@
<ForcedIncludeFiles>pch.h</ForcedIncludeFiles> <ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<LanguageStandard>stdcpp17</LanguageStandard> <LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
@ -210,6 +213,7 @@
<LanguageStandard>stdcpp17</LanguageStandard> <LanguageStandard>stdcpp17</LanguageStandard>
<ForcedIncludeFiles>pch.h</ForcedIncludeFiles> <ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>

View File

@ -51,6 +51,9 @@
<ClInclude Include="pch.h"> <ClInclude Include="pch.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="generated_files\generated_functions.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="generated_files\generated_functions_0.cpp"> <ClCompile Include="generated_files\generated_functions_0.cpp">
@ -71,9 +74,6 @@
<ClCompile Include="generated_files\module.cpp"> <ClCompile Include="generated_files\module.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="generated_files\generated_functions_5.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="pch.cpp"> <ClCompile Include="pch.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>

File diff suppressed because it is too large Load Diff