diff --git a/MANIFEST.in b/MANIFEST.in index 3774204142..a065aceeb7 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1 @@ -recursive-include vnpy *.ico *.ini *.dll *.so *.pyd *.h *.hpp *.cpp *.a *.dat +recursive-include vnpy *.ico *.ini *.dll *.so *.pyd *.h *.hpp *.cpp *.a *.dat *.pfx diff --git a/README.md b/README.md index 53c45634bb..855db047cd 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@

- + @@ -44,7 +44,9 @@ vn.py是一套基于Python的开源量化交易系统开发框架,于2015年1 * 宽睿(oes):国内证券(A股) - * 中泰XTP(xtp):国内证券(A股) + * 中泰XTP(xtp):国内证券(A股)、ETF期权 + + * 恒生期权(hsoption):ETF期权 * 华鑫奇点(tora):国内证券(A股) @@ -54,6 +56,8 @@ vn.py是一套基于Python的开源量化交易系统开发框架,于2015年1 * 融航(rohon):期货资管 + * 中汇亿达(comstar):银行间市场 + * 海外市场 * 富途证券(futu):港股、美股 @@ -68,6 +72,8 @@ vn.py是一套基于Python的开源量化交易系统开发框架,于2015年1 * OANDA(oanda):外汇、CFD + * Alpaca(alpaca):美股(零佣金) + * 数字货币 * BitMEX(bitmex):数字货币期货、期权、永续合约 @@ -116,6 +122,8 @@ vn.py是一套基于Python的开源量化交易系统开发框架,于2015年1 * option_master:期权交易模块,针对国内期权市场设计,支持多种期权定价模型、隐含波动率曲面计算、希腊值风险跟踪等功能 + * portfolio_strategy:组合策略模块,面向同时交易多合约的量化策略(Alpha、期权套利等),提供历史数据回测和实盘自动交易功能 + * algo_trading:算法交易模块,提供多种常用的智能交易算法:TWAP、Sniper、Iceberg、BestLimit等等,支持常用算法配置保存 * script_trader:脚本策略模块,针对多标的组合类交易策略设计,同时也可以直接在命令行中实现REPL指令形式的交易,不支持回测功能 @@ -128,8 +136,6 @@ vn.py是一套基于Python的开源量化交易系统开发框架,于2015年1 * data_manager:历史数据管理模块,通过树形目录查看数据库中已有的数据概况,选择任意时间段数据查看字段细节,支持CSV文件的数据导入和导出 - * csv_loader:CSV历史数据加载器,用于加载CSV格式文件中的历史数据到平台数据库中,用于策略的回测研究以及实盘初始化等功能,支持自定义数据表头格式 - * data_recorder:行情记录模块,基于图形界面进行配置,根据需求实时录制Tick或者K线行情到数据库中,用于策略回测或者实盘初始化 * excel_rtd:Excel RTD(Real Time Data)实时数据服务,基于pyxll模块实现在Excel中获取各类数据(行情、合约、持仓等)的实时推送更新 @@ -150,7 +156,7 @@ vn.py是一套基于Python的开源量化交易系统开发框架,于2015年1 ## 环境准备 -* 推荐使用vn.py团队为量化交易专门打造的Python发行版[VNStudio-2.1.1](https://download.vnpy.com/vnstudio-2.1.1.exe),内置了最新版的vn.py框架以及VN Station量化管理平台,无需手动安装 +* 推荐使用vn.py团队为量化交易专门打造的Python发行版[VNStudio-2.1.2](https://download.vnpy.com/vnstudio-2.1.2.exe),内置了最新版的vn.py框架以及VN Station量化管理平台,无需手动安装 * 支持的系统版本:Windows 7以上/Windows Server 2008以上/Ubuntu 18.04 LTS * 支持的Python版本:Python 3.7 64位(**注意必须是Python 3.7 64位版本**) diff --git a/docs/csv_loader.md b/docs/csv_loader.md deleted file mode 100644 index f23ea8b041..0000000000 --- a/docs/csv_loader.md +++ /dev/null @@ -1,64 +0,0 @@ -# CSV载入模块 - -CSV载入模块在vnpy根目录下vnpy\app\csv_loader文件夹内,engine.py里面的CsvLoaderEngine类负责载入功能实现。 - -## 初始化配置 -初始化数据载入相关信息,可以分成3类: - -- CSV文件路径 -- 合约信息:合约代码、交易所、K线周期 -- CSV表头信息:日期时间、开盘价、最高价、最低价、收盘价、成交量 - -``` - self.file_path: str = "" - - self.symbol: str = "" - self.exchange: Exchange = Exchange.SSE - self.interval: Interval = Interval.MINUTE - - self.datetime_head: str = "" - self.open_head: str = "" - self.close_head: str = "" - self.low_head: str = "" - self.high_head: str = "" - self.volume_head: str = "" -``` -以SQL数据库为例:把上期所的IF1909的历史数据插入到数据库中,那么合约代码应该填写rb1909,交易所中填写SHFE,在本地数据库中会有symbol和exchange两个键值用于索引。 - -  - -## 数据载入 - -从文件路径中读取CSV文件,然后在每一次迭代中载入数据到数据库中。 -``` - with open(file_path, "rt") as f: - reader = csv.DictReader(f) - - for item in reader: -``` - -  - -载入数据的方法可以分成2类: -- 直接插入:合约代码、交易所、K线周期、成交量、开盘价、最高价、最低价、收盘价、接口名称 -- 需要处理:日期时间(根据其相应的时间格式,通过strptime()转化成时间元组)、vt_symbol(合约代码.交易所格式,如rb1909.SHFE) - -注意:db_bar.replace()用于数据更新,即把旧的数据替换成新的。 -``` - db_bar.symbol = symbol - db_bar.exchange = exchange.value - db_bar.datetime = datetime.strptime( - item[datetime_head], datetime_format - ) - db_bar.interval = interval.value - db_bar.volume = item[volume_head] - db_bar.open_price = item[open_head] - db_bar.high_price = item[high_head] - db_bar.low_price = item[low_head] - db_bar.close_price = item[close_head] - db_bar.vt_symbol = vt_symbol - db_bar.gateway_name = "DB" - - db_bar.replace() -``` - diff --git a/docs/index.rst b/docs/index.rst index 5863db2d23..96e79c5f79 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -7,7 +7,6 @@ vn.py项目文档 introduction.md install.md quickstart.md - csv_loader.md cta_strategy.md cta_backtester.md data_recoder.md diff --git a/docs/install.md b/docs/install.md index 82b525c940..38545c6e42 100644 --- a/docs/install.md +++ b/docs/install.md @@ -15,7 +15,7 @@ VNStudio是vn.py团队自行打包的一键安装版本,整合了: - vn.py框架和其他相关库 - VN Station量化工作站(vn.py框架的图形化管理工具) -下载地址:[vnstudio-2.0.6.exe](https://download.vnpy.com/vnstudio-2.0.6.exe) +下载地址:[vnstudio-2.1.1.exe](https://download.vnpy.com/vnstudio-2.1.1.exe)   @@ -25,7 +25,7 @@ VNStudio是vn.py团队自行打包的一键安装版本,整合了: 一路点击“下一步”即可完成VNStudio安装,安装完成后可以查看相关运行目录: - VNStudio默认安装路径为C:\vnstudio; -- VNStudio默认json配置文件和数据库路径为C:\Users\Administrator\.vntrader +- VNStudio默认json配置文件和数据库路径为C:\Users\Administrator\\.vntrader - VN Station量化工作站运行目录为C:\vnstudio\Scripts\vnstation.exe; - vnpy运行目录在C:\vnstudio\Lib\site-packages\vnpy(进入该目录后,用户可以修改vnpy的相关功能) diff --git a/docs/spread_trading.md b/docs/spread_trading.md index fa240e9956..5fab908f01 100644 --- a/docs/spread_trading.md +++ b/docs/spread_trading.md @@ -122,7 +122,7 @@ 2)成交委托监控 -- 【日志】组件显示发出买入xbt价差合约的顺序是:发出XBTZ19多头委托 -> XBTZ19委托成交 -> 发出XBTUSD空头委托 -> XBTUSD委托成交。价差交易必须遵循的逻辑是主动腿成交后,才去用被动腿来对冲头寸,并且对冲必须尽可能即使。这也为什么一般被动腿选择较为活跃合约的原因。 +- 【日志】组件显示发出买入xbt价差合约的顺序是:发出XBTZ19多头委托 -> XBTZ19委托成交 -> 发出XBTUSD空头委托 -> XBTUSD委托成交。价差交易必须遵循的逻辑是主动腿成交后,才去用被动腿来对冲头寸,并且对冲必须尽可能及时。这也为什么一般被动腿选择较为活跃合约的原因。 - 【价差】组件显示买入1手xbt价差合约成交后,【净仓】从0变成1;实际上,VN Trader【持仓】组件显示,XBTZ19合约多头持仓1手,XBTUSD合约空头持仓1手。 diff --git a/examples/portfolio_backtesting/backtesting_demo.ipynb b/examples/portfolio_backtesting/backtesting_demo.ipynb new file mode 100644 index 0000000000..8c65e3e329 --- /dev/null +++ b/examples/portfolio_backtesting/backtesting_demo.ipynb @@ -0,0 +1,77 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#%%\n", + "from datetime import datetime\n", + "\n", + "from vnpy.app.portfolio_strategy import BacktestingEngine\n", + "from vnpy.app.portfolio_strategy.strategies.trend_following_strategy import TrendFollowingStrategy\n", + "from vnpy.trader.constant import Interval" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#%%\n", + "engine = BacktestingEngine()\n", + "engine.set_parameters(\n", + " vt_symbols=[\"IF888.CFFEX\"],\n", + " interval=Interval.MINUTE,\n", + " start=datetime(2010, 2, 1),\n", + " end=datetime(2020, 4, 30),\n", + " rates={\"IF888.CFFEX\": 0.3/10000},\n", + " slippages={\"IF888.CFFEX\": 0.2},\n", + " sizes={\"IF888.CFFEX\": 300},\n", + " priceticks={\"IF888.CFFEX\": 0.2},\n", + " capital=1_000_000,\n", + ")\n", + "engine.add_strategy(TrendFollowingStrategy, {})" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "scrolled": false + }, + "outputs": [], + "source": [ + "#%%\n", + "engine.load_data()\n", + "engine.run_backtesting()\n", + "df = engine.calculate_result()\n", + "engine.calculate_statistics()\n", + "engine.show_chart()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/examples/vn_trader/run.py b/examples/vn_trader/run.py index 4986d513bc..d7b99bb4a5 100644 --- a/examples/vn_trader/run.py +++ b/examples/vn_trader/run.py @@ -24,7 +24,7 @@ # from vnpy.gateway.okexs import OkexsGateway from vnpy.gateway.xtp import XtpGateway # from vnpy.gateway.hbdm import HbdmGateway -# from vnpy.gateway.tap import TapGateway +from vnpy.gateway.tap import TapGateway # from vnpy.gateway.tora import ToraGateway # from vnpy.gateway.alpaca import AlpacaGateway # from vnpy.gateway.da import DaGateway @@ -50,7 +50,8 @@ # from vnpy.app.option_master import OptionMasterApp # from vnpy.app.chart_wizard import ChartWizardApp # from vnpy.app.excel_rtd import ExcelRtdApp -from vnpy.app.data_manager import DataManagerApp +# from vnpy.app.data_manager import DataManagerApp +from vnpy.app.portfolio_strategy import PortfolioStrategyApp def main(): @@ -81,7 +82,7 @@ def main(): # main_engine.add_gateway(OkexfGateway) # main_engine.add_gateway(HbdmGateway) main_engine.add_gateway(XtpGateway) - # main_engine.add_gateway(TapGateway) + main_engine.add_gateway(TapGateway) # main_engine.add_gateway(ToraGateway) # main_engine.add_gateway(AlpacaGateway) # main_engine.add_gateway(OkexsGateway) @@ -107,8 +108,9 @@ def main(): # main_engine.add_app(OptionMasterApp) # main_engine.add_app(ChartWizardApp) # main_engine.add_app(ExcelRtdApp) - main_engine.add_app(DataManagerApp) - + # main_engine.add_app(DataManagerApp) + main_engine.add_app(PortfolioStrategyApp) + main_window = MainWindow(main_engine, event_engine) main_window.showMaximized() diff --git a/requirements.txt b/requirements.txt index 4cb6d56d69..8b10c822ca 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ six==1.13.0 +wheel PyQt5 pyqtgraph dataclasses; python_version<="3.6" diff --git a/vnpy/__init__.py b/vnpy/__init__.py index 58039f5051..4eabd0b3fb 100644 --- a/vnpy/__init__.py +++ b/vnpy/__init__.py @@ -1 +1 @@ -__version__ = "2.1.1" +__version__ = "2.1.2" diff --git a/vnpy/api/rest/rest_client.py b/vnpy/api/rest/rest_client.py index d84227208f..d26883eae1 100644 --- a/vnpy/api/rest/rest_client.py +++ b/vnpy/api/rest/rest_client.py @@ -1,34 +1,27 @@ -import json -import logging -import multiprocessing -import os import sys import traceback -import uuid from datetime import datetime from enum import Enum from multiprocessing.dummy import Pool -from threading import Lock, Thread +from queue import Empty, Queue +from typing import Any, Callable, Optional, Union, Type from types import TracebackType -from typing import Any, Callable, List, Optional, Type, Union -from vnpy.trader.utility import get_file_logger import requests -class RequestStatus(Enum): - ready = 0 # Request created - success = 1 # Request successful (status code 2xx) - failed = 2 # Request failed (status code not 2xx) - error = 3 # Exception raised - - -pool: multiprocessing.pool.Pool = Pool(os.cpu_count() * 20) - CALLBACK_TYPE = Callable[[dict, "Request"], Any] ON_FAILED_TYPE = Callable[[int, "Request"], Any] ON_ERROR_TYPE = Callable[[Type, Exception, TracebackType, "Request"], Any] -CONNECTED_TYPE = Callable[["Request"], Any] + + +class RequestStatus(Enum): + """""" + + ready = 0 # Request created + success = 1 # Request successful (status code 2xx) + failed = 2 # Request failed (status code not 2xx) + error = 3 # Exception raised class Request(object): @@ -46,62 +39,45 @@ def __init__( callback: CALLBACK_TYPE = None, on_failed: ON_FAILED_TYPE = None, on_error: ON_ERROR_TYPE = None, - stream: bool = False, - on_connected: CONNECTED_TYPE = None, # for streaming request extra: Any = None, - client: "RestClient" = None, ): """""" - self.method = method - self.path = path - self.callback = callback - self.params = params - self.data = data - self.headers = headers - - self.stream = stream - self.on_connected = on_connected - self.processing_line: Optional[str] = '' + self.method: str = method + self.path: str = path + self.callback: CALLBACK_TYPE = callback + self.params: dict = params + self.data: Union[dict, str, bytes] = data + self.headers: dict = headers - self.on_failed = on_failed - self.on_error = on_error - self.extra = extra + self.on_failed: ON_FAILED_TYPE = on_failed + self.on_error: ON_ERROR_TYPE = on_error + self.extra: Any = extra - self.response: Optional[requests.Response] = None - self.status = RequestStatus.ready - self.client: "RestClient" = client + self.response: requests.Response = None + self.status: RequestStatus = RequestStatus.ready def __str__(self): + """""" if self.response is None: status_code = "terminated" else: status_code = self.response.status_code - if self.stream: - response = self.processing_line - else: - if self.response is None: - response = None - else: - response = self.response.text - return ( - "request: {method} {path} {http_code}: \n" - "full_url: {full_url}\n" - "status: {status}\n" - "headers: {headers}\n" - "params: {params}\n" - "data: {data}\n" - "response: {response}\n".format( - full_url=self.client.make_full_url(self.path), - status=self.status.name, - method=self.method, - path=self.path, - http_code=status_code, - headers=self.headers, - params=self.params, - data=self.data, - response=response, + "request : {} {} {} because {}: \n" + "headers: {}\n" + "params: {}\n" + "data: {}\n" + "response:" + "{}\n".format( + self.method, + self.path, + self.status.name, + status_code, + self.headers, + self.params, + self.data, + "" if self.response is None else self.response.text, ) ) @@ -109,134 +85,60 @@ def __str__(self): class RestClient(object): """ HTTP Client designed for all sorts of trading RESTFul API. - * Reimplement sign function to add signature function. * Reimplement on_failed function to handle Non-2xx responses. * Use on_failed parameter in add_request function for individual Non-2xx response handling. * Reimplement on_error function to handle exception msg. """ - class Session: - - def __init__(self, client: "RestClient", session: requests.Session): - self.client = client - self.session = session - - def __enter__(self): - return self.session - - def __exit__(self, exc_type, exc_val, exc_tb): - with self.client._sessions_lock: - self.client._sessions.append(self.session) - def __init__(self): - """ - """ - self.url_base = '' # type: str - self._active = False - self.logger: Optional[logging.Logger] = None - - self.proxies = None - - self._tasks_lock = Lock() - self._tasks: List[multiprocessing.pool.AsyncResult] = [] - self._sessions_lock = Lock() - self._sessions: List[requests.Session] = [] + """""" + self.url_base: str = "" + self._active: bool = False - self._streams_lock = Lock() - self._streams: List[Thread] = [] + self._queue: Queue = Queue() + self._pool: Pool = None - @property - def alive(self): - return self._active + self.proxies: dict = None - def init(self, - url_base: str, - proxy_host: str = "", - proxy_port: int = 0, - log_path: Optional[str] = None, - ): + def init( + self, + url_base: str, + proxy_host: str = "", + proxy_port: int = 0 + ) -> None: """ Init rest client with url_base which is the API root address. - e.g. 'https://www.bitmex.com/api/v1/' - :param url_base: - :param proxy_host: - :param proxy_port: - :param log_path: optional. file to save log. + e.g. "https://www.bitmex.com/api/v1/" """ self.url_base = url_base - if log_path is not None: - self.logger = get_file_logger(log_path) - self.logger.setLevel(logging.DEBUG) - if proxy_host and proxy_port: proxy = f"{proxy_host}:{proxy_port}" self.proxies = {"http": proxy, "https": proxy} - def _create_session(self): - """""" - return requests.session() - - def start(self, n: int = 3): + def start(self, n: int = 3) -> None: """ Start rest client with session count n. """ if self._active: return + self._active = True + self._pool = Pool(n) + self._pool.apply_async(self._run) - def stop(self): + def stop(self) -> None: """ Stop rest client immediately. """ self._active = False - def join(self): + def join(self) -> None: """ Wait till all requests are processed. """ - for task in self._tasks: - task.wait() - - def add_streaming_request( - self, - method: str, - path: str, - callback: CALLBACK_TYPE, - params: dict = None, - data: Union[dict, str, bytes] = None, - headers: dict = None, - on_connected: CONNECTED_TYPE = None, - on_failed: ON_FAILED_TYPE = None, - on_error: ON_ERROR_TYPE = None, - extra: Any = None, - ): - """ - See add_request for usage. - """ - request = Request( - method=method, - path=path, - params=params, - data=data, - headers=headers, - callback=callback, - on_failed=on_failed, - on_error=on_error, - extra=extra, - client=self, - stream=True, - on_connected=on_connected, - ) - # stream task should not push to thread pool - # because it is usually no return. - th = Thread( - target=self._process_stream_request, - args=[request, ], - ) - th.start() - return request + self._queue.join() def add_request( self, @@ -249,63 +151,52 @@ def add_request( on_failed: ON_FAILED_TYPE = None, on_error: ON_ERROR_TYPE = None, extra: Any = None, - ): + ) -> Request: """ Add a new request. :param method: GET, POST, PUT, DELETE, QUERY - :param path: + :param path: url path for query :param callback: callback function if 2xx status, type: (dict, Request) :param params: dict for query string :param data: Http body. If it is a dict, it will be converted to form-data. Otherwise, it will be converted to bytes. :param headers: dict for headers - :param on_failed: callback function if Non-2xx status, type, type: (code, Request) + :param on_failed: callback function if Non-2xx status, type, type: (code, dict, Request) :param on_error: callback function when catching Python exception, type: (etype, evalue, tb, Request) :param extra: Any extra data which can be used when handling callback :return: Request """ request = Request( - method=method, - path=path, - params=params, - data=data, - headers=headers, - callback=callback, - on_failed=on_failed, - on_error=on_error, - extra=extra, - client=self, - ) - task = pool.apply_async( - self._process_request, - args=[request, ], - callback=self._clean_finished_tasks, - # error_callback=lambda e: self.on_error(type(e), e, e.__traceback__, request), + method, + path, + params, + data, + headers, + callback, + on_failed, + on_error, + extra, ) - self._push_task(task) + self._queue.put(request) return request - def _push_task(self, task): - with self._tasks_lock: - self._tasks.append(task) - - def _clean_finished_tasks(self, result: None): - with self._tasks_lock: - not_finished_tasks = [i for i in self._tasks if not i.ready()] - self._tasks = not_finished_tasks - - def _clean_finished_streams(self): - with self._streams_lock: - not_finished_streams = [i for i in self._streams if i.is_alive()] - self._streams = not_finished_streams - - def _get_session(self): - with self._sessions_lock: - if self._sessions: - return self.Session(self, self._sessions.pop()) - else: - return self.Session(self, self._create_session()) + def _run(self) -> None: + """""" + try: + session = requests.session() + while self._active: + try: + request = self._queue.get(timeout=1) + try: + self._process_request(request, session) + finally: + self._queue.task_done() + except Empty: + pass + except Exception: + et, ev, tb = sys.exc_info() + self.on_error(et, ev, tb, None) - def sign(self, request: Request): + def sign(self, request: Request) -> None: """ This function is called before sending any request out. Please implement signature method here. @@ -313,7 +204,7 @@ def sign(self, request: Request): """ return request - def on_failed(self, status_code: int, request: Request): + def on_failed(self, status_code: int, request: Request) -> None: """ Default on_failed handler for Non-2xx response. """ @@ -325,7 +216,7 @@ def on_error( exception_value: Exception, tb, request: Optional[Request], - ): + ) -> None: """ Default on_error handler for Python exception. """ @@ -340,7 +231,7 @@ def exception_detail( exception_value: Exception, tb, request: Optional[Request], - ): + ) -> None: text = "[{}]: Unhandled RestClient Error:{}\n".format( datetime.now().isoformat(), exception_type ) @@ -351,86 +242,42 @@ def exception_detail( ) return text - def is_request_success(self, data: dict, request: "Request"): - """ - check if a request succeed - default behavior is returning True - :return True if succeed. - """ - return True - - def _process_stream_request(self, request: Request): - """ - Sending request to server and get result. - """ - self._process_request(request) - self._clean_finished_streams() - - def _log(self, msg, *args): - logger = self.logger - if logger: - logger.debug(msg, *args) - def _process_request( - self, request: Request - ): + self, request: Request, session: requests.Session + ) -> None: """ Sending request to server and get result. """ try: - with self._get_session() as session: - request = self.sign(request) - url = self.make_full_url(request.path) - - # send request - uid = uuid.uuid4() - stream = request.stream - method = request.method - headers = request.headers - params = request.params - data = request.data - self._log("[%s] sending request %s %s, headers:%s, params:%s, data:%s", - uid, method, url, - headers, params, data) - response = session.request( - method, - url, - headers=headers, - params=params, - data=data, - proxies=self.proxies, - stream=stream, - ) - request.response = response - status_code = response.status_code - - self._log("[%s] received response from %s:%s", uid, method, url) - - # check result & call corresponding callbacks - if not stream: # normal API: - # just call callback with all contents received. - if status_code // 100 == 2: # 2xx codes are all successful - if status_code == 204: - json_body = None - else: - json_body = response.json() - self._process_json_body(json_body, request) - else: - if request.on_failed: - request.status = RequestStatus.failed - request.on_failed(status_code, request) - else: - self.on_failed(status_code, request) - else: # streaming API: - if request.on_connected: - request.on_connected(request) - # split response by lines, and call one callback for each line. - for line in response.iter_lines(chunk_size=None): - if line: - request.processing_line = line - json_body = json.loads(line) - self._process_json_body(json_body, request) - request.status = RequestStatus.success + request = self.sign(request) + + url = self.make_full_url(request.path) + + response = session.request( + request.method, + url, + headers=request.headers, + params=request.params, + data=request.data, + proxies=self.proxies, + ) + request.response = response + status_code = response.status_code + if status_code // 100 == 2: # 2xx codes are all successful + if status_code == 204: + json_body = None + else: + json_body = response.json() + + request.callback(json_body, request) + request.status = RequestStatus.success + else: + request.status = RequestStatus.failed + + if request.on_failed: + request.on_failed(status_code, request) + else: + self.on_failed(status_code, request) except Exception: request.status = RequestStatus.error t, v, tb = sys.exc_info() @@ -439,22 +286,10 @@ def _process_request( else: self.on_error(t, v, tb, request) - def _process_json_body(self, json_body: Optional[dict], request: "Request"): - status_code = request.response.status_code - if self.is_request_success(json_body, request): - request.status = RequestStatus.success - request.callback(json_body, request) - else: - request.status = RequestStatus.failed - if request.on_failed: - request.on_failed(status_code, request) - else: - self.on_failed(status_code, request) - - def make_full_url(self, path: str): + def make_full_url(self, path: str) -> str: """ Make relative api path into full url. - eg: make_full_url('/get') == 'http://xxxxx/get' + eg: make_full_url("/get") == "http://xxxxx/get" """ url = self.url_base + path return url @@ -466,11 +301,11 @@ def request( params: dict = None, data: dict = None, headers: dict = None, - ): + ) -> requests.Response: """ Add a new request. :param method: GET, POST, PUT, DELETE, QUERY - :param path: + :param path: url path for query :param params: dict for query string :param data: dict for body :param headers: dict for headers @@ -481,8 +316,7 @@ def request( path, params, data, - headers, - client=self, + headers ) request = self.sign(request) diff --git a/vnpy/api/t2sdk/__init__.py b/vnpy/api/t2sdk/__init__.py new file mode 100644 index 0000000000..ec72fde1f0 --- /dev/null +++ b/vnpy/api/t2sdk/__init__.py @@ -0,0 +1 @@ +from . import py_t2sdk \ No newline at end of file diff --git a/vnpy/api/t2sdk/py_t2sdk.pyd b/vnpy/api/t2sdk/py_t2sdk.pyd new file mode 100644 index 0000000000..2819e2aac6 Binary files /dev/null and b/vnpy/api/t2sdk/py_t2sdk.pyd differ diff --git a/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.cpp b/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.cpp new file mode 100644 index 0000000000..0b41240930 --- /dev/null +++ b/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.cpp @@ -0,0 +1,20333 @@ +/* Generated by Cython 0.29.14 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [ + "ufx_interface.h" + ], + "include_dirs": [ + "." + ], + "language": "c++", + "libraries": [ + "t2sdk" + ], + "name": "py_t2sdk", + "sources": [ + "py_t2sdk.pyx", + "ufx_interface.cpp" + ] + }, + "module_name": "py_t2sdk" +} +END: Cython Metadata */ + +#define PY_SSIZE_T_CLEAN +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) + #error Cython requires Python 2.6+ or Python 3.3+. +#else +#define CYTHON_ABI "0_29_14" +#define CYTHON_HEX_VERSION 0x001D0EF0 +#define CYTHON_FUTURE_DIVISION 0 +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #if PY_VERSION_HEX >= 0x02070000 + #define HAVE_LONG_LONG + #endif +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#ifdef PYPY_VERSION + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #if PY_VERSION_HEX < 0x03050000 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 +#elif defined(PYSTON_VERSION) + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #elif !defined(CYTHON_USE_PYTYPE_LOOKUP) + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #if PY_MAJOR_VERSION < 3 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLONG_INTERNALS) + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #ifndef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if PY_VERSION_HEX < 0x030300F0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) + #endif + #ifndef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) + #endif +#endif +#if !defined(CYTHON_FAST_PYCCALL) +#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int32 uint32_t; + #endif + #endif +#else + #include +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) && __cplusplus >= 201103L + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #elif __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__ ) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif + +#ifndef __cplusplus + #error "Cython files generated with the C++ option must be compiled with a C++ compiler." +#endif +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #else + #define CYTHON_INLINE inline + #endif +#endif +template +void __Pyx_call_destructor(T& x) { + x.~T(); +} +template +class __Pyx_FakeReference { + public: + __Pyx_FakeReference() : ptr(NULL) { } + __Pyx_FakeReference(const T& ref) : ptr(const_cast(&ref)) { } + T *operator->() { return ptr; } + T *operator&() { return ptr; } + operator T&() { return *ptr; } + template bool operator ==(U other) { return *ptr == other; } + template bool operator !=(U other) { return *ptr != other; } + private: + T *ptr; +}; + +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) + #define Py_OptimizeFlag 0 +#endif +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#if PY_MAJOR_VERSION < 3 + #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) + #define __Pyx_DefaultClassType PyClass_Type +#else + #define __Pyx_BUILTIN_MODULE_NAME "builtins" +#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif + #define __Pyx_DefaultClassType PyType_Type +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #define __Pyx_PyCFunctionFast _PyCFunctionFast + #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords +#endif +#if CYTHON_FAST_PYCCALL +#define __Pyx_PyFastCFunction_Check(func)\ + ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) +#else +#define __Pyx_PyFastCFunction_Check(func) 0 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 + #define PyMem_RawMalloc(n) PyMem_Malloc(n) + #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) + #define PyMem_RawFree(p) PyMem_Free(p) +#endif +#if CYTHON_COMPILING_IN_PYSTON + #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x03060000 + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#elif PY_VERSION_HEX >= 0x03000000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_Current +#endif +#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) +#include "pythread.h" +#define Py_tss_NEEDS_INIT 0 +typedef int Py_tss_t; +static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { + *key = PyThread_create_key(); + return 0; +} +static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { + Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); + *key = Py_tss_NEEDS_INIT; + return key; +} +static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { + PyObject_Free(key); +} +static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { + return *key != Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { + PyThread_delete_key(*key); + *key = Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { + return PyThread_set_key_value(*key, value); +} +static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { + return PyThread_get_key_value(*key); +} +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION + #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#else + #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +#else +#define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name) +#endif +#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) + #define CYTHON_PEP393_ENABLED 1 + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) +#else + #define CYTHON_PEP393_ENABLED 0 + #define PyUnicode_1BYTE_KIND 1 + #define PyUnicode_2BYTE_KIND 2 + #define PyUnicode_4BYTE_KIND 4 + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111) + #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) + #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) +#endif +#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) +#else + #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) +#endif +#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) + #define PyObject_ASCII(o) PyObject_Repr(o) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBaseString_Type PyUnicode_Type + #define PyStringObject PyUnicodeObject + #define PyString_Type PyUnicode_Type + #define PyString_Check PyUnicode_Check + #define PyString_CheckExact PyUnicode_CheckExact + #define PyObject_Unicode PyObject_Str +#endif +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) + #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) +#else + #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) + #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) +#else + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyIntObject PyLongObject + #define PyInt_Type PyLong_Type + #define PyInt_Check(op) PyLong_Check(op) + #define PyInt_CheckExact(op) PyLong_CheckExact(op) + #define PyInt_FromString PyLong_FromString + #define PyInt_FromUnicode PyLong_FromUnicode + #define PyInt_FromLong PyLong_FromLong + #define PyInt_FromSize_t PyLong_FromSize_t + #define PyInt_FromSsize_t PyLong_FromSsize_t + #define PyInt_AsLong PyLong_AsLong + #define PyInt_AS_LONG PyLong_AS_LONG + #define PyInt_AsSsize_t PyLong_AsSsize_t + #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask + #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask + #define PyNumber_Int PyNumber_Long +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBoolObject PyLongObject +#endif +#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY + #ifndef PyUnicode_InternFromString + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) + #endif +#endif +#if PY_VERSION_HEX < 0x030200A4 + typedef long Py_hash_t; + #define __Pyx_PyInt_FromHash_t PyInt_FromLong + #define __Pyx_PyInt_AsHash_t PyInt_AsLong +#else + #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t + #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t +#endif +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) +#else + #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) +#endif +#if CYTHON_USE_ASYNC_SLOTS + #if PY_VERSION_HEX >= 0x030500B1 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods + #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) + #else + #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) + #endif +#else + #define __Pyx_PyType_AsAsync(obj) NULL +#endif +#ifndef __Pyx_PyAsyncMethodsStruct + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + } __Pyx_PyAsyncMethodsStruct; +#endif + +#if defined(WIN32) || defined(MS_WINDOWS) + #define _USE_MATH_DEFINES +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + + +#define __PYX_ERR(f_index, lineno, Ln_error) \ +{ \ + __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ +} + +#ifndef __PYX_EXTERN_C + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__py_t2sdk +#define __PYX_HAVE_API__py_t2sdk +/* Early includes */ +#include "ios" +#include "new" +#include "stdexcept" +#include "typeinfo" +#include "ufx_interface.h" +#include +#include +#include +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; + const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if PY_MAJOR_VERSION < 3 + #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#else + #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize +#endif +#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { + const Py_UNICODE *u_end = u; + while (*u_end++) ; + return (size_t)(u_end - u - 1); +} +#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) +#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) +#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); +#if CYTHON_ASSUME_SAFE_MACROS +#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#else +#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#endif +#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) +#if PY_MAJOR_VERSION >= 3 +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#else +#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) +#endif +#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x)) +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII +static int __Pyx_sys_getdefaultencoding_not_ascii; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + PyObject* ascii_chars_u = NULL; + PyObject* ascii_chars_b = NULL; + const char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + if (strcmp(default_encoding_c, "ascii") == 0) { + __Pyx_sys_getdefaultencoding_not_ascii = 0; + } else { + char ascii_chars[128]; + int c; + for (c = 0; c < 128; c++) { + ascii_chars[c] = c; + } + __Pyx_sys_getdefaultencoding_not_ascii = 1; + ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); + if (!ascii_chars_u) goto bad; + ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); + if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { + PyErr_Format( + PyExc_ValueError, + "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", + default_encoding_c); + goto bad; + } + Py_DECREF(ascii_chars_u); + Py_DECREF(ascii_chars_b); + } + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + Py_XDECREF(ascii_chars_u); + Py_XDECREF(ascii_chars_b); + return -1; +} +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#else +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +static char* __PYX_DEFAULT_STRING_ENCODING; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); + if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; + strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + return -1; +} +#endif +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } + +static PyObject *__pyx_m = NULL; +static PyObject *__pyx_d; +static PyObject *__pyx_b; +static PyObject *__pyx_cython_runtime = NULL; +static PyObject *__pyx_empty_tuple; +static PyObject *__pyx_empty_bytes; +static PyObject *__pyx_empty_unicode; +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * __pyx_cfilenm= __FILE__; +static const char *__pyx_filename; + + +static const char *__pyx_f[] = { + "stringsource", + "py_t2sdk.pyx", +}; + +/*--- Type declarations ---*/ +struct __pyx_obj_8py_t2sdk_pyIF2Packer; +struct __pyx_obj_8py_t2sdk_pyIF2UnPacker; +struct __pyx_obj_8py_t2sdk_pyCConfigInterface; +struct __pyx_obj_8py_t2sdk_pyIBizMessage; +struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface; +struct __pyx_obj_8py_t2sdk_pySubCallBack; +struct __pyx_obj_8py_t2sdk_pySubscribeInterface; +struct __pyx_obj_8py_t2sdk_pyCallbackInterface; +struct __pyx_obj_8py_t2sdk_pyConnectionInterface; + +/* "py_t2sdk.pyx":12 + * cdef class pyIF2UnPacker + * + * cdef class pyIF2Packer: # <<<<<<<<<<<<<< + * cdef c_IF2Packer* lpPacker + * def __cinit__(self): + */ +struct __pyx_obj_8py_t2sdk_pyIF2Packer { + PyObject_HEAD + c_IF2Packer *lpPacker; +}; + + +/* "py_t2sdk.pyx":10 + * from libc.stdlib cimport * + * + * cdef class pyIF2UnPacker # <<<<<<<<<<<<<< + * + * cdef class pyIF2Packer: + */ +struct __pyx_obj_8py_t2sdk_pyIF2UnPacker { + PyObject_HEAD + c_IF2UnPacker *lpUnpacker; +}; + + +/* "py_t2sdk.pyx":209 + * self.lpUnpacker.Release() + * + * cdef class pyCConfigInterface: # <<<<<<<<<<<<<< + * cdef C_CConfigInterface* lpConfig + * def __cinit__(self): + */ +struct __pyx_obj_8py_t2sdk_pyCConfigInterface { + PyObject_HEAD + C_CConfigInterface *lpConfig; +}; + + +/* "py_t2sdk.pyx":243 + * self.lpConfig.Release() + * + * cdef class pyIBizMessage: # <<<<<<<<<<<<<< + * cdef c_IBizMessage* lpBizMessage + * def __cinit__(self): + */ +struct __pyx_obj_8py_t2sdk_pyIBizMessage { + PyObject_HEAD + c_IBizMessage *lpBizMessage; +}; + + +/* "py_t2sdk.pyx":367 + * self.lpBizMessage.Release() + * + * cdef class pySubscribeParamInterface: # <<<<<<<<<<<<<< + * cdef c_CSubscribeParamInterface* lpSubscribeParam + * def __cinit__(self): + */ +struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface { + PyObject_HEAD + c_CSubscribeParamInterface *lpSubscribeParam; +}; + + +/* "py_t2sdk.pyx":425 + * return self.lpSubscribeParam.Release() + * + * cdef class pySubCallBack: # <<<<<<<<<<<<<< + * cdef c_SubCallBack* lpSubCallBack + * def __cinit__(self,str lpMould,str lpClass): + */ +struct __pyx_obj_8py_t2sdk_pySubCallBack { + PyObject_HEAD + c_SubCallBack *lpSubCallBack; +}; + + +/* "py_t2sdk.pyx":434 + * return self.lpSubCallBack.initInstance() + * + * cdef class pySubscribeInterface: # <<<<<<<<<<<<<< + * cdef c_CSubscribeInterface* lpSubcribe + * def __cinit__(self): + */ +struct __pyx_obj_8py_t2sdk_pySubscribeInterface { + PyObject_HEAD + c_CSubscribeInterface *lpSubcribe; +}; + + +/* "py_t2sdk.pyx":456 + * def Release(self): + * return self.lpSubcribe.Release() + * cdef class pyCallbackInterface: # <<<<<<<<<<<<<< + * cdef c_CCallbackInterface* lpCallBack + * def __cinit__(self,str lpMould,str lpClass): + */ +struct __pyx_obj_8py_t2sdk_pyCallbackInterface { + PyObject_HEAD + c_CCallbackInterface *lpCallBack; +}; + + +/* "py_t2sdk.pyx":465 + * return self.lpCallBack.InitInstance() + * + * cdef class pyConnectionInterface: # <<<<<<<<<<<<<< + * cdef c_CConnectionInterface* lpConnect + * def __cinit__(self,pyCConfigInterface pConfig): + */ +struct __pyx_obj_8py_t2sdk_pyConnectionInterface { + PyObject_HEAD + c_CConnectionInterface *lpConnect; +}; + + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, int); + void (*DECREF)(void*, PyObject*, int); + void (*GOTREF)(void*, PyObject*, int); + void (*GIVEREF)(void*, PyObject*, int); + void* (*SetupContext)(const char*, int, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; +#ifdef WITH_THREAD + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ + } +#else + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) +#endif + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* KeywordStringCheck.proto */ +static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); + +/* RaiseDoubleKeywords.proto */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywords.proto */ +static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ + PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ + const char* function_name); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* bytes_index.proto */ +static CYTHON_INLINE char __Pyx_PyBytes_GetItemInt(PyObject* bytes, Py_ssize_t index, int check_bounds); + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck); + +/* ListAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { + Py_INCREF(x); + PyList_SET_ITEM(list, len, x); + Py_SIZE(list) = len+1; + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) +#endif + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); +#else +#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectCallNoArg.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); +#else +#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* RaiseException.proto */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* IncludeStringH.proto */ +#include + +/* decode_c_string_utf16.proto */ +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = 0; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = -1; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = 1; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} + +/* decode_c_string.proto */ +static CYTHON_INLINE PyObject* __Pyx_decode_c_string( + const char* cstring, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +#define __Pyx_GetModuleGlobalNameUncached(var, name) {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyObject_GenericGetAttrNoDict.proto */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr +#endif + +/* PyObject_GenericGetAttr.proto */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr +#endif + +/* SetupReduce.proto */ +static int __Pyx_setup_reduce(PyObject* type_obj); + +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* CLineInTraceback.proto */ +#ifdef CYTHON_CLINE_IN_TRACEBACK +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#else +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#endif + +/* CodeObjectCache.proto */ +typedef struct { + PyCodeObject* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; +}; +static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static PyCodeObject *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* CppExceptionConversion.proto */ +#ifndef __Pyx_CppExn2PyErr +#include +#include +#include +#include +static void __Pyx_CppExn2PyErr() { + try { + if (PyErr_Occurred()) + ; // let the latest Python exn pass through and ignore the current one + else + throw; + } catch (const std::bad_alloc& exn) { + PyErr_SetString(PyExc_MemoryError, exn.what()); + } catch (const std::bad_cast& exn) { + PyErr_SetString(PyExc_TypeError, exn.what()); + } catch (const std::bad_typeid& exn) { + PyErr_SetString(PyExc_TypeError, exn.what()); + } catch (const std::domain_error& exn) { + PyErr_SetString(PyExc_ValueError, exn.what()); + } catch (const std::invalid_argument& exn) { + PyErr_SetString(PyExc_ValueError, exn.what()); + } catch (const std::ios_base::failure& exn) { + PyErr_SetString(PyExc_IOError, exn.what()); + } catch (const std::out_of_range& exn) { + PyErr_SetString(PyExc_IndexError, exn.what()); + } catch (const std::overflow_error& exn) { + PyErr_SetString(PyExc_OverflowError, exn.what()); + } catch (const std::range_error& exn) { + PyErr_SetString(PyExc_ArithmeticError, exn.what()); + } catch (const std::underflow_error& exn) { + PyErr_SetString(PyExc_ArithmeticError, exn.what()); + } catch (const std::exception& exn) { + PyErr_SetString(PyExc_RuntimeError, exn.what()); + } + catch (...) + { + PyErr_SetString(PyExc_RuntimeError, "Unknown exception"); + } +} +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) +#endif +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) + +/* CStringEquals.proto */ +static CYTHON_INLINE int __Pyx_StrEq(const char *, const char *); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(void); + +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); + + +/* Module declarations from 'cpython.pycapsule' */ + +/* Module declarations from 'libc.string' */ + +/* Module declarations from 'libcpp.string' */ + +/* Module declarations from 'libc.stdlib' */ + +/* Module declarations from 'py_t2sdk' */ +static PyTypeObject *__pyx_ptype_8py_t2sdk_pyIF2UnPacker = 0; +static PyTypeObject *__pyx_ptype_8py_t2sdk_pyIF2Packer = 0; +static PyTypeObject *__pyx_ptype_8py_t2sdk_pyCConfigInterface = 0; +static PyTypeObject *__pyx_ptype_8py_t2sdk_pyIBizMessage = 0; +static PyTypeObject *__pyx_ptype_8py_t2sdk_pySubscribeParamInterface = 0; +static PyTypeObject *__pyx_ptype_8py_t2sdk_pySubCallBack = 0; +static PyTypeObject *__pyx_ptype_8py_t2sdk_pySubscribeInterface = 0; +static PyTypeObject *__pyx_ptype_8py_t2sdk_pyCallbackInterface = 0; +static PyTypeObject *__pyx_ptype_8py_t2sdk_pyConnectionInterface = 0; +#define __Pyx_MODULE_NAME "py_t2sdk" +extern int __pyx_module_is_main_py_t2sdk; +int __pyx_module_is_main_py_t2sdk = 0; + +/* Implementation of 'py_t2sdk' */ +static PyObject *__pyx_builtin_TypeError; +static const char __pyx_k_S[] = "S"; +static const char __pyx_k__19[] = "*"; +static const char __pyx_k_iLen[] = "iLen"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_nAsy[] = "nAsy"; +static const char __pyx_k_name[] = "__name__"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_UTF_8[] = "UTF-8"; +static const char __pyx_k_hSend[] = "hSend"; +static const char __pyx_k_lpMsg[] = "lpMsg"; +static const char __pyx_k_utf_8[] = "utf-8"; +static const char __pyx_k_ctypes[] = "ctypes"; +static const char __pyx_k_iValue[] = "iValue"; +static const char __pyx_k_import[] = "__import__"; +static const char __pyx_k_lpBuff[] = "lpBuff"; +static const char __pyx_k_lpData[] = "lpData"; +static const char __pyx_k_lpPack[] = "lpPack"; +static const char __pyx_k_reduce[] = "__reduce__"; +static const char __pyx_k_uiFlag[] = "uiFlag"; +static const char __pyx_k_iLength[] = "iLength"; +static const char __pyx_k_lpClass[] = "lpClass"; +static const char __pyx_k_lpMould[] = "lpMould"; +static const char __pyx_k_nAppLen[] = "nAppLen"; +static const char __pyx_k_pConfig[] = "pConfig"; +static const char __pyx_k_szEntry[] = "szEntry"; +static const char __pyx_k_szValue[] = "szValue"; +static const char __pyx_k_encoding[] = "encoding"; +static const char __pyx_k_getstate[] = "__getstate__"; +static const char __pyx_k_iDefault[] = "iDefault"; +static const char __pyx_k_iTimeOut[] = "iTimeOut"; +static const char __pyx_k_lpUnPack[] = "lpUnPack"; +static const char __pyx_k_nBuffLen[] = "nBuffLen"; +static const char __pyx_k_setstate[] = "__setstate__"; +static const char __pyx_k_TypeError[] = "TypeError"; +static const char __pyx_k_bAsyError[] = "bAsyError"; +static const char __pyx_k_lpAppdata[] = "lpAppdata"; +static const char __pyx_k_lpContent[] = "lpContent"; +static const char __pyx_k_lpKeyData[] = "lpKeyData"; +static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; +static const char __pyx_k_szDefault[] = "szDefault"; +static const char __pyx_k_szSection[] = "szSection"; +static const char __pyx_k_uiTimeout[] = "uiTimeout"; +static const char __pyx_k_cFieldType[] = "cFieldType"; +static const char __pyx_k_filterName[] = "filterName"; +static const char __pyx_k_lpSubParam[] = "lpSubParam"; +static const char __pyx_k_filterValue[] = "filterValue"; +static const char __pyx_k_iFieldScale[] = "iFieldScale"; +static const char __pyx_k_iFieldWidth[] = "iFieldWidth"; +static const char __pyx_k_iReturnCode[] = "iReturnCode"; +static const char __pyx_k_lppCallback[] = "lppCallback"; +static const char __pyx_k_pyIF2Packer[] = "pyIF2Packer"; +static const char __pyx_k_szFieldName[] = "szFieldName"; +static const char __pyx_k_SubScribeName[] = "SubScribeName"; +static const char __pyx_k_pyIBizMessage[] = "pyIBizMessage"; +static const char __pyx_k_pyIF2UnPacker[] = "pyIF2UnPacker"; +static const char __pyx_k_pySubCallBack[] = "pySubCallBack"; +static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; +static const char __pyx_k_szDatasetName[] = "szDatasetName"; +static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +static const char __pyx_k_pyCConfigInterface[] = "pyCConfigInterface"; +static const char __pyx_k_pyCallbackInterface[] = "pyCallbackInterface"; +static const char __pyx_k_pySubscribeInterface[] = "pySubscribeInterface"; +static const char __pyx_k_pyConnectionInterface[] = "pyConnectionInterface"; +static const char __pyx_k_pySubscribeParamInterface[] = "pySubscribeParamInterface"; +static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; +static PyObject *__pyx_n_s_S; +static PyObject *__pyx_n_s_SubScribeName; +static PyObject *__pyx_n_s_TypeError; +static PyObject *__pyx_kp_s_UTF_8; +static PyObject *__pyx_n_s__19; +static PyObject *__pyx_n_s_bAsyError; +static PyObject *__pyx_n_s_cFieldType; +static PyObject *__pyx_n_s_cline_in_traceback; +static PyObject *__pyx_n_s_ctypes; +static PyObject *__pyx_n_s_encoding; +static PyObject *__pyx_n_s_filterName; +static PyObject *__pyx_n_s_filterValue; +static PyObject *__pyx_n_s_getstate; +static PyObject *__pyx_n_s_hSend; +static PyObject *__pyx_n_s_iDefault; +static PyObject *__pyx_n_s_iFieldScale; +static PyObject *__pyx_n_s_iFieldWidth; +static PyObject *__pyx_n_s_iLen; +static PyObject *__pyx_n_s_iLength; +static PyObject *__pyx_n_s_iReturnCode; +static PyObject *__pyx_n_s_iTimeOut; +static PyObject *__pyx_n_s_iValue; +static PyObject *__pyx_n_s_import; +static PyObject *__pyx_n_s_lpAppdata; +static PyObject *__pyx_n_s_lpBuff; +static PyObject *__pyx_n_s_lpClass; +static PyObject *__pyx_n_s_lpContent; +static PyObject *__pyx_n_s_lpData; +static PyObject *__pyx_n_s_lpKeyData; +static PyObject *__pyx_n_s_lpMould; +static PyObject *__pyx_n_s_lpMsg; +static PyObject *__pyx_n_s_lpPack; +static PyObject *__pyx_n_s_lpSubParam; +static PyObject *__pyx_n_s_lpUnPack; +static PyObject *__pyx_n_s_lppCallback; +static PyObject *__pyx_n_s_main; +static PyObject *__pyx_n_s_nAppLen; +static PyObject *__pyx_n_s_nAsy; +static PyObject *__pyx_n_s_nBuffLen; +static PyObject *__pyx_n_s_name; +static PyObject *__pyx_kp_s_no_default___reduce___due_to_non; +static PyObject *__pyx_n_s_pConfig; +static PyObject *__pyx_n_s_pyCConfigInterface; +static PyObject *__pyx_n_s_pyCallbackInterface; +static PyObject *__pyx_n_s_pyConnectionInterface; +static PyObject *__pyx_n_s_pyIBizMessage; +static PyObject *__pyx_n_s_pyIF2Packer; +static PyObject *__pyx_n_s_pyIF2UnPacker; +static PyObject *__pyx_n_s_pySubCallBack; +static PyObject *__pyx_n_s_pySubscribeInterface; +static PyObject *__pyx_n_s_pySubscribeParamInterface; +static PyObject *__pyx_n_s_reduce; +static PyObject *__pyx_n_s_reduce_cython; +static PyObject *__pyx_n_s_reduce_ex; +static PyObject *__pyx_n_s_setstate; +static PyObject *__pyx_n_s_setstate_cython; +static PyObject *__pyx_n_s_szDatasetName; +static PyObject *__pyx_n_s_szDefault; +static PyObject *__pyx_n_s_szEntry; +static PyObject *__pyx_n_s_szFieldName; +static PyObject *__pyx_n_s_szSection; +static PyObject *__pyx_n_s_szValue; +static PyObject *__pyx_n_s_test; +static PyObject *__pyx_n_s_uiFlag; +static PyObject *__pyx_n_s_uiTimeout; +static PyObject *__pyx_kp_s_utf_8; +static int __pyx_pf_8py_t2sdk_11pyIF2Packer___cinit__(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static void __pyx_pf_8py_t2sdk_11pyIF2Packer_2__dealloc__(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_4BeginPack(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_6NewDataset(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_szDatasetName, int __pyx_v_iReturnCode); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_8AddField(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_szFieldName, PyObject *__pyx_v_cFieldType, int __pyx_v_iFieldWidth, int __pyx_v_iFieldScale); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_10AddStr(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_szValue); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_12AddInt(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, int __pyx_v_iValue); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_14AddDouble(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, double __pyx_v_fValue); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_16AddChar(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_cValue); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_18AddRaw(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_lpBuff, int __pyx_v_iLen); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_20EndPack(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_22GetPackBuf(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_24GetPackLen(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_26GetPackBufSize(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_28GetVersion(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_30SetReturnCode(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, long __pyx_v_dwRetCode); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_32UnPack(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_34FreeMem(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_36ClearValue(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_38BeginPackEx(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_szName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_40ClearDataSet(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_42Release(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_44__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_46__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_8py_t2sdk_13pyIF2UnPacker___cinit__(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static void __pyx_pf_8py_t2sdk_13pyIF2UnPacker_2__dealloc__(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_4GetVersion(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_6Open(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_lpBuff, int __pyx_v_iLen); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_8GetDatasetCount(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_10SetCurrentDatasetByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_nIndex); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_12SetCurrentDataset(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_szDatasetName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_14GetPackBuf(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_16GetPackLen(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_18GetRowCount(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_20First(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_22Last(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_24Go(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_nRow); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_26GetDatasetName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_28GetColTypeByName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_30GetColScaleByName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_32GetColWidthByName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_34GetColCount(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_36GetColName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_38GetColType(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_40GetColScale(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_42GetColWidth(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_44FindColIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_46GetStrByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_48GetStr(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_50GetCharByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_52GetChar(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_54GetDoubleByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_56GetDouble(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_58GetIntByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_60GetInt(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_62GetRawByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_64GetRaw(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_66WasNull(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_68Next(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_70IsEOF(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_72IsEmpty(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_74Destroy(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_76Release(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_78__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_80__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_8py_t2sdk_18pyCConfigInterface___cinit__(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self); /* proto */ +static void __pyx_pf_8py_t2sdk_18pyCConfigInterface_2__dealloc__(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_4Load(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szFileName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_6Save(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szFileName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_8GetString(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szSection, PyObject *__pyx_v_szEntry, PyObject *__pyx_v_szDefault); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_10GetInt(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szSection, PyObject *__pyx_v_szEntry, int __pyx_v_iDefault); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_12SetString(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szSection, PyObject *__pyx_v_szEntry, PyObject *__pyx_v_szValue); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_14SetInt(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szSection, PyObject *__pyx_v_szEntry, int __pyx_v_iValue); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_16Release(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_8py_t2sdk_13pyIBizMessage___cinit__(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static void __pyx_pf_8py_t2sdk_13pyIBizMessage_2__dealloc__(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_4SetFunction(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nFUnctionNo); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_6GetFunction(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_8SetPacketType(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nPacketType); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_10GetPacketType(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_12SetBranchNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nBranchNo); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_14GetBranchNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_16SetSystemNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nSystemNo); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_18GetSystemNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_20SetSubSystemNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nSubSystemNo); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_22GetSubSystemNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_24SetSenderId(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nSenderId); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_26GetSenderId(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_28SetPacketId(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nPacketId); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_30GetPacketId(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_32SetErrorNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nErrorNo); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_34GetErrorNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_36SetErrorInfo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_strErrorInfo); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_38GetErrorInfo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_40SetReturnCode(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nReturnCode); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_42GetReturnCode(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_44SetContent(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_lpContent, int __pyx_v_iLen); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_46GetContent(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_48SetIssueType(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nIssueType); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_50GetIssueType(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_52SetSequeceNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nSequeceNo); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_54GetSequeceNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_56SetKeyInfo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_lpKeyData, int __pyx_v_iLen); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_58GetKeyInfo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_60SetAppData(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_lpAppdata, int __pyx_v_nAppLen); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_62GetAppData(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_64ChangeReq2AnsMessage(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_66GetBuff(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_68SetBuff(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_lpBuff, int __pyx_v_nBuffLen); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_70ReSet(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_72Release(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_74__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_76__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_8py_t2sdk_25pySubscribeParamInterface___cinit__(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */ +static void __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_2__dealloc__(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_4SetTopicName(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_szName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_6SetAppData(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_lpData, int __pyx_v_iLen); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_8SetFilter(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_filterName, PyObject *__pyx_v_filterValue); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_10SetReturnFiled(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_filedName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_12SetFromNow(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_bFromNow); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_14SetReplace(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_bReplace); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_16SetSendInterval(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_nSendInterval); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_18GetTopicName(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_20GetAppData(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_22GetFilterNameByIndex(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_index); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_24GetFilterValueByIndex(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_index); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_26GetFilterValue(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_fileName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_28GetFilterCount(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_30GetReturnFiled(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_32GetFromNow(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_34GetReplace(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_36GetSendInterval(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_38Release(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_40__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_42__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_8py_t2sdk_13pySubCallBack___cinit__(struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_self, PyObject *__pyx_v_lpMould, PyObject *__pyx_v_lpClass); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pySubCallBack_2initInstance(struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pySubCallBack_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pySubCallBack_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_8py_t2sdk_20pySubscribeInterface___cinit__(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self); /* proto */ +static void __pyx_pf_8py_t2sdk_20pySubscribeInterface_2__dealloc__(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_4SubscribeTopic(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_lpSubParam, int __pyx_v_uiTimeout, struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_lpUnPack, struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_lpPack); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_6CancelSubscribeTopic(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self, int __pyx_v_subscribeIndex); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_8GetSubcribeTopic(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_lpPack); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_10Release(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_8py_t2sdk_19pyCallbackInterface___cinit__(struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_self, PyObject *__pyx_v_lpMould, PyObject *__pyx_v_lpClass); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_19pyCallbackInterface_2InitInstance(struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_19pyCallbackInterface_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_19pyCallbackInterface_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_8py_t2sdk_21pyConnectionInterface___cinit__(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_pConfig); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_2Connect(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, int __pyx_v_uiTimeout); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_4Close(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_6GetServerAddress(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_8GetStatus(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_10GetServerLoad(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_12GetErrorMsg(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, int __pyx_v_nErrorCode); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_14GetConnectError(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_16GetRealAddress(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_18GetSelfAddress(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_20GetSelfMac(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_22NewSubscriber(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_lppCallback, PyObject *__pyx_v_SubScribeName, int __pyx_v_iTimeOut); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_24GetMCLastError(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_26Create2BizMsg(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_lppCallback); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_28SendBizMsg(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_lpMsg, int __pyx_v_nAsy); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_30RecvBizMsg(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, int __pyx_v_hSend, int __pyx_v_uiTimeout, int __pyx_v_uiFlag); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_32GetLastAnsError(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, int __pyx_v_bAsyError); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_34__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_36__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_tp_new_8py_t2sdk_pyIF2UnPacker(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_8py_t2sdk_pyIF2Packer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_8py_t2sdk_pyCConfigInterface(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_8py_t2sdk_pyIBizMessage(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_8py_t2sdk_pySubscribeParamInterface(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_8py_t2sdk_pySubCallBack(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_8py_t2sdk_pySubscribeInterface(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_8py_t2sdk_pyCallbackInterface(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_8py_t2sdk_pyConnectionInterface(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_int_0; +static PyObject *__pyx_int_neg_1; +static PyObject *__pyx_tuple_; +static PyObject *__pyx_tuple__2; +static PyObject *__pyx_tuple__3; +static PyObject *__pyx_tuple__4; +static PyObject *__pyx_tuple__5; +static PyObject *__pyx_tuple__6; +static PyObject *__pyx_tuple__7; +static PyObject *__pyx_tuple__8; +static PyObject *__pyx_tuple__9; +static PyObject *__pyx_tuple__10; +static PyObject *__pyx_tuple__11; +static PyObject *__pyx_tuple__12; +static PyObject *__pyx_tuple__13; +static PyObject *__pyx_tuple__14; +static PyObject *__pyx_tuple__15; +static PyObject *__pyx_tuple__16; +static PyObject *__pyx_tuple__17; +static PyObject *__pyx_tuple__18; +/* Late includes */ + +/* "py_t2sdk.pyx":14 + * cdef class pyIF2Packer: + * cdef c_IF2Packer* lpPacker + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lpPacker = new c_IF2Packer() + * def __dealloc__(self): + */ + +/* Python wrapper */ +static int __pyx_pw_8py_t2sdk_11pyIF2Packer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_8py_t2sdk_11pyIF2Packer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer___cinit__(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_8py_t2sdk_11pyIF2Packer___cinit__(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + c_IF2Packer *__pyx_t_1; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "py_t2sdk.pyx":15 + * cdef c_IF2Packer* lpPacker + * def __cinit__(self): + * self.lpPacker = new c_IF2Packer() # <<<<<<<<<<<<<< + * def __dealloc__(self): + * del self.lpPacker + */ + try { + __pyx_t_1 = new c_IF2Packer(); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 15, __pyx_L1_error) + } + __pyx_v_self->lpPacker = __pyx_t_1; + + /* "py_t2sdk.pyx":14 + * cdef class pyIF2Packer: + * cdef c_IF2Packer* lpPacker + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lpPacker = new c_IF2Packer() + * def __dealloc__(self): + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":16 + * def __cinit__(self): + * self.lpPacker = new c_IF2Packer() + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.lpPacker + * def BeginPack(self): + */ + +/* Python wrapper */ +static void __pyx_pw_8py_t2sdk_11pyIF2Packer_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_8py_t2sdk_11pyIF2Packer_3__dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_pf_8py_t2sdk_11pyIF2Packer_2__dealloc__(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_8py_t2sdk_11pyIF2Packer_2__dealloc__(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__", 0); + + /* "py_t2sdk.pyx":17 + * self.lpPacker = new c_IF2Packer() + * def __dealloc__(self): + * del self.lpPacker # <<<<<<<<<<<<<< + * def BeginPack(self): + * self.lpPacker.BeginPack() + */ + delete __pyx_v_self->lpPacker; + + /* "py_t2sdk.pyx":16 + * def __cinit__(self): + * self.lpPacker = new c_IF2Packer() + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.lpPacker + * def BeginPack(self): + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "py_t2sdk.pyx":18 + * def __dealloc__(self): + * del self.lpPacker + * def BeginPack(self): # <<<<<<<<<<<<<< + * self.lpPacker.BeginPack() + * def NewDataset(self,str szDatasetName, int iReturnCode): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_5BeginPack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_5BeginPack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("BeginPack (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_4BeginPack(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_4BeginPack(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("BeginPack", 0); + + /* "py_t2sdk.pyx":19 + * del self.lpPacker + * def BeginPack(self): + * self.lpPacker.BeginPack() # <<<<<<<<<<<<<< + * def NewDataset(self,str szDatasetName, int iReturnCode): + * sName = bytes(szDatasetName,encoding='utf-8') + */ + __pyx_v_self->lpPacker->BeginPack(); + + /* "py_t2sdk.pyx":18 + * def __dealloc__(self): + * del self.lpPacker + * def BeginPack(self): # <<<<<<<<<<<<<< + * self.lpPacker.BeginPack() + * def NewDataset(self,str szDatasetName, int iReturnCode): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":20 + * def BeginPack(self): + * self.lpPacker.BeginPack() + * def NewDataset(self,str szDatasetName, int iReturnCode): # <<<<<<<<<<<<<< + * sName = bytes(szDatasetName,encoding='utf-8') + * return self.lpPacker.NewDataset(sName,iReturnCode) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_7NewDataset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_7NewDataset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_szDatasetName = 0; + int __pyx_v_iReturnCode; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("NewDataset (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_szDatasetName,&__pyx_n_s_iReturnCode,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szDatasetName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iReturnCode)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("NewDataset", 1, 2, 2, 1); __PYX_ERR(1, 20, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "NewDataset") < 0)) __PYX_ERR(1, 20, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_szDatasetName = ((PyObject*)values[0]); + __pyx_v_iReturnCode = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_iReturnCode == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 20, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("NewDataset", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 20, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.NewDataset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szDatasetName), (&PyString_Type), 1, "szDatasetName", 1))) __PYX_ERR(1, 20, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_6NewDataset(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), __pyx_v_szDatasetName, __pyx_v_iReturnCode); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_6NewDataset(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_szDatasetName, int __pyx_v_iReturnCode) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("NewDataset", 0); + + /* "py_t2sdk.pyx":21 + * self.lpPacker.BeginPack() + * def NewDataset(self,str szDatasetName, int iReturnCode): + * sName = bytes(szDatasetName,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpPacker.NewDataset(sName,iReturnCode) + * def AddField(self,str szFieldName,str cFieldType='S',int iFieldWidth=255,int iFieldScale=4): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 21, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szDatasetName); + __Pyx_GIVEREF(__pyx_v_szDatasetName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szDatasetName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 21, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 21, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 21, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":22 + * def NewDataset(self,str szDatasetName, int iReturnCode): + * sName = bytes(szDatasetName,encoding='utf-8') + * return self.lpPacker.NewDataset(sName,iReturnCode) # <<<<<<<<<<<<<< + * def AddField(self,str szFieldName,str cFieldType='S',int iFieldWidth=255,int iFieldScale=4): + * sName = bytes(szFieldName,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 22, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->NewDataset(__pyx_t_4, __pyx_v_iReturnCode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 22, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":20 + * def BeginPack(self): + * self.lpPacker.BeginPack() + * def NewDataset(self,str szDatasetName, int iReturnCode): # <<<<<<<<<<<<<< + * sName = bytes(szDatasetName,encoding='utf-8') + * return self.lpPacker.NewDataset(sName,iReturnCode) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.NewDataset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":23 + * sName = bytes(szDatasetName,encoding='utf-8') + * return self.lpPacker.NewDataset(sName,iReturnCode) + * def AddField(self,str szFieldName,str cFieldType='S',int iFieldWidth=255,int iFieldScale=4): # <<<<<<<<<<<<<< + * sName = bytes(szFieldName,encoding='utf-8') + * sType = bytes(cFieldType,encoding='utf-8') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_9AddField(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_9AddField(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_szFieldName = 0; + PyObject *__pyx_v_cFieldType = 0; + int __pyx_v_iFieldWidth; + int __pyx_v_iFieldScale; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("AddField (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_szFieldName,&__pyx_n_s_cFieldType,&__pyx_n_s_iFieldWidth,&__pyx_n_s_iFieldScale,0}; + PyObject* values[4] = {0,0,0,0}; + values[1] = ((PyObject*)__pyx_n_s_S); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szFieldName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cFieldType); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iFieldWidth); + if (value) { values[2] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iFieldScale); + if (value) { values[3] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "AddField") < 0)) __PYX_ERR(1, 23, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_szFieldName = ((PyObject*)values[0]); + __pyx_v_cFieldType = ((PyObject*)values[1]); + if (values[2]) { + __pyx_v_iFieldWidth = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_iFieldWidth == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 23, __pyx_L3_error) + } else { + __pyx_v_iFieldWidth = ((int)0xFF); + } + if (values[3]) { + __pyx_v_iFieldScale = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_iFieldScale == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 23, __pyx_L3_error) + } else { + __pyx_v_iFieldScale = ((int)4); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("AddField", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 23, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddField", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szFieldName), (&PyString_Type), 1, "szFieldName", 1))) __PYX_ERR(1, 23, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cFieldType), (&PyString_Type), 1, "cFieldType", 1))) __PYX_ERR(1, 23, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_8AddField(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), __pyx_v_szFieldName, __pyx_v_cFieldType, __pyx_v_iFieldWidth, __pyx_v_iFieldScale); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_8AddField(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_szFieldName, PyObject *__pyx_v_cFieldType, int __pyx_v_iFieldWidth, int __pyx_v_iFieldScale) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_v_sType = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + char __pyx_t_5; + __Pyx_RefNannySetupContext("AddField", 0); + + /* "py_t2sdk.pyx":24 + * return self.lpPacker.NewDataset(sName,iReturnCode) + * def AddField(self,str szFieldName,str cFieldType='S',int iFieldWidth=255,int iFieldScale=4): + * sName = bytes(szFieldName,encoding='utf-8') # <<<<<<<<<<<<<< + * sType = bytes(cFieldType,encoding='utf-8') + * return self.lpPacker.AddField(sName,sType[0],iFieldWidth,iFieldScale) + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szFieldName); + __Pyx_GIVEREF(__pyx_v_szFieldName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szFieldName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 24, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":25 + * def AddField(self,str szFieldName,str cFieldType='S',int iFieldWidth=255,int iFieldScale=4): + * sName = bytes(szFieldName,encoding='utf-8') + * sType = bytes(cFieldType,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpPacker.AddField(sName,sType[0],iFieldWidth,iFieldScale) + * def AddStr(self,str szValue): + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_cFieldType); + __Pyx_GIVEREF(__pyx_v_cFieldType); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_cFieldType); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 25, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sType = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":26 + * sName = bytes(szFieldName,encoding='utf-8') + * sType = bytes(cFieldType,encoding='utf-8') + * return self.lpPacker.AddField(sName,sType[0],iFieldWidth,iFieldScale) # <<<<<<<<<<<<<< + * def AddStr(self,str szValue): + * sValue = bytes(szValue,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 26, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBytes_GetItemInt(__pyx_v_sType, 0, 1); if (unlikely(__pyx_t_5 == ((char)((char)-1)) && PyErr_Occurred())) __PYX_ERR(1, 26, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->AddField(__pyx_t_4, __pyx_t_5, __pyx_v_iFieldWidth, __pyx_v_iFieldScale)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":23 + * sName = bytes(szDatasetName,encoding='utf-8') + * return self.lpPacker.NewDataset(sName,iReturnCode) + * def AddField(self,str szFieldName,str cFieldType='S',int iFieldWidth=255,int iFieldScale=4): # <<<<<<<<<<<<<< + * sName = bytes(szFieldName,encoding='utf-8') + * sType = bytes(cFieldType,encoding='utf-8') + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddField", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XDECREF(__pyx_v_sType); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":27 + * sType = bytes(cFieldType,encoding='utf-8') + * return self.lpPacker.AddField(sName,sType[0],iFieldWidth,iFieldScale) + * def AddStr(self,str szValue): # <<<<<<<<<<<<<< + * sValue = bytes(szValue,encoding='utf-8') + * return self.lpPacker.AddStr(sValue) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_11AddStr(PyObject *__pyx_v_self, PyObject *__pyx_v_szValue); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_11AddStr(PyObject *__pyx_v_self, PyObject *__pyx_v_szValue) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("AddStr (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szValue), (&PyString_Type), 1, "szValue", 1))) __PYX_ERR(1, 27, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_10AddStr(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), ((PyObject*)__pyx_v_szValue)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_10AddStr(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_szValue) { + PyObject *__pyx_v_sValue = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("AddStr", 0); + + /* "py_t2sdk.pyx":28 + * return self.lpPacker.AddField(sName,sType[0],iFieldWidth,iFieldScale) + * def AddStr(self,str szValue): + * sValue = bytes(szValue,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpPacker.AddStr(sValue) + * def AddInt(self,int iValue): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szValue); + __Pyx_GIVEREF(__pyx_v_szValue); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szValue); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 28, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sValue = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":29 + * def AddStr(self,str szValue): + * sValue = bytes(szValue,encoding='utf-8') + * return self.lpPacker.AddStr(sValue) # <<<<<<<<<<<<<< + * def AddInt(self,int iValue): + * return self.lpPacker.AddInt(iValue) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sValue); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 29, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->AddStr(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":27 + * sType = bytes(cFieldType,encoding='utf-8') + * return self.lpPacker.AddField(sName,sType[0],iFieldWidth,iFieldScale) + * def AddStr(self,str szValue): # <<<<<<<<<<<<<< + * sValue = bytes(szValue,encoding='utf-8') + * return self.lpPacker.AddStr(sValue) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddStr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sValue); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":30 + * sValue = bytes(szValue,encoding='utf-8') + * return self.lpPacker.AddStr(sValue) + * def AddInt(self,int iValue): # <<<<<<<<<<<<<< + * return self.lpPacker.AddInt(iValue) + * def AddDouble(self,double fValue): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_13AddInt(PyObject *__pyx_v_self, PyObject *__pyx_arg_iValue); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_13AddInt(PyObject *__pyx_v_self, PyObject *__pyx_arg_iValue) { + int __pyx_v_iValue; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("AddInt (wrapper)", 0); + assert(__pyx_arg_iValue); { + __pyx_v_iValue = __Pyx_PyInt_As_int(__pyx_arg_iValue); if (unlikely((__pyx_v_iValue == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 30, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddInt", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_12AddInt(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), ((int)__pyx_v_iValue)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_12AddInt(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, int __pyx_v_iValue) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("AddInt", 0); + + /* "py_t2sdk.pyx":31 + * return self.lpPacker.AddStr(sValue) + * def AddInt(self,int iValue): + * return self.lpPacker.AddInt(iValue) # <<<<<<<<<<<<<< + * def AddDouble(self,double fValue): + * return self.lpPacker.AddDouble(fValue) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->AddInt(__pyx_v_iValue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 31, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":30 + * sValue = bytes(szValue,encoding='utf-8') + * return self.lpPacker.AddStr(sValue) + * def AddInt(self,int iValue): # <<<<<<<<<<<<<< + * return self.lpPacker.AddInt(iValue) + * def AddDouble(self,double fValue): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddInt", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":32 + * def AddInt(self,int iValue): + * return self.lpPacker.AddInt(iValue) + * def AddDouble(self,double fValue): # <<<<<<<<<<<<<< + * return self.lpPacker.AddDouble(fValue) + * def AddChar(self,str cValue): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_15AddDouble(PyObject *__pyx_v_self, PyObject *__pyx_arg_fValue); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_15AddDouble(PyObject *__pyx_v_self, PyObject *__pyx_arg_fValue) { + double __pyx_v_fValue; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("AddDouble (wrapper)", 0); + assert(__pyx_arg_fValue); { + __pyx_v_fValue = __pyx_PyFloat_AsDouble(__pyx_arg_fValue); if (unlikely((__pyx_v_fValue == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 32, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddDouble", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_14AddDouble(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), ((double)__pyx_v_fValue)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_14AddDouble(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, double __pyx_v_fValue) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("AddDouble", 0); + + /* "py_t2sdk.pyx":33 + * return self.lpPacker.AddInt(iValue) + * def AddDouble(self,double fValue): + * return self.lpPacker.AddDouble(fValue) # <<<<<<<<<<<<<< + * def AddChar(self,str cValue): + * sValue = bytes(cValue,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->AddDouble(__pyx_v_fValue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":32 + * def AddInt(self,int iValue): + * return self.lpPacker.AddInt(iValue) + * def AddDouble(self,double fValue): # <<<<<<<<<<<<<< + * return self.lpPacker.AddDouble(fValue) + * def AddChar(self,str cValue): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddDouble", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":34 + * def AddDouble(self,double fValue): + * return self.lpPacker.AddDouble(fValue) + * def AddChar(self,str cValue): # <<<<<<<<<<<<<< + * sValue = bytes(cValue,encoding='utf-8') + * return self.lpPacker.AddChar(sValue[0]) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_17AddChar(PyObject *__pyx_v_self, PyObject *__pyx_v_cValue); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_17AddChar(PyObject *__pyx_v_self, PyObject *__pyx_v_cValue) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("AddChar (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cValue), (&PyString_Type), 1, "cValue", 1))) __PYX_ERR(1, 34, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_16AddChar(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), ((PyObject*)__pyx_v_cValue)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_16AddChar(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_cValue) { + PyObject *__pyx_v_sValue = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("AddChar", 0); + + /* "py_t2sdk.pyx":35 + * return self.lpPacker.AddDouble(fValue) + * def AddChar(self,str cValue): + * sValue = bytes(cValue,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpPacker.AddChar(sValue[0]) + * def AddRaw(self,list lpBuff,int iLen): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_cValue); + __Pyx_GIVEREF(__pyx_v_cValue); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cValue); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 35, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sValue = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":36 + * def AddChar(self,str cValue): + * sValue = bytes(cValue,encoding='utf-8') + * return self.lpPacker.AddChar(sValue[0]) # <<<<<<<<<<<<<< + * def AddRaw(self,list lpBuff,int iLen): + * cdef char* sBuff = malloc(iLen) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_sValue, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_AsWritableString(__pyx_t_3); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 36, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->AddChar(__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":34 + * def AddDouble(self,double fValue): + * return self.lpPacker.AddDouble(fValue) + * def AddChar(self,str cValue): # <<<<<<<<<<<<<< + * sValue = bytes(cValue,encoding='utf-8') + * return self.lpPacker.AddChar(sValue[0]) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddChar", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sValue); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":37 + * sValue = bytes(cValue,encoding='utf-8') + * return self.lpPacker.AddChar(sValue[0]) + * def AddRaw(self,list lpBuff,int iLen): # <<<<<<<<<<<<<< + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_19AddRaw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_19AddRaw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_lpBuff = 0; + int __pyx_v_iLen; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("AddRaw (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpBuff,&__pyx_n_s_iLen,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpBuff)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iLen)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("AddRaw", 1, 2, 2, 1); __PYX_ERR(1, 37, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "AddRaw") < 0)) __PYX_ERR(1, 37, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_lpBuff = ((PyObject*)values[0]); + __pyx_v_iLen = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_iLen == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 37, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("AddRaw", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 37, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddRaw", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpBuff), (&PyList_Type), 1, "lpBuff", 1))) __PYX_ERR(1, 37, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_18AddRaw(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), __pyx_v_lpBuff, __pyx_v_iLen); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_18AddRaw(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_lpBuff, int __pyx_v_iLen) { + char *__pyx_v_sBuff; + int __pyx_v_iIndex; + int __pyx_v_iRet; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + char __pyx_t_3; + __Pyx_RefNannySetupContext("AddRaw", 0); + + /* "py_t2sdk.pyx":38 + * return self.lpPacker.AddChar(sValue[0]) + * def AddRaw(self,list lpBuff,int iLen): + * cdef char* sBuff = malloc(iLen) # <<<<<<<<<<<<<< + * cdef int iIndex = 0 + * while iIndex < iLen: + */ + __pyx_v_sBuff = ((char *)malloc(__pyx_v_iLen)); + + /* "py_t2sdk.pyx":39 + * def AddRaw(self,list lpBuff,int iLen): + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 # <<<<<<<<<<<<<< + * while iIndex < iLen: + * sBuff[iIndex] = lpBuff[iIndex] + */ + __pyx_v_iIndex = 0; + + /* "py_t2sdk.pyx":40 + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 + * while iIndex < iLen: # <<<<<<<<<<<<<< + * sBuff[iIndex] = lpBuff[iIndex] + * iIndex+=1 + */ + while (1) { + __pyx_t_1 = ((__pyx_v_iIndex < __pyx_v_iLen) != 0); + if (!__pyx_t_1) break; + + /* "py_t2sdk.pyx":41 + * cdef int iIndex = 0 + * while iIndex < iLen: + * sBuff[iIndex] = lpBuff[iIndex] # <<<<<<<<<<<<<< + * iIndex+=1 + * iRet = self.lpPacker.AddRaw(sBuff,iLen) + */ + if (unlikely(__pyx_v_lpBuff == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 41, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_lpBuff, __pyx_v_iIndex, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_As_char(__pyx_t_2); if (unlikely((__pyx_t_3 == (char)-1) && PyErr_Occurred())) __PYX_ERR(1, 41, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + (__pyx_v_sBuff[__pyx_v_iIndex]) = __pyx_t_3; + + /* "py_t2sdk.pyx":42 + * while iIndex < iLen: + * sBuff[iIndex] = lpBuff[iIndex] + * iIndex+=1 # <<<<<<<<<<<<<< + * iRet = self.lpPacker.AddRaw(sBuff,iLen) + * free(sBuff) + */ + __pyx_v_iIndex = (__pyx_v_iIndex + 1); + } + + /* "py_t2sdk.pyx":43 + * sBuff[iIndex] = lpBuff[iIndex] + * iIndex+=1 + * iRet = self.lpPacker.AddRaw(sBuff,iLen) # <<<<<<<<<<<<<< + * free(sBuff) + * return iRet + */ + __pyx_v_iRet = __pyx_v_self->lpPacker->AddRaw(__pyx_v_sBuff, __pyx_v_iLen); + + /* "py_t2sdk.pyx":44 + * iIndex+=1 + * iRet = self.lpPacker.AddRaw(sBuff,iLen) + * free(sBuff) # <<<<<<<<<<<<<< + * return iRet + * def EndPack(self): + */ + free(__pyx_v_sBuff); + + /* "py_t2sdk.pyx":45 + * iRet = self.lpPacker.AddRaw(sBuff,iLen) + * free(sBuff) + * return iRet # <<<<<<<<<<<<<< + * def EndPack(self): + * return self.lpPacker.EndPack() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_iRet); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":37 + * sValue = bytes(cValue,encoding='utf-8') + * return self.lpPacker.AddChar(sValue[0]) + * def AddRaw(self,list lpBuff,int iLen): # <<<<<<<<<<<<<< + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddRaw", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":46 + * free(sBuff) + * return iRet + * def EndPack(self): # <<<<<<<<<<<<<< + * return self.lpPacker.EndPack() + * def GetPackBuf(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_21EndPack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_21EndPack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("EndPack (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_20EndPack(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_20EndPack(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("EndPack", 0); + + /* "py_t2sdk.pyx":47 + * return iRet + * def EndPack(self): + * return self.lpPacker.EndPack() # <<<<<<<<<<<<<< + * def GetPackBuf(self): + * cdef int iLength = self.lpPacker.GetPackLen() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_void_to_None(__pyx_v_self->lpPacker->EndPack()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":46 + * free(sBuff) + * return iRet + * def EndPack(self): # <<<<<<<<<<<<<< + * return self.lpPacker.EndPack() + * def GetPackBuf(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.EndPack", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":48 + * def EndPack(self): + * return self.lpPacker.EndPack() + * def GetPackBuf(self): # <<<<<<<<<<<<<< + * cdef int iLength = self.lpPacker.GetPackLen() + * cdef int* sBuff = self.lpPacker.GetPackBuf() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_23GetPackBuf(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_23GetPackBuf(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetPackBuf (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_22GetPackBuf(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_22GetPackBuf(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + int __pyx_v_iLength; + int *__pyx_v_sBuff; + PyObject *__pyx_v_lpBuff = NULL; + int __pyx_v_iIndex; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + __Pyx_RefNannySetupContext("GetPackBuf", 0); + + /* "py_t2sdk.pyx":49 + * return self.lpPacker.EndPack() + * def GetPackBuf(self): + * cdef int iLength = self.lpPacker.GetPackLen() # <<<<<<<<<<<<<< + * cdef int* sBuff = self.lpPacker.GetPackBuf() + * lpBuff = [] + */ + __pyx_v_iLength = __pyx_v_self->lpPacker->GetPackLen(); + + /* "py_t2sdk.pyx":50 + * def GetPackBuf(self): + * cdef int iLength = self.lpPacker.GetPackLen() + * cdef int* sBuff = self.lpPacker.GetPackBuf() # <<<<<<<<<<<<<< + * lpBuff = [] + * cdef int iIndex = 0 + */ + __pyx_v_sBuff = __pyx_v_self->lpPacker->GetPackBuf(); + + /* "py_t2sdk.pyx":51 + * cdef int iLength = self.lpPacker.GetPackLen() + * cdef int* sBuff = self.lpPacker.GetPackBuf() + * lpBuff = [] # <<<<<<<<<<<<<< + * cdef int iIndex = 0 + * while iIndex < iLength: + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_lpBuff = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":52 + * cdef int* sBuff = self.lpPacker.GetPackBuf() + * lpBuff = [] + * cdef int iIndex = 0 # <<<<<<<<<<<<<< + * while iIndex < iLength: + * lpBuff.append(sBuff[iIndex]) + */ + __pyx_v_iIndex = 0; + + /* "py_t2sdk.pyx":53 + * lpBuff = [] + * cdef int iIndex = 0 + * while iIndex < iLength: # <<<<<<<<<<<<<< + * lpBuff.append(sBuff[iIndex]) + * iIndex +=1 + */ + while (1) { + __pyx_t_2 = ((__pyx_v_iIndex < __pyx_v_iLength) != 0); + if (!__pyx_t_2) break; + + /* "py_t2sdk.pyx":54 + * cdef int iIndex = 0 + * while iIndex < iLength: + * lpBuff.append(sBuff[iIndex]) # <<<<<<<<<<<<<< + * iIndex +=1 + * return lpBuff + */ + __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_sBuff[__pyx_v_iIndex])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_lpBuff, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 54, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":55 + * while iIndex < iLength: + * lpBuff.append(sBuff[iIndex]) + * iIndex +=1 # <<<<<<<<<<<<<< + * return lpBuff + * def GetPackLen(self): + */ + __pyx_v_iIndex = (__pyx_v_iIndex + 1); + } + + /* "py_t2sdk.pyx":56 + * lpBuff.append(sBuff[iIndex]) + * iIndex +=1 + * return lpBuff # <<<<<<<<<<<<<< + * def GetPackLen(self): + * return self.lpPacker.GetPackLen() + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_lpBuff); + __pyx_r = __pyx_v_lpBuff; + goto __pyx_L0; + + /* "py_t2sdk.pyx":48 + * def EndPack(self): + * return self.lpPacker.EndPack() + * def GetPackBuf(self): # <<<<<<<<<<<<<< + * cdef int iLength = self.lpPacker.GetPackLen() + * cdef int* sBuff = self.lpPacker.GetPackBuf() + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.GetPackBuf", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_lpBuff); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":57 + * iIndex +=1 + * return lpBuff + * def GetPackLen(self): # <<<<<<<<<<<<<< + * return self.lpPacker.GetPackLen() + * def GetPackBufSize(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_25GetPackLen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_25GetPackLen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetPackLen (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_24GetPackLen(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_24GetPackLen(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetPackLen", 0); + + /* "py_t2sdk.pyx":58 + * return lpBuff + * def GetPackLen(self): + * return self.lpPacker.GetPackLen() # <<<<<<<<<<<<<< + * def GetPackBufSize(self): + * return self.lpPacker.GetPackBufSize() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->GetPackLen()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":57 + * iIndex +=1 + * return lpBuff + * def GetPackLen(self): # <<<<<<<<<<<<<< + * return self.lpPacker.GetPackLen() + * def GetPackBufSize(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.GetPackLen", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":59 + * def GetPackLen(self): + * return self.lpPacker.GetPackLen() + * def GetPackBufSize(self): # <<<<<<<<<<<<<< + * return self.lpPacker.GetPackBufSize() + * def GetVersion(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_27GetPackBufSize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_27GetPackBufSize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetPackBufSize (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_26GetPackBufSize(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_26GetPackBufSize(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetPackBufSize", 0); + + /* "py_t2sdk.pyx":60 + * return self.lpPacker.GetPackLen() + * def GetPackBufSize(self): + * return self.lpPacker.GetPackBufSize() # <<<<<<<<<<<<<< + * def GetVersion(self): + * return self.lpPacker.GetVersion() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->GetPackBufSize()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":59 + * def GetPackLen(self): + * return self.lpPacker.GetPackLen() + * def GetPackBufSize(self): # <<<<<<<<<<<<<< + * return self.lpPacker.GetPackBufSize() + * def GetVersion(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.GetPackBufSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":61 + * def GetPackBufSize(self): + * return self.lpPacker.GetPackBufSize() + * def GetVersion(self): # <<<<<<<<<<<<<< + * return self.lpPacker.GetVersion() + * def SetReturnCode(self,long dwRetCode): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_29GetVersion(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_29GetVersion(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetVersion (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_28GetVersion(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_28GetVersion(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetVersion", 0); + + /* "py_t2sdk.pyx":62 + * return self.lpPacker.GetPackBufSize() + * def GetVersion(self): + * return self.lpPacker.GetVersion() # <<<<<<<<<<<<<< + * def SetReturnCode(self,long dwRetCode): + * self.lpPacker.SetReturnCode(dwRetCode) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->GetVersion()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":61 + * def GetPackBufSize(self): + * return self.lpPacker.GetPackBufSize() + * def GetVersion(self): # <<<<<<<<<<<<<< + * return self.lpPacker.GetVersion() + * def SetReturnCode(self,long dwRetCode): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.GetVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":63 + * def GetVersion(self): + * return self.lpPacker.GetVersion() + * def SetReturnCode(self,long dwRetCode): # <<<<<<<<<<<<<< + * self.lpPacker.SetReturnCode(dwRetCode) + * def UnPack(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_31SetReturnCode(PyObject *__pyx_v_self, PyObject *__pyx_arg_dwRetCode); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_31SetReturnCode(PyObject *__pyx_v_self, PyObject *__pyx_arg_dwRetCode) { + long __pyx_v_dwRetCode; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetReturnCode (wrapper)", 0); + assert(__pyx_arg_dwRetCode); { + __pyx_v_dwRetCode = __Pyx_PyInt_As_long(__pyx_arg_dwRetCode); if (unlikely((__pyx_v_dwRetCode == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 63, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.SetReturnCode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_30SetReturnCode(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), ((long)__pyx_v_dwRetCode)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_30SetReturnCode(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, long __pyx_v_dwRetCode) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetReturnCode", 0); + + /* "py_t2sdk.pyx":64 + * return self.lpPacker.GetVersion() + * def SetReturnCode(self,long dwRetCode): + * self.lpPacker.SetReturnCode(dwRetCode) # <<<<<<<<<<<<<< + * def UnPack(self): + * cdef c_IF2UnPacker* lpUnpacker = self.lpPacker.UnPack() + */ + __pyx_v_self->lpPacker->SetReturnCode(__pyx_v_dwRetCode); + + /* "py_t2sdk.pyx":63 + * def GetVersion(self): + * return self.lpPacker.GetVersion() + * def SetReturnCode(self,long dwRetCode): # <<<<<<<<<<<<<< + * self.lpPacker.SetReturnCode(dwRetCode) + * def UnPack(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":65 + * def SetReturnCode(self,long dwRetCode): + * self.lpPacker.SetReturnCode(dwRetCode) + * def UnPack(self): # <<<<<<<<<<<<<< + * cdef c_IF2UnPacker* lpUnpacker = self.lpPacker.UnPack() + * lpPyUnpacker = pyIF2UnPacker() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_33UnPack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_33UnPack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("UnPack (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_32UnPack(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_32UnPack(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + c_IF2UnPacker *__pyx_v_lpUnpacker; + struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_lpPyUnpacker = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("UnPack", 0); + + /* "py_t2sdk.pyx":66 + * self.lpPacker.SetReturnCode(dwRetCode) + * def UnPack(self): + * cdef c_IF2UnPacker* lpUnpacker = self.lpPacker.UnPack() # <<<<<<<<<<<<<< + * lpPyUnpacker = pyIF2UnPacker() + * lpPyUnpacker.lpUnpacker = lpUnpacker + */ + __pyx_v_lpUnpacker = __pyx_v_self->lpPacker->UnPack(); + + /* "py_t2sdk.pyx":67 + * def UnPack(self): + * cdef c_IF2UnPacker* lpUnpacker = self.lpPacker.UnPack() + * lpPyUnpacker = pyIF2UnPacker() # <<<<<<<<<<<<<< + * lpPyUnpacker.lpUnpacker = lpUnpacker + * return lpPyUnpacker + */ + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8py_t2sdk_pyIF2UnPacker)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_lpPyUnpacker = ((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":68 + * cdef c_IF2UnPacker* lpUnpacker = self.lpPacker.UnPack() + * lpPyUnpacker = pyIF2UnPacker() + * lpPyUnpacker.lpUnpacker = lpUnpacker # <<<<<<<<<<<<<< + * return lpPyUnpacker + * def FreeMem(self): + */ + __pyx_v_lpPyUnpacker->lpUnpacker = __pyx_v_lpUnpacker; + + /* "py_t2sdk.pyx":69 + * lpPyUnpacker = pyIF2UnPacker() + * lpPyUnpacker.lpUnpacker = lpUnpacker + * return lpPyUnpacker # <<<<<<<<<<<<<< + * def FreeMem(self): + * self.lpPacker.FreeMem() + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_lpPyUnpacker)); + __pyx_r = ((PyObject *)__pyx_v_lpPyUnpacker); + goto __pyx_L0; + + /* "py_t2sdk.pyx":65 + * def SetReturnCode(self,long dwRetCode): + * self.lpPacker.SetReturnCode(dwRetCode) + * def UnPack(self): # <<<<<<<<<<<<<< + * cdef c_IF2UnPacker* lpUnpacker = self.lpPacker.UnPack() + * lpPyUnpacker = pyIF2UnPacker() + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.UnPack", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_lpPyUnpacker); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":70 + * lpPyUnpacker.lpUnpacker = lpUnpacker + * return lpPyUnpacker + * def FreeMem(self): # <<<<<<<<<<<<<< + * self.lpPacker.FreeMem() + * def ClearValue(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_35FreeMem(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_35FreeMem(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("FreeMem (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_34FreeMem(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_34FreeMem(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("FreeMem", 0); + + /* "py_t2sdk.pyx":71 + * return lpPyUnpacker + * def FreeMem(self): + * self.lpPacker.FreeMem() # <<<<<<<<<<<<<< + * def ClearValue(self): + * self.lpPacker.ClearValue() + */ + __pyx_v_self->lpPacker->FreeMem(); + + /* "py_t2sdk.pyx":70 + * lpPyUnpacker.lpUnpacker = lpUnpacker + * return lpPyUnpacker + * def FreeMem(self): # <<<<<<<<<<<<<< + * self.lpPacker.FreeMem() + * def ClearValue(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":72 + * def FreeMem(self): + * self.lpPacker.FreeMem() + * def ClearValue(self): # <<<<<<<<<<<<<< + * self.lpPacker.ClearValue() + * def BeginPackEx(self,str szName): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_37ClearValue(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_37ClearValue(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ClearValue (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_36ClearValue(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_36ClearValue(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ClearValue", 0); + + /* "py_t2sdk.pyx":73 + * self.lpPacker.FreeMem() + * def ClearValue(self): + * self.lpPacker.ClearValue() # <<<<<<<<<<<<<< + * def BeginPackEx(self,str szName): + * sName = bytes(szName,encoding='utf-8') + */ + __pyx_v_self->lpPacker->ClearValue(); + + /* "py_t2sdk.pyx":72 + * def FreeMem(self): + * self.lpPacker.FreeMem() + * def ClearValue(self): # <<<<<<<<<<<<<< + * self.lpPacker.ClearValue() + * def BeginPackEx(self,str szName): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":74 + * def ClearValue(self): + * self.lpPacker.ClearValue() + * def BeginPackEx(self,str szName): # <<<<<<<<<<<<<< + * sName = bytes(szName,encoding='utf-8') + * self.lpPacker.BeginPackEx(sName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_39BeginPackEx(PyObject *__pyx_v_self, PyObject *__pyx_v_szName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_39BeginPackEx(PyObject *__pyx_v_self, PyObject *__pyx_v_szName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("BeginPackEx (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szName), (&PyString_Type), 1, "szName", 1))) __PYX_ERR(1, 74, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_38BeginPackEx(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), ((PyObject*)__pyx_v_szName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_38BeginPackEx(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_szName) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("BeginPackEx", 0); + + /* "py_t2sdk.pyx":75 + * self.lpPacker.ClearValue() + * def BeginPackEx(self,str szName): + * sName = bytes(szName,encoding='utf-8') # <<<<<<<<<<<<<< + * self.lpPacker.BeginPackEx(sName) + * def ClearDataSet(self): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szName); + __Pyx_GIVEREF(__pyx_v_szName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 75, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":76 + * def BeginPackEx(self,str szName): + * sName = bytes(szName,encoding='utf-8') + * self.lpPacker.BeginPackEx(sName) # <<<<<<<<<<<<<< + * def ClearDataSet(self): + * self.lpPacker.ClearDataSet() + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 76, __pyx_L1_error) + __pyx_v_self->lpPacker->BeginPackEx(__pyx_t_4); + + /* "py_t2sdk.pyx":74 + * def ClearValue(self): + * self.lpPacker.ClearValue() + * def BeginPackEx(self,str szName): # <<<<<<<<<<<<<< + * sName = bytes(szName,encoding='utf-8') + * self.lpPacker.BeginPackEx(sName) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.BeginPackEx", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":77 + * sName = bytes(szName,encoding='utf-8') + * self.lpPacker.BeginPackEx(sName) + * def ClearDataSet(self): # <<<<<<<<<<<<<< + * self.lpPacker.ClearDataSet() + * def Release(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_41ClearDataSet(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_41ClearDataSet(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ClearDataSet (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_40ClearDataSet(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_40ClearDataSet(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ClearDataSet", 0); + + /* "py_t2sdk.pyx":78 + * self.lpPacker.BeginPackEx(sName) + * def ClearDataSet(self): + * self.lpPacker.ClearDataSet() # <<<<<<<<<<<<<< + * def Release(self): + * self.lpPacker.Release() + */ + __pyx_v_self->lpPacker->ClearDataSet(); + + /* "py_t2sdk.pyx":77 + * sName = bytes(szName,encoding='utf-8') + * self.lpPacker.BeginPackEx(sName) + * def ClearDataSet(self): # <<<<<<<<<<<<<< + * self.lpPacker.ClearDataSet() + * def Release(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":79 + * def ClearDataSet(self): + * self.lpPacker.ClearDataSet() + * def Release(self): # <<<<<<<<<<<<<< + * self.lpPacker.Release() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_43Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_43Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Release (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_42Release(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_42Release(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Release", 0); + + /* "py_t2sdk.pyx":80 + * self.lpPacker.ClearDataSet() + * def Release(self): + * self.lpPacker.Release() # <<<<<<<<<<<<<< + * + * cdef class pyIF2UnPacker: + */ + __pyx_v_self->lpPacker->Release(); + + /* "py_t2sdk.pyx":79 + * def ClearDataSet(self): + * self.lpPacker.ClearDataSet() + * def Release(self): # <<<<<<<<<<<<<< + * self.lpPacker.Release() + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_45__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_45__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_44__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_44__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_47__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_47__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_46__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_46__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":84 + * cdef class pyIF2UnPacker: + * cdef c_IF2UnPacker* lpUnpacker + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lpUnpacker = NULL + * def __dealloc__(self): + */ + +/* Python wrapper */ +static int __pyx_pw_8py_t2sdk_13pyIF2UnPacker_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_8py_t2sdk_13pyIF2UnPacker_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker___cinit__(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_8py_t2sdk_13pyIF2UnPacker___cinit__(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "py_t2sdk.pyx":85 + * cdef c_IF2UnPacker* lpUnpacker + * def __cinit__(self): + * self.lpUnpacker = NULL # <<<<<<<<<<<<<< + * def __dealloc__(self): + * if self.lpUnpacker != NULL: + */ + __pyx_v_self->lpUnpacker = NULL; + + /* "py_t2sdk.pyx":84 + * cdef class pyIF2UnPacker: + * cdef c_IF2UnPacker* lpUnpacker + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lpUnpacker = NULL + * def __dealloc__(self): + */ + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":86 + * def __cinit__(self): + * self.lpUnpacker = NULL + * def __dealloc__(self): # <<<<<<<<<<<<<< + * if self.lpUnpacker != NULL: + * del self.lpUnpacker + */ + +/* Python wrapper */ +static void __pyx_pw_8py_t2sdk_13pyIF2UnPacker_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_8py_t2sdk_13pyIF2UnPacker_3__dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_pf_8py_t2sdk_13pyIF2UnPacker_2__dealloc__(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_8py_t2sdk_13pyIF2UnPacker_2__dealloc__(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("__dealloc__", 0); + + /* "py_t2sdk.pyx":87 + * self.lpUnpacker = NULL + * def __dealloc__(self): + * if self.lpUnpacker != NULL: # <<<<<<<<<<<<<< + * del self.lpUnpacker + * self.lpUnpacker = NULL + */ + __pyx_t_1 = ((__pyx_v_self->lpUnpacker != NULL) != 0); + if (__pyx_t_1) { + + /* "py_t2sdk.pyx":88 + * def __dealloc__(self): + * if self.lpUnpacker != NULL: + * del self.lpUnpacker # <<<<<<<<<<<<<< + * self.lpUnpacker = NULL + * def GetVersion(self): + */ + delete __pyx_v_self->lpUnpacker; + + /* "py_t2sdk.pyx":89 + * if self.lpUnpacker != NULL: + * del self.lpUnpacker + * self.lpUnpacker = NULL # <<<<<<<<<<<<<< + * def GetVersion(self): + * return self.lpUnpacker.GetVersion() + */ + __pyx_v_self->lpUnpacker = NULL; + + /* "py_t2sdk.pyx":87 + * self.lpUnpacker = NULL + * def __dealloc__(self): + * if self.lpUnpacker != NULL: # <<<<<<<<<<<<<< + * del self.lpUnpacker + * self.lpUnpacker = NULL + */ + } + + /* "py_t2sdk.pyx":86 + * def __cinit__(self): + * self.lpUnpacker = NULL + * def __dealloc__(self): # <<<<<<<<<<<<<< + * if self.lpUnpacker != NULL: + * del self.lpUnpacker + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "py_t2sdk.pyx":90 + * del self.lpUnpacker + * self.lpUnpacker = NULL + * def GetVersion(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetVersion() + * def Open(self,list lpBuff,int iLen): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_5GetVersion(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_5GetVersion(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetVersion (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_4GetVersion(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_4GetVersion(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetVersion", 0); + + /* "py_t2sdk.pyx":91 + * self.lpUnpacker = NULL + * def GetVersion(self): + * return self.lpUnpacker.GetVersion() # <<<<<<<<<<<<<< + * def Open(self,list lpBuff,int iLen): + * cdef char* sBuff = malloc(iLen) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetVersion()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 91, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":90 + * del self.lpUnpacker + * self.lpUnpacker = NULL + * def GetVersion(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetVersion() + * def Open(self,list lpBuff,int iLen): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":92 + * def GetVersion(self): + * return self.lpUnpacker.GetVersion() + * def Open(self,list lpBuff,int iLen): # <<<<<<<<<<<<<< + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_7Open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_7Open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_lpBuff = 0; + int __pyx_v_iLen; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Open (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpBuff,&__pyx_n_s_iLen,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpBuff)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iLen)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("Open", 1, 2, 2, 1); __PYX_ERR(1, 92, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Open") < 0)) __PYX_ERR(1, 92, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_lpBuff = ((PyObject*)values[0]); + __pyx_v_iLen = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_iLen == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 92, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("Open", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 92, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.Open", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpBuff), (&PyList_Type), 1, "lpBuff", 1))) __PYX_ERR(1, 92, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_6Open(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), __pyx_v_lpBuff, __pyx_v_iLen); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_6Open(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_lpBuff, int __pyx_v_iLen) { + char *__pyx_v_sBuff; + int __pyx_v_iIndex; + long __pyx_v_iRet; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + char __pyx_t_3; + c_IF2UnPacker *__pyx_t_4; + __Pyx_RefNannySetupContext("Open", 0); + + /* "py_t2sdk.pyx":93 + * return self.lpUnpacker.GetVersion() + * def Open(self,list lpBuff,int iLen): + * cdef char* sBuff = malloc(iLen) # <<<<<<<<<<<<<< + * cdef int iIndex = 0 + * while iIndex < iLen: + */ + __pyx_v_sBuff = ((char *)malloc(__pyx_v_iLen)); + + /* "py_t2sdk.pyx":94 + * def Open(self,list lpBuff,int iLen): + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 # <<<<<<<<<<<<<< + * while iIndex < iLen: + * sBuff[iIndex] = lpBuff[iIndex] + */ + __pyx_v_iIndex = 0; + + /* "py_t2sdk.pyx":95 + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 + * while iIndex < iLen: # <<<<<<<<<<<<<< + * sBuff[iIndex] = lpBuff[iIndex] + * iIndex+=1 + */ + while (1) { + __pyx_t_1 = ((__pyx_v_iIndex < __pyx_v_iLen) != 0); + if (!__pyx_t_1) break; + + /* "py_t2sdk.pyx":96 + * cdef int iIndex = 0 + * while iIndex < iLen: + * sBuff[iIndex] = lpBuff[iIndex] # <<<<<<<<<<<<<< + * iIndex+=1 + * if self.lpUnpacker == NULL: + */ + if (unlikely(__pyx_v_lpBuff == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 96, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_lpBuff, __pyx_v_iIndex, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 96, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_As_char(__pyx_t_2); if (unlikely((__pyx_t_3 == (char)-1) && PyErr_Occurred())) __PYX_ERR(1, 96, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + (__pyx_v_sBuff[__pyx_v_iIndex]) = __pyx_t_3; + + /* "py_t2sdk.pyx":97 + * while iIndex < iLen: + * sBuff[iIndex] = lpBuff[iIndex] + * iIndex+=1 # <<<<<<<<<<<<<< + * if self.lpUnpacker == NULL: + * self.lpUnpacker = new c_IF2UnPacker(sBuff,iLen) + */ + __pyx_v_iIndex = (__pyx_v_iIndex + 1); + } + + /* "py_t2sdk.pyx":98 + * sBuff[iIndex] = lpBuff[iIndex] + * iIndex+=1 + * if self.lpUnpacker == NULL: # <<<<<<<<<<<<<< + * self.lpUnpacker = new c_IF2UnPacker(sBuff,iLen) + * iRet = 0 + */ + __pyx_t_1 = ((__pyx_v_self->lpUnpacker == NULL) != 0); + if (__pyx_t_1) { + + /* "py_t2sdk.pyx":99 + * iIndex+=1 + * if self.lpUnpacker == NULL: + * self.lpUnpacker = new c_IF2UnPacker(sBuff,iLen) # <<<<<<<<<<<<<< + * iRet = 0 + * else: + */ + try { + __pyx_t_4 = new c_IF2UnPacker(__pyx_v_sBuff, __pyx_v_iLen); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 99, __pyx_L1_error) + } + __pyx_v_self->lpUnpacker = __pyx_t_4; + + /* "py_t2sdk.pyx":100 + * if self.lpUnpacker == NULL: + * self.lpUnpacker = new c_IF2UnPacker(sBuff,iLen) + * iRet = 0 # <<<<<<<<<<<<<< + * else: + * iRet = self.lpUnpacker.Open(sBuff,iLen) + */ + __pyx_v_iRet = 0; + + /* "py_t2sdk.pyx":98 + * sBuff[iIndex] = lpBuff[iIndex] + * iIndex+=1 + * if self.lpUnpacker == NULL: # <<<<<<<<<<<<<< + * self.lpUnpacker = new c_IF2UnPacker(sBuff,iLen) + * iRet = 0 + */ + goto __pyx_L5; + } + + /* "py_t2sdk.pyx":102 + * iRet = 0 + * else: + * iRet = self.lpUnpacker.Open(sBuff,iLen) # <<<<<<<<<<<<<< + * free(sBuff) + * return iRet + */ + /*else*/ { + __pyx_v_iRet = __pyx_v_self->lpUnpacker->Open(__pyx_v_sBuff, __pyx_v_iLen); + } + __pyx_L5:; + + /* "py_t2sdk.pyx":103 + * else: + * iRet = self.lpUnpacker.Open(sBuff,iLen) + * free(sBuff) # <<<<<<<<<<<<<< + * return iRet + * def GetDatasetCount(self): + */ + free(__pyx_v_sBuff); + + /* "py_t2sdk.pyx":104 + * iRet = self.lpUnpacker.Open(sBuff,iLen) + * free(sBuff) + * return iRet # <<<<<<<<<<<<<< + * def GetDatasetCount(self): + * if self.lpUnpacker == NULL: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_iRet); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":92 + * def GetVersion(self): + * return self.lpUnpacker.GetVersion() + * def Open(self,list lpBuff,int iLen): # <<<<<<<<<<<<<< + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.Open", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":105 + * free(sBuff) + * return iRet + * def GetDatasetCount(self): # <<<<<<<<<<<<<< + * if self.lpUnpacker == NULL: + * return -1; + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_9GetDatasetCount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_9GetDatasetCount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetDatasetCount (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_8GetDatasetCount(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_8GetDatasetCount(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("GetDatasetCount", 0); + + /* "py_t2sdk.pyx":106 + * return iRet + * def GetDatasetCount(self): + * if self.lpUnpacker == NULL: # <<<<<<<<<<<<<< + * return -1; + * return self.lpUnpacker.GetDatasetCount() + */ + __pyx_t_1 = ((__pyx_v_self->lpUnpacker == NULL) != 0); + if (__pyx_t_1) { + + /* "py_t2sdk.pyx":107 + * def GetDatasetCount(self): + * if self.lpUnpacker == NULL: + * return -1; # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetDatasetCount() + * def SetCurrentDatasetByIndex(self,int nIndex): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_int_neg_1); + __pyx_r = __pyx_int_neg_1; + goto __pyx_L0; + + /* "py_t2sdk.pyx":106 + * return iRet + * def GetDatasetCount(self): + * if self.lpUnpacker == NULL: # <<<<<<<<<<<<<< + * return -1; + * return self.lpUnpacker.GetDatasetCount() + */ + } + + /* "py_t2sdk.pyx":108 + * if self.lpUnpacker == NULL: + * return -1; + * return self.lpUnpacker.GetDatasetCount() # <<<<<<<<<<<<<< + * def SetCurrentDatasetByIndex(self,int nIndex): + * self.lpUnpacker.SetCurrentDatasetByIndex(nIndex) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetDatasetCount()); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":105 + * free(sBuff) + * return iRet + * def GetDatasetCount(self): # <<<<<<<<<<<<<< + * if self.lpUnpacker == NULL: + * return -1; + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetDatasetCount", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":109 + * return -1; + * return self.lpUnpacker.GetDatasetCount() + * def SetCurrentDatasetByIndex(self,int nIndex): # <<<<<<<<<<<<<< + * self.lpUnpacker.SetCurrentDatasetByIndex(nIndex) + * def SetCurrentDataset(self,str szDatasetName): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_11SetCurrentDatasetByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_nIndex); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_11SetCurrentDatasetByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_nIndex) { + int __pyx_v_nIndex; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetCurrentDatasetByIndex (wrapper)", 0); + assert(__pyx_arg_nIndex); { + __pyx_v_nIndex = __Pyx_PyInt_As_int(__pyx_arg_nIndex); if (unlikely((__pyx_v_nIndex == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 109, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.SetCurrentDatasetByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_10SetCurrentDatasetByIndex(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_nIndex)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_10SetCurrentDatasetByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_nIndex) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetCurrentDatasetByIndex", 0); + + /* "py_t2sdk.pyx":110 + * return self.lpUnpacker.GetDatasetCount() + * def SetCurrentDatasetByIndex(self,int nIndex): + * self.lpUnpacker.SetCurrentDatasetByIndex(nIndex) # <<<<<<<<<<<<<< + * def SetCurrentDataset(self,str szDatasetName): + * sName = bytes(szDatasetName,encoding='utf-8') + */ + (void)(__pyx_v_self->lpUnpacker->SetCurrentDatasetByIndex(__pyx_v_nIndex)); + + /* "py_t2sdk.pyx":109 + * return -1; + * return self.lpUnpacker.GetDatasetCount() + * def SetCurrentDatasetByIndex(self,int nIndex): # <<<<<<<<<<<<<< + * self.lpUnpacker.SetCurrentDatasetByIndex(nIndex) + * def SetCurrentDataset(self,str szDatasetName): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":111 + * def SetCurrentDatasetByIndex(self,int nIndex): + * self.lpUnpacker.SetCurrentDatasetByIndex(nIndex) + * def SetCurrentDataset(self,str szDatasetName): # <<<<<<<<<<<<<< + * sName = bytes(szDatasetName,encoding='utf-8') + * self.lpUnpacker.SetCurrentDataset(sName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_13SetCurrentDataset(PyObject *__pyx_v_self, PyObject *__pyx_v_szDatasetName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_13SetCurrentDataset(PyObject *__pyx_v_self, PyObject *__pyx_v_szDatasetName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetCurrentDataset (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szDatasetName), (&PyString_Type), 1, "szDatasetName", 1))) __PYX_ERR(1, 111, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_12SetCurrentDataset(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_szDatasetName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_12SetCurrentDataset(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_szDatasetName) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("SetCurrentDataset", 0); + + /* "py_t2sdk.pyx":112 + * self.lpUnpacker.SetCurrentDatasetByIndex(nIndex) + * def SetCurrentDataset(self,str szDatasetName): + * sName = bytes(szDatasetName,encoding='utf-8') # <<<<<<<<<<<<<< + * self.lpUnpacker.SetCurrentDataset(sName) + * def GetPackBuf(self): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szDatasetName); + __Pyx_GIVEREF(__pyx_v_szDatasetName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szDatasetName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 112, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":113 + * def SetCurrentDataset(self,str szDatasetName): + * sName = bytes(szDatasetName,encoding='utf-8') + * self.lpUnpacker.SetCurrentDataset(sName) # <<<<<<<<<<<<<< + * def GetPackBuf(self): + * cdef char* lpBuff = self.lpUnpacker.GetPackBuf() + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 113, __pyx_L1_error) + (void)(__pyx_v_self->lpUnpacker->SetCurrentDataset(__pyx_t_4)); + + /* "py_t2sdk.pyx":111 + * def SetCurrentDatasetByIndex(self,int nIndex): + * self.lpUnpacker.SetCurrentDatasetByIndex(nIndex) + * def SetCurrentDataset(self,str szDatasetName): # <<<<<<<<<<<<<< + * sName = bytes(szDatasetName,encoding='utf-8') + * self.lpUnpacker.SetCurrentDataset(sName) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.SetCurrentDataset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":114 + * sName = bytes(szDatasetName,encoding='utf-8') + * self.lpUnpacker.SetCurrentDataset(sName) + * def GetPackBuf(self): # <<<<<<<<<<<<<< + * cdef char* lpBuff = self.lpUnpacker.GetPackBuf() + * return lpBuff + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_15GetPackBuf(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_15GetPackBuf(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetPackBuf (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_14GetPackBuf(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_14GetPackBuf(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + char *__pyx_v_lpBuff; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetPackBuf", 0); + + /* "py_t2sdk.pyx":115 + * self.lpUnpacker.SetCurrentDataset(sName) + * def GetPackBuf(self): + * cdef char* lpBuff = self.lpUnpacker.GetPackBuf() # <<<<<<<<<<<<<< + * return lpBuff + * def GetPackLen(self): + */ + __pyx_v_lpBuff = __pyx_v_self->lpUnpacker->GetPackBuf(); + + /* "py_t2sdk.pyx":116 + * def GetPackBuf(self): + * cdef char* lpBuff = self.lpUnpacker.GetPackBuf() + * return lpBuff # <<<<<<<<<<<<<< + * def GetPackLen(self): + * return self.lpUnpacker.GetPackLen() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_lpBuff); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":114 + * sName = bytes(szDatasetName,encoding='utf-8') + * self.lpUnpacker.SetCurrentDataset(sName) + * def GetPackBuf(self): # <<<<<<<<<<<<<< + * cdef char* lpBuff = self.lpUnpacker.GetPackBuf() + * return lpBuff + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetPackBuf", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":117 + * cdef char* lpBuff = self.lpUnpacker.GetPackBuf() + * return lpBuff + * def GetPackLen(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetPackLen() + * def GetRowCount(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_17GetPackLen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_17GetPackLen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetPackLen (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_16GetPackLen(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_16GetPackLen(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetPackLen", 0); + + /* "py_t2sdk.pyx":118 + * return lpBuff + * def GetPackLen(self): + * return self.lpUnpacker.GetPackLen() # <<<<<<<<<<<<<< + * def GetRowCount(self): + * return self.lpUnpacker.GetRowCount() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetPackLen()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 118, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":117 + * cdef char* lpBuff = self.lpUnpacker.GetPackBuf() + * return lpBuff + * def GetPackLen(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetPackLen() + * def GetRowCount(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetPackLen", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":119 + * def GetPackLen(self): + * return self.lpUnpacker.GetPackLen() + * def GetRowCount(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetRowCount() + * def First(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_19GetRowCount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_19GetRowCount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetRowCount (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_18GetRowCount(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_18GetRowCount(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetRowCount", 0); + + /* "py_t2sdk.pyx":120 + * return self.lpUnpacker.GetPackLen() + * def GetRowCount(self): + * return self.lpUnpacker.GetRowCount() # <<<<<<<<<<<<<< + * def First(self): + * self.lpUnpacker.First() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetRowCount()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":119 + * def GetPackLen(self): + * return self.lpUnpacker.GetPackLen() + * def GetRowCount(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetRowCount() + * def First(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetRowCount", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":121 + * def GetRowCount(self): + * return self.lpUnpacker.GetRowCount() + * def First(self): # <<<<<<<<<<<<<< + * self.lpUnpacker.First() + * def Last(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_21First(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_21First(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("First (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_20First(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_20First(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("First", 0); + + /* "py_t2sdk.pyx":122 + * return self.lpUnpacker.GetRowCount() + * def First(self): + * self.lpUnpacker.First() # <<<<<<<<<<<<<< + * def Last(self): + * self.lpUnpacker.Last() + */ + __pyx_v_self->lpUnpacker->First(); + + /* "py_t2sdk.pyx":121 + * def GetRowCount(self): + * return self.lpUnpacker.GetRowCount() + * def First(self): # <<<<<<<<<<<<<< + * self.lpUnpacker.First() + * def Last(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":123 + * def First(self): + * self.lpUnpacker.First() + * def Last(self): # <<<<<<<<<<<<<< + * self.lpUnpacker.Last() + * def Go(self,int nRow): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_23Last(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_23Last(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Last (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_22Last(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_22Last(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Last", 0); + + /* "py_t2sdk.pyx":124 + * self.lpUnpacker.First() + * def Last(self): + * self.lpUnpacker.Last() # <<<<<<<<<<<<<< + * def Go(self,int nRow): + * self.lpUnpacker.Go(nRow) + */ + __pyx_v_self->lpUnpacker->Last(); + + /* "py_t2sdk.pyx":123 + * def First(self): + * self.lpUnpacker.First() + * def Last(self): # <<<<<<<<<<<<<< + * self.lpUnpacker.Last() + * def Go(self,int nRow): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":125 + * def Last(self): + * self.lpUnpacker.Last() + * def Go(self,int nRow): # <<<<<<<<<<<<<< + * self.lpUnpacker.Go(nRow) + * def GetDatasetName(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_25Go(PyObject *__pyx_v_self, PyObject *__pyx_arg_nRow); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_25Go(PyObject *__pyx_v_self, PyObject *__pyx_arg_nRow) { + int __pyx_v_nRow; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Go (wrapper)", 0); + assert(__pyx_arg_nRow); { + __pyx_v_nRow = __Pyx_PyInt_As_int(__pyx_arg_nRow); if (unlikely((__pyx_v_nRow == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 125, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.Go", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_24Go(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_nRow)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_24Go(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_nRow) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Go", 0); + + /* "py_t2sdk.pyx":126 + * self.lpUnpacker.Last() + * def Go(self,int nRow): + * self.lpUnpacker.Go(nRow) # <<<<<<<<<<<<<< + * def GetDatasetName(self): + * cdef char* sName = self.lpUnpacker.GetDatasetName() + */ + __pyx_v_self->lpUnpacker->Go(__pyx_v_nRow); + + /* "py_t2sdk.pyx":125 + * def Last(self): + * self.lpUnpacker.Last() + * def Go(self,int nRow): # <<<<<<<<<<<<<< + * self.lpUnpacker.Go(nRow) + * def GetDatasetName(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":127 + * def Go(self,int nRow): + * self.lpUnpacker.Go(nRow) + * def GetDatasetName(self): # <<<<<<<<<<<<<< + * cdef char* sName = self.lpUnpacker.GetDatasetName() + * return sName + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_27GetDatasetName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_27GetDatasetName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetDatasetName (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_26GetDatasetName(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_26GetDatasetName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + char *__pyx_v_sName; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetDatasetName", 0); + + /* "py_t2sdk.pyx":128 + * self.lpUnpacker.Go(nRow) + * def GetDatasetName(self): + * cdef char* sName = self.lpUnpacker.GetDatasetName() # <<<<<<<<<<<<<< + * return sName + * def GetColTypeByName(self,str columnName): + */ + __pyx_v_sName = __pyx_v_self->lpUnpacker->GetDatasetName(); + + /* "py_t2sdk.pyx":129 + * def GetDatasetName(self): + * cdef char* sName = self.lpUnpacker.GetDatasetName() + * return sName # <<<<<<<<<<<<<< + * def GetColTypeByName(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sName); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":127 + * def Go(self,int nRow): + * self.lpUnpacker.Go(nRow) + * def GetDatasetName(self): # <<<<<<<<<<<<<< + * cdef char* sName = self.lpUnpacker.GetDatasetName() + * return sName + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetDatasetName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":130 + * cdef char* sName = self.lpUnpacker.GetDatasetName() + * return sName + * def GetColTypeByName(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * cdef char* sType = self.lpUnpacker.GetColTypeByName(sName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_29GetColTypeByName(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_29GetColTypeByName(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetColTypeByName (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 130, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_28GetColTypeByName(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_28GetColTypeByName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_v_sName = NULL; + char *__pyx_v_sType; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("GetColTypeByName", 0); + + /* "py_t2sdk.pyx":131 + * return sName + * def GetColTypeByName(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') # <<<<<<<<<<<<<< + * cdef char* sType = self.lpUnpacker.GetColTypeByName(sName) + * return sType.decode('gbk') + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_columnName); + __Pyx_GIVEREF(__pyx_v_columnName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 131, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":132 + * def GetColTypeByName(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + * cdef char* sType = self.lpUnpacker.GetColTypeByName(sName) # <<<<<<<<<<<<<< + * return sType.decode('gbk') + * def GetColScaleByName(self,str columnName): + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 132, __pyx_L1_error) + __pyx_v_sType = __pyx_v_self->lpUnpacker->GetColTypeByName(__pyx_t_4); + + /* "py_t2sdk.pyx":133 + * sName = bytes(columnName,encoding='utf-8') + * cdef char* sType = self.lpUnpacker.GetColTypeByName(sName) + * return sType.decode('gbk') # <<<<<<<<<<<<<< + * def GetColScaleByName(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_sType, 0, strlen(__pyx_v_sType), ((char const *)"gbk"), NULL, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":130 + * cdef char* sName = self.lpUnpacker.GetDatasetName() + * return sName + * def GetColTypeByName(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * cdef char* sType = self.lpUnpacker.GetColTypeByName(sName) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColTypeByName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":134 + * cdef char* sType = self.lpUnpacker.GetColTypeByName(sName) + * return sType.decode('gbk') + * def GetColScaleByName(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetColScaleByName(sName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_31GetColScaleByName(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_31GetColScaleByName(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetColScaleByName (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 134, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_30GetColScaleByName(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_30GetColScaleByName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("GetColScaleByName", 0); + + /* "py_t2sdk.pyx":135 + * return sType.decode('gbk') + * def GetColScaleByName(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetColScaleByName(sName) + * def GetColWidthByName(self,str columnName): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_columnName); + __Pyx_GIVEREF(__pyx_v_columnName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 135, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":136 + * def GetColScaleByName(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetColScaleByName(sName) # <<<<<<<<<<<<<< + * def GetColWidthByName(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 136, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetColScaleByName(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":134 + * cdef char* sType = self.lpUnpacker.GetColTypeByName(sName) + * return sType.decode('gbk') + * def GetColScaleByName(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetColScaleByName(sName) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColScaleByName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":137 + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetColScaleByName(sName) + * def GetColWidthByName(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetColWidthByName(sName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_33GetColWidthByName(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_33GetColWidthByName(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetColWidthByName (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 137, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_32GetColWidthByName(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_32GetColWidthByName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("GetColWidthByName", 0); + + /* "py_t2sdk.pyx":138 + * return self.lpUnpacker.GetColScaleByName(sName) + * def GetColWidthByName(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetColWidthByName(sName) + * def GetColCount(self): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_columnName); + __Pyx_GIVEREF(__pyx_v_columnName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 138, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":139 + * def GetColWidthByName(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetColWidthByName(sName) # <<<<<<<<<<<<<< + * def GetColCount(self): + * return self.lpUnpacker.GetColCount() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 139, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetColWidthByName(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":137 + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetColScaleByName(sName) + * def GetColWidthByName(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetColWidthByName(sName) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColWidthByName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":140 + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetColWidthByName(sName) + * def GetColCount(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetColCount() + * def GetColName(self,int column): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_35GetColCount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_35GetColCount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetColCount (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_34GetColCount(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_34GetColCount(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetColCount", 0); + + /* "py_t2sdk.pyx":141 + * return self.lpUnpacker.GetColWidthByName(sName) + * def GetColCount(self): + * return self.lpUnpacker.GetColCount() # <<<<<<<<<<<<<< + * def GetColName(self,int column): + * return self.lpUnpacker.GetColName(column).decode('gbk') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetColCount()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":140 + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetColWidthByName(sName) + * def GetColCount(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetColCount() + * def GetColName(self,int column): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColCount", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":142 + * def GetColCount(self): + * return self.lpUnpacker.GetColCount() + * def GetColName(self,int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetColName(column).decode('gbk') + * def GetColType(self,int column): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_37GetColName(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_37GetColName(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) { + int __pyx_v_column; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetColName (wrapper)", 0); + assert(__pyx_arg_column); { + __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 142, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_36GetColName(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_36GetColName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + char *__pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("GetColName", 0); + + /* "py_t2sdk.pyx":143 + * return self.lpUnpacker.GetColCount() + * def GetColName(self,int column): + * return self.lpUnpacker.GetColName(column).decode('gbk') # <<<<<<<<<<<<<< + * def GetColType(self,int column): + * cdef char* sType = self.lpUnpacker.GetColType(column) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_v_self->lpUnpacker->GetColName(__pyx_v_column); + __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_1, 0, strlen(__pyx_t_1), ((char const *)"gbk"), NULL, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":142 + * def GetColCount(self): + * return self.lpUnpacker.GetColCount() + * def GetColName(self,int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetColName(column).decode('gbk') + * def GetColType(self,int column): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":144 + * def GetColName(self,int column): + * return self.lpUnpacker.GetColName(column).decode('gbk') + * def GetColType(self,int column): # <<<<<<<<<<<<<< + * cdef char* sType = self.lpUnpacker.GetColType(column) + * return sType.decode('gbk') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_39GetColType(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_39GetColType(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) { + int __pyx_v_column; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetColType (wrapper)", 0); + assert(__pyx_arg_column); { + __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 144, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColType", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_38GetColType(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_38GetColType(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) { + char *__pyx_v_sType; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetColType", 0); + + /* "py_t2sdk.pyx":145 + * return self.lpUnpacker.GetColName(column).decode('gbk') + * def GetColType(self,int column): + * cdef char* sType = self.lpUnpacker.GetColType(column) # <<<<<<<<<<<<<< + * return sType.decode('gbk') + * def GetColScale(self,int column): + */ + __pyx_v_sType = __pyx_v_self->lpUnpacker->GetColType(__pyx_v_column); + + /* "py_t2sdk.pyx":146 + * def GetColType(self,int column): + * cdef char* sType = self.lpUnpacker.GetColType(column) + * return sType.decode('gbk') # <<<<<<<<<<<<<< + * def GetColScale(self,int column): + * return self.lpUnpacker.GetColScale(column) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_decode_c_string(__pyx_v_sType, 0, strlen(__pyx_v_sType), ((char const *)"gbk"), NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":144 + * def GetColName(self,int column): + * return self.lpUnpacker.GetColName(column).decode('gbk') + * def GetColType(self,int column): # <<<<<<<<<<<<<< + * cdef char* sType = self.lpUnpacker.GetColType(column) + * return sType.decode('gbk') + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColType", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":147 + * cdef char* sType = self.lpUnpacker.GetColType(column) + * return sType.decode('gbk') + * def GetColScale(self,int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetColScale(column) + * def GetColWidth(self,int column): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_41GetColScale(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_41GetColScale(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) { + int __pyx_v_column; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetColScale (wrapper)", 0); + assert(__pyx_arg_column); { + __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 147, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColScale", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_40GetColScale(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_40GetColScale(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetColScale", 0); + + /* "py_t2sdk.pyx":148 + * return sType.decode('gbk') + * def GetColScale(self,int column): + * return self.lpUnpacker.GetColScale(column) # <<<<<<<<<<<<<< + * def GetColWidth(self,int column): + * return self.lpUnpacker.GetColWidth(column) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetColScale(__pyx_v_column)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":147 + * cdef char* sType = self.lpUnpacker.GetColType(column) + * return sType.decode('gbk') + * def GetColScale(self,int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetColScale(column) + * def GetColWidth(self,int column): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColScale", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":149 + * def GetColScale(self,int column): + * return self.lpUnpacker.GetColScale(column) + * def GetColWidth(self,int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetColWidth(column) + * def FindColIndex(self,str columnName): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_43GetColWidth(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_43GetColWidth(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) { + int __pyx_v_column; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetColWidth (wrapper)", 0); + assert(__pyx_arg_column); { + __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 149, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColWidth", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_42GetColWidth(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_42GetColWidth(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetColWidth", 0); + + /* "py_t2sdk.pyx":150 + * return self.lpUnpacker.GetColScale(column) + * def GetColWidth(self,int column): + * return self.lpUnpacker.GetColWidth(column) # <<<<<<<<<<<<<< + * def FindColIndex(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetColWidth(__pyx_v_column)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":149 + * def GetColScale(self,int column): + * return self.lpUnpacker.GetColScale(column) + * def GetColWidth(self,int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetColWidth(column) + * def FindColIndex(self,str columnName): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColWidth", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":151 + * def GetColWidth(self,int column): + * return self.lpUnpacker.GetColWidth(column) + * def FindColIndex(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.FindColIndex(sName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_45FindColIndex(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_45FindColIndex(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("FindColIndex (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 151, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_44FindColIndex(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_44FindColIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("FindColIndex", 0); + + /* "py_t2sdk.pyx":152 + * return self.lpUnpacker.GetColWidth(column) + * def FindColIndex(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpUnpacker.FindColIndex(sName) + * def GetStrByIndex(self,int column): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_columnName); + __Pyx_GIVEREF(__pyx_v_columnName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 152, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":153 + * def FindColIndex(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.FindColIndex(sName) # <<<<<<<<<<<<<< + * def GetStrByIndex(self,int column): + * return self.lpUnpacker.GetStrByIndex(column).decode('GBK') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 153, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->FindColIndex(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":151 + * def GetColWidth(self,int column): + * return self.lpUnpacker.GetColWidth(column) + * def FindColIndex(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.FindColIndex(sName) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.FindColIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":154 + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.FindColIndex(sName) + * def GetStrByIndex(self,int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetStrByIndex(column).decode('GBK') + * def GetStr(self,str columnName): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_47GetStrByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_47GetStrByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) { + int __pyx_v_column; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetStrByIndex (wrapper)", 0); + assert(__pyx_arg_column); { + __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 154, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetStrByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_46GetStrByIndex(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_46GetStrByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + char *__pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("GetStrByIndex", 0); + + /* "py_t2sdk.pyx":155 + * return self.lpUnpacker.FindColIndex(sName) + * def GetStrByIndex(self,int column): + * return self.lpUnpacker.GetStrByIndex(column).decode('GBK') # <<<<<<<<<<<<<< + * def GetStr(self,str columnName): + * sName = bytes(columnName,encoding='UTF-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_v_self->lpUnpacker->GetStrByIndex(__pyx_v_column); + __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_1, 0, strlen(__pyx_t_1), ((char const *)"GBK"), NULL, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":154 + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.FindColIndex(sName) + * def GetStrByIndex(self,int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetStrByIndex(column).decode('GBK') + * def GetStr(self,str columnName): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetStrByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":156 + * def GetStrByIndex(self,int column): + * return self.lpUnpacker.GetStrByIndex(column).decode('GBK') + * def GetStr(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='UTF-8') + * return self.lpUnpacker.GetStr(sName).decode('GBK') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_49GetStr(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_49GetStr(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetStr (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 156, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_48GetStr(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_48GetStr(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + char *__pyx_t_5; + __Pyx_RefNannySetupContext("GetStr", 0); + + /* "py_t2sdk.pyx":157 + * return self.lpUnpacker.GetStrByIndex(column).decode('GBK') + * def GetStr(self,str columnName): + * sName = bytes(columnName,encoding='UTF-8') # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetStr(sName).decode('GBK') + * def GetCharByIndex(self,int column): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_columnName); + __Pyx_GIVEREF(__pyx_v_columnName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_UTF_8) < 0) __PYX_ERR(1, 157, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":158 + * def GetStr(self,str columnName): + * sName = bytes(columnName,encoding='UTF-8') + * return self.lpUnpacker.GetStr(sName).decode('GBK') # <<<<<<<<<<<<<< + * def GetCharByIndex(self,int column): + * return self.lpUnpacker.GetCharByIndex(column).decode('UTF-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 158, __pyx_L1_error) + __pyx_t_5 = __pyx_v_self->lpUnpacker->GetStr(__pyx_t_4); + __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), ((char const *)"GBK"), NULL, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":156 + * def GetStrByIndex(self,int column): + * return self.lpUnpacker.GetStrByIndex(column).decode('GBK') + * def GetStr(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='UTF-8') + * return self.lpUnpacker.GetStr(sName).decode('GBK') + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetStr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":159 + * sName = bytes(columnName,encoding='UTF-8') + * return self.lpUnpacker.GetStr(sName).decode('GBK') + * def GetCharByIndex(self,int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetCharByIndex(column).decode('UTF-8') + * def GetChar(self,str columnName): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_51GetCharByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_51GetCharByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) { + int __pyx_v_column; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetCharByIndex (wrapper)", 0); + assert(__pyx_arg_column); { + __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 159, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetCharByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_50GetCharByIndex(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_50GetCharByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + char *__pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("GetCharByIndex", 0); + + /* "py_t2sdk.pyx":160 + * return self.lpUnpacker.GetStr(sName).decode('GBK') + * def GetCharByIndex(self,int column): + * return self.lpUnpacker.GetCharByIndex(column).decode('UTF-8') # <<<<<<<<<<<<<< + * def GetChar(self,str columnName): + * sName = bytes(columnName,encoding='UTF-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_v_self->lpUnpacker->GetCharByIndex(__pyx_v_column); + __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_1, 0, strlen(__pyx_t_1), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":159 + * sName = bytes(columnName,encoding='UTF-8') + * return self.lpUnpacker.GetStr(sName).decode('GBK') + * def GetCharByIndex(self,int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetCharByIndex(column).decode('UTF-8') + * def GetChar(self,str columnName): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetCharByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":161 + * def GetCharByIndex(self,int column): + * return self.lpUnpacker.GetCharByIndex(column).decode('UTF-8') + * def GetChar(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='UTF-8') + * return self.lpUnpacker.GetChar(sName).decode('UTF-8') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_53GetChar(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_53GetChar(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetChar (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 161, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_52GetChar(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_52GetChar(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + char *__pyx_t_5; + __Pyx_RefNannySetupContext("GetChar", 0); + + /* "py_t2sdk.pyx":162 + * return self.lpUnpacker.GetCharByIndex(column).decode('UTF-8') + * def GetChar(self,str columnName): + * sName = bytes(columnName,encoding='UTF-8') # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetChar(sName).decode('UTF-8') + * def GetDoubleByIndex(self, int column): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_columnName); + __Pyx_GIVEREF(__pyx_v_columnName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_UTF_8) < 0) __PYX_ERR(1, 162, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":163 + * def GetChar(self,str columnName): + * sName = bytes(columnName,encoding='UTF-8') + * return self.lpUnpacker.GetChar(sName).decode('UTF-8') # <<<<<<<<<<<<<< + * def GetDoubleByIndex(self, int column): + * return self.lpUnpacker.GetDoubleByIndex(column) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 163, __pyx_L1_error) + __pyx_t_5 = __pyx_v_self->lpUnpacker->GetChar(__pyx_t_4); + __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 163, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":161 + * def GetCharByIndex(self,int column): + * return self.lpUnpacker.GetCharByIndex(column).decode('UTF-8') + * def GetChar(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='UTF-8') + * return self.lpUnpacker.GetChar(sName).decode('UTF-8') + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetChar", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":164 + * sName = bytes(columnName,encoding='UTF-8') + * return self.lpUnpacker.GetChar(sName).decode('UTF-8') + * def GetDoubleByIndex(self, int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetDoubleByIndex(column) + * def GetDouble(self,str columnName): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_55GetDoubleByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_55GetDoubleByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) { + int __pyx_v_column; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetDoubleByIndex (wrapper)", 0); + assert(__pyx_arg_column); { + __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 164, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetDoubleByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_54GetDoubleByIndex(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_54GetDoubleByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetDoubleByIndex", 0); + + /* "py_t2sdk.pyx":165 + * return self.lpUnpacker.GetChar(sName).decode('UTF-8') + * def GetDoubleByIndex(self, int column): + * return self.lpUnpacker.GetDoubleByIndex(column) # <<<<<<<<<<<<<< + * def GetDouble(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->lpUnpacker->GetDoubleByIndex(__pyx_v_column)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":164 + * sName = bytes(columnName,encoding='UTF-8') + * return self.lpUnpacker.GetChar(sName).decode('UTF-8') + * def GetDoubleByIndex(self, int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetDoubleByIndex(column) + * def GetDouble(self,str columnName): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetDoubleByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":166 + * def GetDoubleByIndex(self, int column): + * return self.lpUnpacker.GetDoubleByIndex(column) + * def GetDouble(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetDouble(sName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_57GetDouble(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_57GetDouble(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetDouble (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 166, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_56GetDouble(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_56GetDouble(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("GetDouble", 0); + + /* "py_t2sdk.pyx":167 + * return self.lpUnpacker.GetDoubleByIndex(column) + * def GetDouble(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetDouble(sName) + * def GetIntByIndex(self,int column): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_columnName); + __Pyx_GIVEREF(__pyx_v_columnName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 167, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":168 + * def GetDouble(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetDouble(sName) # <<<<<<<<<<<<<< + * def GetIntByIndex(self,int column): + * return self.lpUnpacker.GetIntByIndex(column) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 168, __pyx_L1_error) + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->lpUnpacker->GetDouble(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":166 + * def GetDoubleByIndex(self, int column): + * return self.lpUnpacker.GetDoubleByIndex(column) + * def GetDouble(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetDouble(sName) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetDouble", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":169 + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetDouble(sName) + * def GetIntByIndex(self,int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetIntByIndex(column) + * def GetInt(self,str columnName): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_59GetIntByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_59GetIntByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) { + int __pyx_v_column; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetIntByIndex (wrapper)", 0); + assert(__pyx_arg_column); { + __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 169, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetIntByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_58GetIntByIndex(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_58GetIntByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetIntByIndex", 0); + + /* "py_t2sdk.pyx":170 + * return self.lpUnpacker.GetDouble(sName) + * def GetIntByIndex(self,int column): + * return self.lpUnpacker.GetIntByIndex(column) # <<<<<<<<<<<<<< + * def GetInt(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetIntByIndex(__pyx_v_column)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 170, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":169 + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetDouble(sName) + * def GetIntByIndex(self,int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetIntByIndex(column) + * def GetInt(self,str columnName): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetIntByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":171 + * def GetIntByIndex(self,int column): + * return self.lpUnpacker.GetIntByIndex(column) + * def GetInt(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * if self.lpUnpacker == NULL: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_61GetInt(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_61GetInt(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetInt (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 171, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_60GetInt(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_60GetInt(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + char *__pyx_t_5; + __Pyx_RefNannySetupContext("GetInt", 0); + + /* "py_t2sdk.pyx":172 + * return self.lpUnpacker.GetIntByIndex(column) + * def GetInt(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') # <<<<<<<<<<<<<< + * if self.lpUnpacker == NULL: + * return -1 + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_columnName); + __Pyx_GIVEREF(__pyx_v_columnName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 172, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":173 + * def GetInt(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + * if self.lpUnpacker == NULL: # <<<<<<<<<<<<<< + * return -1 + * return self.lpUnpacker.GetInt(sName) + */ + __pyx_t_4 = ((__pyx_v_self->lpUnpacker == NULL) != 0); + if (__pyx_t_4) { + + /* "py_t2sdk.pyx":174 + * sName = bytes(columnName,encoding='utf-8') + * if self.lpUnpacker == NULL: + * return -1 # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetInt(sName) + * def GetRawByIndex(self,int column): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_int_neg_1); + __pyx_r = __pyx_int_neg_1; + goto __pyx_L0; + + /* "py_t2sdk.pyx":173 + * def GetInt(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + * if self.lpUnpacker == NULL: # <<<<<<<<<<<<<< + * return -1 + * return self.lpUnpacker.GetInt(sName) + */ + } + + /* "py_t2sdk.pyx":175 + * if self.lpUnpacker == NULL: + * return -1 + * return self.lpUnpacker.GetInt(sName) # <<<<<<<<<<<<<< + * def GetRawByIndex(self,int column): + * cdef int ilength = 0 + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 175, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetInt(__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":171 + * def GetIntByIndex(self,int column): + * return self.lpUnpacker.GetIntByIndex(column) + * def GetInt(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * if self.lpUnpacker == NULL: + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetInt", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":176 + * return -1 + * return self.lpUnpacker.GetInt(sName) + * def GetRawByIndex(self,int column): # <<<<<<<<<<<<<< + * cdef int ilength = 0 + * cdef char* sBuff = self.lpUnpacker.GetRawByIndex(column,&ilength) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_63GetRawByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_63GetRawByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) { + int __pyx_v_column; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetRawByIndex (wrapper)", 0); + assert(__pyx_arg_column); { + __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 176, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetRawByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_62GetRawByIndex(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_62GetRawByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) { + int __pyx_v_ilength; + char *__pyx_v_sBuff; + PyObject *__pyx_v_lpBuff = NULL; + int __pyx_v_iIndex; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + __Pyx_RefNannySetupContext("GetRawByIndex", 0); + + /* "py_t2sdk.pyx":177 + * return self.lpUnpacker.GetInt(sName) + * def GetRawByIndex(self,int column): + * cdef int ilength = 0 # <<<<<<<<<<<<<< + * cdef char* sBuff = self.lpUnpacker.GetRawByIndex(column,&ilength) + * lpBuff = [] + */ + __pyx_v_ilength = 0; + + /* "py_t2sdk.pyx":178 + * def GetRawByIndex(self,int column): + * cdef int ilength = 0 + * cdef char* sBuff = self.lpUnpacker.GetRawByIndex(column,&ilength) # <<<<<<<<<<<<<< + * lpBuff = [] + * cdef int iIndex = 0 + */ + __pyx_v_sBuff = __pyx_v_self->lpUnpacker->GetRawByIndex(__pyx_v_column, (&__pyx_v_ilength)); + + /* "py_t2sdk.pyx":179 + * cdef int ilength = 0 + * cdef char* sBuff = self.lpUnpacker.GetRawByIndex(column,&ilength) + * lpBuff = [] # <<<<<<<<<<<<<< + * cdef int iIndex = 0 + * while iIndex < iLength: + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_lpBuff = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":180 + * cdef char* sBuff = self.lpUnpacker.GetRawByIndex(column,&ilength) + * lpBuff = [] + * cdef int iIndex = 0 # <<<<<<<<<<<<<< + * while iIndex < iLength: + * lpBuff.append(sBuff[iIndex]) + */ + __pyx_v_iIndex = 0; + + /* "py_t2sdk.pyx":181 + * lpBuff = [] + * cdef int iIndex = 0 + * while iIndex < iLength: # <<<<<<<<<<<<<< + * lpBuff.append(sBuff[iIndex]) + * iIndex +=1 + */ + while (1) { + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_iIndex); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_iLength); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 181, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 181, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (!__pyx_t_4) break; + + /* "py_t2sdk.pyx":182 + * cdef int iIndex = 0 + * while iIndex < iLength: + * lpBuff.append(sBuff[iIndex]) # <<<<<<<<<<<<<< + * iIndex +=1 + * return lpBuff,ilength + */ + __pyx_t_3 = __Pyx_PyInt_From_char((__pyx_v_sBuff[__pyx_v_iIndex])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_lpBuff, __pyx_t_3); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 182, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":183 + * while iIndex < iLength: + * lpBuff.append(sBuff[iIndex]) + * iIndex +=1 # <<<<<<<<<<<<<< + * return lpBuff,ilength + * def GetRaw(self,str columnName): + */ + __pyx_v_iIndex = (__pyx_v_iIndex + 1); + } + + /* "py_t2sdk.pyx":184 + * lpBuff.append(sBuff[iIndex]) + * iIndex +=1 + * return lpBuff,ilength # <<<<<<<<<<<<<< + * def GetRaw(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ilength); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_lpBuff); + __Pyx_GIVEREF(__pyx_v_lpBuff); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lpBuff); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":176 + * return -1 + * return self.lpUnpacker.GetInt(sName) + * def GetRawByIndex(self,int column): # <<<<<<<<<<<<<< + * cdef int ilength = 0 + * cdef char* sBuff = self.lpUnpacker.GetRawByIndex(column,&ilength) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetRawByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_lpBuff); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":185 + * iIndex +=1 + * return lpBuff,ilength + * def GetRaw(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * cdef int ilength = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_65GetRaw(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_65GetRaw(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetRaw (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 185, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_64GetRaw(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_64GetRaw(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_v_sName = NULL; + int __pyx_v_ilength; + char *__pyx_v_sBuff; + PyObject *__pyx_v_lpBuff = NULL; + int __pyx_v_iIndex; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + int __pyx_t_5; + int __pyx_t_6; + __Pyx_RefNannySetupContext("GetRaw", 0); + + /* "py_t2sdk.pyx":186 + * return lpBuff,ilength + * def GetRaw(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') # <<<<<<<<<<<<<< + * cdef int ilength = 0 + * cdef char* sBuff = self.lpUnpacker.GetRaw(sName,&ilength) + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_columnName); + __Pyx_GIVEREF(__pyx_v_columnName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 186, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":187 + * def GetRaw(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + * cdef int ilength = 0 # <<<<<<<<<<<<<< + * cdef char* sBuff = self.lpUnpacker.GetRaw(sName,&ilength) + * lpBuff = [] + */ + __pyx_v_ilength = 0; + + /* "py_t2sdk.pyx":188 + * sName = bytes(columnName,encoding='utf-8') + * cdef int ilength = 0 + * cdef char* sBuff = self.lpUnpacker.GetRaw(sName,&ilength) # <<<<<<<<<<<<<< + * lpBuff = [] + * cdef int iIndex = 0 + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 188, __pyx_L1_error) + __pyx_v_sBuff = __pyx_v_self->lpUnpacker->GetRaw(__pyx_t_4, (&__pyx_v_ilength)); + + /* "py_t2sdk.pyx":189 + * cdef int ilength = 0 + * cdef char* sBuff = self.lpUnpacker.GetRaw(sName,&ilength) + * lpBuff = [] # <<<<<<<<<<<<<< + * cdef int iIndex = 0 + * while iIndex < iLength: + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_lpBuff = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":190 + * cdef char* sBuff = self.lpUnpacker.GetRaw(sName,&ilength) + * lpBuff = [] + * cdef int iIndex = 0 # <<<<<<<<<<<<<< + * while iIndex < iLength: + * lpBuff.append(sBuff[iIndex]) + */ + __pyx_v_iIndex = 0; + + /* "py_t2sdk.pyx":191 + * lpBuff = [] + * cdef int iIndex = 0 + * while iIndex < iLength: # <<<<<<<<<<<<<< + * lpBuff.append(sBuff[iIndex]) + * iIndex +=1 + */ + while (1) { + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_iIndex); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_iLength); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 191, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 191, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (!__pyx_t_5) break; + + /* "py_t2sdk.pyx":192 + * cdef int iIndex = 0 + * while iIndex < iLength: + * lpBuff.append(sBuff[iIndex]) # <<<<<<<<<<<<<< + * iIndex +=1 + * return lpBuff,ilength + */ + __pyx_t_1 = __Pyx_PyInt_From_char((__pyx_v_sBuff[__pyx_v_iIndex])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_lpBuff, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 192, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":193 + * while iIndex < iLength: + * lpBuff.append(sBuff[iIndex]) + * iIndex +=1 # <<<<<<<<<<<<<< + * return lpBuff,ilength + * def WasNull(self): + */ + __pyx_v_iIndex = (__pyx_v_iIndex + 1); + } + + /* "py_t2sdk.pyx":194 + * lpBuff.append(sBuff[iIndex]) + * iIndex +=1 + * return lpBuff,ilength # <<<<<<<<<<<<<< + * def WasNull(self): + * return self.lpUnpacker.WasNull() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ilength); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_lpBuff); + __Pyx_GIVEREF(__pyx_v_lpBuff); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lpBuff); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":185 + * iIndex +=1 + * return lpBuff,ilength + * def GetRaw(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * cdef int ilength = 0 + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetRaw", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XDECREF(__pyx_v_lpBuff); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":195 + * iIndex +=1 + * return lpBuff,ilength + * def WasNull(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.WasNull() + * def Next(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_67WasNull(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_67WasNull(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("WasNull (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_66WasNull(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_66WasNull(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("WasNull", 0); + + /* "py_t2sdk.pyx":196 + * return lpBuff,ilength + * def WasNull(self): + * return self.lpUnpacker.WasNull() # <<<<<<<<<<<<<< + * def Next(self): + * self.lpUnpacker.Next() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->WasNull()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":195 + * iIndex +=1 + * return lpBuff,ilength + * def WasNull(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.WasNull() + * def Next(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.WasNull", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":197 + * def WasNull(self): + * return self.lpUnpacker.WasNull() + * def Next(self): # <<<<<<<<<<<<<< + * self.lpUnpacker.Next() + * def IsEOF(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_69Next(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_69Next(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Next (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_68Next(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_68Next(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Next", 0); + + /* "py_t2sdk.pyx":198 + * return self.lpUnpacker.WasNull() + * def Next(self): + * self.lpUnpacker.Next() # <<<<<<<<<<<<<< + * def IsEOF(self): + * return self.lpUnpacker.IsEOF() + */ + __pyx_v_self->lpUnpacker->Next(); + + /* "py_t2sdk.pyx":197 + * def WasNull(self): + * return self.lpUnpacker.WasNull() + * def Next(self): # <<<<<<<<<<<<<< + * self.lpUnpacker.Next() + * def IsEOF(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":199 + * def Next(self): + * self.lpUnpacker.Next() + * def IsEOF(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.IsEOF() + * def IsEmpty(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_71IsEOF(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_71IsEOF(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("IsEOF (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_70IsEOF(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_70IsEOF(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("IsEOF", 0); + + /* "py_t2sdk.pyx":200 + * self.lpUnpacker.Next() + * def IsEOF(self): + * return self.lpUnpacker.IsEOF() # <<<<<<<<<<<<<< + * def IsEmpty(self): + * return self.lpUnpacker.IsEmpty() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->IsEOF()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":199 + * def Next(self): + * self.lpUnpacker.Next() + * def IsEOF(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.IsEOF() + * def IsEmpty(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.IsEOF", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":201 + * def IsEOF(self): + * return self.lpUnpacker.IsEOF() + * def IsEmpty(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.IsEmpty() + * def Destroy(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_73IsEmpty(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_73IsEmpty(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("IsEmpty (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_72IsEmpty(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_72IsEmpty(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("IsEmpty", 0); + + /* "py_t2sdk.pyx":202 + * return self.lpUnpacker.IsEOF() + * def IsEmpty(self): + * return self.lpUnpacker.IsEmpty() # <<<<<<<<<<<<<< + * def Destroy(self): + * self.lpUnpacker.Destroy() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->IsEmpty()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":201 + * def IsEOF(self): + * return self.lpUnpacker.IsEOF() + * def IsEmpty(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.IsEmpty() + * def Destroy(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.IsEmpty", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":203 + * def IsEmpty(self): + * return self.lpUnpacker.IsEmpty() + * def Destroy(self): # <<<<<<<<<<<<<< + * self.lpUnpacker.Destroy() + * def Release(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_75Destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_75Destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Destroy (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_74Destroy(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_74Destroy(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Destroy", 0); + + /* "py_t2sdk.pyx":204 + * return self.lpUnpacker.IsEmpty() + * def Destroy(self): + * self.lpUnpacker.Destroy() # <<<<<<<<<<<<<< + * def Release(self): + * if self.lpUnpacker != NULL: + */ + __pyx_v_self->lpUnpacker->Destroy(); + + /* "py_t2sdk.pyx":203 + * def IsEmpty(self): + * return self.lpUnpacker.IsEmpty() + * def Destroy(self): # <<<<<<<<<<<<<< + * self.lpUnpacker.Destroy() + * def Release(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":205 + * def Destroy(self): + * self.lpUnpacker.Destroy() + * def Release(self): # <<<<<<<<<<<<<< + * if self.lpUnpacker != NULL: + * self.lpUnpacker.Release() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_77Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_77Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Release (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_76Release(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_76Release(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("Release", 0); + + /* "py_t2sdk.pyx":206 + * self.lpUnpacker.Destroy() + * def Release(self): + * if self.lpUnpacker != NULL: # <<<<<<<<<<<<<< + * self.lpUnpacker.Release() + * + */ + __pyx_t_1 = ((__pyx_v_self->lpUnpacker != NULL) != 0); + if (__pyx_t_1) { + + /* "py_t2sdk.pyx":207 + * def Release(self): + * if self.lpUnpacker != NULL: + * self.lpUnpacker.Release() # <<<<<<<<<<<<<< + * + * cdef class pyCConfigInterface: + */ + __pyx_v_self->lpUnpacker->Release(); + + /* "py_t2sdk.pyx":206 + * self.lpUnpacker.Destroy() + * def Release(self): + * if self.lpUnpacker != NULL: # <<<<<<<<<<<<<< + * self.lpUnpacker.Release() + * + */ + } + + /* "py_t2sdk.pyx":205 + * def Destroy(self): + * self.lpUnpacker.Destroy() + * def Release(self): # <<<<<<<<<<<<<< + * if self.lpUnpacker != NULL: + * self.lpUnpacker.Release() + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_79__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_79__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_78__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_78__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_81__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_81__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_80__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_80__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":211 + * cdef class pyCConfigInterface: + * cdef C_CConfigInterface* lpConfig + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lpConfig = new C_CConfigInterface() + * def __dealloc__(self): + */ + +/* Python wrapper */ +static int __pyx_pw_8py_t2sdk_18pyCConfigInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_8py_t2sdk_18pyCConfigInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface___cinit__(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_8py_t2sdk_18pyCConfigInterface___cinit__(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + C_CConfigInterface *__pyx_t_1; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "py_t2sdk.pyx":212 + * cdef C_CConfigInterface* lpConfig + * def __cinit__(self): + * self.lpConfig = new C_CConfigInterface() # <<<<<<<<<<<<<< + * def __dealloc__(self): + * del self.lpConfig + */ + try { + __pyx_t_1 = new C_CConfigInterface(); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 212, __pyx_L1_error) + } + __pyx_v_self->lpConfig = __pyx_t_1; + + /* "py_t2sdk.pyx":211 + * cdef class pyCConfigInterface: + * cdef C_CConfigInterface* lpConfig + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lpConfig = new C_CConfigInterface() + * def __dealloc__(self): + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":213 + * def __cinit__(self): + * self.lpConfig = new C_CConfigInterface() + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.lpConfig + * def Load(self,str szFileName): + */ + +/* Python wrapper */ +static void __pyx_pw_8py_t2sdk_18pyCConfigInterface_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_8py_t2sdk_18pyCConfigInterface_3__dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_pf_8py_t2sdk_18pyCConfigInterface_2__dealloc__(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_8py_t2sdk_18pyCConfigInterface_2__dealloc__(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__", 0); + + /* "py_t2sdk.pyx":214 + * self.lpConfig = new C_CConfigInterface() + * def __dealloc__(self): + * del self.lpConfig # <<<<<<<<<<<<<< + * def Load(self,str szFileName): + * sName = bytes(szFileName,encoding='utf-8') + */ + delete __pyx_v_self->lpConfig; + + /* "py_t2sdk.pyx":213 + * def __cinit__(self): + * self.lpConfig = new C_CConfigInterface() + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.lpConfig + * def Load(self,str szFileName): + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "py_t2sdk.pyx":215 + * def __dealloc__(self): + * del self.lpConfig + * def Load(self,str szFileName): # <<<<<<<<<<<<<< + * sName = bytes(szFileName,encoding='utf-8') + * return self.lpConfig.Load(sName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_5Load(PyObject *__pyx_v_self, PyObject *__pyx_v_szFileName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_5Load(PyObject *__pyx_v_self, PyObject *__pyx_v_szFileName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Load (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szFileName), (&PyString_Type), 1, "szFileName", 1))) __PYX_ERR(1, 215, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_4Load(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self), ((PyObject*)__pyx_v_szFileName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_4Load(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szFileName) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("Load", 0); + + /* "py_t2sdk.pyx":216 + * del self.lpConfig + * def Load(self,str szFileName): + * sName = bytes(szFileName,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpConfig.Load(sName) + * def Save(self,str szFileName): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szFileName); + __Pyx_GIVEREF(__pyx_v_szFileName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szFileName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 216, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":217 + * def Load(self,str szFileName): + * sName = bytes(szFileName,encoding='utf-8') + * return self.lpConfig.Load(sName) # <<<<<<<<<<<<<< + * def Save(self,str szFileName): + * sName = bytes(szFileName,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 217, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpConfig->Load(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":215 + * def __dealloc__(self): + * del self.lpConfig + * def Load(self,str szFileName): # <<<<<<<<<<<<<< + * sName = bytes(szFileName,encoding='utf-8') + * return self.lpConfig.Load(sName) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.Load", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":218 + * sName = bytes(szFileName,encoding='utf-8') + * return self.lpConfig.Load(sName) + * def Save(self,str szFileName): # <<<<<<<<<<<<<< + * sName = bytes(szFileName,encoding='utf-8') + * return self.lpConfig.Save(sName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_7Save(PyObject *__pyx_v_self, PyObject *__pyx_v_szFileName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_7Save(PyObject *__pyx_v_self, PyObject *__pyx_v_szFileName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Save (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szFileName), (&PyString_Type), 1, "szFileName", 1))) __PYX_ERR(1, 218, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_6Save(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self), ((PyObject*)__pyx_v_szFileName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_6Save(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szFileName) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("Save", 0); + + /* "py_t2sdk.pyx":219 + * return self.lpConfig.Load(sName) + * def Save(self,str szFileName): + * sName = bytes(szFileName,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpConfig.Save(sName) + * def GetString(self,str szSection,str szEntry,str szDefault): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szFileName); + __Pyx_GIVEREF(__pyx_v_szFileName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szFileName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 219, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":220 + * def Save(self,str szFileName): + * sName = bytes(szFileName,encoding='utf-8') + * return self.lpConfig.Save(sName) # <<<<<<<<<<<<<< + * def GetString(self,str szSection,str szEntry,str szDefault): + * sSection = bytes(szSection,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 220, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpConfig->Save(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":218 + * sName = bytes(szFileName,encoding='utf-8') + * return self.lpConfig.Load(sName) + * def Save(self,str szFileName): # <<<<<<<<<<<<<< + * sName = bytes(szFileName,encoding='utf-8') + * return self.lpConfig.Save(sName) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.Save", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":221 + * sName = bytes(szFileName,encoding='utf-8') + * return self.lpConfig.Save(sName) + * def GetString(self,str szSection,str szEntry,str szDefault): # <<<<<<<<<<<<<< + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_9GetString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_9GetString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_szSection = 0; + PyObject *__pyx_v_szEntry = 0; + PyObject *__pyx_v_szDefault = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetString (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_szSection,&__pyx_n_s_szEntry,&__pyx_n_s_szDefault,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szSection)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szEntry)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("GetString", 1, 3, 3, 1); __PYX_ERR(1, 221, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szDefault)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("GetString", 1, 3, 3, 2); __PYX_ERR(1, 221, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "GetString") < 0)) __PYX_ERR(1, 221, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_szSection = ((PyObject*)values[0]); + __pyx_v_szEntry = ((PyObject*)values[1]); + __pyx_v_szDefault = ((PyObject*)values[2]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("GetString", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 221, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.GetString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szSection), (&PyString_Type), 1, "szSection", 1))) __PYX_ERR(1, 221, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szEntry), (&PyString_Type), 1, "szEntry", 1))) __PYX_ERR(1, 221, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szDefault), (&PyString_Type), 1, "szDefault", 1))) __PYX_ERR(1, 221, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_8GetString(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self), __pyx_v_szSection, __pyx_v_szEntry, __pyx_v_szDefault); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_8GetString(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szSection, PyObject *__pyx_v_szEntry, PyObject *__pyx_v_szDefault) { + PyObject *__pyx_v_sSection = NULL; + PyObject *__pyx_v_sEntry = NULL; + PyObject *__pyx_v_sDefault = NULL; + char *__pyx_v_sValue; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + char *__pyx_t_5; + char *__pyx_t_6; + __Pyx_RefNannySetupContext("GetString", 0); + + /* "py_t2sdk.pyx":222 + * return self.lpConfig.Save(sName) + * def GetString(self,str szSection,str szEntry,str szDefault): + * sSection = bytes(szSection,encoding='utf-8') # <<<<<<<<<<<<<< + * sEntry = bytes(szEntry,encoding='utf-8') + * sDefault = bytes(szDefault,encoding='utf-8') + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szSection); + __Pyx_GIVEREF(__pyx_v_szSection); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szSection); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 222, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sSection = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":223 + * def GetString(self,str szSection,str szEntry,str szDefault): + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') # <<<<<<<<<<<<<< + * sDefault = bytes(szDefault,encoding='utf-8') + * cdef char* sValue = self.lpConfig.GetString(sSection,sEntry,sDefault) + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_szEntry); + __Pyx_GIVEREF(__pyx_v_szEntry); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_szEntry); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 223, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sEntry = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":224 + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') + * sDefault = bytes(szDefault,encoding='utf-8') # <<<<<<<<<<<<<< + * cdef char* sValue = self.lpConfig.GetString(sSection,sEntry,sDefault) + * return sValue + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szDefault); + __Pyx_GIVEREF(__pyx_v_szDefault); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szDefault); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 224, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sDefault = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":225 + * sEntry = bytes(szEntry,encoding='utf-8') + * sDefault = bytes(szDefault,encoding='utf-8') + * cdef char* sValue = self.lpConfig.GetString(sSection,sEntry,sDefault) # <<<<<<<<<<<<<< + * return sValue + * def GetInt(self,str szSection,str szEntry, int iDefault): + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sSection); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 225, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_sEntry); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 225, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_v_sDefault); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(1, 225, __pyx_L1_error) + __pyx_v_sValue = __pyx_v_self->lpConfig->GetString(__pyx_t_4, __pyx_t_5, __pyx_t_6); + + /* "py_t2sdk.pyx":226 + * sDefault = bytes(szDefault,encoding='utf-8') + * cdef char* sValue = self.lpConfig.GetString(sSection,sEntry,sDefault) + * return sValue # <<<<<<<<<<<<<< + * def GetInt(self,str szSection,str szEntry, int iDefault): + * sSection = bytes(szSection,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_sValue); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 226, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":221 + * sName = bytes(szFileName,encoding='utf-8') + * return self.lpConfig.Save(sName) + * def GetString(self,str szSection,str szEntry,str szDefault): # <<<<<<<<<<<<<< + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.GetString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sSection); + __Pyx_XDECREF(__pyx_v_sEntry); + __Pyx_XDECREF(__pyx_v_sDefault); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":227 + * cdef char* sValue = self.lpConfig.GetString(sSection,sEntry,sDefault) + * return sValue + * def GetInt(self,str szSection,str szEntry, int iDefault): # <<<<<<<<<<<<<< + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_11GetInt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_11GetInt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_szSection = 0; + PyObject *__pyx_v_szEntry = 0; + int __pyx_v_iDefault; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetInt (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_szSection,&__pyx_n_s_szEntry,&__pyx_n_s_iDefault,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szSection)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szEntry)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("GetInt", 1, 3, 3, 1); __PYX_ERR(1, 227, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iDefault)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("GetInt", 1, 3, 3, 2); __PYX_ERR(1, 227, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "GetInt") < 0)) __PYX_ERR(1, 227, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_szSection = ((PyObject*)values[0]); + __pyx_v_szEntry = ((PyObject*)values[1]); + __pyx_v_iDefault = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_iDefault == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 227, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("GetInt", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 227, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.GetInt", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szSection), (&PyString_Type), 1, "szSection", 1))) __PYX_ERR(1, 227, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szEntry), (&PyString_Type), 1, "szEntry", 1))) __PYX_ERR(1, 227, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_10GetInt(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self), __pyx_v_szSection, __pyx_v_szEntry, __pyx_v_iDefault); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_10GetInt(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szSection, PyObject *__pyx_v_szEntry, int __pyx_v_iDefault) { + PyObject *__pyx_v_sSection = NULL; + PyObject *__pyx_v_sEntry = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + char *__pyx_t_5; + __Pyx_RefNannySetupContext("GetInt", 0); + + /* "py_t2sdk.pyx":228 + * return sValue + * def GetInt(self,str szSection,str szEntry, int iDefault): + * sSection = bytes(szSection,encoding='utf-8') # <<<<<<<<<<<<<< + * sEntry = bytes(szEntry,encoding='utf-8') + * return self.lpConfig.GetInt(sSection,sEntry,iDefault) + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szSection); + __Pyx_GIVEREF(__pyx_v_szSection); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szSection); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 228, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sSection = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":229 + * def GetInt(self,str szSection,str szEntry, int iDefault): + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpConfig.GetInt(sSection,sEntry,iDefault) + * def SetString(self,str szSection,str szEntry,str szValue): + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_szEntry); + __Pyx_GIVEREF(__pyx_v_szEntry); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_szEntry); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 229, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sEntry = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":230 + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') + * return self.lpConfig.GetInt(sSection,sEntry,iDefault) # <<<<<<<<<<<<<< + * def SetString(self,str szSection,str szEntry,str szValue): + * sSection = bytes(szSection,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sSection); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 230, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_sEntry); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 230, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConfig->GetInt(__pyx_t_4, __pyx_t_5, __pyx_v_iDefault)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":227 + * cdef char* sValue = self.lpConfig.GetString(sSection,sEntry,sDefault) + * return sValue + * def GetInt(self,str szSection,str szEntry, int iDefault): # <<<<<<<<<<<<<< + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.GetInt", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sSection); + __Pyx_XDECREF(__pyx_v_sEntry); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":231 + * sEntry = bytes(szEntry,encoding='utf-8') + * return self.lpConfig.GetInt(sSection,sEntry,iDefault) + * def SetString(self,str szSection,str szEntry,str szValue): # <<<<<<<<<<<<<< + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_13SetString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_13SetString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_szSection = 0; + PyObject *__pyx_v_szEntry = 0; + PyObject *__pyx_v_szValue = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetString (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_szSection,&__pyx_n_s_szEntry,&__pyx_n_s_szValue,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szSection)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szEntry)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("SetString", 1, 3, 3, 1); __PYX_ERR(1, 231, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szValue)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("SetString", 1, 3, 3, 2); __PYX_ERR(1, 231, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetString") < 0)) __PYX_ERR(1, 231, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_szSection = ((PyObject*)values[0]); + __pyx_v_szEntry = ((PyObject*)values[1]); + __pyx_v_szValue = ((PyObject*)values[2]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("SetString", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 231, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.SetString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szSection), (&PyString_Type), 1, "szSection", 1))) __PYX_ERR(1, 231, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szEntry), (&PyString_Type), 1, "szEntry", 1))) __PYX_ERR(1, 231, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szValue), (&PyString_Type), 1, "szValue", 1))) __PYX_ERR(1, 231, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_12SetString(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self), __pyx_v_szSection, __pyx_v_szEntry, __pyx_v_szValue); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_12SetString(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szSection, PyObject *__pyx_v_szEntry, PyObject *__pyx_v_szValue) { + PyObject *__pyx_v_sSection = NULL; + PyObject *__pyx_v_sEntry = NULL; + PyObject *__pyx_v_sValue = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + char *__pyx_t_5; + char *__pyx_t_6; + __Pyx_RefNannySetupContext("SetString", 0); + + /* "py_t2sdk.pyx":232 + * return self.lpConfig.GetInt(sSection,sEntry,iDefault) + * def SetString(self,str szSection,str szEntry,str szValue): + * sSection = bytes(szSection,encoding='utf-8') # <<<<<<<<<<<<<< + * sEntry = bytes(szEntry,encoding='utf-8') + * sValue = bytes(szValue,encoding='utf-8') + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szSection); + __Pyx_GIVEREF(__pyx_v_szSection); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szSection); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 232, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sSection = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":233 + * def SetString(self,str szSection,str szEntry,str szValue): + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') # <<<<<<<<<<<<<< + * sValue = bytes(szValue,encoding='utf-8') + * return self.lpConfig.SetString(sSection,sEntry,sValue) + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_szEntry); + __Pyx_GIVEREF(__pyx_v_szEntry); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_szEntry); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 233, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sEntry = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":234 + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') + * sValue = bytes(szValue,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpConfig.SetString(sSection,sEntry,sValue) + * def SetInt(self,str szSection,str szEntry, int iValue): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szValue); + __Pyx_GIVEREF(__pyx_v_szValue); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szValue); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 234, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sValue = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":235 + * sEntry = bytes(szEntry,encoding='utf-8') + * sValue = bytes(szValue,encoding='utf-8') + * return self.lpConfig.SetString(sSection,sEntry,sValue) # <<<<<<<<<<<<<< + * def SetInt(self,str szSection,str szEntry, int iValue): + * sSection = bytes(szSection,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sSection); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 235, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_sEntry); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 235, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_v_sValue); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(1, 235, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpConfig->SetString(__pyx_t_4, __pyx_t_5, __pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":231 + * sEntry = bytes(szEntry,encoding='utf-8') + * return self.lpConfig.GetInt(sSection,sEntry,iDefault) + * def SetString(self,str szSection,str szEntry,str szValue): # <<<<<<<<<<<<<< + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.SetString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sSection); + __Pyx_XDECREF(__pyx_v_sEntry); + __Pyx_XDECREF(__pyx_v_sValue); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":236 + * sValue = bytes(szValue,encoding='utf-8') + * return self.lpConfig.SetString(sSection,sEntry,sValue) + * def SetInt(self,str szSection,str szEntry, int iValue): # <<<<<<<<<<<<<< + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_15SetInt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_15SetInt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_szSection = 0; + PyObject *__pyx_v_szEntry = 0; + int __pyx_v_iValue; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetInt (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_szSection,&__pyx_n_s_szEntry,&__pyx_n_s_iValue,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szSection)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szEntry)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("SetInt", 1, 3, 3, 1); __PYX_ERR(1, 236, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iValue)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("SetInt", 1, 3, 3, 2); __PYX_ERR(1, 236, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetInt") < 0)) __PYX_ERR(1, 236, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_szSection = ((PyObject*)values[0]); + __pyx_v_szEntry = ((PyObject*)values[1]); + __pyx_v_iValue = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_iValue == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 236, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("SetInt", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 236, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.SetInt", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szSection), (&PyString_Type), 1, "szSection", 1))) __PYX_ERR(1, 236, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szEntry), (&PyString_Type), 1, "szEntry", 1))) __PYX_ERR(1, 236, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_14SetInt(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self), __pyx_v_szSection, __pyx_v_szEntry, __pyx_v_iValue); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_14SetInt(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szSection, PyObject *__pyx_v_szEntry, int __pyx_v_iValue) { + PyObject *__pyx_v_sSection = NULL; + PyObject *__pyx_v_sEntry = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + char *__pyx_t_5; + __Pyx_RefNannySetupContext("SetInt", 0); + + /* "py_t2sdk.pyx":237 + * return self.lpConfig.SetString(sSection,sEntry,sValue) + * def SetInt(self,str szSection,str szEntry, int iValue): + * sSection = bytes(szSection,encoding='utf-8') # <<<<<<<<<<<<<< + * sEntry = bytes(szEntry,encoding='utf-8') + * return self.lpConfig.SetInt(sSection,sEntry,iValue) + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szSection); + __Pyx_GIVEREF(__pyx_v_szSection); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szSection); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 237, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sSection = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":238 + * def SetInt(self,str szSection,str szEntry, int iValue): + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpConfig.SetInt(sSection,sEntry,iValue) + * def Release(self): + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_szEntry); + __Pyx_GIVEREF(__pyx_v_szEntry); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_szEntry); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 238, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sEntry = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":239 + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') + * return self.lpConfig.SetInt(sSection,sEntry,iValue) # <<<<<<<<<<<<<< + * def Release(self): + * self.lpConfig.Release() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sSection); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 239, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_sEntry); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 239, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConfig->SetInt(__pyx_t_4, __pyx_t_5, __pyx_v_iValue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":236 + * sValue = bytes(szValue,encoding='utf-8') + * return self.lpConfig.SetString(sSection,sEntry,sValue) + * def SetInt(self,str szSection,str szEntry, int iValue): # <<<<<<<<<<<<<< + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.SetInt", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sSection); + __Pyx_XDECREF(__pyx_v_sEntry); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":240 + * sEntry = bytes(szEntry,encoding='utf-8') + * return self.lpConfig.SetInt(sSection,sEntry,iValue) + * def Release(self): # <<<<<<<<<<<<<< + * self.lpConfig.Release() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_17Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_17Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Release (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_16Release(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_16Release(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Release", 0); + + /* "py_t2sdk.pyx":241 + * return self.lpConfig.SetInt(sSection,sEntry,iValue) + * def Release(self): + * self.lpConfig.Release() # <<<<<<<<<<<<<< + * + * cdef class pyIBizMessage: + */ + __pyx_v_self->lpConfig->Release(); + + /* "py_t2sdk.pyx":240 + * sEntry = bytes(szEntry,encoding='utf-8') + * return self.lpConfig.SetInt(sSection,sEntry,iValue) + * def Release(self): # <<<<<<<<<<<<<< + * self.lpConfig.Release() + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_18__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_20__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":245 + * cdef class pyIBizMessage: + * cdef c_IBizMessage* lpBizMessage + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lpBizMessage = new c_IBizMessage() + * def __dealloc__(self): + */ + +/* Python wrapper */ +static int __pyx_pw_8py_t2sdk_13pyIBizMessage_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_8py_t2sdk_13pyIBizMessage_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage___cinit__(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_8py_t2sdk_13pyIBizMessage___cinit__(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + c_IBizMessage *__pyx_t_1; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "py_t2sdk.pyx":246 + * cdef c_IBizMessage* lpBizMessage + * def __cinit__(self): + * self.lpBizMessage = new c_IBizMessage() # <<<<<<<<<<<<<< + * def __dealloc__(self): + * del self.lpBizMessage + */ + try { + __pyx_t_1 = new c_IBizMessage(); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 246, __pyx_L1_error) + } + __pyx_v_self->lpBizMessage = __pyx_t_1; + + /* "py_t2sdk.pyx":245 + * cdef class pyIBizMessage: + * cdef c_IBizMessage* lpBizMessage + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lpBizMessage = new c_IBizMessage() + * def __dealloc__(self): + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":247 + * def __cinit__(self): + * self.lpBizMessage = new c_IBizMessage() + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.lpBizMessage + * def SetFunction(self,int nFUnctionNo): + */ + +/* Python wrapper */ +static void __pyx_pw_8py_t2sdk_13pyIBizMessage_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_8py_t2sdk_13pyIBizMessage_3__dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_pf_8py_t2sdk_13pyIBizMessage_2__dealloc__(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_8py_t2sdk_13pyIBizMessage_2__dealloc__(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__", 0); + + /* "py_t2sdk.pyx":248 + * self.lpBizMessage = new c_IBizMessage() + * def __dealloc__(self): + * del self.lpBizMessage # <<<<<<<<<<<<<< + * def SetFunction(self,int nFUnctionNo): + * self.lpBizMessage.SetFunction(nFUnctionNo) + */ + delete __pyx_v_self->lpBizMessage; + + /* "py_t2sdk.pyx":247 + * def __cinit__(self): + * self.lpBizMessage = new c_IBizMessage() + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.lpBizMessage + * def SetFunction(self,int nFUnctionNo): + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "py_t2sdk.pyx":249 + * def __dealloc__(self): + * del self.lpBizMessage + * def SetFunction(self,int nFUnctionNo): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetFunction(nFUnctionNo) + * def GetFunction(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_5SetFunction(PyObject *__pyx_v_self, PyObject *__pyx_arg_nFUnctionNo); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_5SetFunction(PyObject *__pyx_v_self, PyObject *__pyx_arg_nFUnctionNo) { + int __pyx_v_nFUnctionNo; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetFunction (wrapper)", 0); + assert(__pyx_arg_nFUnctionNo); { + __pyx_v_nFUnctionNo = __Pyx_PyInt_As_int(__pyx_arg_nFUnctionNo); if (unlikely((__pyx_v_nFUnctionNo == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 249, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_4SetFunction(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nFUnctionNo)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_4SetFunction(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nFUnctionNo) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetFunction", 0); + + /* "py_t2sdk.pyx":250 + * del self.lpBizMessage + * def SetFunction(self,int nFUnctionNo): + * self.lpBizMessage.SetFunction(nFUnctionNo) # <<<<<<<<<<<<<< + * def GetFunction(self): + * return self.lpBizMessage.GetFunction() + */ + __pyx_v_self->lpBizMessage->SetFunction(__pyx_v_nFUnctionNo); + + /* "py_t2sdk.pyx":249 + * def __dealloc__(self): + * del self.lpBizMessage + * def SetFunction(self,int nFUnctionNo): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetFunction(nFUnctionNo) + * def GetFunction(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":251 + * def SetFunction(self,int nFUnctionNo): + * self.lpBizMessage.SetFunction(nFUnctionNo) + * def GetFunction(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetFunction() + * def SetPacketType(self,int nPacketType): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_7GetFunction(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_7GetFunction(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetFunction (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_6GetFunction(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_6GetFunction(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetFunction", 0); + + /* "py_t2sdk.pyx":252 + * self.lpBizMessage.SetFunction(nFUnctionNo) + * def GetFunction(self): + * return self.lpBizMessage.GetFunction() # <<<<<<<<<<<<<< + * def SetPacketType(self,int nPacketType): + * self.lpBizMessage.SetPacketType(nPacketType) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetFunction()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":251 + * def SetFunction(self,int nFUnctionNo): + * self.lpBizMessage.SetFunction(nFUnctionNo) + * def GetFunction(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetFunction() + * def SetPacketType(self,int nPacketType): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":253 + * def GetFunction(self): + * return self.lpBizMessage.GetFunction() + * def SetPacketType(self,int nPacketType): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetPacketType(nPacketType) + * def GetPacketType(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_9SetPacketType(PyObject *__pyx_v_self, PyObject *__pyx_arg_nPacketType); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_9SetPacketType(PyObject *__pyx_v_self, PyObject *__pyx_arg_nPacketType) { + int __pyx_v_nPacketType; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetPacketType (wrapper)", 0); + assert(__pyx_arg_nPacketType); { + __pyx_v_nPacketType = __Pyx_PyInt_As_int(__pyx_arg_nPacketType); if (unlikely((__pyx_v_nPacketType == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 253, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetPacketType", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_8SetPacketType(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nPacketType)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_8SetPacketType(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nPacketType) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetPacketType", 0); + + /* "py_t2sdk.pyx":254 + * return self.lpBizMessage.GetFunction() + * def SetPacketType(self,int nPacketType): + * self.lpBizMessage.SetPacketType(nPacketType) # <<<<<<<<<<<<<< + * def GetPacketType(self): + * return self.lpBizMessage.GetPacketType() + */ + __pyx_v_self->lpBizMessage->SetPacketType(__pyx_v_nPacketType); + + /* "py_t2sdk.pyx":253 + * def GetFunction(self): + * return self.lpBizMessage.GetFunction() + * def SetPacketType(self,int nPacketType): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetPacketType(nPacketType) + * def GetPacketType(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":255 + * def SetPacketType(self,int nPacketType): + * self.lpBizMessage.SetPacketType(nPacketType) + * def GetPacketType(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetPacketType() + * def SetBranchNo(self,int nBranchNo): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_11GetPacketType(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_11GetPacketType(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetPacketType (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_10GetPacketType(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_10GetPacketType(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetPacketType", 0); + + /* "py_t2sdk.pyx":256 + * self.lpBizMessage.SetPacketType(nPacketType) + * def GetPacketType(self): + * return self.lpBizMessage.GetPacketType() # <<<<<<<<<<<<<< + * def SetBranchNo(self,int nBranchNo): + * self.lpBizMessage.SetBranchNo(nBranchNo) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetPacketType()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":255 + * def SetPacketType(self,int nPacketType): + * self.lpBizMessage.SetPacketType(nPacketType) + * def GetPacketType(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetPacketType() + * def SetBranchNo(self,int nBranchNo): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetPacketType", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":257 + * def GetPacketType(self): + * return self.lpBizMessage.GetPacketType() + * def SetBranchNo(self,int nBranchNo): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetBranchNo(nBranchNo) + * def GetBranchNo(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_13SetBranchNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nBranchNo); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_13SetBranchNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nBranchNo) { + int __pyx_v_nBranchNo; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetBranchNo (wrapper)", 0); + assert(__pyx_arg_nBranchNo); { + __pyx_v_nBranchNo = __Pyx_PyInt_As_int(__pyx_arg_nBranchNo); if (unlikely((__pyx_v_nBranchNo == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 257, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetBranchNo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_12SetBranchNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nBranchNo)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_12SetBranchNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nBranchNo) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetBranchNo", 0); + + /* "py_t2sdk.pyx":258 + * return self.lpBizMessage.GetPacketType() + * def SetBranchNo(self,int nBranchNo): + * self.lpBizMessage.SetBranchNo(nBranchNo) # <<<<<<<<<<<<<< + * def GetBranchNo(self): + * return self.lpBizMessage.GetBranchNo() + */ + __pyx_v_self->lpBizMessage->SetBranchNo(__pyx_v_nBranchNo); + + /* "py_t2sdk.pyx":257 + * def GetPacketType(self): + * return self.lpBizMessage.GetPacketType() + * def SetBranchNo(self,int nBranchNo): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetBranchNo(nBranchNo) + * def GetBranchNo(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":259 + * def SetBranchNo(self,int nBranchNo): + * self.lpBizMessage.SetBranchNo(nBranchNo) + * def GetBranchNo(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetBranchNo() + * def SetSystemNo(self,int nSystemNo): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_15GetBranchNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_15GetBranchNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetBranchNo (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_14GetBranchNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_14GetBranchNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetBranchNo", 0); + + /* "py_t2sdk.pyx":260 + * self.lpBizMessage.SetBranchNo(nBranchNo) + * def GetBranchNo(self): + * return self.lpBizMessage.GetBranchNo() # <<<<<<<<<<<<<< + * def SetSystemNo(self,int nSystemNo): + * self.lpBizMessage.SetSystemNo(nSystemNo) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetBranchNo()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":259 + * def SetBranchNo(self,int nBranchNo): + * self.lpBizMessage.SetBranchNo(nBranchNo) + * def GetBranchNo(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetBranchNo() + * def SetSystemNo(self,int nSystemNo): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetBranchNo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":261 + * def GetBranchNo(self): + * return self.lpBizMessage.GetBranchNo() + * def SetSystemNo(self,int nSystemNo): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetSystemNo(nSystemNo) + * def GetSystemNo(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_17SetSystemNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSystemNo); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_17SetSystemNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSystemNo) { + int __pyx_v_nSystemNo; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetSystemNo (wrapper)", 0); + assert(__pyx_arg_nSystemNo); { + __pyx_v_nSystemNo = __Pyx_PyInt_As_int(__pyx_arg_nSystemNo); if (unlikely((__pyx_v_nSystemNo == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 261, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetSystemNo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_16SetSystemNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nSystemNo)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_16SetSystemNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nSystemNo) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetSystemNo", 0); + + /* "py_t2sdk.pyx":262 + * return self.lpBizMessage.GetBranchNo() + * def SetSystemNo(self,int nSystemNo): + * self.lpBizMessage.SetSystemNo(nSystemNo) # <<<<<<<<<<<<<< + * def GetSystemNo(self): + * return self.lpBizMessage.GetSystemNo() + */ + __pyx_v_self->lpBizMessage->SetSystemNo(__pyx_v_nSystemNo); + + /* "py_t2sdk.pyx":261 + * def GetBranchNo(self): + * return self.lpBizMessage.GetBranchNo() + * def SetSystemNo(self,int nSystemNo): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetSystemNo(nSystemNo) + * def GetSystemNo(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":263 + * def SetSystemNo(self,int nSystemNo): + * self.lpBizMessage.SetSystemNo(nSystemNo) + * def GetSystemNo(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetSystemNo() + * def SetSubSystemNo(self,int nSubSystemNo): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_19GetSystemNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_19GetSystemNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetSystemNo (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_18GetSystemNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_18GetSystemNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetSystemNo", 0); + + /* "py_t2sdk.pyx":264 + * self.lpBizMessage.SetSystemNo(nSystemNo) + * def GetSystemNo(self): + * return self.lpBizMessage.GetSystemNo() # <<<<<<<<<<<<<< + * def SetSubSystemNo(self,int nSubSystemNo): + * self.lpBizMessage.SetSubSystemNo(nSubSystemNo) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetSystemNo()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 264, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":263 + * def SetSystemNo(self,int nSystemNo): + * self.lpBizMessage.SetSystemNo(nSystemNo) + * def GetSystemNo(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetSystemNo() + * def SetSubSystemNo(self,int nSubSystemNo): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetSystemNo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":265 + * def GetSystemNo(self): + * return self.lpBizMessage.GetSystemNo() + * def SetSubSystemNo(self,int nSubSystemNo): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetSubSystemNo(nSubSystemNo) + * def GetSubSystemNo(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_21SetSubSystemNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSubSystemNo); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_21SetSubSystemNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSubSystemNo) { + int __pyx_v_nSubSystemNo; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetSubSystemNo (wrapper)", 0); + assert(__pyx_arg_nSubSystemNo); { + __pyx_v_nSubSystemNo = __Pyx_PyInt_As_int(__pyx_arg_nSubSystemNo); if (unlikely((__pyx_v_nSubSystemNo == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 265, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetSubSystemNo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_20SetSubSystemNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nSubSystemNo)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_20SetSubSystemNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nSubSystemNo) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetSubSystemNo", 0); + + /* "py_t2sdk.pyx":266 + * return self.lpBizMessage.GetSystemNo() + * def SetSubSystemNo(self,int nSubSystemNo): + * self.lpBizMessage.SetSubSystemNo(nSubSystemNo) # <<<<<<<<<<<<<< + * def GetSubSystemNo(self): + * return self.lpBizMessage.GetSubSystemNo() + */ + __pyx_v_self->lpBizMessage->SetSubSystemNo(__pyx_v_nSubSystemNo); + + /* "py_t2sdk.pyx":265 + * def GetSystemNo(self): + * return self.lpBizMessage.GetSystemNo() + * def SetSubSystemNo(self,int nSubSystemNo): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetSubSystemNo(nSubSystemNo) + * def GetSubSystemNo(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":267 + * def SetSubSystemNo(self,int nSubSystemNo): + * self.lpBizMessage.SetSubSystemNo(nSubSystemNo) + * def GetSubSystemNo(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetSubSystemNo() + * def SetSenderId(self,int nSenderId): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_23GetSubSystemNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_23GetSubSystemNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetSubSystemNo (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_22GetSubSystemNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_22GetSubSystemNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetSubSystemNo", 0); + + /* "py_t2sdk.pyx":268 + * self.lpBizMessage.SetSubSystemNo(nSubSystemNo) + * def GetSubSystemNo(self): + * return self.lpBizMessage.GetSubSystemNo() # <<<<<<<<<<<<<< + * def SetSenderId(self,int nSenderId): + * self.lpBizMessage.SetSenderId(nSenderId) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetSubSystemNo()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":267 + * def SetSubSystemNo(self,int nSubSystemNo): + * self.lpBizMessage.SetSubSystemNo(nSubSystemNo) + * def GetSubSystemNo(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetSubSystemNo() + * def SetSenderId(self,int nSenderId): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetSubSystemNo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":269 + * def GetSubSystemNo(self): + * return self.lpBizMessage.GetSubSystemNo() + * def SetSenderId(self,int nSenderId): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetSenderId(nSenderId) + * def GetSenderId(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_25SetSenderId(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSenderId); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_25SetSenderId(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSenderId) { + int __pyx_v_nSenderId; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetSenderId (wrapper)", 0); + assert(__pyx_arg_nSenderId); { + __pyx_v_nSenderId = __Pyx_PyInt_As_int(__pyx_arg_nSenderId); if (unlikely((__pyx_v_nSenderId == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 269, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetSenderId", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_24SetSenderId(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nSenderId)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_24SetSenderId(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nSenderId) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetSenderId", 0); + + /* "py_t2sdk.pyx":270 + * return self.lpBizMessage.GetSubSystemNo() + * def SetSenderId(self,int nSenderId): + * self.lpBizMessage.SetSenderId(nSenderId) # <<<<<<<<<<<<<< + * def GetSenderId(self): + * return self.lpBizMessage.GetSenderId() + */ + __pyx_v_self->lpBizMessage->SetSenderId(__pyx_v_nSenderId); + + /* "py_t2sdk.pyx":269 + * def GetSubSystemNo(self): + * return self.lpBizMessage.GetSubSystemNo() + * def SetSenderId(self,int nSenderId): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetSenderId(nSenderId) + * def GetSenderId(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":271 + * def SetSenderId(self,int nSenderId): + * self.lpBizMessage.SetSenderId(nSenderId) + * def GetSenderId(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetSenderId() + * def SetPacketId(self,int nPacketId): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_27GetSenderId(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_27GetSenderId(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetSenderId (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_26GetSenderId(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_26GetSenderId(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetSenderId", 0); + + /* "py_t2sdk.pyx":272 + * self.lpBizMessage.SetSenderId(nSenderId) + * def GetSenderId(self): + * return self.lpBizMessage.GetSenderId() # <<<<<<<<<<<<<< + * def SetPacketId(self,int nPacketId): + * self.lpBizMessage.SetPacketId(nPacketId) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetSenderId()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":271 + * def SetSenderId(self,int nSenderId): + * self.lpBizMessage.SetSenderId(nSenderId) + * def GetSenderId(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetSenderId() + * def SetPacketId(self,int nPacketId): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetSenderId", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":273 + * def GetSenderId(self): + * return self.lpBizMessage.GetSenderId() + * def SetPacketId(self,int nPacketId): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetPacketId(nPacketId) + * def GetPacketId(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_29SetPacketId(PyObject *__pyx_v_self, PyObject *__pyx_arg_nPacketId); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_29SetPacketId(PyObject *__pyx_v_self, PyObject *__pyx_arg_nPacketId) { + int __pyx_v_nPacketId; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetPacketId (wrapper)", 0); + assert(__pyx_arg_nPacketId); { + __pyx_v_nPacketId = __Pyx_PyInt_As_int(__pyx_arg_nPacketId); if (unlikely((__pyx_v_nPacketId == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 273, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetPacketId", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_28SetPacketId(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nPacketId)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_28SetPacketId(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nPacketId) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetPacketId", 0); + + /* "py_t2sdk.pyx":274 + * return self.lpBizMessage.GetSenderId() + * def SetPacketId(self,int nPacketId): + * self.lpBizMessage.SetPacketId(nPacketId) # <<<<<<<<<<<<<< + * def GetPacketId(self): + * return self.lpBizMessage.GetPacketId() + */ + __pyx_v_self->lpBizMessage->SetPacketId(__pyx_v_nPacketId); + + /* "py_t2sdk.pyx":273 + * def GetSenderId(self): + * return self.lpBizMessage.GetSenderId() + * def SetPacketId(self,int nPacketId): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetPacketId(nPacketId) + * def GetPacketId(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":275 + * def SetPacketId(self,int nPacketId): + * self.lpBizMessage.SetPacketId(nPacketId) + * def GetPacketId(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetPacketId() + * def SetErrorNo(self,int nErrorNo): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_31GetPacketId(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_31GetPacketId(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetPacketId (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_30GetPacketId(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_30GetPacketId(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetPacketId", 0); + + /* "py_t2sdk.pyx":276 + * self.lpBizMessage.SetPacketId(nPacketId) + * def GetPacketId(self): + * return self.lpBizMessage.GetPacketId() # <<<<<<<<<<<<<< + * def SetErrorNo(self,int nErrorNo): + * self.lpBizMessage.SetErrorNo(nErrorNo) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetPacketId()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":275 + * def SetPacketId(self,int nPacketId): + * self.lpBizMessage.SetPacketId(nPacketId) + * def GetPacketId(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetPacketId() + * def SetErrorNo(self,int nErrorNo): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetPacketId", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":277 + * def GetPacketId(self): + * return self.lpBizMessage.GetPacketId() + * def SetErrorNo(self,int nErrorNo): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetErrorNo(nErrorNo) + * def GetErrorNo(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_33SetErrorNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nErrorNo); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_33SetErrorNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nErrorNo) { + int __pyx_v_nErrorNo; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetErrorNo (wrapper)", 0); + assert(__pyx_arg_nErrorNo); { + __pyx_v_nErrorNo = __Pyx_PyInt_As_int(__pyx_arg_nErrorNo); if (unlikely((__pyx_v_nErrorNo == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 277, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetErrorNo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_32SetErrorNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nErrorNo)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_32SetErrorNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nErrorNo) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetErrorNo", 0); + + /* "py_t2sdk.pyx":278 + * return self.lpBizMessage.GetPacketId() + * def SetErrorNo(self,int nErrorNo): + * self.lpBizMessage.SetErrorNo(nErrorNo) # <<<<<<<<<<<<<< + * def GetErrorNo(self): + * return self.lpBizMessage.GetErrorNo() + */ + __pyx_v_self->lpBizMessage->SetErrorNo(__pyx_v_nErrorNo); + + /* "py_t2sdk.pyx":277 + * def GetPacketId(self): + * return self.lpBizMessage.GetPacketId() + * def SetErrorNo(self,int nErrorNo): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetErrorNo(nErrorNo) + * def GetErrorNo(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":279 + * def SetErrorNo(self,int nErrorNo): + * self.lpBizMessage.SetErrorNo(nErrorNo) + * def GetErrorNo(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetErrorNo() + * def SetErrorInfo(self,str strErrorInfo): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_35GetErrorNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_35GetErrorNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetErrorNo (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_34GetErrorNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_34GetErrorNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetErrorNo", 0); + + /* "py_t2sdk.pyx":280 + * self.lpBizMessage.SetErrorNo(nErrorNo) + * def GetErrorNo(self): + * return self.lpBizMessage.GetErrorNo() # <<<<<<<<<<<<<< + * def SetErrorInfo(self,str strErrorInfo): + * sErrorInfo = bytes(strErrorInfo,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetErrorNo()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":279 + * def SetErrorNo(self,int nErrorNo): + * self.lpBizMessage.SetErrorNo(nErrorNo) + * def GetErrorNo(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetErrorNo() + * def SetErrorInfo(self,str strErrorInfo): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetErrorNo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":281 + * def GetErrorNo(self): + * return self.lpBizMessage.GetErrorNo() + * def SetErrorInfo(self,str strErrorInfo): # <<<<<<<<<<<<<< + * sErrorInfo = bytes(strErrorInfo,encoding='utf-8') + * self.lpBizMessage.SetErrorInfo(sErrorInfo) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_37SetErrorInfo(PyObject *__pyx_v_self, PyObject *__pyx_v_strErrorInfo); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_37SetErrorInfo(PyObject *__pyx_v_self, PyObject *__pyx_v_strErrorInfo) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetErrorInfo (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strErrorInfo), (&PyString_Type), 1, "strErrorInfo", 1))) __PYX_ERR(1, 281, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_36SetErrorInfo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((PyObject*)__pyx_v_strErrorInfo)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_36SetErrorInfo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_strErrorInfo) { + PyObject *__pyx_v_sErrorInfo = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("SetErrorInfo", 0); + + /* "py_t2sdk.pyx":282 + * return self.lpBizMessage.GetErrorNo() + * def SetErrorInfo(self,str strErrorInfo): + * sErrorInfo = bytes(strErrorInfo,encoding='utf-8') # <<<<<<<<<<<<<< + * self.lpBizMessage.SetErrorInfo(sErrorInfo) + * def GetErrorInfo(self): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_strErrorInfo); + __Pyx_GIVEREF(__pyx_v_strErrorInfo); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_strErrorInfo); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 282, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sErrorInfo = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":283 + * def SetErrorInfo(self,str strErrorInfo): + * sErrorInfo = bytes(strErrorInfo,encoding='utf-8') + * self.lpBizMessage.SetErrorInfo(sErrorInfo) # <<<<<<<<<<<<<< + * def GetErrorInfo(self): + * cdef char* sErrInfo = self.lpBizMessage.GetErrorInfo() + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sErrorInfo); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 283, __pyx_L1_error) + __pyx_v_self->lpBizMessage->SetErrorInfo(__pyx_t_4); + + /* "py_t2sdk.pyx":281 + * def GetErrorNo(self): + * return self.lpBizMessage.GetErrorNo() + * def SetErrorInfo(self,str strErrorInfo): # <<<<<<<<<<<<<< + * sErrorInfo = bytes(strErrorInfo,encoding='utf-8') + * self.lpBizMessage.SetErrorInfo(sErrorInfo) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetErrorInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sErrorInfo); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":284 + * sErrorInfo = bytes(strErrorInfo,encoding='utf-8') + * self.lpBizMessage.SetErrorInfo(sErrorInfo) + * def GetErrorInfo(self): # <<<<<<<<<<<<<< + * cdef char* sErrInfo = self.lpBizMessage.GetErrorInfo() + * return sErrInfo + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_39GetErrorInfo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_39GetErrorInfo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetErrorInfo (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_38GetErrorInfo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_38GetErrorInfo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + char *__pyx_v_sErrInfo; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetErrorInfo", 0); + + /* "py_t2sdk.pyx":285 + * self.lpBizMessage.SetErrorInfo(sErrorInfo) + * def GetErrorInfo(self): + * cdef char* sErrInfo = self.lpBizMessage.GetErrorInfo() # <<<<<<<<<<<<<< + * return sErrInfo + * def SetReturnCode(self,int nReturnCode): + */ + __pyx_v_sErrInfo = __pyx_v_self->lpBizMessage->GetErrorInfo(); + + /* "py_t2sdk.pyx":286 + * def GetErrorInfo(self): + * cdef char* sErrInfo = self.lpBizMessage.GetErrorInfo() + * return sErrInfo # <<<<<<<<<<<<<< + * def SetReturnCode(self,int nReturnCode): + * self.lpBizMessage.SetReturnCode(nReturnCode) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sErrInfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":284 + * sErrorInfo = bytes(strErrorInfo,encoding='utf-8') + * self.lpBizMessage.SetErrorInfo(sErrorInfo) + * def GetErrorInfo(self): # <<<<<<<<<<<<<< + * cdef char* sErrInfo = self.lpBizMessage.GetErrorInfo() + * return sErrInfo + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetErrorInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":287 + * cdef char* sErrInfo = self.lpBizMessage.GetErrorInfo() + * return sErrInfo + * def SetReturnCode(self,int nReturnCode): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetReturnCode(nReturnCode) + * def GetReturnCode(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_41SetReturnCode(PyObject *__pyx_v_self, PyObject *__pyx_arg_nReturnCode); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_41SetReturnCode(PyObject *__pyx_v_self, PyObject *__pyx_arg_nReturnCode) { + int __pyx_v_nReturnCode; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetReturnCode (wrapper)", 0); + assert(__pyx_arg_nReturnCode); { + __pyx_v_nReturnCode = __Pyx_PyInt_As_int(__pyx_arg_nReturnCode); if (unlikely((__pyx_v_nReturnCode == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 287, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetReturnCode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_40SetReturnCode(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nReturnCode)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_40SetReturnCode(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nReturnCode) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetReturnCode", 0); + + /* "py_t2sdk.pyx":288 + * return sErrInfo + * def SetReturnCode(self,int nReturnCode): + * self.lpBizMessage.SetReturnCode(nReturnCode) # <<<<<<<<<<<<<< + * def GetReturnCode(self): + * return self.lpBizMessage.GetReturnCode() + */ + __pyx_v_self->lpBizMessage->SetReturnCode(__pyx_v_nReturnCode); + + /* "py_t2sdk.pyx":287 + * cdef char* sErrInfo = self.lpBizMessage.GetErrorInfo() + * return sErrInfo + * def SetReturnCode(self,int nReturnCode): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetReturnCode(nReturnCode) + * def GetReturnCode(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":289 + * def SetReturnCode(self,int nReturnCode): + * self.lpBizMessage.SetReturnCode(nReturnCode) + * def GetReturnCode(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetReturnCode() + * def SetContent(self,list lpContent,int iLen): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_43GetReturnCode(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_43GetReturnCode(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetReturnCode (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_42GetReturnCode(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_42GetReturnCode(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetReturnCode", 0); + + /* "py_t2sdk.pyx":290 + * self.lpBizMessage.SetReturnCode(nReturnCode) + * def GetReturnCode(self): + * return self.lpBizMessage.GetReturnCode() # <<<<<<<<<<<<<< + * def SetContent(self,list lpContent,int iLen): + * cdef char* sBuff = malloc(iLen) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetReturnCode()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":289 + * def SetReturnCode(self,int nReturnCode): + * self.lpBizMessage.SetReturnCode(nReturnCode) + * def GetReturnCode(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetReturnCode() + * def SetContent(self,list lpContent,int iLen): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetReturnCode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":291 + * def GetReturnCode(self): + * return self.lpBizMessage.GetReturnCode() + * def SetContent(self,list lpContent,int iLen): # <<<<<<<<<<<<<< + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_45SetContent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_45SetContent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_lpContent = 0; + int __pyx_v_iLen; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetContent (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpContent,&__pyx_n_s_iLen,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpContent)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iLen)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("SetContent", 1, 2, 2, 1); __PYX_ERR(1, 291, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetContent") < 0)) __PYX_ERR(1, 291, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_lpContent = ((PyObject*)values[0]); + __pyx_v_iLen = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_iLen == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 291, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("SetContent", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 291, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetContent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpContent), (&PyList_Type), 1, "lpContent", 1))) __PYX_ERR(1, 291, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_44SetContent(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), __pyx_v_lpContent, __pyx_v_iLen); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_44SetContent(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_lpContent, int __pyx_v_iLen) { + char *__pyx_v_sBuff; + int __pyx_v_iIndex; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + char __pyx_t_3; + __Pyx_RefNannySetupContext("SetContent", 0); + + /* "py_t2sdk.pyx":292 + * return self.lpBizMessage.GetReturnCode() + * def SetContent(self,list lpContent,int iLen): + * cdef char* sBuff = malloc(iLen) # <<<<<<<<<<<<<< + * cdef int iIndex = 0 + * while iIndex < iLen: + */ + __pyx_v_sBuff = ((char *)malloc(__pyx_v_iLen)); + + /* "py_t2sdk.pyx":293 + * def SetContent(self,list lpContent,int iLen): + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 # <<<<<<<<<<<<<< + * while iIndex < iLen: + * sBuff[iIndex] = lpContent[iIndex] + */ + __pyx_v_iIndex = 0; + + /* "py_t2sdk.pyx":294 + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 + * while iIndex < iLen: # <<<<<<<<<<<<<< + * sBuff[iIndex] = lpContent[iIndex] + * iIndex+=1 + */ + while (1) { + __pyx_t_1 = ((__pyx_v_iIndex < __pyx_v_iLen) != 0); + if (!__pyx_t_1) break; + + /* "py_t2sdk.pyx":295 + * cdef int iIndex = 0 + * while iIndex < iLen: + * sBuff[iIndex] = lpContent[iIndex] # <<<<<<<<<<<<<< + * iIndex+=1 + * self.lpBizMessage.SetContent(sBuff,iLen) + */ + if (unlikely(__pyx_v_lpContent == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 295, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_lpContent, __pyx_v_iIndex, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 295, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_As_char(__pyx_t_2); if (unlikely((__pyx_t_3 == (char)-1) && PyErr_Occurred())) __PYX_ERR(1, 295, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + (__pyx_v_sBuff[__pyx_v_iIndex]) = __pyx_t_3; + + /* "py_t2sdk.pyx":296 + * while iIndex < iLen: + * sBuff[iIndex] = lpContent[iIndex] + * iIndex+=1 # <<<<<<<<<<<<<< + * self.lpBizMessage.SetContent(sBuff,iLen) + * free(sBuff) + */ + __pyx_v_iIndex = (__pyx_v_iIndex + 1); + } + + /* "py_t2sdk.pyx":297 + * sBuff[iIndex] = lpContent[iIndex] + * iIndex+=1 + * self.lpBizMessage.SetContent(sBuff,iLen) # <<<<<<<<<<<<<< + * free(sBuff) + * def GetContent(self): + */ + __pyx_v_self->lpBizMessage->SetContent(__pyx_v_sBuff, __pyx_v_iLen); + + /* "py_t2sdk.pyx":298 + * iIndex+=1 + * self.lpBizMessage.SetContent(sBuff,iLen) + * free(sBuff) # <<<<<<<<<<<<<< + * def GetContent(self): + * cdef int iLen = 0 + */ + free(__pyx_v_sBuff); + + /* "py_t2sdk.pyx":291 + * def GetReturnCode(self): + * return self.lpBizMessage.GetReturnCode() + * def SetContent(self,list lpContent,int iLen): # <<<<<<<<<<<<<< + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetContent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":299 + * self.lpBizMessage.SetContent(sBuff,iLen) + * free(sBuff) + * def GetContent(self): # <<<<<<<<<<<<<< + * cdef int iLen = 0 + * cdef char* sBuff = self.lpBizMessage.GetContent(iLen) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_47GetContent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_47GetContent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetContent (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_46GetContent(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_46GetContent(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + int __pyx_v_iLen; + char *__pyx_v_sBuff; + PyObject *__pyx_v_lpBuff = NULL; + PyObject *__pyx_v_iTemp = 0; + int __pyx_v_iIndex; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("GetContent", 0); + + /* "py_t2sdk.pyx":300 + * free(sBuff) + * def GetContent(self): + * cdef int iLen = 0 # <<<<<<<<<<<<<< + * cdef char* sBuff = self.lpBizMessage.GetContent(iLen) + * lpBuff = [] + */ + __pyx_v_iLen = 0; + + /* "py_t2sdk.pyx":301 + * def GetContent(self): + * cdef int iLen = 0 + * cdef char* sBuff = self.lpBizMessage.GetContent(iLen) # <<<<<<<<<<<<<< + * lpBuff = [] + * cdef iTemp = 0 + */ + __pyx_v_sBuff = __pyx_v_self->lpBizMessage->GetContent(__pyx_v_iLen); + + /* "py_t2sdk.pyx":302 + * cdef int iLen = 0 + * cdef char* sBuff = self.lpBizMessage.GetContent(iLen) + * lpBuff = [] # <<<<<<<<<<<<<< + * cdef iTemp = 0 + * cdef int iIndex = 0 + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_lpBuff = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":303 + * cdef char* sBuff = self.lpBizMessage.GetContent(iLen) + * lpBuff = [] + * cdef iTemp = 0 # <<<<<<<<<<<<<< + * cdef int iIndex = 0 + * while iIndex < iLen: + */ + __Pyx_INCREF(__pyx_int_0); + __pyx_v_iTemp = __pyx_int_0; + + /* "py_t2sdk.pyx":304 + * lpBuff = [] + * cdef iTemp = 0 + * cdef int iIndex = 0 # <<<<<<<<<<<<<< + * while iIndex < iLen: + * iTemp = sBuff[iIndex] + */ + __pyx_v_iIndex = 0; + + /* "py_t2sdk.pyx":305 + * cdef iTemp = 0 + * cdef int iIndex = 0 + * while iIndex < iLen: # <<<<<<<<<<<<<< + * iTemp = sBuff[iIndex] + * lpBuff.append(iTemp) + */ + while (1) { + __pyx_t_2 = ((__pyx_v_iIndex < __pyx_v_iLen) != 0); + if (!__pyx_t_2) break; + + /* "py_t2sdk.pyx":306 + * cdef int iIndex = 0 + * while iIndex < iLen: + * iTemp = sBuff[iIndex] # <<<<<<<<<<<<<< + * lpBuff.append(iTemp) + * iIndex +=1 + */ + __pyx_t_1 = __Pyx_PyInt_From_char((__pyx_v_sBuff[__pyx_v_iIndex])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_iTemp, __pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":307 + * while iIndex < iLen: + * iTemp = sBuff[iIndex] + * lpBuff.append(iTemp) # <<<<<<<<<<<<<< + * iIndex +=1 + * return lpBuff,iLen + */ + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_lpBuff, __pyx_v_iTemp); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 307, __pyx_L1_error) + + /* "py_t2sdk.pyx":308 + * iTemp = sBuff[iIndex] + * lpBuff.append(iTemp) + * iIndex +=1 # <<<<<<<<<<<<<< + * return lpBuff,iLen + * def SetIssueType(self,int nIssueType): + */ + __pyx_v_iIndex = (__pyx_v_iIndex + 1); + } + + /* "py_t2sdk.pyx":309 + * lpBuff.append(iTemp) + * iIndex +=1 + * return lpBuff,iLen # <<<<<<<<<<<<<< + * def SetIssueType(self,int nIssueType): + * self.lpBizMessage.SetIssueType(nIssueType) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_iLen); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_lpBuff); + __Pyx_GIVEREF(__pyx_v_lpBuff); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_lpBuff); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":299 + * self.lpBizMessage.SetContent(sBuff,iLen) + * free(sBuff) + * def GetContent(self): # <<<<<<<<<<<<<< + * cdef int iLen = 0 + * cdef char* sBuff = self.lpBizMessage.GetContent(iLen) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetContent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_lpBuff); + __Pyx_XDECREF(__pyx_v_iTemp); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":310 + * iIndex +=1 + * return lpBuff,iLen + * def SetIssueType(self,int nIssueType): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetIssueType(nIssueType) + * def GetIssueType(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_49SetIssueType(PyObject *__pyx_v_self, PyObject *__pyx_arg_nIssueType); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_49SetIssueType(PyObject *__pyx_v_self, PyObject *__pyx_arg_nIssueType) { + int __pyx_v_nIssueType; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetIssueType (wrapper)", 0); + assert(__pyx_arg_nIssueType); { + __pyx_v_nIssueType = __Pyx_PyInt_As_int(__pyx_arg_nIssueType); if (unlikely((__pyx_v_nIssueType == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 310, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetIssueType", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_48SetIssueType(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nIssueType)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_48SetIssueType(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nIssueType) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetIssueType", 0); + + /* "py_t2sdk.pyx":311 + * return lpBuff,iLen + * def SetIssueType(self,int nIssueType): + * self.lpBizMessage.SetIssueType(nIssueType) # <<<<<<<<<<<<<< + * def GetIssueType(self): + * return self.lpBizMessage.GetIssueType() + */ + __pyx_v_self->lpBizMessage->SetIssueType(__pyx_v_nIssueType); + + /* "py_t2sdk.pyx":310 + * iIndex +=1 + * return lpBuff,iLen + * def SetIssueType(self,int nIssueType): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetIssueType(nIssueType) + * def GetIssueType(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":312 + * def SetIssueType(self,int nIssueType): + * self.lpBizMessage.SetIssueType(nIssueType) + * def GetIssueType(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetIssueType() + * def SetSequeceNo(self,int nSequeceNo): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_51GetIssueType(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_51GetIssueType(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetIssueType (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_50GetIssueType(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_50GetIssueType(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetIssueType", 0); + + /* "py_t2sdk.pyx":313 + * self.lpBizMessage.SetIssueType(nIssueType) + * def GetIssueType(self): + * return self.lpBizMessage.GetIssueType() # <<<<<<<<<<<<<< + * def SetSequeceNo(self,int nSequeceNo): + * self.lpBizMessage.SetSequeceNo(nSequeceNo) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetIssueType()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":312 + * def SetIssueType(self,int nIssueType): + * self.lpBizMessage.SetIssueType(nIssueType) + * def GetIssueType(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetIssueType() + * def SetSequeceNo(self,int nSequeceNo): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetIssueType", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":314 + * def GetIssueType(self): + * return self.lpBizMessage.GetIssueType() + * def SetSequeceNo(self,int nSequeceNo): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetSequeceNo(nSequeceNo) + * def GetSequeceNo(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_53SetSequeceNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSequeceNo); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_53SetSequeceNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSequeceNo) { + int __pyx_v_nSequeceNo; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetSequeceNo (wrapper)", 0); + assert(__pyx_arg_nSequeceNo); { + __pyx_v_nSequeceNo = __Pyx_PyInt_As_int(__pyx_arg_nSequeceNo); if (unlikely((__pyx_v_nSequeceNo == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 314, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetSequeceNo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_52SetSequeceNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nSequeceNo)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_52SetSequeceNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nSequeceNo) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetSequeceNo", 0); + + /* "py_t2sdk.pyx":315 + * return self.lpBizMessage.GetIssueType() + * def SetSequeceNo(self,int nSequeceNo): + * self.lpBizMessage.SetSequeceNo(nSequeceNo) # <<<<<<<<<<<<<< + * def GetSequeceNo(self): + * return self.lpBizMessage.GetSequeceNo() + */ + __pyx_v_self->lpBizMessage->SetSequeceNo(__pyx_v_nSequeceNo); + + /* "py_t2sdk.pyx":314 + * def GetIssueType(self): + * return self.lpBizMessage.GetIssueType() + * def SetSequeceNo(self,int nSequeceNo): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetSequeceNo(nSequeceNo) + * def GetSequeceNo(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":316 + * def SetSequeceNo(self,int nSequeceNo): + * self.lpBizMessage.SetSequeceNo(nSequeceNo) + * def GetSequeceNo(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetSequeceNo() + * def SetKeyInfo(self,list lpKeyData,int iLen): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_55GetSequeceNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_55GetSequeceNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetSequeceNo (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_54GetSequeceNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_54GetSequeceNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetSequeceNo", 0); + + /* "py_t2sdk.pyx":317 + * self.lpBizMessage.SetSequeceNo(nSequeceNo) + * def GetSequeceNo(self): + * return self.lpBizMessage.GetSequeceNo() # <<<<<<<<<<<<<< + * def SetKeyInfo(self,list lpKeyData,int iLen): + * cdef char* sBuff = malloc(iLen) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetSequeceNo()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":316 + * def SetSequeceNo(self,int nSequeceNo): + * self.lpBizMessage.SetSequeceNo(nSequeceNo) + * def GetSequeceNo(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetSequeceNo() + * def SetKeyInfo(self,list lpKeyData,int iLen): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetSequeceNo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":318 + * def GetSequeceNo(self): + * return self.lpBizMessage.GetSequeceNo() + * def SetKeyInfo(self,list lpKeyData,int iLen): # <<<<<<<<<<<<<< + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_57SetKeyInfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_57SetKeyInfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_lpKeyData = 0; + int __pyx_v_iLen; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetKeyInfo (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpKeyData,&__pyx_n_s_iLen,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpKeyData)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iLen)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("SetKeyInfo", 1, 2, 2, 1); __PYX_ERR(1, 318, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetKeyInfo") < 0)) __PYX_ERR(1, 318, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_lpKeyData = ((PyObject*)values[0]); + __pyx_v_iLen = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_iLen == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 318, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("SetKeyInfo", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 318, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetKeyInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpKeyData), (&PyList_Type), 1, "lpKeyData", 1))) __PYX_ERR(1, 318, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_56SetKeyInfo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), __pyx_v_lpKeyData, __pyx_v_iLen); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_56SetKeyInfo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_lpKeyData, int __pyx_v_iLen) { + char *__pyx_v_sBuff; + int __pyx_v_iIndex; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + char __pyx_t_3; + __Pyx_RefNannySetupContext("SetKeyInfo", 0); + + /* "py_t2sdk.pyx":319 + * return self.lpBizMessage.GetSequeceNo() + * def SetKeyInfo(self,list lpKeyData,int iLen): + * cdef char* sBuff = malloc(iLen) # <<<<<<<<<<<<<< + * cdef int iIndex = 0 + * while iIndex < iLen: + */ + __pyx_v_sBuff = ((char *)malloc(__pyx_v_iLen)); + + /* "py_t2sdk.pyx":320 + * def SetKeyInfo(self,list lpKeyData,int iLen): + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 # <<<<<<<<<<<<<< + * while iIndex < iLen: + * sBuff[iIndex] = lpKeyData[iIndex] + */ + __pyx_v_iIndex = 0; + + /* "py_t2sdk.pyx":321 + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 + * while iIndex < iLen: # <<<<<<<<<<<<<< + * sBuff[iIndex] = lpKeyData[iIndex] + * iIndex+=1 + */ + while (1) { + __pyx_t_1 = ((__pyx_v_iIndex < __pyx_v_iLen) != 0); + if (!__pyx_t_1) break; + + /* "py_t2sdk.pyx":322 + * cdef int iIndex = 0 + * while iIndex < iLen: + * sBuff[iIndex] = lpKeyData[iIndex] # <<<<<<<<<<<<<< + * iIndex+=1 + * self.lpBizMessage.SetKeyInfo(sBuff,iLen) + */ + if (unlikely(__pyx_v_lpKeyData == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 322, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_lpKeyData, __pyx_v_iIndex, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_As_char(__pyx_t_2); if (unlikely((__pyx_t_3 == (char)-1) && PyErr_Occurred())) __PYX_ERR(1, 322, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + (__pyx_v_sBuff[__pyx_v_iIndex]) = __pyx_t_3; + + /* "py_t2sdk.pyx":323 + * while iIndex < iLen: + * sBuff[iIndex] = lpKeyData[iIndex] + * iIndex+=1 # <<<<<<<<<<<<<< + * self.lpBizMessage.SetKeyInfo(sBuff,iLen) + * def GetKeyInfo(self): + */ + __pyx_v_iIndex = (__pyx_v_iIndex + 1); + } + + /* "py_t2sdk.pyx":324 + * sBuff[iIndex] = lpKeyData[iIndex] + * iIndex+=1 + * self.lpBizMessage.SetKeyInfo(sBuff,iLen) # <<<<<<<<<<<<<< + * def GetKeyInfo(self): + * cdef int iLen = 0 + */ + __pyx_v_self->lpBizMessage->SetKeyInfo(__pyx_v_sBuff, __pyx_v_iLen); + + /* "py_t2sdk.pyx":318 + * def GetSequeceNo(self): + * return self.lpBizMessage.GetSequeceNo() + * def SetKeyInfo(self,list lpKeyData,int iLen): # <<<<<<<<<<<<<< + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetKeyInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":325 + * iIndex+=1 + * self.lpBizMessage.SetKeyInfo(sBuff,iLen) + * def GetKeyInfo(self): # <<<<<<<<<<<<<< + * cdef int iLen = 0 + * cdef int itemp = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_59GetKeyInfo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_59GetKeyInfo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetKeyInfo (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_58GetKeyInfo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_58GetKeyInfo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + int __pyx_v_iLen; + CYTHON_UNUSED int __pyx_v_itemp; + char *__pyx_v_sBuff; + PyObject *__pyx_v_lpBuff = NULL; + int __pyx_v_iIndex; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("GetKeyInfo", 0); + + /* "py_t2sdk.pyx":326 + * self.lpBizMessage.SetKeyInfo(sBuff,iLen) + * def GetKeyInfo(self): + * cdef int iLen = 0 # <<<<<<<<<<<<<< + * cdef int itemp = 0 + * cdef char* sBuff = self.lpBizMessage.GetKeyInfo(iLen) + */ + __pyx_v_iLen = 0; + + /* "py_t2sdk.pyx":327 + * def GetKeyInfo(self): + * cdef int iLen = 0 + * cdef int itemp = 0 # <<<<<<<<<<<<<< + * cdef char* sBuff = self.lpBizMessage.GetKeyInfo(iLen) + * lpBuff = [] + */ + __pyx_v_itemp = 0; + + /* "py_t2sdk.pyx":328 + * cdef int iLen = 0 + * cdef int itemp = 0 + * cdef char* sBuff = self.lpBizMessage.GetKeyInfo(iLen) # <<<<<<<<<<<<<< + * lpBuff = [] + * cdef int iIndex = 0 + */ + __pyx_v_sBuff = __pyx_v_self->lpBizMessage->GetKeyInfo(__pyx_v_iLen); + + /* "py_t2sdk.pyx":329 + * cdef int itemp = 0 + * cdef char* sBuff = self.lpBizMessage.GetKeyInfo(iLen) + * lpBuff = [] # <<<<<<<<<<<<<< + * cdef int iIndex = 0 + * while iIndex < iLen: + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_lpBuff = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":330 + * cdef char* sBuff = self.lpBizMessage.GetKeyInfo(iLen) + * lpBuff = [] + * cdef int iIndex = 0 # <<<<<<<<<<<<<< + * while iIndex < iLen: + * lpBuff.append(sBuff[iIndex]) + */ + __pyx_v_iIndex = 0; + + /* "py_t2sdk.pyx":331 + * lpBuff = [] + * cdef int iIndex = 0 + * while iIndex < iLen: # <<<<<<<<<<<<<< + * lpBuff.append(sBuff[iIndex]) + * iIndex +=1 + */ + while (1) { + __pyx_t_2 = ((__pyx_v_iIndex < __pyx_v_iLen) != 0); + if (!__pyx_t_2) break; + + /* "py_t2sdk.pyx":332 + * cdef int iIndex = 0 + * while iIndex < iLen: + * lpBuff.append(sBuff[iIndex]) # <<<<<<<<<<<<<< + * iIndex +=1 + * return lpBuff,iLen + */ + __pyx_t_1 = __Pyx_PyInt_From_char((__pyx_v_sBuff[__pyx_v_iIndex])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_lpBuff, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 332, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":333 + * while iIndex < iLen: + * lpBuff.append(sBuff[iIndex]) + * iIndex +=1 # <<<<<<<<<<<<<< + * return lpBuff,iLen + * def SetAppData(self,str lpAppdata,int nAppLen): + */ + __pyx_v_iIndex = (__pyx_v_iIndex + 1); + } + + /* "py_t2sdk.pyx":334 + * lpBuff.append(sBuff[iIndex]) + * iIndex +=1 + * return lpBuff,iLen # <<<<<<<<<<<<<< + * def SetAppData(self,str lpAppdata,int nAppLen): + * sAppData = bytes(lpAppdata,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_iLen); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 334, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 334, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_lpBuff); + __Pyx_GIVEREF(__pyx_v_lpBuff); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_lpBuff); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":325 + * iIndex+=1 + * self.lpBizMessage.SetKeyInfo(sBuff,iLen) + * def GetKeyInfo(self): # <<<<<<<<<<<<<< + * cdef int iLen = 0 + * cdef int itemp = 0 + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetKeyInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_lpBuff); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":335 + * iIndex +=1 + * return lpBuff,iLen + * def SetAppData(self,str lpAppdata,int nAppLen): # <<<<<<<<<<<<<< + * sAppData = bytes(lpAppdata,encoding='utf-8') + * self.lpBizMessage.SetAppData(sAppData,nAppLen) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_61SetAppData(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_61SetAppData(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_lpAppdata = 0; + int __pyx_v_nAppLen; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetAppData (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpAppdata,&__pyx_n_s_nAppLen,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpAppdata)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nAppLen)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("SetAppData", 1, 2, 2, 1); __PYX_ERR(1, 335, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetAppData") < 0)) __PYX_ERR(1, 335, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_lpAppdata = ((PyObject*)values[0]); + __pyx_v_nAppLen = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nAppLen == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 335, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("SetAppData", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 335, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetAppData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpAppdata), (&PyString_Type), 1, "lpAppdata", 1))) __PYX_ERR(1, 335, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_60SetAppData(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), __pyx_v_lpAppdata, __pyx_v_nAppLen); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_60SetAppData(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_lpAppdata, int __pyx_v_nAppLen) { + PyObject *__pyx_v_sAppData = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("SetAppData", 0); + + /* "py_t2sdk.pyx":336 + * return lpBuff,iLen + * def SetAppData(self,str lpAppdata,int nAppLen): + * sAppData = bytes(lpAppdata,encoding='utf-8') # <<<<<<<<<<<<<< + * self.lpBizMessage.SetAppData(sAppData,nAppLen) + * def GetAppData(self): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 336, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_lpAppdata); + __Pyx_GIVEREF(__pyx_v_lpAppdata); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_lpAppdata); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 336, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 336, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 336, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sAppData = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":337 + * def SetAppData(self,str lpAppdata,int nAppLen): + * sAppData = bytes(lpAppdata,encoding='utf-8') + * self.lpBizMessage.SetAppData(sAppData,nAppLen) # <<<<<<<<<<<<<< + * def GetAppData(self): + * cdef int iLen = 0 + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sAppData); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 337, __pyx_L1_error) + __pyx_v_self->lpBizMessage->SetAppData(__pyx_t_4, __pyx_v_nAppLen); + + /* "py_t2sdk.pyx":335 + * iIndex +=1 + * return lpBuff,iLen + * def SetAppData(self,str lpAppdata,int nAppLen): # <<<<<<<<<<<<<< + * sAppData = bytes(lpAppdata,encoding='utf-8') + * self.lpBizMessage.SetAppData(sAppData,nAppLen) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetAppData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sAppData); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":338 + * sAppData = bytes(lpAppdata,encoding='utf-8') + * self.lpBizMessage.SetAppData(sAppData,nAppLen) + * def GetAppData(self): # <<<<<<<<<<<<<< + * cdef int iLen = 0 + * cdef char* sAppData = self.lpBizMessage.GetAppData(iLen) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_63GetAppData(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_63GetAppData(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetAppData (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_62GetAppData(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_62GetAppData(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + int __pyx_v_iLen; + char *__pyx_v_sAppData; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("GetAppData", 0); + + /* "py_t2sdk.pyx":339 + * self.lpBizMessage.SetAppData(sAppData,nAppLen) + * def GetAppData(self): + * cdef int iLen = 0 # <<<<<<<<<<<<<< + * cdef char* sAppData = self.lpBizMessage.GetAppData(iLen) + * return sAppData,iLen + */ + __pyx_v_iLen = 0; + + /* "py_t2sdk.pyx":340 + * def GetAppData(self): + * cdef int iLen = 0 + * cdef char* sAppData = self.lpBizMessage.GetAppData(iLen) # <<<<<<<<<<<<<< + * return sAppData,iLen + * def ChangeReq2AnsMessage(self): + */ + __pyx_v_sAppData = __pyx_v_self->lpBizMessage->GetAppData(__pyx_v_iLen); + + /* "py_t2sdk.pyx":341 + * cdef int iLen = 0 + * cdef char* sAppData = self.lpBizMessage.GetAppData(iLen) + * return sAppData,iLen # <<<<<<<<<<<<<< + * def ChangeReq2AnsMessage(self): + * self.lpBizMessage.ChangeReq2AnsMessage() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sAppData); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_iLen); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":338 + * sAppData = bytes(lpAppdata,encoding='utf-8') + * self.lpBizMessage.SetAppData(sAppData,nAppLen) + * def GetAppData(self): # <<<<<<<<<<<<<< + * cdef int iLen = 0 + * cdef char* sAppData = self.lpBizMessage.GetAppData(iLen) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetAppData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":342 + * cdef char* sAppData = self.lpBizMessage.GetAppData(iLen) + * return sAppData,iLen + * def ChangeReq2AnsMessage(self): # <<<<<<<<<<<<<< + * self.lpBizMessage.ChangeReq2AnsMessage() + * def GetBuff(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_65ChangeReq2AnsMessage(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_65ChangeReq2AnsMessage(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ChangeReq2AnsMessage (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_64ChangeReq2AnsMessage(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_64ChangeReq2AnsMessage(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ChangeReq2AnsMessage", 0); + + /* "py_t2sdk.pyx":343 + * return sAppData,iLen + * def ChangeReq2AnsMessage(self): + * self.lpBizMessage.ChangeReq2AnsMessage() # <<<<<<<<<<<<<< + * def GetBuff(self): + * cdef int iLen = 0 + */ + (void)(__pyx_v_self->lpBizMessage->ChangeReq2AnsMessage()); + + /* "py_t2sdk.pyx":342 + * cdef char* sAppData = self.lpBizMessage.GetAppData(iLen) + * return sAppData,iLen + * def ChangeReq2AnsMessage(self): # <<<<<<<<<<<<<< + * self.lpBizMessage.ChangeReq2AnsMessage() + * def GetBuff(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":344 + * def ChangeReq2AnsMessage(self): + * self.lpBizMessage.ChangeReq2AnsMessage() + * def GetBuff(self): # <<<<<<<<<<<<<< + * cdef int iLen = 0 + * cdef iTemp = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_67GetBuff(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_67GetBuff(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetBuff (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_66GetBuff(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_66GetBuff(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + int __pyx_v_iLen; + PyObject *__pyx_v_iTemp = 0; + char *__pyx_v_sBuff; + PyObject *__pyx_v_lpBuff = NULL; + int __pyx_v_iIndex; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("GetBuff", 0); + + /* "py_t2sdk.pyx":345 + * self.lpBizMessage.ChangeReq2AnsMessage() + * def GetBuff(self): + * cdef int iLen = 0 # <<<<<<<<<<<<<< + * cdef iTemp = 0 + * cdef char* sBuff = self.lpBizMessage.GetBuff(iLen) + */ + __pyx_v_iLen = 0; + + /* "py_t2sdk.pyx":346 + * def GetBuff(self): + * cdef int iLen = 0 + * cdef iTemp = 0 # <<<<<<<<<<<<<< + * cdef char* sBuff = self.lpBizMessage.GetBuff(iLen) + * lpBuff = [] + */ + __Pyx_INCREF(__pyx_int_0); + __pyx_v_iTemp = __pyx_int_0; + + /* "py_t2sdk.pyx":347 + * cdef int iLen = 0 + * cdef iTemp = 0 + * cdef char* sBuff = self.lpBizMessage.GetBuff(iLen) # <<<<<<<<<<<<<< + * lpBuff = [] + * cdef int iIndex = 0 + */ + __pyx_v_sBuff = __pyx_v_self->lpBizMessage->GetBuff(__pyx_v_iLen); + + /* "py_t2sdk.pyx":348 + * cdef iTemp = 0 + * cdef char* sBuff = self.lpBizMessage.GetBuff(iLen) + * lpBuff = [] # <<<<<<<<<<<<<< + * cdef int iIndex = 0 + * while iIndex < iLen: + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 348, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_lpBuff = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":349 + * cdef char* sBuff = self.lpBizMessage.GetBuff(iLen) + * lpBuff = [] + * cdef int iIndex = 0 # <<<<<<<<<<<<<< + * while iIndex < iLen: + * iTemp = sBuff[iIndex] + */ + __pyx_v_iIndex = 0; + + /* "py_t2sdk.pyx":350 + * lpBuff = [] + * cdef int iIndex = 0 + * while iIndex < iLen: # <<<<<<<<<<<<<< + * iTemp = sBuff[iIndex] + * lpBuff.append(iTemp) + */ + while (1) { + __pyx_t_2 = ((__pyx_v_iIndex < __pyx_v_iLen) != 0); + if (!__pyx_t_2) break; + + /* "py_t2sdk.pyx":351 + * cdef int iIndex = 0 + * while iIndex < iLen: + * iTemp = sBuff[iIndex] # <<<<<<<<<<<<<< + * lpBuff.append(iTemp) + * iIndex +=1 + */ + __pyx_t_1 = __Pyx_PyInt_From_char((__pyx_v_sBuff[__pyx_v_iIndex])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_iTemp, __pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":352 + * while iIndex < iLen: + * iTemp = sBuff[iIndex] + * lpBuff.append(iTemp) # <<<<<<<<<<<<<< + * iIndex +=1 + * return lpBuff,iLen + */ + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_lpBuff, __pyx_v_iTemp); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 352, __pyx_L1_error) + + /* "py_t2sdk.pyx":353 + * iTemp = sBuff[iIndex] + * lpBuff.append(iTemp) + * iIndex +=1 # <<<<<<<<<<<<<< + * return lpBuff,iLen + * def SetBuff(self,list lpBuff,int nBuffLen): + */ + __pyx_v_iIndex = (__pyx_v_iIndex + 1); + } + + /* "py_t2sdk.pyx":354 + * lpBuff.append(iTemp) + * iIndex +=1 + * return lpBuff,iLen # <<<<<<<<<<<<<< + * def SetBuff(self,list lpBuff,int nBuffLen): + * cdef char* sBuff = malloc(nBuffLen) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_iLen); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_lpBuff); + __Pyx_GIVEREF(__pyx_v_lpBuff); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_lpBuff); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":344 + * def ChangeReq2AnsMessage(self): + * self.lpBizMessage.ChangeReq2AnsMessage() + * def GetBuff(self): # <<<<<<<<<<<<<< + * cdef int iLen = 0 + * cdef iTemp = 0 + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetBuff", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_iTemp); + __Pyx_XDECREF(__pyx_v_lpBuff); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":355 + * iIndex +=1 + * return lpBuff,iLen + * def SetBuff(self,list lpBuff,int nBuffLen): # <<<<<<<<<<<<<< + * cdef char* sBuff = malloc(nBuffLen) + * cdef int iIndex = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_69SetBuff(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_69SetBuff(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_lpBuff = 0; + int __pyx_v_nBuffLen; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetBuff (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpBuff,&__pyx_n_s_nBuffLen,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpBuff)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nBuffLen)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("SetBuff", 1, 2, 2, 1); __PYX_ERR(1, 355, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetBuff") < 0)) __PYX_ERR(1, 355, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_lpBuff = ((PyObject*)values[0]); + __pyx_v_nBuffLen = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nBuffLen == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 355, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("SetBuff", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 355, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetBuff", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpBuff), (&PyList_Type), 1, "lpBuff", 1))) __PYX_ERR(1, 355, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_68SetBuff(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), __pyx_v_lpBuff, __pyx_v_nBuffLen); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_68SetBuff(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_lpBuff, int __pyx_v_nBuffLen) { + char *__pyx_v_sBuff; + int __pyx_v_iIndex; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + char __pyx_t_3; + __Pyx_RefNannySetupContext("SetBuff", 0); + + /* "py_t2sdk.pyx":356 + * return lpBuff,iLen + * def SetBuff(self,list lpBuff,int nBuffLen): + * cdef char* sBuff = malloc(nBuffLen) # <<<<<<<<<<<<<< + * cdef int iIndex = 0 + * while iIndex < nBuffLen: + */ + __pyx_v_sBuff = ((char *)malloc(__pyx_v_nBuffLen)); + + /* "py_t2sdk.pyx":357 + * def SetBuff(self,list lpBuff,int nBuffLen): + * cdef char* sBuff = malloc(nBuffLen) + * cdef int iIndex = 0 # <<<<<<<<<<<<<< + * while iIndex < nBuffLen: + * sBuff[iIndex] = lpBuff[iIndex] + */ + __pyx_v_iIndex = 0; + + /* "py_t2sdk.pyx":358 + * cdef char* sBuff = malloc(nBuffLen) + * cdef int iIndex = 0 + * while iIndex < nBuffLen: # <<<<<<<<<<<<<< + * sBuff[iIndex] = lpBuff[iIndex] + * iIndex+=1 + */ + while (1) { + __pyx_t_1 = ((__pyx_v_iIndex < __pyx_v_nBuffLen) != 0); + if (!__pyx_t_1) break; + + /* "py_t2sdk.pyx":359 + * cdef int iIndex = 0 + * while iIndex < nBuffLen: + * sBuff[iIndex] = lpBuff[iIndex] # <<<<<<<<<<<<<< + * iIndex+=1 + * self.lpBizMessage.SetBuff(sBuff,nBuffLen) + */ + if (unlikely(__pyx_v_lpBuff == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 359, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_lpBuff, __pyx_v_iIndex, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_As_char(__pyx_t_2); if (unlikely((__pyx_t_3 == (char)-1) && PyErr_Occurred())) __PYX_ERR(1, 359, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + (__pyx_v_sBuff[__pyx_v_iIndex]) = __pyx_t_3; + + /* "py_t2sdk.pyx":360 + * while iIndex < nBuffLen: + * sBuff[iIndex] = lpBuff[iIndex] + * iIndex+=1 # <<<<<<<<<<<<<< + * self.lpBizMessage.SetBuff(sBuff,nBuffLen) + * def ReSet(self): + */ + __pyx_v_iIndex = (__pyx_v_iIndex + 1); + } + + /* "py_t2sdk.pyx":361 + * sBuff[iIndex] = lpBuff[iIndex] + * iIndex+=1 + * self.lpBizMessage.SetBuff(sBuff,nBuffLen) # <<<<<<<<<<<<<< + * def ReSet(self): + * self.lpBizMessage.ReSet() + */ + (void)(__pyx_v_self->lpBizMessage->SetBuff(__pyx_v_sBuff, __pyx_v_nBuffLen)); + + /* "py_t2sdk.pyx":355 + * iIndex +=1 + * return lpBuff,iLen + * def SetBuff(self,list lpBuff,int nBuffLen): # <<<<<<<<<<<<<< + * cdef char* sBuff = malloc(nBuffLen) + * cdef int iIndex = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetBuff", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":362 + * iIndex+=1 + * self.lpBizMessage.SetBuff(sBuff,nBuffLen) + * def ReSet(self): # <<<<<<<<<<<<<< + * self.lpBizMessage.ReSet() + * def Release(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_71ReSet(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_71ReSet(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ReSet (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_70ReSet(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_70ReSet(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ReSet", 0); + + /* "py_t2sdk.pyx":363 + * self.lpBizMessage.SetBuff(sBuff,nBuffLen) + * def ReSet(self): + * self.lpBizMessage.ReSet() # <<<<<<<<<<<<<< + * def Release(self): + * self.lpBizMessage.Release() + */ + __pyx_v_self->lpBizMessage->ReSet(); + + /* "py_t2sdk.pyx":362 + * iIndex+=1 + * self.lpBizMessage.SetBuff(sBuff,nBuffLen) + * def ReSet(self): # <<<<<<<<<<<<<< + * self.lpBizMessage.ReSet() + * def Release(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":364 + * def ReSet(self): + * self.lpBizMessage.ReSet() + * def Release(self): # <<<<<<<<<<<<<< + * self.lpBizMessage.Release() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_73Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_73Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Release (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_72Release(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_72Release(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Release", 0); + + /* "py_t2sdk.pyx":365 + * self.lpBizMessage.ReSet() + * def Release(self): + * self.lpBizMessage.Release() # <<<<<<<<<<<<<< + * + * cdef class pySubscribeParamInterface: + */ + __pyx_v_self->lpBizMessage->Release(); + + /* "py_t2sdk.pyx":364 + * def ReSet(self): + * self.lpBizMessage.ReSet() + * def Release(self): # <<<<<<<<<<<<<< + * self.lpBizMessage.Release() + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_75__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_75__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_74__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_74__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_77__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_77__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_76__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_76__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":369 + * cdef class pySubscribeParamInterface: + * cdef c_CSubscribeParamInterface* lpSubscribeParam + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lpSubscribeParam = new c_CSubscribeParamInterface() + * def __dealloc__(self): + */ + +/* Python wrapper */ +static int __pyx_pw_8py_t2sdk_25pySubscribeParamInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_8py_t2sdk_25pySubscribeParamInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface___cinit__(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_8py_t2sdk_25pySubscribeParamInterface___cinit__(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + c_CSubscribeParamInterface *__pyx_t_1; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "py_t2sdk.pyx":370 + * cdef c_CSubscribeParamInterface* lpSubscribeParam + * def __cinit__(self): + * self.lpSubscribeParam = new c_CSubscribeParamInterface() # <<<<<<<<<<<<<< + * def __dealloc__(self): + * del self.lpSubscribeParam + */ + try { + __pyx_t_1 = new c_CSubscribeParamInterface(); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 370, __pyx_L1_error) + } + __pyx_v_self->lpSubscribeParam = __pyx_t_1; + + /* "py_t2sdk.pyx":369 + * cdef class pySubscribeParamInterface: + * cdef c_CSubscribeParamInterface* lpSubscribeParam + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lpSubscribeParam = new c_CSubscribeParamInterface() + * def __dealloc__(self): + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":371 + * def __cinit__(self): + * self.lpSubscribeParam = new c_CSubscribeParamInterface() + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.lpSubscribeParam + * def SetTopicName(self,str szName): + */ + +/* Python wrapper */ +static void __pyx_pw_8py_t2sdk_25pySubscribeParamInterface_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_8py_t2sdk_25pySubscribeParamInterface_3__dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_2__dealloc__(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_2__dealloc__(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__", 0); + + /* "py_t2sdk.pyx":372 + * self.lpSubscribeParam = new c_CSubscribeParamInterface() + * def __dealloc__(self): + * del self.lpSubscribeParam # <<<<<<<<<<<<<< + * def SetTopicName(self,str szName): + * sName = bytes(szName,encoding='utf-8') + */ + delete __pyx_v_self->lpSubscribeParam; + + /* "py_t2sdk.pyx":371 + * def __cinit__(self): + * self.lpSubscribeParam = new c_CSubscribeParamInterface() + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.lpSubscribeParam + * def SetTopicName(self,str szName): + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "py_t2sdk.pyx":373 + * def __dealloc__(self): + * del self.lpSubscribeParam + * def SetTopicName(self,str szName): # <<<<<<<<<<<<<< + * sName = bytes(szName,encoding='utf-8') + * self.lpSubscribeParam.SetTopicName(sName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_5SetTopicName(PyObject *__pyx_v_self, PyObject *__pyx_v_szName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_5SetTopicName(PyObject *__pyx_v_self, PyObject *__pyx_v_szName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetTopicName (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szName), (&PyString_Type), 1, "szName", 1))) __PYX_ERR(1, 373, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_4SetTopicName(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((PyObject*)__pyx_v_szName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_4SetTopicName(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_szName) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("SetTopicName", 0); + + /* "py_t2sdk.pyx":374 + * del self.lpSubscribeParam + * def SetTopicName(self,str szName): + * sName = bytes(szName,encoding='utf-8') # <<<<<<<<<<<<<< + * self.lpSubscribeParam.SetTopicName(sName) + * def SetAppData(self,str lpData,int iLen): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szName); + __Pyx_GIVEREF(__pyx_v_szName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 374, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":375 + * def SetTopicName(self,str szName): + * sName = bytes(szName,encoding='utf-8') + * self.lpSubscribeParam.SetTopicName(sName) # <<<<<<<<<<<<<< + * def SetAppData(self,str lpData,int iLen): + * sData = bytes(lpData,encoding='utf-8') + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 375, __pyx_L1_error) + __pyx_v_self->lpSubscribeParam->SetTopicName(__pyx_t_4); + + /* "py_t2sdk.pyx":373 + * def __dealloc__(self): + * del self.lpSubscribeParam + * def SetTopicName(self,str szName): # <<<<<<<<<<<<<< + * sName = bytes(szName,encoding='utf-8') + * self.lpSubscribeParam.SetTopicName(sName) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.SetTopicName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":376 + * sName = bytes(szName,encoding='utf-8') + * self.lpSubscribeParam.SetTopicName(sName) + * def SetAppData(self,str lpData,int iLen): # <<<<<<<<<<<<<< + * sData = bytes(lpData,encoding='utf-8') + * self.lpSubscribeParam.SetAppData(sData,iLen) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_7SetAppData(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_7SetAppData(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_lpData = 0; + int __pyx_v_iLen; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetAppData (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpData,&__pyx_n_s_iLen,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpData)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iLen)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("SetAppData", 1, 2, 2, 1); __PYX_ERR(1, 376, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetAppData") < 0)) __PYX_ERR(1, 376, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_lpData = ((PyObject*)values[0]); + __pyx_v_iLen = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_iLen == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 376, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("SetAppData", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 376, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.SetAppData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpData), (&PyString_Type), 1, "lpData", 1))) __PYX_ERR(1, 376, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_6SetAppData(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), __pyx_v_lpData, __pyx_v_iLen); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_6SetAppData(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_lpData, int __pyx_v_iLen) { + PyObject *__pyx_v_sData = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("SetAppData", 0); + + /* "py_t2sdk.pyx":377 + * self.lpSubscribeParam.SetTopicName(sName) + * def SetAppData(self,str lpData,int iLen): + * sData = bytes(lpData,encoding='utf-8') # <<<<<<<<<<<<<< + * self.lpSubscribeParam.SetAppData(sData,iLen) + * def SetFilter(self,str filterName,str filterValue): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_lpData); + __Pyx_GIVEREF(__pyx_v_lpData); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_lpData); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 377, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sData = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":378 + * def SetAppData(self,str lpData,int iLen): + * sData = bytes(lpData,encoding='utf-8') + * self.lpSubscribeParam.SetAppData(sData,iLen) # <<<<<<<<<<<<<< + * def SetFilter(self,str filterName,str filterValue): + * sName = bytes(filterName,encoding='utf-8') + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sData); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 378, __pyx_L1_error) + __pyx_v_self->lpSubscribeParam->SetAppData(__pyx_t_4, __pyx_v_iLen); + + /* "py_t2sdk.pyx":376 + * sName = bytes(szName,encoding='utf-8') + * self.lpSubscribeParam.SetTopicName(sName) + * def SetAppData(self,str lpData,int iLen): # <<<<<<<<<<<<<< + * sData = bytes(lpData,encoding='utf-8') + * self.lpSubscribeParam.SetAppData(sData,iLen) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.SetAppData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sData); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":379 + * sData = bytes(lpData,encoding='utf-8') + * self.lpSubscribeParam.SetAppData(sData,iLen) + * def SetFilter(self,str filterName,str filterValue): # <<<<<<<<<<<<<< + * sName = bytes(filterName,encoding='utf-8') + * sValue = bytes(filterValue,encoding='utf-8') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_9SetFilter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_9SetFilter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_filterName = 0; + PyObject *__pyx_v_filterValue = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetFilter (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filterName,&__pyx_n_s_filterValue,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filterName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filterValue)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("SetFilter", 1, 2, 2, 1); __PYX_ERR(1, 379, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetFilter") < 0)) __PYX_ERR(1, 379, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_filterName = ((PyObject*)values[0]); + __pyx_v_filterValue = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("SetFilter", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 379, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.SetFilter", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filterName), (&PyString_Type), 1, "filterName", 1))) __PYX_ERR(1, 379, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filterValue), (&PyString_Type), 1, "filterValue", 1))) __PYX_ERR(1, 379, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_8SetFilter(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), __pyx_v_filterName, __pyx_v_filterValue); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_8SetFilter(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_filterName, PyObject *__pyx_v_filterValue) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_v_sValue = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + char *__pyx_t_5; + __Pyx_RefNannySetupContext("SetFilter", 0); + + /* "py_t2sdk.pyx":380 + * self.lpSubscribeParam.SetAppData(sData,iLen) + * def SetFilter(self,str filterName,str filterValue): + * sName = bytes(filterName,encoding='utf-8') # <<<<<<<<<<<<<< + * sValue = bytes(filterValue,encoding='utf-8') + * self.lpSubscribeParam.SetFilter(sName,sValue) + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_filterName); + __Pyx_GIVEREF(__pyx_v_filterName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filterName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 380, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":381 + * def SetFilter(self,str filterName,str filterValue): + * sName = bytes(filterName,encoding='utf-8') + * sValue = bytes(filterValue,encoding='utf-8') # <<<<<<<<<<<<<< + * self.lpSubscribeParam.SetFilter(sName,sValue) + * def SetReturnFiled(self,str filedName): + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_filterValue); + __Pyx_GIVEREF(__pyx_v_filterValue); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_filterValue); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 381, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sValue = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":382 + * sName = bytes(filterName,encoding='utf-8') + * sValue = bytes(filterValue,encoding='utf-8') + * self.lpSubscribeParam.SetFilter(sName,sValue) # <<<<<<<<<<<<<< + * def SetReturnFiled(self,str filedName): + * sName = bytes(filedName,encoding='utf-8') + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 382, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_sValue); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 382, __pyx_L1_error) + __pyx_v_self->lpSubscribeParam->SetFilter(__pyx_t_4, __pyx_t_5); + + /* "py_t2sdk.pyx":379 + * sData = bytes(lpData,encoding='utf-8') + * self.lpSubscribeParam.SetAppData(sData,iLen) + * def SetFilter(self,str filterName,str filterValue): # <<<<<<<<<<<<<< + * sName = bytes(filterName,encoding='utf-8') + * sValue = bytes(filterValue,encoding='utf-8') + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.SetFilter", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XDECREF(__pyx_v_sValue); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":383 + * sValue = bytes(filterValue,encoding='utf-8') + * self.lpSubscribeParam.SetFilter(sName,sValue) + * def SetReturnFiled(self,str filedName): # <<<<<<<<<<<<<< + * sName = bytes(filedName,encoding='utf-8') + * self.lpSubscribeParam.SetReturnFiled(sName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_11SetReturnFiled(PyObject *__pyx_v_self, PyObject *__pyx_v_filedName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_11SetReturnFiled(PyObject *__pyx_v_self, PyObject *__pyx_v_filedName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetReturnFiled (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filedName), (&PyString_Type), 1, "filedName", 1))) __PYX_ERR(1, 383, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_10SetReturnFiled(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((PyObject*)__pyx_v_filedName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_10SetReturnFiled(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_filedName) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("SetReturnFiled", 0); + + /* "py_t2sdk.pyx":384 + * self.lpSubscribeParam.SetFilter(sName,sValue) + * def SetReturnFiled(self,str filedName): + * sName = bytes(filedName,encoding='utf-8') # <<<<<<<<<<<<<< + * self.lpSubscribeParam.SetReturnFiled(sName) + * def SetFromNow(self,int bFromNow): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 384, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_filedName); + __Pyx_GIVEREF(__pyx_v_filedName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filedName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 384, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 384, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 384, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":385 + * def SetReturnFiled(self,str filedName): + * sName = bytes(filedName,encoding='utf-8') + * self.lpSubscribeParam.SetReturnFiled(sName) # <<<<<<<<<<<<<< + * def SetFromNow(self,int bFromNow): + * self.lpSubscribeParam.SetFromNow(bFromNow) + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 385, __pyx_L1_error) + __pyx_v_self->lpSubscribeParam->SetReturnFiled(__pyx_t_4); + + /* "py_t2sdk.pyx":383 + * sValue = bytes(filterValue,encoding='utf-8') + * self.lpSubscribeParam.SetFilter(sName,sValue) + * def SetReturnFiled(self,str filedName): # <<<<<<<<<<<<<< + * sName = bytes(filedName,encoding='utf-8') + * self.lpSubscribeParam.SetReturnFiled(sName) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.SetReturnFiled", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":386 + * sName = bytes(filedName,encoding='utf-8') + * self.lpSubscribeParam.SetReturnFiled(sName) + * def SetFromNow(self,int bFromNow): # <<<<<<<<<<<<<< + * self.lpSubscribeParam.SetFromNow(bFromNow) + * def SetReplace(self,int bReplace): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_13SetFromNow(PyObject *__pyx_v_self, PyObject *__pyx_arg_bFromNow); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_13SetFromNow(PyObject *__pyx_v_self, PyObject *__pyx_arg_bFromNow) { + int __pyx_v_bFromNow; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetFromNow (wrapper)", 0); + assert(__pyx_arg_bFromNow); { + __pyx_v_bFromNow = __Pyx_PyInt_As_int(__pyx_arg_bFromNow); if (unlikely((__pyx_v_bFromNow == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 386, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.SetFromNow", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_12SetFromNow(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((int)__pyx_v_bFromNow)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_12SetFromNow(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_bFromNow) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetFromNow", 0); + + /* "py_t2sdk.pyx":387 + * self.lpSubscribeParam.SetReturnFiled(sName) + * def SetFromNow(self,int bFromNow): + * self.lpSubscribeParam.SetFromNow(bFromNow) # <<<<<<<<<<<<<< + * def SetReplace(self,int bReplace): + * self.lpSubscribeParam.SetReplace(bReplace) + */ + __pyx_v_self->lpSubscribeParam->SetFromNow(__pyx_v_bFromNow); + + /* "py_t2sdk.pyx":386 + * sName = bytes(filedName,encoding='utf-8') + * self.lpSubscribeParam.SetReturnFiled(sName) + * def SetFromNow(self,int bFromNow): # <<<<<<<<<<<<<< + * self.lpSubscribeParam.SetFromNow(bFromNow) + * def SetReplace(self,int bReplace): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":388 + * def SetFromNow(self,int bFromNow): + * self.lpSubscribeParam.SetFromNow(bFromNow) + * def SetReplace(self,int bReplace): # <<<<<<<<<<<<<< + * self.lpSubscribeParam.SetReplace(bReplace) + * def SetSendInterval(self,int nSendInterval): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_15SetReplace(PyObject *__pyx_v_self, PyObject *__pyx_arg_bReplace); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_15SetReplace(PyObject *__pyx_v_self, PyObject *__pyx_arg_bReplace) { + int __pyx_v_bReplace; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetReplace (wrapper)", 0); + assert(__pyx_arg_bReplace); { + __pyx_v_bReplace = __Pyx_PyInt_As_int(__pyx_arg_bReplace); if (unlikely((__pyx_v_bReplace == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 388, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.SetReplace", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_14SetReplace(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((int)__pyx_v_bReplace)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_14SetReplace(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_bReplace) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetReplace", 0); + + /* "py_t2sdk.pyx":389 + * self.lpSubscribeParam.SetFromNow(bFromNow) + * def SetReplace(self,int bReplace): + * self.lpSubscribeParam.SetReplace(bReplace) # <<<<<<<<<<<<<< + * def SetSendInterval(self,int nSendInterval): + * self.lpSubscribeParam.SetSendInterval(nSendInterval) + */ + __pyx_v_self->lpSubscribeParam->SetReplace(__pyx_v_bReplace); + + /* "py_t2sdk.pyx":388 + * def SetFromNow(self,int bFromNow): + * self.lpSubscribeParam.SetFromNow(bFromNow) + * def SetReplace(self,int bReplace): # <<<<<<<<<<<<<< + * self.lpSubscribeParam.SetReplace(bReplace) + * def SetSendInterval(self,int nSendInterval): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":390 + * def SetReplace(self,int bReplace): + * self.lpSubscribeParam.SetReplace(bReplace) + * def SetSendInterval(self,int nSendInterval): # <<<<<<<<<<<<<< + * self.lpSubscribeParam.SetSendInterval(nSendInterval) + * def GetTopicName(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_17SetSendInterval(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSendInterval); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_17SetSendInterval(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSendInterval) { + int __pyx_v_nSendInterval; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetSendInterval (wrapper)", 0); + assert(__pyx_arg_nSendInterval); { + __pyx_v_nSendInterval = __Pyx_PyInt_As_int(__pyx_arg_nSendInterval); if (unlikely((__pyx_v_nSendInterval == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 390, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.SetSendInterval", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_16SetSendInterval(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((int)__pyx_v_nSendInterval)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_16SetSendInterval(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_nSendInterval) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetSendInterval", 0); + + /* "py_t2sdk.pyx":391 + * self.lpSubscribeParam.SetReplace(bReplace) + * def SetSendInterval(self,int nSendInterval): + * self.lpSubscribeParam.SetSendInterval(nSendInterval) # <<<<<<<<<<<<<< + * def GetTopicName(self): + * cdef char* sName = self.lpSubscribeParam.GetTopicName() + */ + __pyx_v_self->lpSubscribeParam->SetSendInterval(__pyx_v_nSendInterval); + + /* "py_t2sdk.pyx":390 + * def SetReplace(self,int bReplace): + * self.lpSubscribeParam.SetReplace(bReplace) + * def SetSendInterval(self,int nSendInterval): # <<<<<<<<<<<<<< + * self.lpSubscribeParam.SetSendInterval(nSendInterval) + * def GetTopicName(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":392 + * def SetSendInterval(self,int nSendInterval): + * self.lpSubscribeParam.SetSendInterval(nSendInterval) + * def GetTopicName(self): # <<<<<<<<<<<<<< + * cdef char* sName = self.lpSubscribeParam.GetTopicName() + * return sName + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_19GetTopicName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_19GetTopicName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetTopicName (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_18GetTopicName(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_18GetTopicName(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) { + char *__pyx_v_sName; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetTopicName", 0); + + /* "py_t2sdk.pyx":393 + * self.lpSubscribeParam.SetSendInterval(nSendInterval) + * def GetTopicName(self): + * cdef char* sName = self.lpSubscribeParam.GetTopicName() # <<<<<<<<<<<<<< + * return sName + * def GetAppData(self): + */ + __pyx_v_sName = __pyx_v_self->lpSubscribeParam->GetTopicName(); + + /* "py_t2sdk.pyx":394 + * def GetTopicName(self): + * cdef char* sName = self.lpSubscribeParam.GetTopicName() + * return sName # <<<<<<<<<<<<<< + * def GetAppData(self): + * cdef int iLen = 0 + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sName); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 394, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":392 + * def SetSendInterval(self,int nSendInterval): + * self.lpSubscribeParam.SetSendInterval(nSendInterval) + * def GetTopicName(self): # <<<<<<<<<<<<<< + * cdef char* sName = self.lpSubscribeParam.GetTopicName() + * return sName + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetTopicName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":395 + * cdef char* sName = self.lpSubscribeParam.GetTopicName() + * return sName + * def GetAppData(self): # <<<<<<<<<<<<<< + * cdef int iLen = 0 + * cdef char* sAppData = self.lpSubscribeParam.GetAppData(&iLen) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_21GetAppData(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_21GetAppData(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetAppData (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_20GetAppData(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_20GetAppData(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) { + int __pyx_v_iLen; + char *__pyx_v_sAppData; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("GetAppData", 0); + + /* "py_t2sdk.pyx":396 + * return sName + * def GetAppData(self): + * cdef int iLen = 0 # <<<<<<<<<<<<<< + * cdef char* sAppData = self.lpSubscribeParam.GetAppData(&iLen) + * return sAppData,iLen + */ + __pyx_v_iLen = 0; + + /* "py_t2sdk.pyx":397 + * def GetAppData(self): + * cdef int iLen = 0 + * cdef char* sAppData = self.lpSubscribeParam.GetAppData(&iLen) # <<<<<<<<<<<<<< + * return sAppData,iLen + * def GetFilterNameByIndex(self,int index): + */ + __pyx_v_sAppData = __pyx_v_self->lpSubscribeParam->GetAppData((&__pyx_v_iLen)); + + /* "py_t2sdk.pyx":398 + * cdef int iLen = 0 + * cdef char* sAppData = self.lpSubscribeParam.GetAppData(&iLen) + * return sAppData,iLen # <<<<<<<<<<<<<< + * def GetFilterNameByIndex(self,int index): + * cdef char* sName = self.lpSubscribeParam.GetFilterNameByIndex(index) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sAppData); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_iLen); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":395 + * cdef char* sName = self.lpSubscribeParam.GetTopicName() + * return sName + * def GetAppData(self): # <<<<<<<<<<<<<< + * cdef int iLen = 0 + * cdef char* sAppData = self.lpSubscribeParam.GetAppData(&iLen) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetAppData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":399 + * cdef char* sAppData = self.lpSubscribeParam.GetAppData(&iLen) + * return sAppData,iLen + * def GetFilterNameByIndex(self,int index): # <<<<<<<<<<<<<< + * cdef char* sName = self.lpSubscribeParam.GetFilterNameByIndex(index) + * return sName + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_23GetFilterNameByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_23GetFilterNameByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) { + int __pyx_v_index; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetFilterNameByIndex (wrapper)", 0); + assert(__pyx_arg_index); { + __pyx_v_index = __Pyx_PyInt_As_int(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 399, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetFilterNameByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_22GetFilterNameByIndex(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((int)__pyx_v_index)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_22GetFilterNameByIndex(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_index) { + char *__pyx_v_sName; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetFilterNameByIndex", 0); + + /* "py_t2sdk.pyx":400 + * return sAppData,iLen + * def GetFilterNameByIndex(self,int index): + * cdef char* sName = self.lpSubscribeParam.GetFilterNameByIndex(index) # <<<<<<<<<<<<<< + * return sName + * def GetFilterValueByIndex(self,int index): + */ + __pyx_v_sName = __pyx_v_self->lpSubscribeParam->GetFilterNameByIndex(__pyx_v_index); + + /* "py_t2sdk.pyx":401 + * def GetFilterNameByIndex(self,int index): + * cdef char* sName = self.lpSubscribeParam.GetFilterNameByIndex(index) + * return sName # <<<<<<<<<<<<<< + * def GetFilterValueByIndex(self,int index): + * cdef char* sName = self.lpSubscribeParam.GetFilterValueByIndex(index) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sName); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":399 + * cdef char* sAppData = self.lpSubscribeParam.GetAppData(&iLen) + * return sAppData,iLen + * def GetFilterNameByIndex(self,int index): # <<<<<<<<<<<<<< + * cdef char* sName = self.lpSubscribeParam.GetFilterNameByIndex(index) + * return sName + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetFilterNameByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":402 + * cdef char* sName = self.lpSubscribeParam.GetFilterNameByIndex(index) + * return sName + * def GetFilterValueByIndex(self,int index): # <<<<<<<<<<<<<< + * cdef char* sName = self.lpSubscribeParam.GetFilterValueByIndex(index) + * return sName + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_25GetFilterValueByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_25GetFilterValueByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) { + int __pyx_v_index; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetFilterValueByIndex (wrapper)", 0); + assert(__pyx_arg_index); { + __pyx_v_index = __Pyx_PyInt_As_int(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 402, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetFilterValueByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_24GetFilterValueByIndex(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((int)__pyx_v_index)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_24GetFilterValueByIndex(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_index) { + char *__pyx_v_sName; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetFilterValueByIndex", 0); + + /* "py_t2sdk.pyx":403 + * return sName + * def GetFilterValueByIndex(self,int index): + * cdef char* sName = self.lpSubscribeParam.GetFilterValueByIndex(index) # <<<<<<<<<<<<<< + * return sName + * def GetFilterValue(self,str fileName): + */ + __pyx_v_sName = __pyx_v_self->lpSubscribeParam->GetFilterValueByIndex(__pyx_v_index); + + /* "py_t2sdk.pyx":404 + * def GetFilterValueByIndex(self,int index): + * cdef char* sName = self.lpSubscribeParam.GetFilterValueByIndex(index) + * return sName # <<<<<<<<<<<<<< + * def GetFilterValue(self,str fileName): + * sName = bytes(fileName,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sName); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 404, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":402 + * cdef char* sName = self.lpSubscribeParam.GetFilterNameByIndex(index) + * return sName + * def GetFilterValueByIndex(self,int index): # <<<<<<<<<<<<<< + * cdef char* sName = self.lpSubscribeParam.GetFilterValueByIndex(index) + * return sName + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetFilterValueByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":405 + * cdef char* sName = self.lpSubscribeParam.GetFilterValueByIndex(index) + * return sName + * def GetFilterValue(self,str fileName): # <<<<<<<<<<<<<< + * sName = bytes(fileName,encoding='utf-8') + * sValus = self.lpSubscribeParam.GetFilterValue(sName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_27GetFilterValue(PyObject *__pyx_v_self, PyObject *__pyx_v_fileName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_27GetFilterValue(PyObject *__pyx_v_self, PyObject *__pyx_v_fileName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetFilterValue (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fileName), (&PyString_Type), 1, "fileName", 1))) __PYX_ERR(1, 405, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_26GetFilterValue(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((PyObject*)__pyx_v_fileName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_26GetFilterValue(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_fileName) { + PyObject *__pyx_v_sName = NULL; + char *__pyx_v_sValus; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("GetFilterValue", 0); + + /* "py_t2sdk.pyx":406 + * return sName + * def GetFilterValue(self,str fileName): + * sName = bytes(fileName,encoding='utf-8') # <<<<<<<<<<<<<< + * sValus = self.lpSubscribeParam.GetFilterValue(sName) + * return sValus + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 406, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_fileName); + __Pyx_GIVEREF(__pyx_v_fileName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_fileName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 406, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 406, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 406, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":407 + * def GetFilterValue(self,str fileName): + * sName = bytes(fileName,encoding='utf-8') + * sValus = self.lpSubscribeParam.GetFilterValue(sName) # <<<<<<<<<<<<<< + * return sValus + * def GetFilterCount(self): + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 407, __pyx_L1_error) + __pyx_v_sValus = __pyx_v_self->lpSubscribeParam->GetFilterValue(__pyx_t_4); + + /* "py_t2sdk.pyx":408 + * sName = bytes(fileName,encoding='utf-8') + * sValus = self.lpSubscribeParam.GetFilterValue(sName) + * return sValus # <<<<<<<<<<<<<< + * def GetFilterCount(self): + * return self.lpSubscribeParam.GetFilterCount() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_sValus); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 408, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":405 + * cdef char* sName = self.lpSubscribeParam.GetFilterValueByIndex(index) + * return sName + * def GetFilterValue(self,str fileName): # <<<<<<<<<<<<<< + * sName = bytes(fileName,encoding='utf-8') + * sValus = self.lpSubscribeParam.GetFilterValue(sName) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetFilterValue", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":409 + * sValus = self.lpSubscribeParam.GetFilterValue(sName) + * return sValus + * def GetFilterCount(self): # <<<<<<<<<<<<<< + * return self.lpSubscribeParam.GetFilterCount() + * def GetReturnFiled(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_29GetFilterCount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_29GetFilterCount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetFilterCount (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_28GetFilterCount(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_28GetFilterCount(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetFilterCount", 0); + + /* "py_t2sdk.pyx":410 + * return sValus + * def GetFilterCount(self): + * return self.lpSubscribeParam.GetFilterCount() # <<<<<<<<<<<<<< + * def GetReturnFiled(self): + * cdef char* sFields = self.lpSubscribeParam.GetReturnFiled() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpSubscribeParam->GetFilterCount()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 410, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":409 + * sValus = self.lpSubscribeParam.GetFilterValue(sName) + * return sValus + * def GetFilterCount(self): # <<<<<<<<<<<<<< + * return self.lpSubscribeParam.GetFilterCount() + * def GetReturnFiled(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetFilterCount", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":411 + * def GetFilterCount(self): + * return self.lpSubscribeParam.GetFilterCount() + * def GetReturnFiled(self): # <<<<<<<<<<<<<< + * cdef char* sFields = self.lpSubscribeParam.GetReturnFiled() + * return sFields + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_31GetReturnFiled(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_31GetReturnFiled(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetReturnFiled (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_30GetReturnFiled(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_30GetReturnFiled(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) { + char *__pyx_v_sFields; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetReturnFiled", 0); + + /* "py_t2sdk.pyx":412 + * return self.lpSubscribeParam.GetFilterCount() + * def GetReturnFiled(self): + * cdef char* sFields = self.lpSubscribeParam.GetReturnFiled() # <<<<<<<<<<<<<< + * return sFields + * def GetFromNow(self): + */ + __pyx_v_sFields = __pyx_v_self->lpSubscribeParam->GetReturnFiled(); + + /* "py_t2sdk.pyx":413 + * def GetReturnFiled(self): + * cdef char* sFields = self.lpSubscribeParam.GetReturnFiled() + * return sFields # <<<<<<<<<<<<<< + * def GetFromNow(self): + * cdef int bFromNow = self.lpSubscribeParam.GetFromNow() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sFields); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 413, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":411 + * def GetFilterCount(self): + * return self.lpSubscribeParam.GetFilterCount() + * def GetReturnFiled(self): # <<<<<<<<<<<<<< + * cdef char* sFields = self.lpSubscribeParam.GetReturnFiled() + * return sFields + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetReturnFiled", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":414 + * cdef char* sFields = self.lpSubscribeParam.GetReturnFiled() + * return sFields + * def GetFromNow(self): # <<<<<<<<<<<<<< + * cdef int bFromNow = self.lpSubscribeParam.GetFromNow() + * return bFromNow + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_33GetFromNow(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_33GetFromNow(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetFromNow (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_32GetFromNow(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_32GetFromNow(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) { + int __pyx_v_bFromNow; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetFromNow", 0); + + /* "py_t2sdk.pyx":415 + * return sFields + * def GetFromNow(self): + * cdef int bFromNow = self.lpSubscribeParam.GetFromNow() # <<<<<<<<<<<<<< + * return bFromNow + * def GetReplace(self): + */ + __pyx_v_bFromNow = __pyx_v_self->lpSubscribeParam->GetFromNow(); + + /* "py_t2sdk.pyx":416 + * def GetFromNow(self): + * cdef int bFromNow = self.lpSubscribeParam.GetFromNow() + * return bFromNow # <<<<<<<<<<<<<< + * def GetReplace(self): + * cdef int bRep = self.lpSubscribeParam.GetReplace() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_bFromNow); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":414 + * cdef char* sFields = self.lpSubscribeParam.GetReturnFiled() + * return sFields + * def GetFromNow(self): # <<<<<<<<<<<<<< + * cdef int bFromNow = self.lpSubscribeParam.GetFromNow() + * return bFromNow + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetFromNow", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":417 + * cdef int bFromNow = self.lpSubscribeParam.GetFromNow() + * return bFromNow + * def GetReplace(self): # <<<<<<<<<<<<<< + * cdef int bRep = self.lpSubscribeParam.GetReplace() + * return bRep + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_35GetReplace(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_35GetReplace(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetReplace (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_34GetReplace(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_34GetReplace(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) { + int __pyx_v_bRep; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetReplace", 0); + + /* "py_t2sdk.pyx":418 + * return bFromNow + * def GetReplace(self): + * cdef int bRep = self.lpSubscribeParam.GetReplace() # <<<<<<<<<<<<<< + * return bRep + * def GetSendInterval(self): + */ + __pyx_v_bRep = __pyx_v_self->lpSubscribeParam->GetReplace(); + + /* "py_t2sdk.pyx":419 + * def GetReplace(self): + * cdef int bRep = self.lpSubscribeParam.GetReplace() + * return bRep # <<<<<<<<<<<<<< + * def GetSendInterval(self): + * return self.lpSubscribeParam.GetSendInterval() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_bRep); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":417 + * cdef int bFromNow = self.lpSubscribeParam.GetFromNow() + * return bFromNow + * def GetReplace(self): # <<<<<<<<<<<<<< + * cdef int bRep = self.lpSubscribeParam.GetReplace() + * return bRep + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetReplace", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":420 + * cdef int bRep = self.lpSubscribeParam.GetReplace() + * return bRep + * def GetSendInterval(self): # <<<<<<<<<<<<<< + * return self.lpSubscribeParam.GetSendInterval() + * def Release(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_37GetSendInterval(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_37GetSendInterval(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetSendInterval (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_36GetSendInterval(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_36GetSendInterval(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetSendInterval", 0); + + /* "py_t2sdk.pyx":421 + * return bRep + * def GetSendInterval(self): + * return self.lpSubscribeParam.GetSendInterval() # <<<<<<<<<<<<<< + * def Release(self): + * return self.lpSubscribeParam.Release() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpSubscribeParam->GetSendInterval()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 421, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":420 + * cdef int bRep = self.lpSubscribeParam.GetReplace() + * return bRep + * def GetSendInterval(self): # <<<<<<<<<<<<<< + * return self.lpSubscribeParam.GetSendInterval() + * def Release(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetSendInterval", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":422 + * def GetSendInterval(self): + * return self.lpSubscribeParam.GetSendInterval() + * def Release(self): # <<<<<<<<<<<<<< + * return self.lpSubscribeParam.Release() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_39Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_39Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Release (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_38Release(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_38Release(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("Release", 0); + + /* "py_t2sdk.pyx":423 + * return self.lpSubscribeParam.GetSendInterval() + * def Release(self): + * return self.lpSubscribeParam.Release() # <<<<<<<<<<<<<< + * + * cdef class pySubCallBack: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_void_to_None(__pyx_v_self->lpSubscribeParam->Release()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":422 + * def GetSendInterval(self): + * return self.lpSubscribeParam.GetSendInterval() + * def Release(self): # <<<<<<<<<<<<<< + * return self.lpSubscribeParam.Release() + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.Release", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_41__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_41__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_40__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_40__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_43__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_43__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_42__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_42__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":427 + * cdef class pySubCallBack: + * cdef c_SubCallBack* lpSubCallBack + * def __cinit__(self,str lpMould,str lpClass): # <<<<<<<<<<<<<< + * sMould = bytes(lpMould,encoding='utf-8') + * sClass = bytes(lpClass,encoding='utf-8') + */ + +/* Python wrapper */ +static int __pyx_pw_8py_t2sdk_13pySubCallBack_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_8py_t2sdk_13pySubCallBack_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_lpMould = 0; + PyObject *__pyx_v_lpClass = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpMould,&__pyx_n_s_lpClass,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpMould)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpClass)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(1, 427, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 427, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_lpMould = ((PyObject*)values[0]); + __pyx_v_lpClass = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 427, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pySubCallBack.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpMould), (&PyString_Type), 1, "lpMould", 1))) __PYX_ERR(1, 427, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpClass), (&PyString_Type), 1, "lpClass", 1))) __PYX_ERR(1, 427, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pySubCallBack___cinit__(((struct __pyx_obj_8py_t2sdk_pySubCallBack *)__pyx_v_self), __pyx_v_lpMould, __pyx_v_lpClass); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_8py_t2sdk_13pySubCallBack___cinit__(struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_self, PyObject *__pyx_v_lpMould, PyObject *__pyx_v_lpClass) { + PyObject *__pyx_v_sMould = NULL; + PyObject *__pyx_v_sClass = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + char *__pyx_t_5; + c_SubCallBack *__pyx_t_6; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "py_t2sdk.pyx":428 + * cdef c_SubCallBack* lpSubCallBack + * def __cinit__(self,str lpMould,str lpClass): + * sMould = bytes(lpMould,encoding='utf-8') # <<<<<<<<<<<<<< + * sClass = bytes(lpClass,encoding='utf-8') + * self.lpSubCallBack = new c_SubCallBack(sMould,sClass) + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_lpMould); + __Pyx_GIVEREF(__pyx_v_lpMould); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_lpMould); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 428, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sMould = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":429 + * def __cinit__(self,str lpMould,str lpClass): + * sMould = bytes(lpMould,encoding='utf-8') + * sClass = bytes(lpClass,encoding='utf-8') # <<<<<<<<<<<<<< + * self.lpSubCallBack = new c_SubCallBack(sMould,sClass) + * def initInstance(self): + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_lpClass); + __Pyx_GIVEREF(__pyx_v_lpClass); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lpClass); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 429, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sClass = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":430 + * sMould = bytes(lpMould,encoding='utf-8') + * sClass = bytes(lpClass,encoding='utf-8') + * self.lpSubCallBack = new c_SubCallBack(sMould,sClass) # <<<<<<<<<<<<<< + * def initInstance(self): + * return self.lpSubCallBack.initInstance() + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sMould); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 430, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_sClass); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 430, __pyx_L1_error) + try { + __pyx_t_6 = new c_SubCallBack(__pyx_t_4, __pyx_t_5); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 430, __pyx_L1_error) + } + __pyx_v_self->lpSubCallBack = __pyx_t_6; + + /* "py_t2sdk.pyx":427 + * cdef class pySubCallBack: + * cdef c_SubCallBack* lpSubCallBack + * def __cinit__(self,str lpMould,str lpClass): # <<<<<<<<<<<<<< + * sMould = bytes(lpMould,encoding='utf-8') + * sClass = bytes(lpClass,encoding='utf-8') + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pySubCallBack.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sMould); + __Pyx_XDECREF(__pyx_v_sClass); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":431 + * sClass = bytes(lpClass,encoding='utf-8') + * self.lpSubCallBack = new c_SubCallBack(sMould,sClass) + * def initInstance(self): # <<<<<<<<<<<<<< + * return self.lpSubCallBack.initInstance() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pySubCallBack_3initInstance(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pySubCallBack_3initInstance(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("initInstance (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pySubCallBack_2initInstance(((struct __pyx_obj_8py_t2sdk_pySubCallBack *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pySubCallBack_2initInstance(struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("initInstance", 0); + + /* "py_t2sdk.pyx":432 + * self.lpSubCallBack = new c_SubCallBack(sMould,sClass) + * def initInstance(self): + * return self.lpSubCallBack.initInstance() # <<<<<<<<<<<<<< + * + * cdef class pySubscribeInterface: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpSubCallBack->initInstance()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 432, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":431 + * sClass = bytes(lpClass,encoding='utf-8') + * self.lpSubCallBack = new c_SubCallBack(sMould,sClass) + * def initInstance(self): # <<<<<<<<<<<<<< + * return self.lpSubCallBack.initInstance() + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubCallBack.initInstance", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pySubCallBack_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pySubCallBack_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pySubCallBack_4__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pySubCallBack *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pySubCallBack_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubCallBack.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pySubCallBack_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pySubCallBack_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pySubCallBack_6__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pySubCallBack *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pySubCallBack_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubCallBack.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":436 + * cdef class pySubscribeInterface: + * cdef c_CSubscribeInterface* lpSubcribe + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lpSubcribe = NULL + * def __dealloc__(self): + */ + +/* Python wrapper */ +static int __pyx_pw_8py_t2sdk_20pySubscribeInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_8py_t2sdk_20pySubscribeInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_8py_t2sdk_20pySubscribeInterface___cinit__(((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_8py_t2sdk_20pySubscribeInterface___cinit__(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "py_t2sdk.pyx":437 + * cdef c_CSubscribeInterface* lpSubcribe + * def __cinit__(self): + * self.lpSubcribe = NULL # <<<<<<<<<<<<<< + * def __dealloc__(self): + * if self.lpSubcribe != NULL: + */ + __pyx_v_self->lpSubcribe = NULL; + + /* "py_t2sdk.pyx":436 + * cdef class pySubscribeInterface: + * cdef c_CSubscribeInterface* lpSubcribe + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lpSubcribe = NULL + * def __dealloc__(self): + */ + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":438 + * def __cinit__(self): + * self.lpSubcribe = NULL + * def __dealloc__(self): # <<<<<<<<<<<<<< + * if self.lpSubcribe != NULL: + * del self.lpSubcribe + */ + +/* Python wrapper */ +static void __pyx_pw_8py_t2sdk_20pySubscribeInterface_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_8py_t2sdk_20pySubscribeInterface_3__dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_pf_8py_t2sdk_20pySubscribeInterface_2__dealloc__(((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_8py_t2sdk_20pySubscribeInterface_2__dealloc__(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self) { + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("__dealloc__", 0); + + /* "py_t2sdk.pyx":439 + * self.lpSubcribe = NULL + * def __dealloc__(self): + * if self.lpSubcribe != NULL: # <<<<<<<<<<<<<< + * del self.lpSubcribe + * self.lpSubcribe = NULL + */ + __pyx_t_1 = ((__pyx_v_self->lpSubcribe != NULL) != 0); + if (__pyx_t_1) { + + /* "py_t2sdk.pyx":440 + * def __dealloc__(self): + * if self.lpSubcribe != NULL: + * del self.lpSubcribe # <<<<<<<<<<<<<< + * self.lpSubcribe = NULL + * def SubscribeTopic(self,pySubscribeParamInterface lpSubParam,int uiTimeout,pyIF2UnPacker lpUnPack = None,pyIF2Packer lpPack = None): + */ + delete __pyx_v_self->lpSubcribe; + + /* "py_t2sdk.pyx":441 + * if self.lpSubcribe != NULL: + * del self.lpSubcribe + * self.lpSubcribe = NULL # <<<<<<<<<<<<<< + * def SubscribeTopic(self,pySubscribeParamInterface lpSubParam,int uiTimeout,pyIF2UnPacker lpUnPack = None,pyIF2Packer lpPack = None): + * cdef c_IF2UnPacker** lppBizUnPack = NULL + */ + __pyx_v_self->lpSubcribe = NULL; + + /* "py_t2sdk.pyx":439 + * self.lpSubcribe = NULL + * def __dealloc__(self): + * if self.lpSubcribe != NULL: # <<<<<<<<<<<<<< + * del self.lpSubcribe + * self.lpSubcribe = NULL + */ + } + + /* "py_t2sdk.pyx":438 + * def __cinit__(self): + * self.lpSubcribe = NULL + * def __dealloc__(self): # <<<<<<<<<<<<<< + * if self.lpSubcribe != NULL: + * del self.lpSubcribe + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "py_t2sdk.pyx":442 + * del self.lpSubcribe + * self.lpSubcribe = NULL + * def SubscribeTopic(self,pySubscribeParamInterface lpSubParam,int uiTimeout,pyIF2UnPacker lpUnPack = None,pyIF2Packer lpPack = None): # <<<<<<<<<<<<<< + * cdef c_IF2UnPacker** lppBizUnPack = NULL + * cdef c_IF2Packer* lpBizPack = NULL + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_5SubscribeTopic(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_5SubscribeTopic(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_lpSubParam = 0; + int __pyx_v_uiTimeout; + struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_lpUnPack = 0; + struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_lpPack = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SubscribeTopic (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpSubParam,&__pyx_n_s_uiTimeout,&__pyx_n_s_lpUnPack,&__pyx_n_s_lpPack,0}; + PyObject* values[4] = {0,0,0,0}; + values[2] = (PyObject *)((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)Py_None); + values[3] = (PyObject *)((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpSubParam)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_uiTimeout)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("SubscribeTopic", 0, 2, 4, 1); __PYX_ERR(1, 442, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpUnPack); + if (value) { values[2] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpPack); + if (value) { values[3] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SubscribeTopic") < 0)) __PYX_ERR(1, 442, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_lpSubParam = ((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)values[0]); + __pyx_v_uiTimeout = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_uiTimeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 442, __pyx_L3_error) + __pyx_v_lpUnPack = ((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)values[2]); + __pyx_v_lpPack = ((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)values[3]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("SubscribeTopic", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 442, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pySubscribeInterface.SubscribeTopic", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpSubParam), __pyx_ptype_8py_t2sdk_pySubscribeParamInterface, 1, "lpSubParam", 0))) __PYX_ERR(1, 442, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpUnPack), __pyx_ptype_8py_t2sdk_pyIF2UnPacker, 1, "lpUnPack", 0))) __PYX_ERR(1, 442, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpPack), __pyx_ptype_8py_t2sdk_pyIF2Packer, 1, "lpPack", 0))) __PYX_ERR(1, 442, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_20pySubscribeInterface_4SubscribeTopic(((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_v_self), __pyx_v_lpSubParam, __pyx_v_uiTimeout, __pyx_v_lpUnPack, __pyx_v_lpPack); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_4SubscribeTopic(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_lpSubParam, int __pyx_v_uiTimeout, struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_lpUnPack, struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_lpPack) { + c_IF2UnPacker **__pyx_v_lppBizUnPack; + c_IF2Packer *__pyx_v_lpBizPack; + int __pyx_v_ret; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + c_IF2Packer *__pyx_t_4; + __Pyx_RefNannySetupContext("SubscribeTopic", 0); + + /* "py_t2sdk.pyx":443 + * self.lpSubcribe = NULL + * def SubscribeTopic(self,pySubscribeParamInterface lpSubParam,int uiTimeout,pyIF2UnPacker lpUnPack = None,pyIF2Packer lpPack = None): + * cdef c_IF2UnPacker** lppBizUnPack = NULL # <<<<<<<<<<<<<< + * cdef c_IF2Packer* lpBizPack = NULL + * if lpUnPack != None and lpPack != None: + */ + __pyx_v_lppBizUnPack = NULL; + + /* "py_t2sdk.pyx":444 + * def SubscribeTopic(self,pySubscribeParamInterface lpSubParam,int uiTimeout,pyIF2UnPacker lpUnPack = None,pyIF2Packer lpPack = None): + * cdef c_IF2UnPacker** lppBizUnPack = NULL + * cdef c_IF2Packer* lpBizPack = NULL # <<<<<<<<<<<<<< + * if lpUnPack != None and lpPack != None: + * lppBizUnPack = &(lpUnPack.lpUnpacker) + */ + __pyx_v_lpBizPack = NULL; + + /* "py_t2sdk.pyx":445 + * cdef c_IF2UnPacker** lppBizUnPack = NULL + * cdef c_IF2Packer* lpBizPack = NULL + * if lpUnPack != None and lpPack != None: # <<<<<<<<<<<<<< + * lppBizUnPack = &(lpUnPack.lpUnpacker) + * lpBizPack = lpPack.lpPacker + */ + __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_lpUnPack), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 445, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 445, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_lpPack), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 445, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 445, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "py_t2sdk.pyx":446 + * cdef c_IF2Packer* lpBizPack = NULL + * if lpUnPack != None and lpPack != None: + * lppBizUnPack = &(lpUnPack.lpUnpacker) # <<<<<<<<<<<<<< + * lpBizPack = lpPack.lpPacker + * cdef int ret = self.lpSubcribe.SubscribeTopic(lpSubParam.lpSubscribeParam,uiTimeout,lppBizUnPack,lpBizPack) + */ + __pyx_v_lppBizUnPack = (&__pyx_v_lpUnPack->lpUnpacker); + + /* "py_t2sdk.pyx":447 + * if lpUnPack != None and lpPack != None: + * lppBizUnPack = &(lpUnPack.lpUnpacker) + * lpBizPack = lpPack.lpPacker # <<<<<<<<<<<<<< + * cdef int ret = self.lpSubcribe.SubscribeTopic(lpSubParam.lpSubscribeParam,uiTimeout,lppBizUnPack,lpBizPack) + * return ret + */ + __pyx_t_4 = __pyx_v_lpPack->lpPacker; + __pyx_v_lpBizPack = __pyx_t_4; + + /* "py_t2sdk.pyx":445 + * cdef c_IF2UnPacker** lppBizUnPack = NULL + * cdef c_IF2Packer* lpBizPack = NULL + * if lpUnPack != None and lpPack != None: # <<<<<<<<<<<<<< + * lppBizUnPack = &(lpUnPack.lpUnpacker) + * lpBizPack = lpPack.lpPacker + */ + } + + /* "py_t2sdk.pyx":448 + * lppBizUnPack = &(lpUnPack.lpUnpacker) + * lpBizPack = lpPack.lpPacker + * cdef int ret = self.lpSubcribe.SubscribeTopic(lpSubParam.lpSubscribeParam,uiTimeout,lppBizUnPack,lpBizPack) # <<<<<<<<<<<<<< + * return ret + * def CancelSubscribeTopic(self,int subscribeIndex): + */ + __pyx_v_ret = __pyx_v_self->lpSubcribe->SubscribeTopic(__pyx_v_lpSubParam->lpSubscribeParam, __pyx_v_uiTimeout, __pyx_v_lppBizUnPack, __pyx_v_lpBizPack); + + /* "py_t2sdk.pyx":449 + * lpBizPack = lpPack.lpPacker + * cdef int ret = self.lpSubcribe.SubscribeTopic(lpSubParam.lpSubscribeParam,uiTimeout,lppBizUnPack,lpBizPack) + * return ret # <<<<<<<<<<<<<< + * def CancelSubscribeTopic(self,int subscribeIndex): + * return self.lpSubcribe.CancelSubscribeTopic(subscribeIndex) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":442 + * del self.lpSubcribe + * self.lpSubcribe = NULL + * def SubscribeTopic(self,pySubscribeParamInterface lpSubParam,int uiTimeout,pyIF2UnPacker lpUnPack = None,pyIF2Packer lpPack = None): # <<<<<<<<<<<<<< + * cdef c_IF2UnPacker** lppBizUnPack = NULL + * cdef c_IF2Packer* lpBizPack = NULL + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("py_t2sdk.pySubscribeInterface.SubscribeTopic", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":450 + * cdef int ret = self.lpSubcribe.SubscribeTopic(lpSubParam.lpSubscribeParam,uiTimeout,lppBizUnPack,lpBizPack) + * return ret + * def CancelSubscribeTopic(self,int subscribeIndex): # <<<<<<<<<<<<<< + * return self.lpSubcribe.CancelSubscribeTopic(subscribeIndex) + * def GetSubcribeTopic(self,pyIF2Packer lpPack): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_7CancelSubscribeTopic(PyObject *__pyx_v_self, PyObject *__pyx_arg_subscribeIndex); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_7CancelSubscribeTopic(PyObject *__pyx_v_self, PyObject *__pyx_arg_subscribeIndex) { + int __pyx_v_subscribeIndex; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("CancelSubscribeTopic (wrapper)", 0); + assert(__pyx_arg_subscribeIndex); { + __pyx_v_subscribeIndex = __Pyx_PyInt_As_int(__pyx_arg_subscribeIndex); if (unlikely((__pyx_v_subscribeIndex == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 450, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pySubscribeInterface.CancelSubscribeTopic", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_20pySubscribeInterface_6CancelSubscribeTopic(((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_v_self), ((int)__pyx_v_subscribeIndex)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_6CancelSubscribeTopic(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self, int __pyx_v_subscribeIndex) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("CancelSubscribeTopic", 0); + + /* "py_t2sdk.pyx":451 + * return ret + * def CancelSubscribeTopic(self,int subscribeIndex): + * return self.lpSubcribe.CancelSubscribeTopic(subscribeIndex) # <<<<<<<<<<<<<< + * def GetSubcribeTopic(self,pyIF2Packer lpPack): + * return self.lpSubcribe.GetSubcribeTopic(lpPack.lpPacker) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpSubcribe->CancelSubscribeTopic(__pyx_v_subscribeIndex)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":450 + * cdef int ret = self.lpSubcribe.SubscribeTopic(lpSubParam.lpSubscribeParam,uiTimeout,lppBizUnPack,lpBizPack) + * return ret + * def CancelSubscribeTopic(self,int subscribeIndex): # <<<<<<<<<<<<<< + * return self.lpSubcribe.CancelSubscribeTopic(subscribeIndex) + * def GetSubcribeTopic(self,pyIF2Packer lpPack): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeInterface.CancelSubscribeTopic", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":452 + * def CancelSubscribeTopic(self,int subscribeIndex): + * return self.lpSubcribe.CancelSubscribeTopic(subscribeIndex) + * def GetSubcribeTopic(self,pyIF2Packer lpPack): # <<<<<<<<<<<<<< + * return self.lpSubcribe.GetSubcribeTopic(lpPack.lpPacker) + * def Release(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_9GetSubcribeTopic(PyObject *__pyx_v_self, PyObject *__pyx_v_lpPack); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_9GetSubcribeTopic(PyObject *__pyx_v_self, PyObject *__pyx_v_lpPack) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetSubcribeTopic (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpPack), __pyx_ptype_8py_t2sdk_pyIF2Packer, 1, "lpPack", 0))) __PYX_ERR(1, 452, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_20pySubscribeInterface_8GetSubcribeTopic(((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_v_self), ((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_lpPack)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_8GetSubcribeTopic(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_lpPack) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetSubcribeTopic", 0); + + /* "py_t2sdk.pyx":453 + * return self.lpSubcribe.CancelSubscribeTopic(subscribeIndex) + * def GetSubcribeTopic(self,pyIF2Packer lpPack): + * return self.lpSubcribe.GetSubcribeTopic(lpPack.lpPacker) # <<<<<<<<<<<<<< + * def Release(self): + * return self.lpSubcribe.Release() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_void_to_None(__pyx_v_self->lpSubcribe->GetSubcribeTopic(__pyx_v_lpPack->lpPacker)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 453, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":452 + * def CancelSubscribeTopic(self,int subscribeIndex): + * return self.lpSubcribe.CancelSubscribeTopic(subscribeIndex) + * def GetSubcribeTopic(self,pyIF2Packer lpPack): # <<<<<<<<<<<<<< + * return self.lpSubcribe.GetSubcribeTopic(lpPack.lpPacker) + * def Release(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeInterface.GetSubcribeTopic", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":454 + * def GetSubcribeTopic(self,pyIF2Packer lpPack): + * return self.lpSubcribe.GetSubcribeTopic(lpPack.lpPacker) + * def Release(self): # <<<<<<<<<<<<<< + * return self.lpSubcribe.Release() + * cdef class pyCallbackInterface: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_11Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_11Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Release (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_20pySubscribeInterface_10Release(((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_10Release(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("Release", 0); + + /* "py_t2sdk.pyx":455 + * return self.lpSubcribe.GetSubcribeTopic(lpPack.lpPacker) + * def Release(self): + * return self.lpSubcribe.Release() # <<<<<<<<<<<<<< + * cdef class pyCallbackInterface: + * cdef c_CCallbackInterface* lpCallBack + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_void_to_None(__pyx_v_self->lpSubcribe->Release()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 455, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":454 + * def GetSubcribeTopic(self,pyIF2Packer lpPack): + * return self.lpSubcribe.GetSubcribeTopic(lpPack.lpPacker) + * def Release(self): # <<<<<<<<<<<<<< + * return self.lpSubcribe.Release() + * cdef class pyCallbackInterface: + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeInterface.Release", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_20pySubscribeInterface_12__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeInterface.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_20pySubscribeInterface_14__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeInterface.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":458 + * cdef class pyCallbackInterface: + * cdef c_CCallbackInterface* lpCallBack + * def __cinit__(self,str lpMould,str lpClass): # <<<<<<<<<<<<<< + * sMould = bytes(lpMould,encoding='utf-8') + * sClass = bytes(lpClass,encoding='utf-8') + */ + +/* Python wrapper */ +static int __pyx_pw_8py_t2sdk_19pyCallbackInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_8py_t2sdk_19pyCallbackInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_lpMould = 0; + PyObject *__pyx_v_lpClass = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpMould,&__pyx_n_s_lpClass,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpMould)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpClass)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(1, 458, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 458, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_lpMould = ((PyObject*)values[0]); + __pyx_v_lpClass = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 458, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyCallbackInterface.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpMould), (&PyString_Type), 1, "lpMould", 1))) __PYX_ERR(1, 458, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpClass), (&PyString_Type), 1, "lpClass", 1))) __PYX_ERR(1, 458, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_19pyCallbackInterface___cinit__(((struct __pyx_obj_8py_t2sdk_pyCallbackInterface *)__pyx_v_self), __pyx_v_lpMould, __pyx_v_lpClass); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_8py_t2sdk_19pyCallbackInterface___cinit__(struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_self, PyObject *__pyx_v_lpMould, PyObject *__pyx_v_lpClass) { + PyObject *__pyx_v_sMould = NULL; + PyObject *__pyx_v_sClass = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + char *__pyx_t_5; + c_CCallbackInterface *__pyx_t_6; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "py_t2sdk.pyx":459 + * cdef c_CCallbackInterface* lpCallBack + * def __cinit__(self,str lpMould,str lpClass): + * sMould = bytes(lpMould,encoding='utf-8') # <<<<<<<<<<<<<< + * sClass = bytes(lpClass,encoding='utf-8') + * self.lpCallBack = new c_CCallbackInterface(sMould,sClass) + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 459, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_lpMould); + __Pyx_GIVEREF(__pyx_v_lpMould); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_lpMould); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 459, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 459, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 459, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sMould = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":460 + * def __cinit__(self,str lpMould,str lpClass): + * sMould = bytes(lpMould,encoding='utf-8') + * sClass = bytes(lpClass,encoding='utf-8') # <<<<<<<<<<<<<< + * self.lpCallBack = new c_CCallbackInterface(sMould,sClass) + * def InitInstance(self): + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_lpClass); + __Pyx_GIVEREF(__pyx_v_lpClass); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lpClass); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 460, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sClass = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":461 + * sMould = bytes(lpMould,encoding='utf-8') + * sClass = bytes(lpClass,encoding='utf-8') + * self.lpCallBack = new c_CCallbackInterface(sMould,sClass) # <<<<<<<<<<<<<< + * def InitInstance(self): + * return self.lpCallBack.InitInstance() + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sMould); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 461, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_sClass); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 461, __pyx_L1_error) + try { + __pyx_t_6 = new c_CCallbackInterface(__pyx_t_4, __pyx_t_5); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 461, __pyx_L1_error) + } + __pyx_v_self->lpCallBack = __pyx_t_6; + + /* "py_t2sdk.pyx":458 + * cdef class pyCallbackInterface: + * cdef c_CCallbackInterface* lpCallBack + * def __cinit__(self,str lpMould,str lpClass): # <<<<<<<<<<<<<< + * sMould = bytes(lpMould,encoding='utf-8') + * sClass = bytes(lpClass,encoding='utf-8') + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyCallbackInterface.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sMould); + __Pyx_XDECREF(__pyx_v_sClass); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":462 + * sClass = bytes(lpClass,encoding='utf-8') + * self.lpCallBack = new c_CCallbackInterface(sMould,sClass) + * def InitInstance(self): # <<<<<<<<<<<<<< + * return self.lpCallBack.InitInstance() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_19pyCallbackInterface_3InitInstance(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_19pyCallbackInterface_3InitInstance(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("InitInstance (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_19pyCallbackInterface_2InitInstance(((struct __pyx_obj_8py_t2sdk_pyCallbackInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_19pyCallbackInterface_2InitInstance(struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("InitInstance", 0); + + /* "py_t2sdk.pyx":463 + * self.lpCallBack = new c_CCallbackInterface(sMould,sClass) + * def InitInstance(self): + * return self.lpCallBack.InitInstance() # <<<<<<<<<<<<<< + * + * cdef class pyConnectionInterface: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpCallBack->InitInstance()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 463, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":462 + * sClass = bytes(lpClass,encoding='utf-8') + * self.lpCallBack = new c_CCallbackInterface(sMould,sClass) + * def InitInstance(self): # <<<<<<<<<<<<<< + * return self.lpCallBack.InitInstance() + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyCallbackInterface.InitInstance", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_19pyCallbackInterface_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_19pyCallbackInterface_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_19pyCallbackInterface_4__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pyCallbackInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_19pyCallbackInterface_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyCallbackInterface.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_19pyCallbackInterface_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_19pyCallbackInterface_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_19pyCallbackInterface_6__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pyCallbackInterface *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_19pyCallbackInterface_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyCallbackInterface.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":467 + * cdef class pyConnectionInterface: + * cdef c_CConnectionInterface* lpConnect + * def __cinit__(self,pyCConfigInterface pConfig): # <<<<<<<<<<<<<< + * self.lpConnect = new c_CConnectionInterface(pConfig.lpConfig) + * def Connect(self,int uiTimeout): + */ + +/* Python wrapper */ +static int __pyx_pw_8py_t2sdk_21pyConnectionInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_8py_t2sdk_21pyConnectionInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_pConfig = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pConfig,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pConfig)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 467, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + } + __pyx_v_pConfig = ((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)values[0]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 467, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pConfig), __pyx_ptype_8py_t2sdk_pyCConfigInterface, 1, "pConfig", 0))) __PYX_ERR(1, 467, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface___cinit__(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), __pyx_v_pConfig); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_8py_t2sdk_21pyConnectionInterface___cinit__(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_pConfig) { + int __pyx_r; + __Pyx_RefNannyDeclarations + c_CConnectionInterface *__pyx_t_1; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "py_t2sdk.pyx":468 + * cdef c_CConnectionInterface* lpConnect + * def __cinit__(self,pyCConfigInterface pConfig): + * self.lpConnect = new c_CConnectionInterface(pConfig.lpConfig) # <<<<<<<<<<<<<< + * def Connect(self,int uiTimeout): + * return self.lpConnect.Connect(uiTimeout) + */ + try { + __pyx_t_1 = new c_CConnectionInterface(__pyx_v_pConfig->lpConfig); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 468, __pyx_L1_error) + } + __pyx_v_self->lpConnect = __pyx_t_1; + + /* "py_t2sdk.pyx":467 + * cdef class pyConnectionInterface: + * cdef c_CConnectionInterface* lpConnect + * def __cinit__(self,pyCConfigInterface pConfig): # <<<<<<<<<<<<<< + * self.lpConnect = new c_CConnectionInterface(pConfig.lpConfig) + * def Connect(self,int uiTimeout): + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":469 + * def __cinit__(self,pyCConfigInterface pConfig): + * self.lpConnect = new c_CConnectionInterface(pConfig.lpConfig) + * def Connect(self,int uiTimeout): # <<<<<<<<<<<<<< + * return self.lpConnect.Connect(uiTimeout) + * def Close(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_3Connect(PyObject *__pyx_v_self, PyObject *__pyx_arg_uiTimeout); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_3Connect(PyObject *__pyx_v_self, PyObject *__pyx_arg_uiTimeout) { + int __pyx_v_uiTimeout; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Connect (wrapper)", 0); + assert(__pyx_arg_uiTimeout); { + __pyx_v_uiTimeout = __Pyx_PyInt_As_int(__pyx_arg_uiTimeout); if (unlikely((__pyx_v_uiTimeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 469, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.Connect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_2Connect(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), ((int)__pyx_v_uiTimeout)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_2Connect(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, int __pyx_v_uiTimeout) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("Connect", 0); + + /* "py_t2sdk.pyx":470 + * self.lpConnect = new c_CConnectionInterface(pConfig.lpConfig) + * def Connect(self,int uiTimeout): + * return self.lpConnect.Connect(uiTimeout) # <<<<<<<<<<<<<< + * def Close(self): + * return self.lpConnect.Close() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConnect->Connect(__pyx_v_uiTimeout)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 470, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":469 + * def __cinit__(self,pyCConfigInterface pConfig): + * self.lpConnect = new c_CConnectionInterface(pConfig.lpConfig) + * def Connect(self,int uiTimeout): # <<<<<<<<<<<<<< + * return self.lpConnect.Connect(uiTimeout) + * def Close(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.Connect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":471 + * def Connect(self,int uiTimeout): + * return self.lpConnect.Connect(uiTimeout) + * def Close(self): # <<<<<<<<<<<<<< + * return self.lpConnect.Close() + * def GetServerAddress(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_5Close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_5Close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Close (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_4Close(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_4Close(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("Close", 0); + + /* "py_t2sdk.pyx":472 + * return self.lpConnect.Connect(uiTimeout) + * def Close(self): + * return self.lpConnect.Close() # <<<<<<<<<<<<<< + * def GetServerAddress(self): + * cdef int iPort = 0 + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConnect->Close()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 472, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":471 + * def Connect(self,int uiTimeout): + * return self.lpConnect.Connect(uiTimeout) + * def Close(self): # <<<<<<<<<<<<<< + * return self.lpConnect.Close() + * def GetServerAddress(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.Close", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":473 + * def Close(self): + * return self.lpConnect.Close() + * def GetServerAddress(self): # <<<<<<<<<<<<<< + * cdef int iPort = 0 + * cdef char* sAddress = self.lpConnect.GetServerAddress(&iPort) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_7GetServerAddress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_7GetServerAddress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetServerAddress (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_6GetServerAddress(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_6GetServerAddress(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) { + int __pyx_v_iPort; + char *__pyx_v_sAddress; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("GetServerAddress", 0); + + /* "py_t2sdk.pyx":474 + * return self.lpConnect.Close() + * def GetServerAddress(self): + * cdef int iPort = 0 # <<<<<<<<<<<<<< + * cdef char* sAddress = self.lpConnect.GetServerAddress(&iPort) + * return sAddress,iPort + */ + __pyx_v_iPort = 0; + + /* "py_t2sdk.pyx":475 + * def GetServerAddress(self): + * cdef int iPort = 0 + * cdef char* sAddress = self.lpConnect.GetServerAddress(&iPort) # <<<<<<<<<<<<<< + * return sAddress,iPort + * def GetStatus(self): + */ + __pyx_v_sAddress = __pyx_v_self->lpConnect->GetServerAddress((&__pyx_v_iPort)); + + /* "py_t2sdk.pyx":476 + * cdef int iPort = 0 + * cdef char* sAddress = self.lpConnect.GetServerAddress(&iPort) + * return sAddress,iPort # <<<<<<<<<<<<<< + * def GetStatus(self): + * return self.lpConnect.GetStatus() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sAddress); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_iPort); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":473 + * def Close(self): + * return self.lpConnect.Close() + * def GetServerAddress(self): # <<<<<<<<<<<<<< + * cdef int iPort = 0 + * cdef char* sAddress = self.lpConnect.GetServerAddress(&iPort) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetServerAddress", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":477 + * cdef char* sAddress = self.lpConnect.GetServerAddress(&iPort) + * return sAddress,iPort + * def GetStatus(self): # <<<<<<<<<<<<<< + * return self.lpConnect.GetStatus() + * def GetServerLoad(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_9GetStatus(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_9GetStatus(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetStatus (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_8GetStatus(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_8GetStatus(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetStatus", 0); + + /* "py_t2sdk.pyx":478 + * return sAddress,iPort + * def GetStatus(self): + * return self.lpConnect.GetStatus() # <<<<<<<<<<<<<< + * def GetServerLoad(self): + * return self.lpConnect.GetServerLoad() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConnect->GetStatus()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 478, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":477 + * cdef char* sAddress = self.lpConnect.GetServerAddress(&iPort) + * return sAddress,iPort + * def GetStatus(self): # <<<<<<<<<<<<<< + * return self.lpConnect.GetStatus() + * def GetServerLoad(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetStatus", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":479 + * def GetStatus(self): + * return self.lpConnect.GetStatus() + * def GetServerLoad(self): # <<<<<<<<<<<<<< + * return self.lpConnect.GetServerLoad() + * def GetErrorMsg(self,int nErrorCode): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_11GetServerLoad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_11GetServerLoad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetServerLoad (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_10GetServerLoad(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_10GetServerLoad(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetServerLoad", 0); + + /* "py_t2sdk.pyx":480 + * return self.lpConnect.GetStatus() + * def GetServerLoad(self): + * return self.lpConnect.GetServerLoad() # <<<<<<<<<<<<<< + * def GetErrorMsg(self,int nErrorCode): + * cdef char* sErrMsg = self.lpConnect.GetErrorMsg(nErrorCode) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConnect->GetServerLoad()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 480, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":479 + * def GetStatus(self): + * return self.lpConnect.GetStatus() + * def GetServerLoad(self): # <<<<<<<<<<<<<< + * return self.lpConnect.GetServerLoad() + * def GetErrorMsg(self,int nErrorCode): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetServerLoad", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":481 + * def GetServerLoad(self): + * return self.lpConnect.GetServerLoad() + * def GetErrorMsg(self,int nErrorCode): # <<<<<<<<<<<<<< + * cdef char* sErrMsg = self.lpConnect.GetErrorMsg(nErrorCode) + * return sErrMsg.decode('GBK') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_13GetErrorMsg(PyObject *__pyx_v_self, PyObject *__pyx_arg_nErrorCode); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_13GetErrorMsg(PyObject *__pyx_v_self, PyObject *__pyx_arg_nErrorCode) { + int __pyx_v_nErrorCode; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetErrorMsg (wrapper)", 0); + assert(__pyx_arg_nErrorCode); { + __pyx_v_nErrorCode = __Pyx_PyInt_As_int(__pyx_arg_nErrorCode); if (unlikely((__pyx_v_nErrorCode == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 481, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetErrorMsg", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_12GetErrorMsg(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), ((int)__pyx_v_nErrorCode)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_12GetErrorMsg(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, int __pyx_v_nErrorCode) { + char *__pyx_v_sErrMsg; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetErrorMsg", 0); + + /* "py_t2sdk.pyx":482 + * return self.lpConnect.GetServerLoad() + * def GetErrorMsg(self,int nErrorCode): + * cdef char* sErrMsg = self.lpConnect.GetErrorMsg(nErrorCode) # <<<<<<<<<<<<<< + * return sErrMsg.decode('GBK') + * def GetConnectError(self): + */ + __pyx_v_sErrMsg = __pyx_v_self->lpConnect->GetErrorMsg(__pyx_v_nErrorCode); + + /* "py_t2sdk.pyx":483 + * def GetErrorMsg(self,int nErrorCode): + * cdef char* sErrMsg = self.lpConnect.GetErrorMsg(nErrorCode) + * return sErrMsg.decode('GBK') # <<<<<<<<<<<<<< + * def GetConnectError(self): + * return self.lpConnect.GetConnectError() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_decode_c_string(__pyx_v_sErrMsg, 0, strlen(__pyx_v_sErrMsg), ((char const *)"GBK"), NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 483, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":481 + * def GetServerLoad(self): + * return self.lpConnect.GetServerLoad() + * def GetErrorMsg(self,int nErrorCode): # <<<<<<<<<<<<<< + * cdef char* sErrMsg = self.lpConnect.GetErrorMsg(nErrorCode) + * return sErrMsg.decode('GBK') + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetErrorMsg", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":484 + * cdef char* sErrMsg = self.lpConnect.GetErrorMsg(nErrorCode) + * return sErrMsg.decode('GBK') + * def GetConnectError(self): # <<<<<<<<<<<<<< + * return self.lpConnect.GetConnectError() + * def GetRealAddress(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_15GetConnectError(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_15GetConnectError(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetConnectError (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_14GetConnectError(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_14GetConnectError(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetConnectError", 0); + + /* "py_t2sdk.pyx":485 + * return sErrMsg.decode('GBK') + * def GetConnectError(self): + * return self.lpConnect.GetConnectError() # <<<<<<<<<<<<<< + * def GetRealAddress(self): + * cdef char* sAddress = self.lpConnect.GetRealAddress() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConnect->GetConnectError()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 485, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":484 + * cdef char* sErrMsg = self.lpConnect.GetErrorMsg(nErrorCode) + * return sErrMsg.decode('GBK') + * def GetConnectError(self): # <<<<<<<<<<<<<< + * return self.lpConnect.GetConnectError() + * def GetRealAddress(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetConnectError", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":486 + * def GetConnectError(self): + * return self.lpConnect.GetConnectError() + * def GetRealAddress(self): # <<<<<<<<<<<<<< + * cdef char* sAddress = self.lpConnect.GetRealAddress() + * return sAddress + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_17GetRealAddress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_17GetRealAddress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetRealAddress (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_16GetRealAddress(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_16GetRealAddress(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) { + char *__pyx_v_sAddress; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetRealAddress", 0); + + /* "py_t2sdk.pyx":487 + * return self.lpConnect.GetConnectError() + * def GetRealAddress(self): + * cdef char* sAddress = self.lpConnect.GetRealAddress() # <<<<<<<<<<<<<< + * return sAddress + * def GetSelfAddress(self): + */ + __pyx_v_sAddress = __pyx_v_self->lpConnect->GetRealAddress(); + + /* "py_t2sdk.pyx":488 + * def GetRealAddress(self): + * cdef char* sAddress = self.lpConnect.GetRealAddress() + * return sAddress # <<<<<<<<<<<<<< + * def GetSelfAddress(self): + * cdef char* sAddress = self.lpConnect.GetSelfAddress() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sAddress); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 488, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":486 + * def GetConnectError(self): + * return self.lpConnect.GetConnectError() + * def GetRealAddress(self): # <<<<<<<<<<<<<< + * cdef char* sAddress = self.lpConnect.GetRealAddress() + * return sAddress + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetRealAddress", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":489 + * cdef char* sAddress = self.lpConnect.GetRealAddress() + * return sAddress + * def GetSelfAddress(self): # <<<<<<<<<<<<<< + * cdef char* sAddress = self.lpConnect.GetSelfAddress() + * return sAddress + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_19GetSelfAddress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_19GetSelfAddress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetSelfAddress (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_18GetSelfAddress(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_18GetSelfAddress(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) { + char *__pyx_v_sAddress; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetSelfAddress", 0); + + /* "py_t2sdk.pyx":490 + * return sAddress + * def GetSelfAddress(self): + * cdef char* sAddress = self.lpConnect.GetSelfAddress() # <<<<<<<<<<<<<< + * return sAddress + * def GetSelfMac(self): + */ + __pyx_v_sAddress = __pyx_v_self->lpConnect->GetSelfAddress(); + + /* "py_t2sdk.pyx":491 + * def GetSelfAddress(self): + * cdef char* sAddress = self.lpConnect.GetSelfAddress() + * return sAddress # <<<<<<<<<<<<<< + * def GetSelfMac(self): + * cdef char* sMac = self.lpConnect.GetSelfMac() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sAddress); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 491, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":489 + * cdef char* sAddress = self.lpConnect.GetRealAddress() + * return sAddress + * def GetSelfAddress(self): # <<<<<<<<<<<<<< + * cdef char* sAddress = self.lpConnect.GetSelfAddress() + * return sAddress + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetSelfAddress", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":492 + * cdef char* sAddress = self.lpConnect.GetSelfAddress() + * return sAddress + * def GetSelfMac(self): # <<<<<<<<<<<<<< + * cdef char* sMac = self.lpConnect.GetSelfMac() + * return sMac + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_21GetSelfMac(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_21GetSelfMac(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetSelfMac (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_20GetSelfMac(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_20GetSelfMac(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) { + char *__pyx_v_sMac; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetSelfMac", 0); + + /* "py_t2sdk.pyx":493 + * return sAddress + * def GetSelfMac(self): + * cdef char* sMac = self.lpConnect.GetSelfMac() # <<<<<<<<<<<<<< + * return sMac + * def NewSubscriber(self,pySubCallBack lppCallback,str SubScribeName,int iTimeOut): + */ + __pyx_v_sMac = __pyx_v_self->lpConnect->GetSelfMac(); + + /* "py_t2sdk.pyx":494 + * def GetSelfMac(self): + * cdef char* sMac = self.lpConnect.GetSelfMac() + * return sMac # <<<<<<<<<<<<<< + * def NewSubscriber(self,pySubCallBack lppCallback,str SubScribeName,int iTimeOut): + * sName = bytes(SubScribeName,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sMac); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":492 + * cdef char* sAddress = self.lpConnect.GetSelfAddress() + * return sAddress + * def GetSelfMac(self): # <<<<<<<<<<<<<< + * cdef char* sMac = self.lpConnect.GetSelfMac() + * return sMac + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetSelfMac", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":495 + * cdef char* sMac = self.lpConnect.GetSelfMac() + * return sMac + * def NewSubscriber(self,pySubCallBack lppCallback,str SubScribeName,int iTimeOut): # <<<<<<<<<<<<<< + * sName = bytes(SubScribeName,encoding='utf-8') + * cdef c_CSubscribeInterface* lpSub = self.lpConnect.NewSubscriber(lppCallback.lpSubCallBack,sName,iTimeOut) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_23NewSubscriber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_23NewSubscriber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_lppCallback = 0; + PyObject *__pyx_v_SubScribeName = 0; + int __pyx_v_iTimeOut; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("NewSubscriber (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lppCallback,&__pyx_n_s_SubScribeName,&__pyx_n_s_iTimeOut,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lppCallback)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_SubScribeName)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("NewSubscriber", 1, 3, 3, 1); __PYX_ERR(1, 495, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iTimeOut)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("NewSubscriber", 1, 3, 3, 2); __PYX_ERR(1, 495, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "NewSubscriber") < 0)) __PYX_ERR(1, 495, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_lppCallback = ((struct __pyx_obj_8py_t2sdk_pySubCallBack *)values[0]); + __pyx_v_SubScribeName = ((PyObject*)values[1]); + __pyx_v_iTimeOut = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_iTimeOut == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 495, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("NewSubscriber", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 495, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.NewSubscriber", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lppCallback), __pyx_ptype_8py_t2sdk_pySubCallBack, 1, "lppCallback", 0))) __PYX_ERR(1, 495, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_SubScribeName), (&PyString_Type), 1, "SubScribeName", 1))) __PYX_ERR(1, 495, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_22NewSubscriber(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), __pyx_v_lppCallback, __pyx_v_SubScribeName, __pyx_v_iTimeOut); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_22NewSubscriber(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_lppCallback, PyObject *__pyx_v_SubScribeName, int __pyx_v_iTimeOut) { + PyObject *__pyx_v_sName = NULL; + c_CSubscribeInterface *__pyx_v_lpSub; + struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_pSub = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + int __pyx_t_5; + __Pyx_RefNannySetupContext("NewSubscriber", 0); + + /* "py_t2sdk.pyx":496 + * return sMac + * def NewSubscriber(self,pySubCallBack lppCallback,str SubScribeName,int iTimeOut): + * sName = bytes(SubScribeName,encoding='utf-8') # <<<<<<<<<<<<<< + * cdef c_CSubscribeInterface* lpSub = self.lpConnect.NewSubscriber(lppCallback.lpSubCallBack,sName,iTimeOut) + * pSub = pySubscribeInterface() + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 496, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_SubScribeName); + __Pyx_GIVEREF(__pyx_v_SubScribeName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_SubScribeName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 496, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 496, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 496, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":497 + * def NewSubscriber(self,pySubCallBack lppCallback,str SubScribeName,int iTimeOut): + * sName = bytes(SubScribeName,encoding='utf-8') + * cdef c_CSubscribeInterface* lpSub = self.lpConnect.NewSubscriber(lppCallback.lpSubCallBack,sName,iTimeOut) # <<<<<<<<<<<<<< + * pSub = pySubscribeInterface() + * pSub.lpSubcribe = lpSub + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 497, __pyx_L1_error) + __pyx_v_lpSub = __pyx_v_self->lpConnect->NewSubscriber(__pyx_v_lppCallback->lpSubCallBack, __pyx_t_4, __pyx_v_iTimeOut, NULL); + + /* "py_t2sdk.pyx":498 + * sName = bytes(SubScribeName,encoding='utf-8') + * cdef c_CSubscribeInterface* lpSub = self.lpConnect.NewSubscriber(lppCallback.lpSubCallBack,sName,iTimeOut) + * pSub = pySubscribeInterface() # <<<<<<<<<<<<<< + * pSub.lpSubcribe = lpSub + * if lpSub == NULL: + */ + __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8py_t2sdk_pySubscribeInterface)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_pSub = ((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":499 + * cdef c_CSubscribeInterface* lpSub = self.lpConnect.NewSubscriber(lppCallback.lpSubCallBack,sName,iTimeOut) + * pSub = pySubscribeInterface() + * pSub.lpSubcribe = lpSub # <<<<<<<<<<<<<< + * if lpSub == NULL: + * return -1,pSub + */ + __pyx_v_pSub->lpSubcribe = __pyx_v_lpSub; + + /* "py_t2sdk.pyx":500 + * pSub = pySubscribeInterface() + * pSub.lpSubcribe = lpSub + * if lpSub == NULL: # <<<<<<<<<<<<<< + * return -1,pSub + * else: + */ + __pyx_t_5 = ((__pyx_v_lpSub == NULL) != 0); + if (__pyx_t_5) { + + /* "py_t2sdk.pyx":501 + * pSub.lpSubcribe = lpSub + * if lpSub == NULL: + * return -1,pSub # <<<<<<<<<<<<<< + * else: + * return 0,pSub + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 501, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_int_neg_1); + __Pyx_GIVEREF(__pyx_int_neg_1); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_neg_1); + __Pyx_INCREF(((PyObject *)__pyx_v_pSub)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_pSub)); + PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pSub)); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":500 + * pSub = pySubscribeInterface() + * pSub.lpSubcribe = lpSub + * if lpSub == NULL: # <<<<<<<<<<<<<< + * return -1,pSub + * else: + */ + } + + /* "py_t2sdk.pyx":503 + * return -1,pSub + * else: + * return 0,pSub # <<<<<<<<<<<<<< + * def GetMCLastError(self): + * cdef char* lpMcErr = self.lpConnect.GetMCLastError() + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 503, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0); + __Pyx_INCREF(((PyObject *)__pyx_v_pSub)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_pSub)); + PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pSub)); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + + /* "py_t2sdk.pyx":495 + * cdef char* sMac = self.lpConnect.GetSelfMac() + * return sMac + * def NewSubscriber(self,pySubCallBack lppCallback,str SubScribeName,int iTimeOut): # <<<<<<<<<<<<<< + * sName = bytes(SubScribeName,encoding='utf-8') + * cdef c_CSubscribeInterface* lpSub = self.lpConnect.NewSubscriber(lppCallback.lpSubCallBack,sName,iTimeOut) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.NewSubscriber", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XDECREF((PyObject *)__pyx_v_pSub); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":504 + * else: + * return 0,pSub + * def GetMCLastError(self): # <<<<<<<<<<<<<< + * cdef char* lpMcErr = self.lpConnect.GetMCLastError() + * return lpMcErr + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_25GetMCLastError(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_25GetMCLastError(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetMCLastError (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_24GetMCLastError(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_24GetMCLastError(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) { + char *__pyx_v_lpMcErr; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetMCLastError", 0); + + /* "py_t2sdk.pyx":505 + * return 0,pSub + * def GetMCLastError(self): + * cdef char* lpMcErr = self.lpConnect.GetMCLastError() # <<<<<<<<<<<<<< + * return lpMcErr + * def Create2BizMsg(self,pyCallbackInterface lppCallback): + */ + __pyx_v_lpMcErr = __pyx_v_self->lpConnect->GetMCLastError(); + + /* "py_t2sdk.pyx":506 + * def GetMCLastError(self): + * cdef char* lpMcErr = self.lpConnect.GetMCLastError() + * return lpMcErr # <<<<<<<<<<<<<< + * def Create2BizMsg(self,pyCallbackInterface lppCallback): + * return self.lpConnect.Create2BizMsg(lppCallback.lpCallBack) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_lpMcErr); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":504 + * else: + * return 0,pSub + * def GetMCLastError(self): # <<<<<<<<<<<<<< + * cdef char* lpMcErr = self.lpConnect.GetMCLastError() + * return lpMcErr + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetMCLastError", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":507 + * cdef char* lpMcErr = self.lpConnect.GetMCLastError() + * return lpMcErr + * def Create2BizMsg(self,pyCallbackInterface lppCallback): # <<<<<<<<<<<<<< + * return self.lpConnect.Create2BizMsg(lppCallback.lpCallBack) + * def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_27Create2BizMsg(PyObject *__pyx_v_self, PyObject *__pyx_v_lppCallback); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_27Create2BizMsg(PyObject *__pyx_v_self, PyObject *__pyx_v_lppCallback) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Create2BizMsg (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lppCallback), __pyx_ptype_8py_t2sdk_pyCallbackInterface, 1, "lppCallback", 0))) __PYX_ERR(1, 507, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_26Create2BizMsg(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), ((struct __pyx_obj_8py_t2sdk_pyCallbackInterface *)__pyx_v_lppCallback)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_26Create2BizMsg(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_lppCallback) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("Create2BizMsg", 0); + + /* "py_t2sdk.pyx":508 + * return lpMcErr + * def Create2BizMsg(self,pyCallbackInterface lppCallback): + * return self.lpConnect.Create2BizMsg(lppCallback.lpCallBack) # <<<<<<<<<<<<<< + * def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0): + * return self.lpConnect.SendBizMsg(lpMsg.lpBizMessage,nAsy) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConnect->Create2BizMsg(__pyx_v_lppCallback->lpCallBack)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":507 + * cdef char* lpMcErr = self.lpConnect.GetMCLastError() + * return lpMcErr + * def Create2BizMsg(self,pyCallbackInterface lppCallback): # <<<<<<<<<<<<<< + * return self.lpConnect.Create2BizMsg(lppCallback.lpCallBack) + * def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.Create2BizMsg", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":509 + * def Create2BizMsg(self,pyCallbackInterface lppCallback): + * return self.lpConnect.Create2BizMsg(lppCallback.lpCallBack) + * def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0): # <<<<<<<<<<<<<< + * return self.lpConnect.SendBizMsg(lpMsg.lpBizMessage,nAsy) + * def RecvBizMsg(self,int hSend, int uiTimeout=1000, int uiFlag=0): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_29SendBizMsg(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_29SendBizMsg(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_lpMsg = 0; + int __pyx_v_nAsy; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SendBizMsg (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpMsg,&__pyx_n_s_nAsy,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpMsg)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nAsy); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SendBizMsg") < 0)) __PYX_ERR(1, 509, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_lpMsg = ((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)values[0]); + if (values[1]) { + __pyx_v_nAsy = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nAsy == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 509, __pyx_L3_error) + } else { + __pyx_v_nAsy = ((int)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("SendBizMsg", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 509, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.SendBizMsg", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpMsg), __pyx_ptype_8py_t2sdk_pyIBizMessage, 1, "lpMsg", 0))) __PYX_ERR(1, 509, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_28SendBizMsg(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), __pyx_v_lpMsg, __pyx_v_nAsy); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_28SendBizMsg(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_lpMsg, int __pyx_v_nAsy) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("SendBizMsg", 0); + + /* "py_t2sdk.pyx":510 + * return self.lpConnect.Create2BizMsg(lppCallback.lpCallBack) + * def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0): + * return self.lpConnect.SendBizMsg(lpMsg.lpBizMessage,nAsy) # <<<<<<<<<<<<<< + * def RecvBizMsg(self,int hSend, int uiTimeout=1000, int uiFlag=0): + * lpMsg = pyIBizMessage() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConnect->SendBizMsg(__pyx_v_lpMsg->lpBizMessage, __pyx_v_nAsy)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 510, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":509 + * def Create2BizMsg(self,pyCallbackInterface lppCallback): + * return self.lpConnect.Create2BizMsg(lppCallback.lpCallBack) + * def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0): # <<<<<<<<<<<<<< + * return self.lpConnect.SendBizMsg(lpMsg.lpBizMessage,nAsy) + * def RecvBizMsg(self,int hSend, int uiTimeout=1000, int uiFlag=0): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.SendBizMsg", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":511 + * def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0): + * return self.lpConnect.SendBizMsg(lpMsg.lpBizMessage,nAsy) + * def RecvBizMsg(self,int hSend, int uiTimeout=1000, int uiFlag=0): # <<<<<<<<<<<<<< + * lpMsg = pyIBizMessage() + * ret = self.lpConnect.RecvBizMsg(hSend,lpMsg.lpBizMessage,uiTimeout,uiFlag) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_31RecvBizMsg(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_31RecvBizMsg(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_v_hSend; + int __pyx_v_uiTimeout; + int __pyx_v_uiFlag; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("RecvBizMsg (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hSend,&__pyx_n_s_uiTimeout,&__pyx_n_s_uiFlag,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hSend)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_uiTimeout); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_uiFlag); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "RecvBizMsg") < 0)) __PYX_ERR(1, 511, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_hSend = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_hSend == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 511, __pyx_L3_error) + if (values[1]) { + __pyx_v_uiTimeout = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_uiTimeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 511, __pyx_L3_error) + } else { + __pyx_v_uiTimeout = ((int)0x3E8); + } + if (values[2]) { + __pyx_v_uiFlag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_uiFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 511, __pyx_L3_error) + } else { + __pyx_v_uiFlag = ((int)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("RecvBizMsg", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 511, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.RecvBizMsg", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_30RecvBizMsg(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), __pyx_v_hSend, __pyx_v_uiTimeout, __pyx_v_uiFlag); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_30RecvBizMsg(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, int __pyx_v_hSend, int __pyx_v_uiTimeout, int __pyx_v_uiFlag) { + struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_lpMsg = NULL; + int __pyx_v_ret; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("RecvBizMsg", 0); + + /* "py_t2sdk.pyx":512 + * return self.lpConnect.SendBizMsg(lpMsg.lpBizMessage,nAsy) + * def RecvBizMsg(self,int hSend, int uiTimeout=1000, int uiFlag=0): + * lpMsg = pyIBizMessage() # <<<<<<<<<<<<<< + * ret = self.lpConnect.RecvBizMsg(hSend,lpMsg.lpBizMessage,uiTimeout,uiFlag) + * return ret,lpMsg + */ + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8py_t2sdk_pyIBizMessage)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 512, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_lpMsg = ((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":513 + * def RecvBizMsg(self,int hSend, int uiTimeout=1000, int uiFlag=0): + * lpMsg = pyIBizMessage() + * ret = self.lpConnect.RecvBizMsg(hSend,lpMsg.lpBizMessage,uiTimeout,uiFlag) # <<<<<<<<<<<<<< + * return ret,lpMsg + * def GetLastAnsError(self,int bAsyError=0): + */ + __pyx_v_ret = __pyx_v_self->lpConnect->RecvBizMsg(__pyx_v_hSend, __pyx_v_lpMsg->lpBizMessage, __pyx_v_uiTimeout, __pyx_v_uiFlag); + + /* "py_t2sdk.pyx":514 + * lpMsg = pyIBizMessage() + * ret = self.lpConnect.RecvBizMsg(hSend,lpMsg.lpBizMessage,uiTimeout,uiFlag) + * return ret,lpMsg # <<<<<<<<<<<<<< + * def GetLastAnsError(self,int bAsyError=0): + * return self.lpConnect.GetLastAnsError(bAsyError) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_INCREF(((PyObject *)__pyx_v_lpMsg)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_lpMsg)); + PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_lpMsg)); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":511 + * def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0): + * return self.lpConnect.SendBizMsg(lpMsg.lpBizMessage,nAsy) + * def RecvBizMsg(self,int hSend, int uiTimeout=1000, int uiFlag=0): # <<<<<<<<<<<<<< + * lpMsg = pyIBizMessage() + * ret = self.lpConnect.RecvBizMsg(hSend,lpMsg.lpBizMessage,uiTimeout,uiFlag) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.RecvBizMsg", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_lpMsg); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":515 + * ret = self.lpConnect.RecvBizMsg(hSend,lpMsg.lpBizMessage,uiTimeout,uiFlag) + * return ret,lpMsg + * def GetLastAnsError(self,int bAsyError=0): # <<<<<<<<<<<<<< + * return self.lpConnect.GetLastAnsError(bAsyError) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_33GetLastAnsError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_33GetLastAnsError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_v_bAsyError; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetLastAnsError (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bAsyError,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bAsyError); + if (value) { values[0] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "GetLastAnsError") < 0)) __PYX_ERR(1, 515, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + if (values[0]) { + __pyx_v_bAsyError = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_bAsyError == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 515, __pyx_L3_error) + } else { + __pyx_v_bAsyError = ((int)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("GetLastAnsError", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 515, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetLastAnsError", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_32GetLastAnsError(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), __pyx_v_bAsyError); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_32GetLastAnsError(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, int __pyx_v_bAsyError) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetLastAnsError", 0); + + /* "py_t2sdk.pyx":516 + * return ret,lpMsg + * def GetLastAnsError(self,int bAsyError=0): + * return self.lpConnect.GetLastAnsError(bAsyError) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->lpConnect->GetLastAnsError(__pyx_v_bAsyError)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":515 + * ret = self.lpConnect.RecvBizMsg(hSend,lpMsg.lpBizMessage,uiTimeout,uiFlag) + * return ret,lpMsg + * def GetLastAnsError(self,int bAsyError=0): # <<<<<<<<<<<<<< + * return self.lpConnect.GetLastAnsError(bAsyError) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetLastAnsError", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_35__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_35__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_34__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_34__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_37__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_37__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_36__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_36__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_tp_new_8py_t2sdk_pyIF2UnPacker(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_8py_t2sdk_13pyIF2UnPacker_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_8py_t2sdk_pyIF2UnPacker(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_8py_t2sdk_13pyIF2UnPacker_3__dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +} + +static PyMethodDef __pyx_methods_8py_t2sdk_pyIF2UnPacker[] = { + {"GetVersion", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_5GetVersion, METH_NOARGS, 0}, + {"Open", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_7Open, METH_VARARGS|METH_KEYWORDS, 0}, + {"GetDatasetCount", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_9GetDatasetCount, METH_NOARGS, 0}, + {"SetCurrentDatasetByIndex", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_11SetCurrentDatasetByIndex, METH_O, 0}, + {"SetCurrentDataset", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_13SetCurrentDataset, METH_O, 0}, + {"GetPackBuf", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_15GetPackBuf, METH_NOARGS, 0}, + {"GetPackLen", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_17GetPackLen, METH_NOARGS, 0}, + {"GetRowCount", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_19GetRowCount, METH_NOARGS, 0}, + {"First", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_21First, METH_NOARGS, 0}, + {"Last", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_23Last, METH_NOARGS, 0}, + {"Go", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_25Go, METH_O, 0}, + {"GetDatasetName", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_27GetDatasetName, METH_NOARGS, 0}, + {"GetColTypeByName", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_29GetColTypeByName, METH_O, 0}, + {"GetColScaleByName", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_31GetColScaleByName, METH_O, 0}, + {"GetColWidthByName", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_33GetColWidthByName, METH_O, 0}, + {"GetColCount", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_35GetColCount, METH_NOARGS, 0}, + {"GetColName", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_37GetColName, METH_O, 0}, + {"GetColType", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_39GetColType, METH_O, 0}, + {"GetColScale", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_41GetColScale, METH_O, 0}, + {"GetColWidth", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_43GetColWidth, METH_O, 0}, + {"FindColIndex", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_45FindColIndex, METH_O, 0}, + {"GetStrByIndex", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_47GetStrByIndex, METH_O, 0}, + {"GetStr", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_49GetStr, METH_O, 0}, + {"GetCharByIndex", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_51GetCharByIndex, METH_O, 0}, + {"GetChar", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_53GetChar, METH_O, 0}, + {"GetDoubleByIndex", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_55GetDoubleByIndex, METH_O, 0}, + {"GetDouble", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_57GetDouble, METH_O, 0}, + {"GetIntByIndex", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_59GetIntByIndex, METH_O, 0}, + {"GetInt", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_61GetInt, METH_O, 0}, + {"GetRawByIndex", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_63GetRawByIndex, METH_O, 0}, + {"GetRaw", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_65GetRaw, METH_O, 0}, + {"WasNull", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_67WasNull, METH_NOARGS, 0}, + {"Next", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_69Next, METH_NOARGS, 0}, + {"IsEOF", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_71IsEOF, METH_NOARGS, 0}, + {"IsEmpty", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_73IsEmpty, METH_NOARGS, 0}, + {"Destroy", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_75Destroy, METH_NOARGS, 0}, + {"Release", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_77Release, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_79__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_81__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_8py_t2sdk_pyIF2UnPacker = { + PyVarObject_HEAD_INIT(0, 0) + "py_t2sdk.pyIF2UnPacker", /*tp_name*/ + sizeof(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_8py_t2sdk_pyIF2UnPacker, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_8py_t2sdk_pyIF2UnPacker, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_8py_t2sdk_pyIF2UnPacker, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static PyObject *__pyx_tp_new_8py_t2sdk_pyIF2Packer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_8py_t2sdk_11pyIF2Packer_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_8py_t2sdk_pyIF2Packer(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_8py_t2sdk_11pyIF2Packer_3__dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +} + +static PyMethodDef __pyx_methods_8py_t2sdk_pyIF2Packer[] = { + {"BeginPack", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_5BeginPack, METH_NOARGS, 0}, + {"NewDataset", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_11pyIF2Packer_7NewDataset, METH_VARARGS|METH_KEYWORDS, 0}, + {"AddField", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_11pyIF2Packer_9AddField, METH_VARARGS|METH_KEYWORDS, 0}, + {"AddStr", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_11AddStr, METH_O, 0}, + {"AddInt", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_13AddInt, METH_O, 0}, + {"AddDouble", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_15AddDouble, METH_O, 0}, + {"AddChar", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_17AddChar, METH_O, 0}, + {"AddRaw", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_11pyIF2Packer_19AddRaw, METH_VARARGS|METH_KEYWORDS, 0}, + {"EndPack", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_21EndPack, METH_NOARGS, 0}, + {"GetPackBuf", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_23GetPackBuf, METH_NOARGS, 0}, + {"GetPackLen", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_25GetPackLen, METH_NOARGS, 0}, + {"GetPackBufSize", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_27GetPackBufSize, METH_NOARGS, 0}, + {"GetVersion", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_29GetVersion, METH_NOARGS, 0}, + {"SetReturnCode", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_31SetReturnCode, METH_O, 0}, + {"UnPack", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_33UnPack, METH_NOARGS, 0}, + {"FreeMem", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_35FreeMem, METH_NOARGS, 0}, + {"ClearValue", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_37ClearValue, METH_NOARGS, 0}, + {"BeginPackEx", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_39BeginPackEx, METH_O, 0}, + {"ClearDataSet", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_41ClearDataSet, METH_NOARGS, 0}, + {"Release", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_43Release, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_45__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_47__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_8py_t2sdk_pyIF2Packer = { + PyVarObject_HEAD_INIT(0, 0) + "py_t2sdk.pyIF2Packer", /*tp_name*/ + sizeof(struct __pyx_obj_8py_t2sdk_pyIF2Packer), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_8py_t2sdk_pyIF2Packer, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_8py_t2sdk_pyIF2Packer, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_8py_t2sdk_pyIF2Packer, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static PyObject *__pyx_tp_new_8py_t2sdk_pyCConfigInterface(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_8py_t2sdk_18pyCConfigInterface_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_8py_t2sdk_pyCConfigInterface(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_8py_t2sdk_18pyCConfigInterface_3__dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +} + +static PyMethodDef __pyx_methods_8py_t2sdk_pyCConfigInterface[] = { + {"Load", (PyCFunction)__pyx_pw_8py_t2sdk_18pyCConfigInterface_5Load, METH_O, 0}, + {"Save", (PyCFunction)__pyx_pw_8py_t2sdk_18pyCConfigInterface_7Save, METH_O, 0}, + {"GetString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_18pyCConfigInterface_9GetString, METH_VARARGS|METH_KEYWORDS, 0}, + {"GetInt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_18pyCConfigInterface_11GetInt, METH_VARARGS|METH_KEYWORDS, 0}, + {"SetString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_18pyCConfigInterface_13SetString, METH_VARARGS|METH_KEYWORDS, 0}, + {"SetInt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_18pyCConfigInterface_15SetInt, METH_VARARGS|METH_KEYWORDS, 0}, + {"Release", (PyCFunction)__pyx_pw_8py_t2sdk_18pyCConfigInterface_17Release, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_18pyCConfigInterface_19__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_18pyCConfigInterface_21__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_8py_t2sdk_pyCConfigInterface = { + PyVarObject_HEAD_INIT(0, 0) + "py_t2sdk.pyCConfigInterface", /*tp_name*/ + sizeof(struct __pyx_obj_8py_t2sdk_pyCConfigInterface), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_8py_t2sdk_pyCConfigInterface, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_8py_t2sdk_pyCConfigInterface, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_8py_t2sdk_pyCConfigInterface, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static PyObject *__pyx_tp_new_8py_t2sdk_pyIBizMessage(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_8py_t2sdk_13pyIBizMessage_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_8py_t2sdk_pyIBizMessage(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_8py_t2sdk_13pyIBizMessage_3__dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +} + +static PyMethodDef __pyx_methods_8py_t2sdk_pyIBizMessage[] = { + {"SetFunction", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_5SetFunction, METH_O, 0}, + {"GetFunction", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_7GetFunction, METH_NOARGS, 0}, + {"SetPacketType", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_9SetPacketType, METH_O, 0}, + {"GetPacketType", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_11GetPacketType, METH_NOARGS, 0}, + {"SetBranchNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_13SetBranchNo, METH_O, 0}, + {"GetBranchNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_15GetBranchNo, METH_NOARGS, 0}, + {"SetSystemNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_17SetSystemNo, METH_O, 0}, + {"GetSystemNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_19GetSystemNo, METH_NOARGS, 0}, + {"SetSubSystemNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_21SetSubSystemNo, METH_O, 0}, + {"GetSubSystemNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_23GetSubSystemNo, METH_NOARGS, 0}, + {"SetSenderId", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_25SetSenderId, METH_O, 0}, + {"GetSenderId", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_27GetSenderId, METH_NOARGS, 0}, + {"SetPacketId", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_29SetPacketId, METH_O, 0}, + {"GetPacketId", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_31GetPacketId, METH_NOARGS, 0}, + {"SetErrorNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_33SetErrorNo, METH_O, 0}, + {"GetErrorNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_35GetErrorNo, METH_NOARGS, 0}, + {"SetErrorInfo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_37SetErrorInfo, METH_O, 0}, + {"GetErrorInfo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_39GetErrorInfo, METH_NOARGS, 0}, + {"SetReturnCode", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_41SetReturnCode, METH_O, 0}, + {"GetReturnCode", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_43GetReturnCode, METH_NOARGS, 0}, + {"SetContent", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_13pyIBizMessage_45SetContent, METH_VARARGS|METH_KEYWORDS, 0}, + {"GetContent", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_47GetContent, METH_NOARGS, 0}, + {"SetIssueType", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_49SetIssueType, METH_O, 0}, + {"GetIssueType", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_51GetIssueType, METH_NOARGS, 0}, + {"SetSequeceNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_53SetSequeceNo, METH_O, 0}, + {"GetSequeceNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_55GetSequeceNo, METH_NOARGS, 0}, + {"SetKeyInfo", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_13pyIBizMessage_57SetKeyInfo, METH_VARARGS|METH_KEYWORDS, 0}, + {"GetKeyInfo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_59GetKeyInfo, METH_NOARGS, 0}, + {"SetAppData", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_13pyIBizMessage_61SetAppData, METH_VARARGS|METH_KEYWORDS, 0}, + {"GetAppData", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_63GetAppData, METH_NOARGS, 0}, + {"ChangeReq2AnsMessage", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_65ChangeReq2AnsMessage, METH_NOARGS, 0}, + {"GetBuff", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_67GetBuff, METH_NOARGS, 0}, + {"SetBuff", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_13pyIBizMessage_69SetBuff, METH_VARARGS|METH_KEYWORDS, 0}, + {"ReSet", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_71ReSet, METH_NOARGS, 0}, + {"Release", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_73Release, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_75__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_77__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_8py_t2sdk_pyIBizMessage = { + PyVarObject_HEAD_INIT(0, 0) + "py_t2sdk.pyIBizMessage", /*tp_name*/ + sizeof(struct __pyx_obj_8py_t2sdk_pyIBizMessage), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_8py_t2sdk_pyIBizMessage, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_8py_t2sdk_pyIBizMessage, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_8py_t2sdk_pyIBizMessage, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static PyObject *__pyx_tp_new_8py_t2sdk_pySubscribeParamInterface(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_8py_t2sdk_pySubscribeParamInterface(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_8py_t2sdk_25pySubscribeParamInterface_3__dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +} + +static PyMethodDef __pyx_methods_8py_t2sdk_pySubscribeParamInterface[] = { + {"SetTopicName", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_5SetTopicName, METH_O, 0}, + {"SetAppData", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_7SetAppData, METH_VARARGS|METH_KEYWORDS, 0}, + {"SetFilter", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_9SetFilter, METH_VARARGS|METH_KEYWORDS, 0}, + {"SetReturnFiled", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_11SetReturnFiled, METH_O, 0}, + {"SetFromNow", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_13SetFromNow, METH_O, 0}, + {"SetReplace", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_15SetReplace, METH_O, 0}, + {"SetSendInterval", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_17SetSendInterval, METH_O, 0}, + {"GetTopicName", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_19GetTopicName, METH_NOARGS, 0}, + {"GetAppData", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_21GetAppData, METH_NOARGS, 0}, + {"GetFilterNameByIndex", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_23GetFilterNameByIndex, METH_O, 0}, + {"GetFilterValueByIndex", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_25GetFilterValueByIndex, METH_O, 0}, + {"GetFilterValue", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_27GetFilterValue, METH_O, 0}, + {"GetFilterCount", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_29GetFilterCount, METH_NOARGS, 0}, + {"GetReturnFiled", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_31GetReturnFiled, METH_NOARGS, 0}, + {"GetFromNow", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_33GetFromNow, METH_NOARGS, 0}, + {"GetReplace", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_35GetReplace, METH_NOARGS, 0}, + {"GetSendInterval", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_37GetSendInterval, METH_NOARGS, 0}, + {"Release", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_39Release, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_41__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_43__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_8py_t2sdk_pySubscribeParamInterface = { + PyVarObject_HEAD_INIT(0, 0) + "py_t2sdk.pySubscribeParamInterface", /*tp_name*/ + sizeof(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_8py_t2sdk_pySubscribeParamInterface, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_8py_t2sdk_pySubscribeParamInterface, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_8py_t2sdk_pySubscribeParamInterface, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static PyObject *__pyx_tp_new_8py_t2sdk_pySubCallBack(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_8py_t2sdk_13pySubCallBack_1__cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_8py_t2sdk_pySubCallBack(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + (*Py_TYPE(o)->tp_free)(o); +} + +static PyMethodDef __pyx_methods_8py_t2sdk_pySubCallBack[] = { + {"initInstance", (PyCFunction)__pyx_pw_8py_t2sdk_13pySubCallBack_3initInstance, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_13pySubCallBack_5__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_13pySubCallBack_7__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_8py_t2sdk_pySubCallBack = { + PyVarObject_HEAD_INIT(0, 0) + "py_t2sdk.pySubCallBack", /*tp_name*/ + sizeof(struct __pyx_obj_8py_t2sdk_pySubCallBack), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_8py_t2sdk_pySubCallBack, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_8py_t2sdk_pySubCallBack, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_8py_t2sdk_pySubCallBack, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static PyObject *__pyx_tp_new_8py_t2sdk_pySubscribeInterface(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_8py_t2sdk_20pySubscribeInterface_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_8py_t2sdk_pySubscribeInterface(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_8py_t2sdk_20pySubscribeInterface_3__dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +} + +static PyMethodDef __pyx_methods_8py_t2sdk_pySubscribeInterface[] = { + {"SubscribeTopic", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_20pySubscribeInterface_5SubscribeTopic, METH_VARARGS|METH_KEYWORDS, 0}, + {"CancelSubscribeTopic", (PyCFunction)__pyx_pw_8py_t2sdk_20pySubscribeInterface_7CancelSubscribeTopic, METH_O, 0}, + {"GetSubcribeTopic", (PyCFunction)__pyx_pw_8py_t2sdk_20pySubscribeInterface_9GetSubcribeTopic, METH_O, 0}, + {"Release", (PyCFunction)__pyx_pw_8py_t2sdk_20pySubscribeInterface_11Release, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_20pySubscribeInterface_13__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_20pySubscribeInterface_15__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_8py_t2sdk_pySubscribeInterface = { + PyVarObject_HEAD_INIT(0, 0) + "py_t2sdk.pySubscribeInterface", /*tp_name*/ + sizeof(struct __pyx_obj_8py_t2sdk_pySubscribeInterface), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_8py_t2sdk_pySubscribeInterface, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_8py_t2sdk_pySubscribeInterface, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_8py_t2sdk_pySubscribeInterface, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static PyObject *__pyx_tp_new_8py_t2sdk_pyCallbackInterface(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_8py_t2sdk_19pyCallbackInterface_1__cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_8py_t2sdk_pyCallbackInterface(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + (*Py_TYPE(o)->tp_free)(o); +} + +static PyMethodDef __pyx_methods_8py_t2sdk_pyCallbackInterface[] = { + {"InitInstance", (PyCFunction)__pyx_pw_8py_t2sdk_19pyCallbackInterface_3InitInstance, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_19pyCallbackInterface_5__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_19pyCallbackInterface_7__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_8py_t2sdk_pyCallbackInterface = { + PyVarObject_HEAD_INIT(0, 0) + "py_t2sdk.pyCallbackInterface", /*tp_name*/ + sizeof(struct __pyx_obj_8py_t2sdk_pyCallbackInterface), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_8py_t2sdk_pyCallbackInterface, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_8py_t2sdk_pyCallbackInterface, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_8py_t2sdk_pyCallbackInterface, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static PyObject *__pyx_tp_new_8py_t2sdk_pyConnectionInterface(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_8py_t2sdk_21pyConnectionInterface_1__cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_8py_t2sdk_pyConnectionInterface(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + (*Py_TYPE(o)->tp_free)(o); +} + +static PyMethodDef __pyx_methods_8py_t2sdk_pyConnectionInterface[] = { + {"Connect", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_3Connect, METH_O, 0}, + {"Close", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_5Close, METH_NOARGS, 0}, + {"GetServerAddress", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_7GetServerAddress, METH_NOARGS, 0}, + {"GetStatus", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_9GetStatus, METH_NOARGS, 0}, + {"GetServerLoad", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_11GetServerLoad, METH_NOARGS, 0}, + {"GetErrorMsg", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_13GetErrorMsg, METH_O, 0}, + {"GetConnectError", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_15GetConnectError, METH_NOARGS, 0}, + {"GetRealAddress", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_17GetRealAddress, METH_NOARGS, 0}, + {"GetSelfAddress", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_19GetSelfAddress, METH_NOARGS, 0}, + {"GetSelfMac", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_21GetSelfMac, METH_NOARGS, 0}, + {"NewSubscriber", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_21pyConnectionInterface_23NewSubscriber, METH_VARARGS|METH_KEYWORDS, 0}, + {"GetMCLastError", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_25GetMCLastError, METH_NOARGS, 0}, + {"Create2BizMsg", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_27Create2BizMsg, METH_O, 0}, + {"SendBizMsg", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_21pyConnectionInterface_29SendBizMsg, METH_VARARGS|METH_KEYWORDS, 0}, + {"RecvBizMsg", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_21pyConnectionInterface_31RecvBizMsg, METH_VARARGS|METH_KEYWORDS, 0}, + {"GetLastAnsError", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_21pyConnectionInterface_33GetLastAnsError, METH_VARARGS|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_35__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_37__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_8py_t2sdk_pyConnectionInterface = { + PyVarObject_HEAD_INIT(0, 0) + "py_t2sdk.pyConnectionInterface", /*tp_name*/ + sizeof(struct __pyx_obj_8py_t2sdk_pyConnectionInterface), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_8py_t2sdk_pyConnectionInterface, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_8py_t2sdk_pyConnectionInterface, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_8py_t2sdk_pyConnectionInterface, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; + +static int __pyx_import_star_set(PyObject *o, PyObject* py_name, char *name) { + static const char* internal_type_names[] = { + "C_CConfigInterface", + "PyCapsule_Destructor", + "PyCapsule_Type", + "__pyx_ctuple_char__ptr__and_int", + "__pyx_ctuple_char__ptr__and_int_struct", + "__pyx_opt_args_22c_CConnectionInterface_NewSubscriber", + "c_CCallbackInterface", + "c_CConnectionInterface", + "c_CSubscribeInterface", + "c_CSubscribeParamInterface", + "c_IBizMessage", + "c_IF2Packer", + "c_IF2UnPacker", + "c_SubCallBack", + "const_char", + "const_void", + "div_t", + "ldiv_t", + "lldiv_t", + "pyCConfigInterface", + "pyCallbackInterface", + "pyConnectionInterface", + "pyIBizMessage", + "pyIF2Packer", + "pyIF2UnPacker", + "pySubCallBack", + "pySubscribeInterface", + "pySubscribeParamInterface", + "string", + 0 + }; + const char** type_name = internal_type_names; + while (*type_name) { + if (__Pyx_StrEq(name, *type_name)) { + PyErr_Format(PyExc_TypeError, "Cannot overwrite C type %s", name); + goto bad; + } + type_name++; + } + if (0); + else { + if (PyObject_SetAttr(__pyx_m, py_name, o) < 0) goto bad; + } + return 0; + bad: + return -1; +} + +static int +__Pyx_import_all_from(PyObject *locals, PyObject *v) +{ + PyObject *all = PyObject_GetAttrString(v, "__all__"); + PyObject *dict, *name, *value; + int skip_leading_underscores = 0; + int pos, err; + if (all == NULL) { + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) + return -1; + PyErr_Clear(); + dict = PyObject_GetAttrString(v, "__dict__"); + if (dict == NULL) { + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) + return -1; + PyErr_SetString(PyExc_ImportError, + "from-import-* object has no __dict__ and no __all__"); + return -1; + } +#if PY_MAJOR_VERSION < 3 + all = PyObject_CallMethod(dict, (char *)"keys", NULL); +#else + all = PyMapping_Keys(dict); +#endif + Py_DECREF(dict); + if (all == NULL) + return -1; + skip_leading_underscores = 1; + } + for (pos = 0, err = 0; ; pos++) { + name = PySequence_GetItem(all, pos); + if (name == NULL) { + if (!PyErr_ExceptionMatches(PyExc_IndexError)) + err = -1; + else + PyErr_Clear(); + break; + } + if (skip_leading_underscores && +#if PY_MAJOR_VERSION < 3 + PyString_Check(name) && + PyString_AS_STRING(name)[0] == '_') +#else + PyUnicode_Check(name) && + PyUnicode_AS_UNICODE(name)[0] == '_') +#endif + { + Py_DECREF(name); + continue; + } + value = PyObject_GetAttr(v, name); + if (value == NULL) + err = -1; + else if (PyDict_CheckExact(locals)) + err = PyDict_SetItem(locals, name, value); + else + err = PyObject_SetItem(locals, name, value); + Py_DECREF(name); + Py_XDECREF(value); + if (err != 0) + break; + } + Py_DECREF(all); + return err; +} +static int __pyx_import_star(PyObject* m) { + int i; + int ret = -1; + char* s; + PyObject *locals = 0; + PyObject *list = 0; +#if PY_MAJOR_VERSION >= 3 + PyObject *utf8_name = 0; +#endif + PyObject *name; + PyObject *item; + locals = PyDict_New(); if (!locals) goto bad; + if (__Pyx_import_all_from(locals, m) < 0) goto bad; + list = PyDict_Items(locals); if (!list) goto bad; + for(i=0; i= 3 + utf8_name = PyUnicode_AsUTF8String(name); + if (!utf8_name) goto bad; + s = PyBytes_AS_STRING(utf8_name); + if (__pyx_import_star_set(item, name, s) < 0) goto bad; + Py_DECREF(utf8_name); utf8_name = 0; +#else + s = PyString_AsString(name); + if (!s) goto bad; + if (__pyx_import_star_set(item, name, s) < 0) goto bad; +#endif + } + ret = 0; +bad: + Py_XDECREF(locals); + Py_XDECREF(list); +#if PY_MAJOR_VERSION >= 3 + Py_XDECREF(utf8_name); +#endif + return ret; +} + + + +#if PY_MAJOR_VERSION >= 3 +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_py_t2sdk(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_py_t2sdk}, + {0, NULL} +}; +#endif + +static struct PyModuleDef __pyx_moduledef = { + PyModuleDef_HEAD_INIT, + "py_t2sdk", + 0, /* m_doc */ + #if CYTHON_PEP489_MULTI_PHASE_INIT + 0, /* m_size */ + #else + -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ +}; +#endif +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +static __Pyx_StringTabEntry __pyx_string_tab[] = { + {&__pyx_n_s_S, __pyx_k_S, sizeof(__pyx_k_S), 0, 0, 1, 1}, + {&__pyx_n_s_SubScribeName, __pyx_k_SubScribeName, sizeof(__pyx_k_SubScribeName), 0, 0, 1, 1}, + {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, + {&__pyx_kp_s_UTF_8, __pyx_k_UTF_8, sizeof(__pyx_k_UTF_8), 0, 0, 1, 0}, + {&__pyx_n_s__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 0, 1, 1}, + {&__pyx_n_s_bAsyError, __pyx_k_bAsyError, sizeof(__pyx_k_bAsyError), 0, 0, 1, 1}, + {&__pyx_n_s_cFieldType, __pyx_k_cFieldType, sizeof(__pyx_k_cFieldType), 0, 0, 1, 1}, + {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, + {&__pyx_n_s_ctypes, __pyx_k_ctypes, sizeof(__pyx_k_ctypes), 0, 0, 1, 1}, + {&__pyx_n_s_encoding, __pyx_k_encoding, sizeof(__pyx_k_encoding), 0, 0, 1, 1}, + {&__pyx_n_s_filterName, __pyx_k_filterName, sizeof(__pyx_k_filterName), 0, 0, 1, 1}, + {&__pyx_n_s_filterValue, __pyx_k_filterValue, sizeof(__pyx_k_filterValue), 0, 0, 1, 1}, + {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, + {&__pyx_n_s_hSend, __pyx_k_hSend, sizeof(__pyx_k_hSend), 0, 0, 1, 1}, + {&__pyx_n_s_iDefault, __pyx_k_iDefault, sizeof(__pyx_k_iDefault), 0, 0, 1, 1}, + {&__pyx_n_s_iFieldScale, __pyx_k_iFieldScale, sizeof(__pyx_k_iFieldScale), 0, 0, 1, 1}, + {&__pyx_n_s_iFieldWidth, __pyx_k_iFieldWidth, sizeof(__pyx_k_iFieldWidth), 0, 0, 1, 1}, + {&__pyx_n_s_iLen, __pyx_k_iLen, sizeof(__pyx_k_iLen), 0, 0, 1, 1}, + {&__pyx_n_s_iLength, __pyx_k_iLength, sizeof(__pyx_k_iLength), 0, 0, 1, 1}, + {&__pyx_n_s_iReturnCode, __pyx_k_iReturnCode, sizeof(__pyx_k_iReturnCode), 0, 0, 1, 1}, + {&__pyx_n_s_iTimeOut, __pyx_k_iTimeOut, sizeof(__pyx_k_iTimeOut), 0, 0, 1, 1}, + {&__pyx_n_s_iValue, __pyx_k_iValue, sizeof(__pyx_k_iValue), 0, 0, 1, 1}, + {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, + {&__pyx_n_s_lpAppdata, __pyx_k_lpAppdata, sizeof(__pyx_k_lpAppdata), 0, 0, 1, 1}, + {&__pyx_n_s_lpBuff, __pyx_k_lpBuff, sizeof(__pyx_k_lpBuff), 0, 0, 1, 1}, + {&__pyx_n_s_lpClass, __pyx_k_lpClass, sizeof(__pyx_k_lpClass), 0, 0, 1, 1}, + {&__pyx_n_s_lpContent, __pyx_k_lpContent, sizeof(__pyx_k_lpContent), 0, 0, 1, 1}, + {&__pyx_n_s_lpData, __pyx_k_lpData, sizeof(__pyx_k_lpData), 0, 0, 1, 1}, + {&__pyx_n_s_lpKeyData, __pyx_k_lpKeyData, sizeof(__pyx_k_lpKeyData), 0, 0, 1, 1}, + {&__pyx_n_s_lpMould, __pyx_k_lpMould, sizeof(__pyx_k_lpMould), 0, 0, 1, 1}, + {&__pyx_n_s_lpMsg, __pyx_k_lpMsg, sizeof(__pyx_k_lpMsg), 0, 0, 1, 1}, + {&__pyx_n_s_lpPack, __pyx_k_lpPack, sizeof(__pyx_k_lpPack), 0, 0, 1, 1}, + {&__pyx_n_s_lpSubParam, __pyx_k_lpSubParam, sizeof(__pyx_k_lpSubParam), 0, 0, 1, 1}, + {&__pyx_n_s_lpUnPack, __pyx_k_lpUnPack, sizeof(__pyx_k_lpUnPack), 0, 0, 1, 1}, + {&__pyx_n_s_lppCallback, __pyx_k_lppCallback, sizeof(__pyx_k_lppCallback), 0, 0, 1, 1}, + {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, + {&__pyx_n_s_nAppLen, __pyx_k_nAppLen, sizeof(__pyx_k_nAppLen), 0, 0, 1, 1}, + {&__pyx_n_s_nAsy, __pyx_k_nAsy, sizeof(__pyx_k_nAsy), 0, 0, 1, 1}, + {&__pyx_n_s_nBuffLen, __pyx_k_nBuffLen, sizeof(__pyx_k_nBuffLen), 0, 0, 1, 1}, + {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, + {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0}, + {&__pyx_n_s_pConfig, __pyx_k_pConfig, sizeof(__pyx_k_pConfig), 0, 0, 1, 1}, + {&__pyx_n_s_pyCConfigInterface, __pyx_k_pyCConfigInterface, sizeof(__pyx_k_pyCConfigInterface), 0, 0, 1, 1}, + {&__pyx_n_s_pyCallbackInterface, __pyx_k_pyCallbackInterface, sizeof(__pyx_k_pyCallbackInterface), 0, 0, 1, 1}, + {&__pyx_n_s_pyConnectionInterface, __pyx_k_pyConnectionInterface, sizeof(__pyx_k_pyConnectionInterface), 0, 0, 1, 1}, + {&__pyx_n_s_pyIBizMessage, __pyx_k_pyIBizMessage, sizeof(__pyx_k_pyIBizMessage), 0, 0, 1, 1}, + {&__pyx_n_s_pyIF2Packer, __pyx_k_pyIF2Packer, sizeof(__pyx_k_pyIF2Packer), 0, 0, 1, 1}, + {&__pyx_n_s_pyIF2UnPacker, __pyx_k_pyIF2UnPacker, sizeof(__pyx_k_pyIF2UnPacker), 0, 0, 1, 1}, + {&__pyx_n_s_pySubCallBack, __pyx_k_pySubCallBack, sizeof(__pyx_k_pySubCallBack), 0, 0, 1, 1}, + {&__pyx_n_s_pySubscribeInterface, __pyx_k_pySubscribeInterface, sizeof(__pyx_k_pySubscribeInterface), 0, 0, 1, 1}, + {&__pyx_n_s_pySubscribeParamInterface, __pyx_k_pySubscribeParamInterface, sizeof(__pyx_k_pySubscribeParamInterface), 0, 0, 1, 1}, + {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, + {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, + {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, + {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, + {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, + {&__pyx_n_s_szDatasetName, __pyx_k_szDatasetName, sizeof(__pyx_k_szDatasetName), 0, 0, 1, 1}, + {&__pyx_n_s_szDefault, __pyx_k_szDefault, sizeof(__pyx_k_szDefault), 0, 0, 1, 1}, + {&__pyx_n_s_szEntry, __pyx_k_szEntry, sizeof(__pyx_k_szEntry), 0, 0, 1, 1}, + {&__pyx_n_s_szFieldName, __pyx_k_szFieldName, sizeof(__pyx_k_szFieldName), 0, 0, 1, 1}, + {&__pyx_n_s_szSection, __pyx_k_szSection, sizeof(__pyx_k_szSection), 0, 0, 1, 1}, + {&__pyx_n_s_szValue, __pyx_k_szValue, sizeof(__pyx_k_szValue), 0, 0, 1, 1}, + {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, + {&__pyx_n_s_uiFlag, __pyx_k_uiFlag, sizeof(__pyx_k_uiFlag), 0, 0, 1, 1}, + {&__pyx_n_s_uiTimeout, __pyx_k_uiTimeout, sizeof(__pyx_k_uiTimeout), 0, 0, 1, 1}, + {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0}, + {0, 0, 0, 0, 0, 0, 0} +}; +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple_); + __Pyx_GIVEREF(__pyx_tuple_); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__2); + __Pyx_GIVEREF(__pyx_tuple__2); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__3); + __Pyx_GIVEREF(__pyx_tuple__3); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__4); + __Pyx_GIVEREF(__pyx_tuple__4); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__5); + __Pyx_GIVEREF(__pyx_tuple__5); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__6); + __Pyx_GIVEREF(__pyx_tuple__6); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__7); + __Pyx_GIVEREF(__pyx_tuple__7); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__8); + __Pyx_GIVEREF(__pyx_tuple__8); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__9); + __Pyx_GIVEREF(__pyx_tuple__9); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__10); + __Pyx_GIVEREF(__pyx_tuple__10); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__11); + __Pyx_GIVEREF(__pyx_tuple__11); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__12); + __Pyx_GIVEREF(__pyx_tuple__12); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__13); + __Pyx_GIVEREF(__pyx_tuple__13); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__14); + __Pyx_GIVEREF(__pyx_tuple__14); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__15); + __Pyx_GIVEREF(__pyx_tuple__15); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__16); + __Pyx_GIVEREF(__pyx_tuple__16); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__17); + __Pyx_GIVEREF(__pyx_tuple__17); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__18); + __Pyx_GIVEREF(__pyx_tuple__18); + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { + if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(1, 1, __pyx_L1_error); + __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(1, 1, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ + +static int __Pyx_modinit_global_init_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + if (PyType_Ready(&__pyx_type_8py_t2sdk_pyIF2UnPacker) < 0) __PYX_ERR(1, 82, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_8py_t2sdk_pyIF2UnPacker.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pyIF2UnPacker.tp_dictoffset && __pyx_type_8py_t2sdk_pyIF2UnPacker.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_8py_t2sdk_pyIF2UnPacker.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pyIF2UnPacker, (PyObject *)&__pyx_type_8py_t2sdk_pyIF2UnPacker) < 0) __PYX_ERR(1, 82, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pyIF2UnPacker) < 0) __PYX_ERR(1, 82, __pyx_L1_error) + __pyx_ptype_8py_t2sdk_pyIF2UnPacker = &__pyx_type_8py_t2sdk_pyIF2UnPacker; + if (PyType_Ready(&__pyx_type_8py_t2sdk_pyIF2Packer) < 0) __PYX_ERR(1, 12, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_8py_t2sdk_pyIF2Packer.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pyIF2Packer.tp_dictoffset && __pyx_type_8py_t2sdk_pyIF2Packer.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_8py_t2sdk_pyIF2Packer.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pyIF2Packer, (PyObject *)&__pyx_type_8py_t2sdk_pyIF2Packer) < 0) __PYX_ERR(1, 12, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pyIF2Packer) < 0) __PYX_ERR(1, 12, __pyx_L1_error) + __pyx_ptype_8py_t2sdk_pyIF2Packer = &__pyx_type_8py_t2sdk_pyIF2Packer; + if (PyType_Ready(&__pyx_type_8py_t2sdk_pyCConfigInterface) < 0) __PYX_ERR(1, 209, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_8py_t2sdk_pyCConfigInterface.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pyCConfigInterface.tp_dictoffset && __pyx_type_8py_t2sdk_pyCConfigInterface.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_8py_t2sdk_pyCConfigInterface.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pyCConfigInterface, (PyObject *)&__pyx_type_8py_t2sdk_pyCConfigInterface) < 0) __PYX_ERR(1, 209, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pyCConfigInterface) < 0) __PYX_ERR(1, 209, __pyx_L1_error) + __pyx_ptype_8py_t2sdk_pyCConfigInterface = &__pyx_type_8py_t2sdk_pyCConfigInterface; + if (PyType_Ready(&__pyx_type_8py_t2sdk_pyIBizMessage) < 0) __PYX_ERR(1, 243, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_8py_t2sdk_pyIBizMessage.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pyIBizMessage.tp_dictoffset && __pyx_type_8py_t2sdk_pyIBizMessage.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_8py_t2sdk_pyIBizMessage.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pyIBizMessage, (PyObject *)&__pyx_type_8py_t2sdk_pyIBizMessage) < 0) __PYX_ERR(1, 243, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pyIBizMessage) < 0) __PYX_ERR(1, 243, __pyx_L1_error) + __pyx_ptype_8py_t2sdk_pyIBizMessage = &__pyx_type_8py_t2sdk_pyIBizMessage; + if (PyType_Ready(&__pyx_type_8py_t2sdk_pySubscribeParamInterface) < 0) __PYX_ERR(1, 367, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_8py_t2sdk_pySubscribeParamInterface.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pySubscribeParamInterface.tp_dictoffset && __pyx_type_8py_t2sdk_pySubscribeParamInterface.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_8py_t2sdk_pySubscribeParamInterface.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pySubscribeParamInterface, (PyObject *)&__pyx_type_8py_t2sdk_pySubscribeParamInterface) < 0) __PYX_ERR(1, 367, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pySubscribeParamInterface) < 0) __PYX_ERR(1, 367, __pyx_L1_error) + __pyx_ptype_8py_t2sdk_pySubscribeParamInterface = &__pyx_type_8py_t2sdk_pySubscribeParamInterface; + if (PyType_Ready(&__pyx_type_8py_t2sdk_pySubCallBack) < 0) __PYX_ERR(1, 425, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_8py_t2sdk_pySubCallBack.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pySubCallBack.tp_dictoffset && __pyx_type_8py_t2sdk_pySubCallBack.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_8py_t2sdk_pySubCallBack.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pySubCallBack, (PyObject *)&__pyx_type_8py_t2sdk_pySubCallBack) < 0) __PYX_ERR(1, 425, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pySubCallBack) < 0) __PYX_ERR(1, 425, __pyx_L1_error) + __pyx_ptype_8py_t2sdk_pySubCallBack = &__pyx_type_8py_t2sdk_pySubCallBack; + if (PyType_Ready(&__pyx_type_8py_t2sdk_pySubscribeInterface) < 0) __PYX_ERR(1, 434, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_8py_t2sdk_pySubscribeInterface.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pySubscribeInterface.tp_dictoffset && __pyx_type_8py_t2sdk_pySubscribeInterface.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_8py_t2sdk_pySubscribeInterface.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pySubscribeInterface, (PyObject *)&__pyx_type_8py_t2sdk_pySubscribeInterface) < 0) __PYX_ERR(1, 434, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pySubscribeInterface) < 0) __PYX_ERR(1, 434, __pyx_L1_error) + __pyx_ptype_8py_t2sdk_pySubscribeInterface = &__pyx_type_8py_t2sdk_pySubscribeInterface; + if (PyType_Ready(&__pyx_type_8py_t2sdk_pyCallbackInterface) < 0) __PYX_ERR(1, 456, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_8py_t2sdk_pyCallbackInterface.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pyCallbackInterface.tp_dictoffset && __pyx_type_8py_t2sdk_pyCallbackInterface.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_8py_t2sdk_pyCallbackInterface.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pyCallbackInterface, (PyObject *)&__pyx_type_8py_t2sdk_pyCallbackInterface) < 0) __PYX_ERR(1, 456, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pyCallbackInterface) < 0) __PYX_ERR(1, 456, __pyx_L1_error) + __pyx_ptype_8py_t2sdk_pyCallbackInterface = &__pyx_type_8py_t2sdk_pyCallbackInterface; + if (PyType_Ready(&__pyx_type_8py_t2sdk_pyConnectionInterface) < 0) __PYX_ERR(1, 465, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_8py_t2sdk_pyConnectionInterface.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pyConnectionInterface.tp_dictoffset && __pyx_type_8py_t2sdk_pyConnectionInterface.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_8py_t2sdk_pyConnectionInterface.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pyConnectionInterface, (PyObject *)&__pyx_type_8py_t2sdk_pyConnectionInterface) < 0) __PYX_ERR(1, 465, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pyConnectionInterface) < 0) __PYX_ERR(1, 465, __pyx_L1_error) + __pyx_ptype_8py_t2sdk_pyConnectionInterface = &__pyx_type_8py_t2sdk_pyConnectionInterface; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + + +#if PY_MAJOR_VERSION < 3 +#ifdef CYTHON_NO_PYINIT_EXPORT +#define __Pyx_PyMODINIT_FUNC void +#else +#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#endif +#else +#ifdef CYTHON_NO_PYINIT_EXPORT +#define __Pyx_PyMODINIT_FUNC PyObject * +#else +#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#endif +#endif + + +#if PY_MAJOR_VERSION < 3 +__Pyx_PyMODINIT_FUNC initpy_t2sdk(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC initpy_t2sdk(void) +#else +__Pyx_PyMODINIT_FUNC PyInit_py_t2sdk(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_py_t2sdk(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + #if PY_VERSION_HEX >= 0x030700A1 + static PY_INT64_T main_interpreter_id = -1; + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return (unlikely(current_id == -1)) ? -1 : 0; + } else if (unlikely(main_interpreter_id != current_id)) + #else + static PyInterpreterState *main_interpreter = NULL; + PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; + if (!main_interpreter) { + main_interpreter = current_interpreter; + } else if (unlikely(main_interpreter != current_interpreter)) + #endif + { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + if (__Pyx_check_single_interpreter()) + return NULL; + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_py_t2sdk(PyObject *__pyx_pyinit_module) +#endif +#endif +{ + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'py_t2sdk' has already been imported. Re-initialisation is not supported."); + return -1; + } + #elif PY_MAJOR_VERSION >= 3 + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_py_t2sdk(void)", 0); + if (__Pyx_check_binary_version() < 0) __PYX_ERR(1, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(1, 1, __pyx_L1_error) + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_StopAsyncIteration_USED + if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + /*--- Threads initialization code ---*/ + #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS + #ifdef WITH_THREAD /* Python build with threading support? */ + PyEval_InitThreads(); + #endif + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_m = __pyx_pyinit_module; + Py_INCREF(__pyx_m); + #else + #if PY_MAJOR_VERSION < 3 + __pyx_m = Py_InitModule4("py_t2sdk", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); + #else + __pyx_m = PyModule_Create(&__pyx_moduledef); + #endif + if (unlikely(!__pyx_m)) __PYX_ERR(1, 1, __pyx_L1_error) + #endif + __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(1, 1, __pyx_L1_error) + Py_INCREF(__pyx_d); + __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(1, 1, __pyx_L1_error) + Py_INCREF(__pyx_b); + __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(1, 1, __pyx_L1_error) + Py_INCREF(__pyx_cython_runtime); + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(1, 1, __pyx_L1_error); + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitGlobals() < 0) __PYX_ERR(1, 1, __pyx_L1_error) + #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) + if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(1, 1, __pyx_L1_error) + #endif + if (__pyx_module_is_main_py_t2sdk) { + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(1, 1, __pyx_L1_error) + } + #if PY_MAJOR_VERSION >= 3 + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(1, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "py_t2sdk")) { + if (unlikely(PyDict_SetItemString(modules, "py_t2sdk", __pyx_m) < 0)) __PYX_ERR(1, 1, __pyx_L1_error) + } + } + #endif + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(); + (void)__Pyx_modinit_variable_export_code(); + (void)__Pyx_modinit_function_export_code(); + if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; + (void)__Pyx_modinit_type_import_code(); + (void)__Pyx_modinit_variable_import_code(); + (void)__Pyx_modinit_function_import_code(); + /*--- Execution code ---*/ + #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) + if (__Pyx_patch_abc() < 0) __PYX_ERR(1, 1, __pyx_L1_error) + #endif + + /* "py_t2sdk.pyx":6 + * cimport py_t2sdk + * from cpython.pycapsule cimport * + * from ctypes import * # <<<<<<<<<<<<<< + * from libcpp.string cimport string + * from libc.stdlib cimport * + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s__19); + __Pyx_GIVEREF(__pyx_n_s__19); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s__19); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_ctypes, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_import_star(__pyx_t_2) < 0) __PYX_ERR(1, 6, __pyx_L1_error); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "py_t2sdk.pyx":1 + * # coding=utf-8 # <<<<<<<<<<<<<< + * # distutils: language = c++ + * + */ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + if (__pyx_m) { + if (__pyx_d) { + __Pyx_AddTraceback("init py_t2sdk", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + Py_CLEAR(__pyx_m); + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init py_t2sdk"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #elif PY_MAJOR_VERSION >= 3 + return __pyx_m; + #else + return; + #endif +} + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); +#if PY_MAJOR_VERSION < 3 + if (likely(tp->tp_getattr)) + return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); +#endif + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); + if (unlikely(!result)) { + PyErr_Format(PyExc_NameError, +#if PY_MAJOR_VERSION >= 3 + "name '%U' is not defined", name); +#else + "name '%.200s' is not defined", PyString_AS_STRING(name)); +#endif + } + return result; +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* KeywordStringCheck */ +static int __Pyx_CheckKeywordStrings( + PyObject *kwdict, + const char* function_name, + int kw_allowed) +{ + PyObject* key = 0; + Py_ssize_t pos = 0; +#if CYTHON_COMPILING_IN_PYPY + if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0)) + goto invalid_keyword; + return 1; +#else + while (PyDict_Next(kwdict, &pos, &key, 0)) { + #if PY_MAJOR_VERSION < 3 + if (unlikely(!PyString_Check(key))) + #endif + if (unlikely(!PyUnicode_Check(key))) + goto invalid_keyword_type; + } + if ((!kw_allowed) && unlikely(key)) + goto invalid_keyword; + return 1; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + return 0; +#endif +invalid_keyword: + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION < 3 + "%.200s() got an unexpected keyword argument '%.200s'", + function_name, PyString_AsString(key)); + #else + "%s() got an unexpected keyword argument '%U'", + function_name, key); + #endif + return 0; +} + +/* RaiseDoubleKeywords */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION >= 3 + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); + #else + "%s() got multiple values for keyword argument '%s'", func_name, + PyString_AsString(kw_name)); + #endif +} + +/* ParseKeywords */ +static int __Pyx_ParseOptionalKeywords( + PyObject *kwds, + PyObject **argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject *key = 0, *value = 0; + Py_ssize_t pos = 0; + PyObject*** name; + PyObject*** first_kw_arg = argnames + num_pos_args; + while (PyDict_Next(kwds, &pos, &key, &value)) { + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + values[name-argnames] = value; + continue; + } + name = first_kw_arg; + #if PY_MAJOR_VERSION < 3 + if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { + while (*name) { + if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) + && _PyString_Eq(**name, key)) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + if ((**argname == key) || ( + (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) + && _PyString_Eq(**argname, key))) { + goto arg_passed_twice; + } + argname++; + } + } + } else + #endif + if (likely(PyUnicode_Check(key))) { + while (*name) { + int cmp = (**name == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : + #endif + PyUnicode_Compare(**name, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + int cmp = (**argname == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : + #endif + PyUnicode_Compare(**argname, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + argname++; + } + } + } else + goto invalid_keyword_type; + if (kwds2) { + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else { + goto invalid_keyword; + } + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION < 3 + "%.200s() got an unexpected keyword argument '%.200s'", + function_name, PyString_AsString(key)); + #else + "%s() got an unexpected keyword argument '%U'", + function_name, key); + #endif +bad: + return -1; +} + +/* ArgTypeTest */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (exact) { + #if PY_MAJOR_VERSION == 2 + if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; + #endif + } + else { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", + name, type->tp_name, Py_TYPE(obj)->tp_name); + return 0; +} + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = func->ob_type->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* bytes_index */ +static CYTHON_INLINE char __Pyx_PyBytes_GetItemInt(PyObject* bytes, Py_ssize_t index, int check_bounds) { + if (index < 0) + index += PyBytes_GET_SIZE(bytes); + if (check_bounds) { + Py_ssize_t size = PyBytes_GET_SIZE(bytes); + if (unlikely(!__Pyx_is_valid_index(index, size))) { + PyErr_SetString(PyExc_IndexError, "string index out of range"); + return (char) -1; + } + } + return PyBytes_AS_STRING(bytes)[index]; +} + +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (!j) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + PyObject *r = PyList_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + PyObject *r = PyList_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } + else if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } else { + PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; + if (likely(m && m->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { + Py_ssize_t l = m->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return m->sq_item(o, i); + } + } +#else + if (is_list || PySequence_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +} + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; +#if PY_MAJOR_VERSION >= 3 + PyObject *kwdefs; +#endif + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { + return NULL; + } + if ( +#if PY_MAJOR_VERSION >= 3 + co->co_kwonlyargcount == 0 && +#endif + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); +#if PY_MAJOR_VERSION >= 3 + kwdefs = PyFunction_GET_KW_DEFAULTS(func); +#endif + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } +#if PY_MAJOR_VERSION >= 3 + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); +#else + result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, closure); +#endif + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif +#endif + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = PyCFunction_GET_FUNCTION(func); + self = PyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallNoArg */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { +#if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCall(func, NULL, 0); + } +#endif +#ifdef __Pyx_CyFunction_USED + if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func))) +#else + if (likely(PyCFunction_Check(func))) +#endif + { + if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { + return __Pyx_PyObject_CallMethO(func, NULL); + } + } + return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL); +} +#endif + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +} +#endif + +/* RaiseException */ +#if PY_MAJOR_VERSION < 3 +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, + CYTHON_UNUSED PyObject *cause) { + __Pyx_PyThreadState_declare + Py_XINCREF(type); + if (!value || value == Py_None) + value = NULL; + else + Py_INCREF(value); + if (!tb || tb == Py_None) + tb = NULL; + else { + Py_INCREF(tb); + if (!PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto raise_error; + } + } + if (PyType_Check(type)) { +#if CYTHON_COMPILING_IN_PYPY + if (!value) { + Py_INCREF(Py_None); + value = Py_None; + } +#endif + PyErr_NormalizeException(&type, &value, &tb); + } else { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto raise_error; + } + value = type; + type = (PyObject*) Py_TYPE(type); + Py_INCREF(type); + if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto raise_error; + } + } + __Pyx_PyThreadState_assign + __Pyx_ErrRestore(type, value, tb); + return; +raise_error: + Py_XDECREF(value); + Py_XDECREF(type); + Py_XDECREF(tb); + return; +} +#else +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if CYTHON_COMPILING_IN_PYPY + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#else + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} +#endif + +/* decode_c_string */ +static CYTHON_INLINE PyObject* __Pyx_decode_c_string( + const char* cstring, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { + Py_ssize_t length; + if (unlikely((start < 0) | (stop < 0))) { + size_t slen = strlen(cstring); + if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, + "c-string too long to convert to Python"); + return NULL; + } + length = (Py_ssize_t) slen; + if (start < 0) { + start += length; + if (start < 0) + start = 0; + } + if (stop < 0) + stop += length; + } + length = stop - start; + if (unlikely(length <= 0)) + return PyUnicode_FromUnicode(NULL, 0); + cstring += start; + if (decode_func) { + return decode_func(cstring, length, errors); + } else { + return PyUnicode_Decode(cstring, length, encoding, errors); + } +} + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if !CYTHON_AVOID_BORROWED_REFS +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 + result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } else if (unlikely(PyErr_Occurred())) { + return NULL; + } +#else + result = PyDict_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } +#endif +#else + result = PyObject_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* PyObject_GenericGetAttrNoDict */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { + PyErr_Format(PyExc_AttributeError, +#if PY_MAJOR_VERSION >= 3 + "'%.50s' object has no attribute '%U'", + tp->tp_name, attr_name); +#else + "'%.50s' object has no attribute '%.400s'", + tp->tp_name, PyString_AS_STRING(attr_name)); +#endif + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) { + PyObject *descr; + PyTypeObject *tp = Py_TYPE(obj); + if (unlikely(!PyString_Check(attr_name))) { + return PyObject_GenericGetAttr(obj, attr_name); + } + assert(!tp->tp_dictoffset); + descr = _PyType_Lookup(tp, attr_name); + if (unlikely(!descr)) { + return __Pyx_RaiseGenericGetAttributeError(tp, attr_name); + } + Py_INCREF(descr); + #if PY_MAJOR_VERSION < 3 + if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS))) + #endif + { + descrgetfunc f = Py_TYPE(descr)->tp_descr_get; + if (unlikely(f)) { + PyObject *res = f(descr, obj, (PyObject *)tp); + Py_DECREF(descr); + return res; + } + } + return descr; +} +#endif + +/* PyObject_GenericGetAttr */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { + if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { + return PyObject_GenericGetAttr(obj, attr_name); + } + return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name); +} +#endif + +/* SetupReduce */ +static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + int ret; + PyObject *name_attr; + name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name); + if (likely(name_attr)) { + ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); + } else { + ret = -1; + } + if (unlikely(ret < 0)) { + PyErr_Clear(); + ret = 0; + } + Py_XDECREF(name_attr); + return ret; +} +static int __Pyx_setup_reduce(PyObject* type_obj) { + int ret = 0; + PyObject *object_reduce = NULL; + PyObject *object_reduce_ex = NULL; + PyObject *reduce = NULL; + PyObject *reduce_ex = NULL; + PyObject *reduce_cython = NULL; + PyObject *setstate = NULL; + PyObject *setstate_cython = NULL; +#if CYTHON_USE_PYTYPE_LOOKUP + if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; +#else + if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; +#endif +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; +#else + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; +#endif + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; + if (reduce_ex == object_reduce_ex) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; +#else + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; +#endif + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; + if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { + reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; + setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); + if (!setstate) PyErr_Clear(); + if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { + setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; + } + PyType_Modified((PyTypeObject*)type_obj); + } + } + goto GOOD; +BAD: + if (!PyErr_Occurred()) + PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); + ret = -1; +GOOD: +#if !CYTHON_USE_PYTYPE_LOOKUP + Py_XDECREF(object_reduce); + Py_XDECREF(object_reduce_ex); +#endif + Py_XDECREF(reduce); + Py_XDECREF(reduce_ex); + Py_XDECREF(reduce_cython); + Py_XDECREF(setstate); + Py_XDECREF(setstate_cython); + return ret; +} + +/* Import */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { + PyObject *empty_list = 0; + PyObject *module = 0; + PyObject *global_dict = 0; + PyObject *empty_dict = 0; + PyObject *list; + #if PY_MAJOR_VERSION < 3 + PyObject *py_import; + py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); + if (!py_import) + goto bad; + #endif + if (from_list) + list = from_list; + else { + empty_list = PyList_New(0); + if (!empty_list) + goto bad; + list = empty_list; + } + global_dict = PyModule_GetDict(__pyx_m); + if (!global_dict) + goto bad; + empty_dict = PyDict_New(); + if (!empty_dict) + goto bad; + { + #if PY_MAJOR_VERSION >= 3 + if (level == -1) { + if (strchr(__Pyx_MODULE_NAME, '.')) { + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, 1); + if (!module) { + if (!PyErr_ExceptionMatches(PyExc_ImportError)) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + #endif + if (!module) { + #if PY_MAJOR_VERSION < 3 + PyObject *py_level = PyInt_FromLong(level); + if (!py_level) + goto bad; + module = PyObject_CallFunctionObjArgs(py_import, + name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); + Py_DECREF(py_level); + #else + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, level); + #endif + } + } +bad: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(py_import); + #endif + Py_XDECREF(empty_list); + Py_XDECREF(empty_dict); + return module; +} + +/* CLineInTraceback */ +#ifndef CYTHON_CLINE_IN_TRACEBACK +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + if (unlikely(!__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static PyCodeObject *__pyx_find_code_object(int code_line) { + PyCodeObject* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { + return NULL; + } + code_object = __pyx_code_cache.entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = 64; + __pyx_code_cache.count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { + PyCodeObject* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_DECREF(tmp); + return; + } + if (__pyx_code_cache.count == __pyx_code_cache.max_count) { + int new_max = __pyx_code_cache.max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = new_max; + } + for (i=__pyx_code_cache.count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + __pyx_code_cache.count++; + Py_INCREF(code_object); +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyObject *py_srcfile = 0; + PyObject *py_funcname = 0; + #if PY_MAJOR_VERSION < 3 + py_srcfile = PyString_FromString(filename); + #else + py_srcfile = PyUnicode_FromString(filename); + #endif + if (!py_srcfile) goto bad; + if (c_line) { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + #else + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + #endif + } + else { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromString(funcname); + #else + py_funcname = PyUnicode_FromString(funcname); + #endif + } + if (!py_funcname) goto bad; + py_code = __Pyx_PyCode_New( + 0, + 0, + 0, + 0, + 0, + __pyx_empty_bytes, /*PyObject *code,*/ + __pyx_empty_tuple, /*PyObject *consts,*/ + __pyx_empty_tuple, /*PyObject *names,*/ + __pyx_empty_tuple, /*PyObject *varnames,*/ + __pyx_empty_tuple, /*PyObject *freevars,*/ + __pyx_empty_tuple, /*PyObject *cellvars,*/ + py_srcfile, /*PyObject *filename,*/ + py_funcname, /*PyObject *name,*/ + py_line, + __pyx_empty_bytes /*PyObject *lnotab*/ + ); + Py_DECREF(py_srcfile); + Py_DECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_srcfile); + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { + const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value) { + const char neg_one = (char) ((char) 0 - (char) 1), const_zero = (char) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(char) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(char) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(char) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(char), + little, !is_unsigned); + } +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { + const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(int) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (int) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (int) 0; + case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) + case 2: + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(int) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (int) 0; + case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) + case -2: + if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } +#endif + if (sizeof(int) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + int val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (int) -1; + } + } else { + int val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (int) -1; + val = __Pyx_PyInt_As_int(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(long) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (long) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (long) 0; + case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) + case 2: + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(long) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (long) 0; + case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) + case -2: + if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } +#endif + if (sizeof(long) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + long val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (long) -1; + } + } else { + long val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (long) -1; + val = __Pyx_PyInt_As_long(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) { + const char neg_one = (char) ((char) 0 - (char) 1), const_zero = (char) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(char) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (char) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (char) 0; + case 1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0]) + case 2: + if (8 * sizeof(char) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) { + return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(char) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) { + return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(char) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT) { + return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (char) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(char) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (char) 0; + case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(char, digit, +digits[0]) + case -2: + if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) { + return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(char) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) { + return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) { + return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(char) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) { + return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) { + return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(char) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) { + return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + } +#endif + if (sizeof(char) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + char val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (char) -1; + } + } else { + char val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (char) -1; + val = __Pyx_PyInt_As_char(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to char"); + return (char) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to char"); + return (char) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = a->tp_base; + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +#if PY_MAJOR_VERSION == 2 +static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { + PyObject *exception, *value, *tb; + int res; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&exception, &value, &tb); + res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + if (!res) { + res = PyObject_IsSubclass(err, exc_type2); + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + } + __Pyx_ErrRestore(exception, value, tb); + return res; +} +#else +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0; + if (!res) { + res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } + return res; +} +#endif +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; ip) { + #if PY_MAJOR_VERSION < 3 + if (t->is_unicode) { + *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); + } else if (t->intern) { + *t->p = PyString_InternFromString(t->s); + } else { + *t->p = PyString_FromStringAndSize(t->s, t->n - 1); + } + #else + if (t->is_unicode | t->is_str) { + if (t->intern) { + *t->p = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); + } else { + *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + #endif + if (!*t->p) + return -1; + if (PyObject_Hash(*t->p) == -1) + return -1; + ++t; + } + return 0; +} + +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +#if !CYTHON_PEP393_ENABLED +static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + char* defenc_c; + PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); + if (!defenc) return NULL; + defenc_c = PyBytes_AS_STRING(defenc); +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + { + char* end = defenc_c + PyBytes_GET_SIZE(defenc); + char* c; + for (c = defenc_c; c < end; c++) { + if ((unsigned char) (*c) >= 128) { + PyUnicode_AsASCIIString(o); + return NULL; + } + } + } +#endif + *length = PyBytes_GET_SIZE(defenc); + return defenc_c; +} +#else +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +} +#endif +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT + if ( +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + __Pyx_sys_getdefaultencoding_not_ascii && +#endif + PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif +#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) + if (PyByteArray_Check(o)) { + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); + } else +#endif + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { +#if PY_MAJOR_VERSION >= 3 + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type %.200s). " + "The ability to return an instance of a strict subclass of int " + "is deprecated, and may be removed in a future version of Python.", + Py_TYPE(result)->tp_name)) { + Py_DECREF(result); + return NULL; + } + return result; + } +#endif + PyErr_Format(PyExc_TypeError, + "__%.4s__ returned non-%.4s (type %.200s)", + type_name, type_name, Py_TYPE(result)->tp_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + const char *name = NULL; + PyObject *res = NULL; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x) || PyLong_Check(x))) +#else + if (likely(PyLong_Check(x))) +#endif + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + #if PY_MAJOR_VERSION < 3 + if (m && m->nb_int) { + name = "int"; + res = m->nb_int(x); + } + else if (m && m->nb_long) { + name = "long"; + res = m->nb_long(x); + } + #else + if (likely(m && m->nb_int)) { + name = "int"; + res = m->nb_int(x); + } + #endif +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Int(x); + } +#endif + if (likely(res)) { +#if PY_MAJOR_VERSION < 3 + if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { +#else + if (unlikely(!PyLong_CheckExact(res))) { +#endif + return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(b))) { + if (sizeof(Py_ssize_t) >= sizeof(long)) + return PyInt_AS_LONG(b); + else + return PyInt_AsSsize_t(b); + } +#endif + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)b)->ob_digit; + const Py_ssize_t size = Py_SIZE(b); + if (likely(__Pyx_sst_abs(size) <= 1)) { + ival = likely(size) ? digits[0] : 0; + if (size == -1) ival = -ival; + return ival; + } else { + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyInt_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { + return PyInt_FromSize_t(ival); +} + + +#endif /* Py_PYTHON_H */ diff --git a/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.pxd b/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.pxd new file mode 100644 index 0000000000..7e2fd76920 --- /dev/null +++ b/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.pxd @@ -0,0 +1,188 @@ +# coding=utf-8 +# distutils: language = c++ + +cdef extern from "ufx_interface.h": + cdef cppclass c_IF2UnPacker + + cdef cppclass c_IF2Packer: + c_IF2Packer() except+ + void SetBuffer(char* pBuf,int iBufSize,int iDataLen) + void BeginPack() + int NewDataset(char *szDatasetName, int iReturnCode) + int AddField(char *szFieldName,char cFieldType,int iFieldWidth,int iFieldScale) + int AddStr(char *szValue) + int AddInt(int iValue) + int AddDouble(double fValue) + int AddChar(char* cValue) + int AddRaw(char* lpBuff,int iLen) + void EndPack() + int* GetPackBuf() + int GetPackLen() + int GetPackBufSize() + int GetVersion() + void SetReturnCode(long dwRetCode) + c_IF2UnPacker* UnPack() + void FreeMem() + void ClearValue() + void BeginPackEx(char* szName) + void ClearDataSet() + void Release() + + cdef cppclass c_IF2UnPacker: + c_IF2UnPacker(char* lpBuffer,int iLen) except+ + c_IF2UnPacker(c_IF2Packer* lpPacker) except+ + int GetVersion() + char* GetErrorInfo() + int Open(char* lpBuffer,int iLen) + int GetDatasetCount() + int SetCurrentDatasetByIndex(int nIndex) + int SetCurrentDataset(char *szDatasetName) + char* GetPackBuf() + int GetPackLen() + int GetRowCount() + void First() + void Last() + void Go(int nRow) + char* GetDatasetName() + int OpenAndCopy(char* lpBuffer,int iLen) + char* GetColTypeByName(char* columnName) + int GetColScaleByName(char* columnName) + int GetColWidthByName(char* columnName) + int GetColCount(); + char* GetColName(int column); + char* GetColType(int column); + int GetColScale(int column); + int GetColWidth(int column); + int FindColIndex(char * columnName); + char* GetStrByIndex(int column); + char* GetStr(char * columnName); + char* GetCharByIndex(int column); + char* GetChar(char * columnName); + double GetDoubleByIndex( int column); + double GetDouble(char * columnName); + int GetIntByIndex(int column); + int GetInt(char * columnName); + char* GetRawByIndex(int column,int * lpRawLen); + char* GetRaw(char * columnName,int * lpRawLen); + int WasNull(); + void Next(); + int IsEOF(); + int IsEmpty(); + void Destroy(); + void Release() + + cdef cppclass C_CConfigInterface: + C_CConfigInterface() except+ + int Load(char *szFileName) + int Save(char *szFileName) + char * GetString(char *szSection, char *szEntry, char *szDefault) + int GetInt(char *szSection, char *szEntry, int iDefault) + int SetString(char *szSection, char *szEntry, char *szValue) + int SetInt(char *szSection, char *szEntry, int iValue) + void Release() + + cdef cppclass c_IBizMessage: + c_IBizMessage() except+ + void SetFunction(int nFUnctionNo) + int GetFunction() + void SetPacketType(int nPacketType) + int GetPacketType() + void SetBranchNo(int nBranchNo) + int GetBranchNo() + void SetSystemNo(int nSystemNo) + int GetSystemNo() + void SetSubSystemNo(int nSubSystemNo) + int GetSubSystemNo() + void SetSenderId(int nSenderId) + int GetSenderId() + void SetPacketId(int nPacketId) + int GetPacketId() + void SetErrorNo(int nErrorNo) + int GetErrorNo() + void SetErrorInfo(char* strErrorInfo) + char* GetErrorInfo() + void SetReturnCode(int nReturnCode) + int GetReturnCode() + void SetContent(char* lpContent,int iLen) + char* GetContent(int& iLen) + void SetIssueType(int nIssueType) + int GetIssueType() + void SetSequeceNo(int nSequeceNo) + int GetSequeceNo() + void SetKeyInfo(char* lpKeyData,int iLen) + char* GetKeyInfo(int& iLen) + void SetAppData(char* lpAppdata,int nAppLen) + char* GetAppData(int& nAppLen) + int ChangeReq2AnsMessage() + char* GetBuff(int& nBuffLen) + int SetBuff(char* lpBuff,int nBuffLen) + void ReSet() + void Release() + + cdef cppclass c_CSubscribeParamInterface: + c_CSubscribeParamInterface() except+ + void SetTopicName(char* szName) + void SetAppData(char* lpData,int iLen) + void SetFilter(char* filterName,char* filterValue) + void SetReturnFiled(char* filedName) + void SetFromNow(int bFromNow) + void SetReplace(int bReplace) + void SetSendInterval(int nSendInterval) + char* GetTopicName() + char* GetAppData(int *iLen) + char* GetFilterNameByIndex(int index) + char* GetFilterValueByIndex(int index) + char* GetFilterValue(char* fileName) + int GetFilterCount() + char* GetReturnFiled() + int GetFromNow() + int GetReplace() + int GetSendInterval() + void Release() + + cdef cppclass c_SubCallBack: + c_SubCallBack(char *lpMould,char *lpClass) except+ + c_SubCallBack() except+ + int initInstance() + + cdef cppclass c_CSubscribeInterface: + int SubscribeTopic(c_CSubscribeParamInterface* lpSubscribeParamInter ,int uiTimeout,c_IF2UnPacker** lppBizUnPack,c_IF2Packer* lpBizPack); + int CancelSubscribeTopic(int subscribeIndex) + void GetSubcribeTopic(c_IF2Packer* lpPack) + void Release(); + + cdef cppclass c_CCallbackInterface: + c_CCallbackInterface(char* sMould,char* sClass) except+ + c_CCallbackInterface() except+ + int InitInstance() + + cdef cppclass c_CConnectionInterface: + c_CConnectionInterface(C_CConfigInterface* lpConfig) except+ + int Create(c_CCallbackInterface *lpCallback) + int Connect(unsigned int uiTimeout) + int Close() + char* GetServerAddress(int *lpPort) + int GetStatus() + int GetServerLoad() + char* GetErrorMsg(int nErrorCode) + int GetConnectError() + int SendBiz(int iFunID, c_IF2Packer *lpPacker, int nAsy, int iSystemNo, int nCompressID) + int RecvBiz(int hSend, c_IF2UnPacker **lppUnPackerOrStr, int uiTimeout, int uiFlag) + int SendBizEx(int iFunID, c_IF2Packer *lpPacker,char* svrName, int nAsy, int iSystemNo, int nCompressID,int branchNo) + int RecvBizEx(int hSend, c_IF2UnPacker **lppUnpackerOrStr, unsigned uiTimeout, unsigned uiFlag) + int CreateEx(c_CCallbackInterface *lpCallback) + char* GetRealAddress() + int Reserved8() + int Reserved9() + char* GetSelfAddress() + char* GetSelfMac() + c_CSubscribeInterface* NewSubscriber(c_SubCallBack *lpCallback,char* SubScribeName,int iTimeOut, + int iInitRecvQLen=INIT_RECVQ_LEN,int iStepRecvQLen=STEP_RECVQ_LEN) + c_IF2UnPacker* GetTopic(int byForce,int iTimeOut) + char* GetMCLastError() + int Create2BizMsg(c_CCallbackInterface *lpCallback) + int SendBizMsg(c_IBizMessage* lpMsg,int nAsy) + int RecvBizMsg(int hSend, c_IBizMessage* lpMsg, unsigned uiTimeout, unsigned uiFlag) + int Reserved10() + int Reserved11() + char* GetLastAnsError(int bAsyError) diff --git a/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.pyx b/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.pyx new file mode 100644 index 0000000000..2dbe2d2943 --- /dev/null +++ b/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.pyx @@ -0,0 +1,519 @@ +# coding=utf-8 +# distutils: language = c++ + +cimport py_t2sdk +from cpython.pycapsule cimport * +from ctypes import * +from libcpp.string cimport string +from libc.stdlib cimport * + +cdef class pyIF2UnPacker + +cdef class pyIF2Packer: + cdef c_IF2Packer* lpPacker + def __cinit__(self): + self.lpPacker = new c_IF2Packer() + def __dealloc__(self): + del self.lpPacker + def BeginPack(self): + self.lpPacker.BeginPack() + def NewDataset(self,str szDatasetName, int iReturnCode): + sName = bytes(szDatasetName,encoding='utf-8') + return self.lpPacker.NewDataset(sName,iReturnCode) + def AddField(self,str szFieldName,str cFieldType='S',int iFieldWidth=255,int iFieldScale=4): + sName = bytes(szFieldName,encoding='utf-8') + sType = bytes(cFieldType,encoding='utf-8') + return self.lpPacker.AddField(sName,sType[0],iFieldWidth,iFieldScale) + def AddStr(self,str szValue): + sValue = bytes(szValue,encoding='utf-8') + return self.lpPacker.AddStr(sValue) + def AddInt(self,int iValue): + return self.lpPacker.AddInt(iValue) + def AddDouble(self,double fValue): + return self.lpPacker.AddDouble(fValue) + def AddChar(self,str cValue): + sValue = bytes(cValue,encoding='utf-8') + return self.lpPacker.AddChar(sValue[0]) + def AddRaw(self,list lpBuff,int iLen): + cdef char* sBuff = malloc(iLen) + cdef int iIndex = 0 + while iIndex < iLen: + sBuff[iIndex] = lpBuff[iIndex] + iIndex+=1 + iRet = self.lpPacker.AddRaw(sBuff,iLen) + free(sBuff) + return iRet + def EndPack(self): + return self.lpPacker.EndPack() + def GetPackBuf(self): + cdef int iLength = self.lpPacker.GetPackLen() + cdef int* sBuff = self.lpPacker.GetPackBuf() + lpBuff = [] + cdef int iIndex = 0 + while iIndex < iLength: + lpBuff.append(sBuff[iIndex]) + iIndex +=1 + return lpBuff + def GetPackLen(self): + return self.lpPacker.GetPackLen() + def GetPackBufSize(self): + return self.lpPacker.GetPackBufSize() + def GetVersion(self): + return self.lpPacker.GetVersion() + def SetReturnCode(self,long dwRetCode): + self.lpPacker.SetReturnCode(dwRetCode) + def UnPack(self): + cdef c_IF2UnPacker* lpUnpacker = self.lpPacker.UnPack() + lpPyUnpacker = pyIF2UnPacker() + lpPyUnpacker.lpUnpacker = lpUnpacker + return lpPyUnpacker + def FreeMem(self): + self.lpPacker.FreeMem() + def ClearValue(self): + self.lpPacker.ClearValue() + def BeginPackEx(self,str szName): + sName = bytes(szName,encoding='utf-8') + self.lpPacker.BeginPackEx(sName) + def ClearDataSet(self): + self.lpPacker.ClearDataSet() + def Release(self): + self.lpPacker.Release() + +cdef class pyIF2UnPacker: + cdef c_IF2UnPacker* lpUnpacker + def __cinit__(self): + self.lpUnpacker = NULL + def __dealloc__(self): + if self.lpUnpacker != NULL: + del self.lpUnpacker + self.lpUnpacker = NULL + def GetVersion(self): + return self.lpUnpacker.GetVersion() + def Open(self,list lpBuff,int iLen): + cdef char* sBuff = malloc(iLen) + cdef int iIndex = 0 + while iIndex < iLen: + sBuff[iIndex] = lpBuff[iIndex] + iIndex+=1 + if self.lpUnpacker == NULL: + self.lpUnpacker = new c_IF2UnPacker(sBuff,iLen) + iRet = 0 + else: + iRet = self.lpUnpacker.Open(sBuff,iLen) + free(sBuff) + return iRet + def GetDatasetCount(self): + if self.lpUnpacker == NULL: + return -1; + return self.lpUnpacker.GetDatasetCount() + def SetCurrentDatasetByIndex(self,int nIndex): + self.lpUnpacker.SetCurrentDatasetByIndex(nIndex) + def SetCurrentDataset(self,str szDatasetName): + sName = bytes(szDatasetName,encoding='utf-8') + self.lpUnpacker.SetCurrentDataset(sName) + def GetPackBuf(self): + cdef char* lpBuff = self.lpUnpacker.GetPackBuf() + return lpBuff + def GetPackLen(self): + return self.lpUnpacker.GetPackLen() + def GetRowCount(self): + return self.lpUnpacker.GetRowCount() + def First(self): + self.lpUnpacker.First() + def Last(self): + self.lpUnpacker.Last() + def Go(self,int nRow): + self.lpUnpacker.Go(nRow) + def GetDatasetName(self): + cdef char* sName = self.lpUnpacker.GetDatasetName() + return sName + def GetColTypeByName(self,str columnName): + sName = bytes(columnName,encoding='utf-8') + cdef char* sType = self.lpUnpacker.GetColTypeByName(sName) + return sType.decode('gbk') + def GetColScaleByName(self,str columnName): + sName = bytes(columnName,encoding='utf-8') + return self.lpUnpacker.GetColScaleByName(sName) + def GetColWidthByName(self,str columnName): + sName = bytes(columnName,encoding='utf-8') + return self.lpUnpacker.GetColWidthByName(sName) + def GetColCount(self): + return self.lpUnpacker.GetColCount() + def GetColName(self,int column): + return self.lpUnpacker.GetColName(column).decode('gbk') + def GetColType(self,int column): + cdef char* sType = self.lpUnpacker.GetColType(column) + return sType.decode('gbk') + def GetColScale(self,int column): + return self.lpUnpacker.GetColScale(column) + def GetColWidth(self,int column): + return self.lpUnpacker.GetColWidth(column) + def FindColIndex(self,str columnName): + sName = bytes(columnName,encoding='utf-8') + return self.lpUnpacker.FindColIndex(sName) + def GetStrByIndex(self,int column): + return self.lpUnpacker.GetStrByIndex(column).decode('GBK') + def GetStr(self,str columnName): + sName = bytes(columnName,encoding='UTF-8') + return self.lpUnpacker.GetStr(sName).decode('GBK') + def GetCharByIndex(self,int column): + return self.lpUnpacker.GetCharByIndex(column).decode('UTF-8') + def GetChar(self,str columnName): + sName = bytes(columnName,encoding='UTF-8') + return self.lpUnpacker.GetChar(sName).decode('UTF-8') + def GetDoubleByIndex(self, int column): + return self.lpUnpacker.GetDoubleByIndex(column) + def GetDouble(self,str columnName): + sName = bytes(columnName,encoding='utf-8') + return self.lpUnpacker.GetDouble(sName) + def GetIntByIndex(self,int column): + return self.lpUnpacker.GetIntByIndex(column) + def GetInt(self,str columnName): + sName = bytes(columnName,encoding='utf-8') + if self.lpUnpacker == NULL: + return -1 + return self.lpUnpacker.GetInt(sName) + def GetRawByIndex(self,int column): + cdef int ilength = 0 + cdef char* sBuff = self.lpUnpacker.GetRawByIndex(column,&ilength) + lpBuff = [] + cdef int iIndex = 0 + while iIndex < iLength: + lpBuff.append(sBuff[iIndex]) + iIndex +=1 + return lpBuff,ilength + def GetRaw(self,str columnName): + sName = bytes(columnName,encoding='utf-8') + cdef int ilength = 0 + cdef char* sBuff = self.lpUnpacker.GetRaw(sName,&ilength) + lpBuff = [] + cdef int iIndex = 0 + while iIndex < iLength: + lpBuff.append(sBuff[iIndex]) + iIndex +=1 + return lpBuff,ilength + def WasNull(self): + return self.lpUnpacker.WasNull() + def Next(self): + self.lpUnpacker.Next() + def IsEOF(self): + return self.lpUnpacker.IsEOF() + def IsEmpty(self): + return self.lpUnpacker.IsEmpty() + def Destroy(self): + self.lpUnpacker.Destroy() + def Release(self): + if self.lpUnpacker != NULL: + self.lpUnpacker.Release() + +cdef class pyCConfigInterface: + cdef C_CConfigInterface* lpConfig + def __cinit__(self): + self.lpConfig = new C_CConfigInterface() + def __dealloc__(self): + del self.lpConfig + def Load(self,str szFileName): + sName = bytes(szFileName,encoding='utf-8') + return self.lpConfig.Load(sName) + def Save(self,str szFileName): + sName = bytes(szFileName,encoding='utf-8') + return self.lpConfig.Save(sName) + def GetString(self,str szSection,str szEntry,str szDefault): + sSection = bytes(szSection,encoding='utf-8') + sEntry = bytes(szEntry,encoding='utf-8') + sDefault = bytes(szDefault,encoding='utf-8') + cdef char* sValue = self.lpConfig.GetString(sSection,sEntry,sDefault) + return sValue + def GetInt(self,str szSection,str szEntry, int iDefault): + sSection = bytes(szSection,encoding='utf-8') + sEntry = bytes(szEntry,encoding='utf-8') + return self.lpConfig.GetInt(sSection,sEntry,iDefault) + def SetString(self,str szSection,str szEntry,str szValue): + sSection = bytes(szSection,encoding='utf-8') + sEntry = bytes(szEntry,encoding='utf-8') + sValue = bytes(szValue,encoding='utf-8') + return self.lpConfig.SetString(sSection,sEntry,sValue) + def SetInt(self,str szSection,str szEntry, int iValue): + sSection = bytes(szSection,encoding='utf-8') + sEntry = bytes(szEntry,encoding='utf-8') + return self.lpConfig.SetInt(sSection,sEntry,iValue) + def Release(self): + self.lpConfig.Release() + +cdef class pyIBizMessage: + cdef c_IBizMessage* lpBizMessage + def __cinit__(self): + self.lpBizMessage = new c_IBizMessage() + def __dealloc__(self): + del self.lpBizMessage + def SetFunction(self,int nFUnctionNo): + self.lpBizMessage.SetFunction(nFUnctionNo) + def GetFunction(self): + return self.lpBizMessage.GetFunction() + def SetPacketType(self,int nPacketType): + self.lpBizMessage.SetPacketType(nPacketType) + def GetPacketType(self): + return self.lpBizMessage.GetPacketType() + def SetBranchNo(self,int nBranchNo): + self.lpBizMessage.SetBranchNo(nBranchNo) + def GetBranchNo(self): + return self.lpBizMessage.GetBranchNo() + def SetSystemNo(self,int nSystemNo): + self.lpBizMessage.SetSystemNo(nSystemNo) + def GetSystemNo(self): + return self.lpBizMessage.GetSystemNo() + def SetSubSystemNo(self,int nSubSystemNo): + self.lpBizMessage.SetSubSystemNo(nSubSystemNo) + def GetSubSystemNo(self): + return self.lpBizMessage.GetSubSystemNo() + def SetSenderId(self,int nSenderId): + self.lpBizMessage.SetSenderId(nSenderId) + def GetSenderId(self): + return self.lpBizMessage.GetSenderId() + def SetPacketId(self,int nPacketId): + self.lpBizMessage.SetPacketId(nPacketId) + def GetPacketId(self): + return self.lpBizMessage.GetPacketId() + def SetErrorNo(self,int nErrorNo): + self.lpBizMessage.SetErrorNo(nErrorNo) + def GetErrorNo(self): + return self.lpBizMessage.GetErrorNo() + def SetErrorInfo(self,str strErrorInfo): + sErrorInfo = bytes(strErrorInfo,encoding='utf-8') + self.lpBizMessage.SetErrorInfo(sErrorInfo) + def GetErrorInfo(self): + cdef char* sErrInfo = self.lpBizMessage.GetErrorInfo() + return sErrInfo + def SetReturnCode(self,int nReturnCode): + self.lpBizMessage.SetReturnCode(nReturnCode) + def GetReturnCode(self): + return self.lpBizMessage.GetReturnCode() + def SetContent(self,list lpContent,int iLen): + cdef char* sBuff = malloc(iLen) + cdef int iIndex = 0 + while iIndex < iLen: + sBuff[iIndex] = lpContent[iIndex] + iIndex+=1 + self.lpBizMessage.SetContent(sBuff,iLen) + free(sBuff) + def GetContent(self): + cdef int iLen = 0 + cdef char* sBuff = self.lpBizMessage.GetContent(iLen) + lpBuff = [] + cdef iTemp = 0 + cdef int iIndex = 0 + while iIndex < iLen: + iTemp = sBuff[iIndex] + lpBuff.append(iTemp) + iIndex +=1 + return lpBuff,iLen + def SetIssueType(self,int nIssueType): + self.lpBizMessage.SetIssueType(nIssueType) + def GetIssueType(self): + return self.lpBizMessage.GetIssueType() + def SetSequeceNo(self,int nSequeceNo): + self.lpBizMessage.SetSequeceNo(nSequeceNo) + def GetSequeceNo(self): + return self.lpBizMessage.GetSequeceNo() + def SetKeyInfo(self,list lpKeyData,int iLen): + cdef char* sBuff = malloc(iLen) + cdef int iIndex = 0 + while iIndex < iLen: + sBuff[iIndex] = lpKeyData[iIndex] + iIndex+=1 + self.lpBizMessage.SetKeyInfo(sBuff,iLen) + def GetKeyInfo(self): + cdef int iLen = 0 + cdef int itemp = 0 + cdef char* sBuff = self.lpBizMessage.GetKeyInfo(iLen) + lpBuff = [] + cdef int iIndex = 0 + while iIndex < iLen: + lpBuff.append(sBuff[iIndex]) + iIndex +=1 + return lpBuff,iLen + def SetAppData(self,str lpAppdata,int nAppLen): + sAppData = bytes(lpAppdata,encoding='utf-8') + self.lpBizMessage.SetAppData(sAppData,nAppLen) + def GetAppData(self): + cdef int iLen = 0 + cdef char* sAppData = self.lpBizMessage.GetAppData(iLen) + return sAppData,iLen + def ChangeReq2AnsMessage(self): + self.lpBizMessage.ChangeReq2AnsMessage() + def GetBuff(self): + cdef int iLen = 0 + cdef iTemp = 0 + cdef char* sBuff = self.lpBizMessage.GetBuff(iLen) + lpBuff = [] + cdef int iIndex = 0 + while iIndex < iLen: + iTemp = sBuff[iIndex] + lpBuff.append(iTemp) + iIndex +=1 + return lpBuff,iLen + def SetBuff(self,list lpBuff,int nBuffLen): + cdef char* sBuff = malloc(nBuffLen) + cdef int iIndex = 0 + while iIndex < nBuffLen: + sBuff[iIndex] = lpBuff[iIndex] + iIndex+=1 + self.lpBizMessage.SetBuff(sBuff,nBuffLen) + def ReSet(self): + self.lpBizMessage.ReSet() + def Release(self): + self.lpBizMessage.Release() + +cdef class pySubscribeParamInterface: + cdef c_CSubscribeParamInterface* lpSubscribeParam + def __cinit__(self): + self.lpSubscribeParam = new c_CSubscribeParamInterface() + def __dealloc__(self): + del self.lpSubscribeParam + def SetTopicName(self,str szName): + sName = bytes(szName,encoding='utf-8') + self.lpSubscribeParam.SetTopicName(sName) + def SetAppData(self,str lpData,int iLen): + sData = bytes(lpData,encoding='utf-8') + self.lpSubscribeParam.SetAppData(sData,iLen) + def SetFilter(self,str filterName,str filterValue): + sName = bytes(filterName,encoding='utf-8') + sValue = bytes(filterValue,encoding='utf-8') + self.lpSubscribeParam.SetFilter(sName,sValue) + def SetReturnFiled(self,str filedName): + sName = bytes(filedName,encoding='utf-8') + self.lpSubscribeParam.SetReturnFiled(sName) + def SetFromNow(self,int bFromNow): + self.lpSubscribeParam.SetFromNow(bFromNow) + def SetReplace(self,int bReplace): + self.lpSubscribeParam.SetReplace(bReplace) + def SetSendInterval(self,int nSendInterval): + self.lpSubscribeParam.SetSendInterval(nSendInterval) + def GetTopicName(self): + cdef char* sName = self.lpSubscribeParam.GetTopicName() + return sName + def GetAppData(self): + cdef int iLen = 0 + cdef char* sAppData = self.lpSubscribeParam.GetAppData(&iLen) + return sAppData,iLen + def GetFilterNameByIndex(self,int index): + cdef char* sName = self.lpSubscribeParam.GetFilterNameByIndex(index) + return sName + def GetFilterValueByIndex(self,int index): + cdef char* sName = self.lpSubscribeParam.GetFilterValueByIndex(index) + return sName + def GetFilterValue(self,str fileName): + sName = bytes(fileName,encoding='utf-8') + sValus = self.lpSubscribeParam.GetFilterValue(sName) + return sValus + def GetFilterCount(self): + return self.lpSubscribeParam.GetFilterCount() + def GetReturnFiled(self): + cdef char* sFields = self.lpSubscribeParam.GetReturnFiled() + return sFields + def GetFromNow(self): + cdef int bFromNow = self.lpSubscribeParam.GetFromNow() + return bFromNow + def GetReplace(self): + cdef int bRep = self.lpSubscribeParam.GetReplace() + return bRep + def GetSendInterval(self): + return self.lpSubscribeParam.GetSendInterval() + def Release(self): + return self.lpSubscribeParam.Release() + +cdef class pySubCallBack: + cdef c_SubCallBack* lpSubCallBack + def __cinit__(self,str lpMould,str lpClass): + sMould = bytes(lpMould,encoding='utf-8') + sClass = bytes(lpClass,encoding='utf-8') + self.lpSubCallBack = new c_SubCallBack(sMould,sClass) + def initInstance(self): + return self.lpSubCallBack.initInstance() + +cdef class pySubscribeInterface: + cdef c_CSubscribeInterface* lpSubcribe + def __cinit__(self): + self.lpSubcribe = NULL + def __dealloc__(self): + if self.lpSubcribe != NULL: + del self.lpSubcribe + self.lpSubcribe = NULL + def SubscribeTopic(self,pySubscribeParamInterface lpSubParam,int uiTimeout,pyIF2UnPacker lpUnPack = None,pyIF2Packer lpPack = None): + cdef c_IF2UnPacker** lppBizUnPack = NULL + cdef c_IF2Packer* lpBizPack = NULL + if lpUnPack != None and lpPack != None: + lppBizUnPack = &(lpUnPack.lpUnpacker) + lpBizPack = lpPack.lpPacker + cdef int ret = self.lpSubcribe.SubscribeTopic(lpSubParam.lpSubscribeParam,uiTimeout,lppBizUnPack,lpBizPack) + return ret + def CancelSubscribeTopic(self,int subscribeIndex): + return self.lpSubcribe.CancelSubscribeTopic(subscribeIndex) + def GetSubcribeTopic(self,pyIF2Packer lpPack): + return self.lpSubcribe.GetSubcribeTopic(lpPack.lpPacker) + def Release(self): + return self.lpSubcribe.Release() +cdef class pyCallbackInterface: + cdef c_CCallbackInterface* lpCallBack + def __cinit__(self,str lpMould,str lpClass): + sMould = bytes(lpMould,encoding='utf-8') + sClass = bytes(lpClass,encoding='utf-8') + self.lpCallBack = new c_CCallbackInterface(sMould,sClass) + def InitInstance(self): + return self.lpCallBack.InitInstance() + +cdef class pyConnectionInterface: + cdef c_CConnectionInterface* lpConnect + def __cinit__(self,pyCConfigInterface pConfig): + self.lpConnect = new c_CConnectionInterface(pConfig.lpConfig) + def Connect(self,int uiTimeout): + return self.lpConnect.Connect(uiTimeout) + def Close(self): + return self.lpConnect.Close() + def GetServerAddress(self): + cdef int iPort = 0 + cdef char* sAddress = self.lpConnect.GetServerAddress(&iPort) + return sAddress,iPort + def GetStatus(self): + return self.lpConnect.GetStatus() + def GetServerLoad(self): + return self.lpConnect.GetServerLoad() + def GetErrorMsg(self,int nErrorCode): + cdef char* sErrMsg = self.lpConnect.GetErrorMsg(nErrorCode) + return sErrMsg.decode('GBK') + def GetConnectError(self): + return self.lpConnect.GetConnectError() + def GetRealAddress(self): + cdef char* sAddress = self.lpConnect.GetRealAddress() + return sAddress + def GetSelfAddress(self): + cdef char* sAddress = self.lpConnect.GetSelfAddress() + return sAddress + def GetSelfMac(self): + cdef char* sMac = self.lpConnect.GetSelfMac() + return sMac + def NewSubscriber(self,pySubCallBack lppCallback,str SubScribeName,int iTimeOut): + sName = bytes(SubScribeName,encoding='utf-8') + cdef c_CSubscribeInterface* lpSub = self.lpConnect.NewSubscriber(lppCallback.lpSubCallBack,sName,iTimeOut) + pSub = pySubscribeInterface() + pSub.lpSubcribe = lpSub + if lpSub == NULL: + return -1,pSub + else: + return 0,pSub + def GetMCLastError(self): + cdef char* lpMcErr = self.lpConnect.GetMCLastError() + return lpMcErr + def Create2BizMsg(self,pyCallbackInterface lppCallback): + return self.lpConnect.Create2BizMsg(lppCallback.lpCallBack) + def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0): + return self.lpConnect.SendBizMsg(lpMsg.lpBizMessage,nAsy) + def RecvBizMsg(self,int hSend, int uiTimeout=1000, int uiFlag=0): + lpMsg = pyIBizMessage() + ret = self.lpConnect.RecvBizMsg(hSend,lpMsg.lpBizMessage,uiTimeout,uiFlag) + return ret,lpMsg + def GetLastAnsError(self,int bAsyError=0): + return self.lpConnect.GetLastAnsError(bAsyError) + + + \ No newline at end of file diff --git a/vnpy/api/t2sdk/py_t2sdk/setup.py b/vnpy/api/t2sdk/py_t2sdk/setup.py new file mode 100644 index 0000000000..16aea8e6fe --- /dev/null +++ b/vnpy/api/t2sdk/py_t2sdk/setup.py @@ -0,0 +1,22 @@ +#from distutils.core import setup, Extension +from distutils.core import setup +from distutils.extension import Extension +from Cython.Distutils import build_ext +from Cython.Build import cythonize + +setup( + name='py_t2sdk', + version='1.0.0', + author='rdc@hundsun', + author_email='', + url='', + ext_modules = cythonize(Extension( + 'py_t2sdk', + sources=['py_t2sdk.pyx','ufx_interface.cpp'], + language='c++', + include_dirs=[], + library_dirs=[], + libraries=['t2sdk'], + extra_compile_args=[], + extra_link_args=[] +))) \ No newline at end of file diff --git a/vnpy/api/t2sdk/py_t2sdk/t2sdk.lib b/vnpy/api/t2sdk/py_t2sdk/t2sdk.lib new file mode 100644 index 0000000000..3ca9f05a6d Binary files /dev/null and b/vnpy/api/t2sdk/py_t2sdk/t2sdk.lib differ diff --git a/vnpy/api/t2sdk/py_t2sdk/t2sdk_interface.h b/vnpy/api/t2sdk/py_t2sdk/t2sdk_interface.h new file mode 100644 index 0000000000..6ed77b9097 --- /dev/null +++ b/vnpy/api/t2sdk/py_t2sdk/t2sdk_interface.h @@ -0,0 +1,1812 @@ +#include +#include + +#ifndef _T2SDK_INTERFACE_H +# define _T2SDK_INTERFACE_H + +#ifdef _WIN32 + #if !defined( FUNCTION_CALL_MODE ) + #define FUNCTION_CALL_MODE __stdcall + #endif +#else + #define FUNCTION_CALL_MODE +#endif + +#ifndef HS_IKNOWN_SDK +#define HS_IKNOWN_SDK +struct IKnown +{ + virtual unsigned long FUNCTION_CALL_MODE QueryInterface(const char *iid, IKnown **ppv) = 0; + + virtual unsigned long FUNCTION_CALL_MODE AddRef() = 0; + + virtual unsigned long FUNCTION_CALL_MODE Release() = 0; + + ~IKnown(){} +}; +#endif + +#include + +#ifdef _WIN32 +typedef unsigned int uint32; +#else +#include +#if defined(__linux__) +#include +#endif +typedef uint32_t uint32; +#endif + +///ESBȣΪɼַܰʵָո񡢷ֺ; +#define IDENTITY_NAME_LENGTH 32 +///ʵռλ +#define ID_LENGTH 4 +///ڵȫ,ʱʹchar sName[ID_STR_LEN+1] +#define ID_STR_LEN (IDENTITY_NAME_LENGTH + ID_LENGTH + 1) + + +// ӿ󳤶,ʱʹchar sName[PLUGINID_LENGTH+1] +#define PLUGINID_LENGTH 256 +// ʵ󳤶,ʱʹchar sName[PLUGIN_NAME_LENGTH+1] +#define PLUGIN_NAME_LENGTH (PLUGINID_LENGTH+ID_LENGTH+1) +// 󳤶.ʱʹchar sName[SVR_NAME_LENGTH+1] +#define SVR_NAME_LENGTH 256 +// ʵ󳤶.ʱʹchar sName[PLUGINID_NAME_LENGTH+1] +#define SVRINSTANCE_NAME_LENGTH (SVR_NAME_LENGTH+ID_LENGTH+1) + +//ļбֶ +/** ļ£ºΪAPIļ¹佻Ĵеֶ */ +#define PACKER_INT_FILE_LIST "file_list" /**< ļб */ +#define PACKER_INT_FILE_ID "file_id" /**< ļid */ +#define PACKER_INT_FILE_SIZE "file_size" /**< ļС */ +#define PACKER_INT_TIME "time" /**< ļʱ */ +#define PACKER_STRING_FILE_NAME "file_name" /**< ļ */ +#define PACKER_STRING_FILE_PATH "file_path" /**< ļ· */ +#define PACKER_STRING_LOCAL_PATH "local_path" /**< ļ· */ +#define PACKER_STRING_MD5_CODE "md5_code" /**< ļmd5ֵ */ +#define PACKER_STRING_FILE_FLAG "file_flag" /**< ļʶ */ + +//ҵϢ +// +#define REQUEST_PACKET 0 +//Ӧ +#define ANSWER_PACKET 1 +//20110302 xuxp ·ϢĽṹ嶨 +typedef struct tagRouteInfo +{ + char ospfName[ID_STR_LEN+1]; + char nbrName[ID_STR_LEN+1]; + char svrName[SVRINSTANCE_NAME_LENGTH+1]; + char pluginID[PLUGIN_NAME_LENGTH+1]; + int connectID; + int memberNO; + + tagRouteInfo() + { + memset(this,0,sizeof(tagRouteInfo)); + } +}Route_Info; + + +//20101228 xuxp Ϊ˷ͺͷضϢӵĽṹĶ +typedef struct tagRequestData +{ + int sequeceNo; + int issueType; + void* lpKeyInfo; + int keyInfoLen; + void* lpFileHead; + int fileHeadLen; + int packetType;//20100111 xuxp ¼ӵİ + Route_Info routeInfo;//20110302 xuxp ·Ϣ + int iSubSystemNo;//20130508 xuxp ϵͳŴ + int iCompanyID;//20140114 xuxp ӹ˾ +}REQ_DATA, *LPREQ_DATA; +typedef struct tagRespondData +{ + int functionID; + int returnCode; + int errorNo; + char* errorInfo; + int issueType; + void* lpKeyInfo; + int keyInfoLen; + Route_Info sendInfo;//20110302 xuxp ӦӷϢ +}RET_DATA, *LPRET_DATA; + +//20150209 majc Ӻ궨 +#define T2SDK_MAX_BRANCH_NO_LEN 256 +#define T2SDK_MAX_COMPANY_NO_LEN 256 +#define T2SDK_MAX_OSPF_LEN 256 + +//20150209 majc Ӵʱָ·ɲṹ嶨 +typedef struct tagSubRouteInfo +{ + int iSystemNo; //ϵͳ + int iSubSystemNo; //ϵͳ + char szBranchNo[T2SDK_MAX_BRANCH_NO_LEN+1]; //֧ + char szCompanyNo[T2SDK_MAX_COMPANY_NO_LEN+1]; //˾ + char szOspfName[T2SDK_MAX_OSPF_LEN+1]; //OSPF + tagSubRouteInfo() + { + memset(this,0,sizeof(tagSubRouteInfo)); + } +}SUB_ROUTER_INFO; + +///ӿ +struct IF2ResultSet : public IKnown +{ + + ///ȡֶ + /**@return ֶ. + */ + virtual int FUNCTION_CALL_MODE GetColCount()=0; + + ///ȡֶ + /** @param column:ֶ(0Ϊ) + * @return ֶ ±Խ NULL + */ + virtual const char * FUNCTION_CALL_MODE GetColName(int column)=0; + + //ȡֶ + /** @param column:ֶ(0Ϊ) + * @return:泣;±Խ -1 + */ + virtual char FUNCTION_CALL_MODE GetColType(int column)=0; + + + ///ȡֶСλ + /** @param column:ֶ(0Ϊ) + * @return int ֶСλ ±Խ -1 + */ + virtual int FUNCTION_CALL_MODE GetColScale(int column)=0; + + //ȡֶݵ. + /** @param column:ֶ(0Ϊ) + * @return int ֶο ±Խ -1 + */ + virtual int FUNCTION_CALL_MODE GetColWidth(int column) = 0; + + ///ȡֶӦֶ + /**@param columnName: ֶ + *@return ֶ. ڷ-1 + */ + virtual int FUNCTION_CALL_MODE FindColIndex(const char * columnName)=0; + + // + //ֶ(0Ϊ)ȡֵֶ(ַ) + /**@param column:ֶ(0Ϊ) + *@return ֵֶַ,±Խ緵NULL + */ + virtual const char * FUNCTION_CALL_MODE GetStrByIndex(int column)=0; + + //ֶȡֵֶ(ַ) + /**@param columnName: ֶ + *@return ֵֶַ,ڷNULL + */ + virtual const char * FUNCTION_CALL_MODE GetStr(const char * columnName)=0; + + //ֶ(0Ϊ)ȡֵֶ + /**@param column:ֶ(0Ϊ) + *@return ֵֶַ,±Խ緵'\0'. + */ + virtual char FUNCTION_CALL_MODE GetCharByIndex(int column)=0; + + //ֶȡֵֶ + /**@param columnName: ֶ + *@return ֵֶַ,ڷ'\0' + */ + virtual char FUNCTION_CALL_MODE GetChar(const char * columnName)=0; + + //ֶţȡֵֶ + /**@param column:ֶ(0Ϊ) + *@return doubleֵֶ,±Խ緵0 + */ + virtual double FUNCTION_CALL_MODE GetDoubleByIndex( int column)=0; + + ///ֶȡֵֶ + /**@param columnName:ֶ + *@return doubleֵֶ,ڷ0 + */ + virtual double FUNCTION_CALL_MODE GetDouble(const char * columnName)=0; + + ///ֶţȡֵֶ + /**@param column:ֶ(0Ϊ) + *@return intֵֶ,±Խ緵0 + */ + virtual int FUNCTION_CALL_MODE GetIntByIndex(int column)=0; + + ///ֶȡֵֶ + /**@param columnName:ֶ + *@return intֵֶ,ڷ0 + */ + virtual int FUNCTION_CALL_MODE GetInt(const char * columnName)=0; + + ///ֶŻֵֶ, + /**@param column: ֶ(0Ϊ) + *@param lpRawLen: [out]ݳ + *@return : ׵ַ + */ + virtual void * FUNCTION_CALL_MODE GetRawByIndex(int column,int * lpRawLen) = 0; + + ///ֶȡֵֶ + /**@param columnName:ֶ + *@param lpRawLen: [out]ݳ + *@return : ׵ַ + */ + virtual void * FUNCTION_CALL_MODE GetRaw(const char * columnName,int * lpRawLen) = 0; + + + ///һȡֵֶǷΪNULL + /**@return 0 ǣ 1 + */ + virtual int FUNCTION_CALL_MODE WasNull()=0; + + ///ȡһ¼ + virtual void FUNCTION_CALL_MODE Next()=0; + + ///жǷΪβ + /**@return 1 ǣ0 ; + */ + virtual int FUNCTION_CALL_MODE IsEOF()=0; + + ///жǷΪ + /**@return 1 ǣ0 ; + */ + virtual int FUNCTION_CALL_MODE IsEmpty()=0; + + virtual void * FUNCTION_CALL_MODE Destroy() = 0; +}; + +struct IF2UnPacker; + +///ӿ(һж칹) +/**ִ: + * + * 0׼(ѡ, иò, IF2Packerڲڴ滺) SetBuffer(),ɵṩ,BeginPack()֮ǰ׼; + * + * 1ʼ: BeginPack(),λ; + * + * 2һ + * + *(a)ֶбAddField() + * + *(b)սά˳ֶΣ¼ֶݣAddStr() {AddInt(), AddDouble(), AddRaw()} + * + * 3ýķ(ѡ, 򷵻Ϊ0) SetReturnCode() + * + * 4һ(ѡ) NewDataSet()˴ͬʱ˸ýķ룻 + * + * 5ο2ʵһ(ѡ) + * + * 6EndPack(),ظûᵼ¼ս; + * + * 7ȡ(Сݳ) + * ҲֱӽUnPack()ؽӿ + * + *ʹע:IF2Packerʹõڴ滺ɵ߸գ + * ķ룬ֻڰʽ汾0x21ʱЧ + */ +struct IF2Packer : public IKnown +{ + ///ʼ(ʹõߵĻ) + /** һʹôʱʹñúû(ݳȱΪiDataLen) + *@param char * pBuf ַ + *@param int iBufSize ռ + *@param int iDataLen ݳȣݼֻ֮V1.0ʽİЧ + */ + virtual void FUNCTION_CALL_MODE SetBuffer(void * pBuf,int iBufSize,int iDataLen=0 )=0; + + ///λ¿ʼһ(ֶ¼Ϊ00) + /** + * ܣʼѰ(ظʹеĻռ) + *@return + */ + virtual void FUNCTION_CALL_MODE BeginPack(void)=0; + + ///ʼһ + /**ڴ򵥽İʱԲñ,ȡĬֵ + *@param const char *szDatasetName 0x20Ҫָ + *@param int iReturnCode 0x20ҪΪÿֵָ + */ + virtual int FUNCTION_CALL_MODE NewDataset(const char *szDatasetName, int iReturnCode = 0)=0; + + /** + * ܣֶ + * + *ִдҪ: NewDataset()Reset(),SetBuffer()֮,ֶΰ˳; + * + *@param szFieldNameֶ + *@param cFieldType ֶ:IDCַSַR + *@param iFieldWidth ֶοȣռֽ + *@param iFieldScale ֶξ,cFieldType='D'ʱСλ(ȱʡΪ4λС) + *@return ʾʧܣΪĿǰij + */ + virtual int FUNCTION_CALL_MODE AddField(const char *szFieldName,char cFieldType ='S',int iFieldWidth=255,int iFieldScale=4)=0; + + /** + * ܣַ + * ִдҪ:ֶ֮,ֶΰ˳; + *@param szValueַ + *@return ʾʧܣΪĿǰij + */ + virtual int FUNCTION_CALL_MODE AddStr(const char *szValue)=0; + + /** + * ܣ + *@param iValue + *@return ʾʧܣΪĿǰij + */ + virtual int FUNCTION_CALL_MODE AddInt(int iValue)=0; + + /** + * ܣӸ + *@param fValue + *@return ʾʧܣΪĿǰij + */ + virtual int FUNCTION_CALL_MODE AddDouble(double fValue)=0; + + /** + * ܣһַ + *@param cValueַ + *@return ʾʧܣΪĿǰij + */ + virtual int FUNCTION_CALL_MODE AddChar(char cValue)=0; + + /** + * ܣһ + *@param void * lpBuff + *@param int iLen ݳ + *@return ʾʧܣΪĿǰij + */ + virtual int FUNCTION_CALL_MODE AddRaw(void * lpBuff,int iLen)=0; + + /// + virtual void FUNCTION_CALL_MODE EndPack()=0; + + /** + * ܣȡָ + *@return ָ + */ + virtual void * FUNCTION_CALL_MODE GetPackBuf(void) = 0; + + /** + * ܣȡ + *@return + */ + virtual int FUNCTION_CALL_MODE GetPackLen(void) = 0; + + /** + * ܣȡС + *@return С + */ + virtual int FUNCTION_CALL_MODE GetPackBufSize(void) = 0; + + /** + * ܣȡʽ汾 + *@return 汾 + */ + virtual int FUNCTION_CALL_MODE GetVersion(void) = 0; + + ///ýķ(0x20Ҫ)Ҫ + /**ȡȱʡֵ0ããEndPack()֮ǰ + *@return 汾 + */ + virtual void FUNCTION_CALL_MODE SetReturnCode(unsigned long dwRetCode) = 0; + + /**ֱӷصǰĽӿ,EndPack()֮ܵ,ڴͷʱӦĽʵҲͷ + *@return ӿڣ˽ӿڲܵ destroy()ͷ + */ + virtual IF2UnPacker * FUNCTION_CALL_MODE UnPack(void) = 0; + + /** + * + */ + virtual void FUNCTION_CALL_MODE FreeMem(void* lpBuf) = 0; + + /** + * + */ + virtual void FUNCTION_CALL_MODE ClearValue() = 0; + + + //20110302 xuxp һӿںݵһ + ///λ¿ʼһ(ֶ¼Ϊ00) + /** + * ܣʼѰ(ظʹеĻռ) + *@return + */ + virtual void FUNCTION_CALL_MODE BeginPackEx(char* szName = NULL) = 0; + + //20110324 dongpf һӿںλǰ + ///λǰ(ֶ¼Ϊ00)Ӱ + /** + * ܣλǰ + *@return + */ + virtual void FUNCTION_CALL_MODE ClearDataSet() = 0; +}; + +///ӿ +struct IF2UnPacker : public IF2ResultSet +{ + /**ȡʽ汾 + *@return 汾 + */ + virtual int FUNCTION_CALL_MODE GetVersion(void) = 0; + + /**ȡݳ + *@return 0 ʾɹ Ϊʧ + */ + virtual int FUNCTION_CALL_MODE Open(void * lpBuffer,unsigned int iLen) = 0; + + ///ȡ(0x20ϰ汾֧) + virtual int FUNCTION_CALL_MODE GetDatasetCount()=0; + + ///õǰ(0x20ϰ汾֧) + /** + *@param int nIndex + *@return int 0 ʾɹΪʧ + */ + virtual int FUNCTION_CALL_MODE SetCurrentDatasetByIndex(int nIndex)=0; + + ///õǰ (0x20ϰ汾֧) + /** + *@param const char *szDatasetName + *@return int 0 ʾɹΪʧ + */ + virtual int FUNCTION_CALL_MODE SetCurrentDataset(const char *szDatasetName)=0; + + /** ȡָ + *@return ָ + */ + virtual void * FUNCTION_CALL_MODE GetPackBuf(void) = 0; + + /** ȡݳ + *@return ݳ + */ + virtual unsigned int FUNCTION_CALL_MODE GetPackLen(void) = 0; + + /**ȡݼ¼,20051207Ժ汾֧ + *@return ¼ + */ + virtual unsigned int FUNCTION_CALL_MODE GetRowCount(void) = 0; + + ///м¼αӿڣȡ¼ + virtual void FUNCTION_CALL_MODE First() = 0; + + ///м¼αӿڣȡһ¼ + virtual void FUNCTION_CALL_MODE Last() = 0; + + ///м¼αӿڣȡĵn¼ȡֵΧ[1, GetRowCount()] + virtual void FUNCTION_CALL_MODE Go(int nRow) = 0; + + ///ȡǰֵĽӿ,ûַ"" + virtual const char* FUNCTION_CALL_MODE GetDatasetName() = 0; + + virtual int FUNCTION_CALL_MODE OpenAndCopy(void * lpBuffer,unsigned int iLen) = 0; + + //20140623 majc Ӹֻȡֶֶͣξȣֶ󳤶 + //ȡֶ + /** @param columnName:ֶ + * @return:泣; ĬϷ'S' + */ + virtual char FUNCTION_CALL_MODE GetColTypeByName(const char * columnName)=0; + + + ///ȡֶСλ + /** @param columnName:ֶ + * @return int ֶСλ 0 + */ + virtual int FUNCTION_CALL_MODE GetColScaleByName(const char * columnName)=0; + + //ȡֶݵ. + /** @param columnName:ֶ + * @return int ֶο 1 + */ + virtual int FUNCTION_CALL_MODE GetColWidthByName(const char * columnName) = 0; +}; + +///Ӷ CConnectionInterface IJöCConfigInterface +/** +* ļء浽ļд +*/ +class CConfigInterface: public IKnown +{ +public: + /** + * ļ + * @param szFileName ļʽiniοʾ + * @return 0ʾɹʧ + */ + virtual int FUNCTION_CALL_MODE Load(const char *szFileName) = 0; + + /** + * 浽ļ + * @param szFileName ļ + * @return 0ʾɹʧ + */ + virtual int FUNCTION_CALL_MODE Save(const char *szFileName) = 0; + + /** + * ȡֵַ + * @param szSection + * @param szEntry + * @param szDefault ȱʡֵ + * @return ֵַûҵʱszDefault + */ + virtual const char * FUNCTION_CALL_MODE GetString(const char *szSection, const char *szEntry, const char *szDefault) = 0; + + /** + * ȡֵ + * @param szSection + * @param szEntry + * @param iDefault ȱʡֵ + * @return ֵûҵʱiDefault + */ + virtual int FUNCTION_CALL_MODE GetInt(const char *szSection, const char *szEntry, int iDefault) = 0; + + /** + * ֵַ + * @param szSection + * @param szEntry + * @param szValue ֵ + * @return 0ʾɹʧ + */ + virtual int FUNCTION_CALL_MODE SetString(const char *szSection, const char *szEntry, const char *szValue) = 0; + + /** + * ֵ + * @param szSection + * @param szEntry + * @param iValue ֵ + * @return 0ʾɹʧ + */ + virtual int FUNCTION_CALL_MODE SetInt(const char *szSection, const char *szEntry, int iValue) = 0; +}; + + +typedef struct tagBizRouteInfo +{ + char ospfName[ID_STR_LEN+1];//·Ŀڵм + char nbrName[ID_STR_LEN+1];//мڵھ + char svrName[SVRINSTANCE_NAME_LENGTH+1];//мĽ + char pluginID[PLUGIN_NAME_LENGTH+1];//м + int connectID;//Ӻ + int memberNO;//Ա + + tagBizRouteInfo() + { + memset(this,0,sizeof(tagBizRouteInfo)); + } +}BIZROUTE_INFO; + + +struct IBizMessage : public IKnown +{ + //ùܺ + virtual void FUNCTION_CALL_MODE SetFunction(const int nFUnctionNo) = 0; + //ȡܺ + virtual int FUNCTION_CALL_MODE GetFunction() = 0; + + //ð + virtual void FUNCTION_CALL_MODE SetPacketType(const int nPacketType) = 0; + //ȡ + virtual int FUNCTION_CALL_MODE GetPacketType() = 0; + + //Ӫҵ + virtual void FUNCTION_CALL_MODE SetBranchNo(const int nBranchNo) = 0; + //ȡӪҵ + virtual int FUNCTION_CALL_MODE GetBranchNo() = 0; + + //ϵͳ + virtual void FUNCTION_CALL_MODE SetSystemNo(const int nSystemNo) = 0; + //ȡϵͳ + virtual int FUNCTION_CALL_MODE GetSystemNo() = 0; + + //ϵͳ + virtual void FUNCTION_CALL_MODE SetSubSystemNo(const int nSubSystemNo) = 0; + //ȡϵͳ + virtual int FUNCTION_CALL_MODE GetSubSystemNo() = 0; + + //÷߱ + virtual void FUNCTION_CALL_MODE SetSenderId(const int nSenderId) = 0; + //ȡ߱ + virtual int FUNCTION_CALL_MODE GetSenderId() = 0; + + //ð + virtual void FUNCTION_CALL_MODE SetPacketId(const int nPacketId) = 0; + //ȡ + virtual int FUNCTION_CALL_MODE GetPacketId() = 0; + + //Ŀĵ· + virtual void FUNCTION_CALL_MODE SetTargetInfo(const BIZROUTE_INFO targetInfo) = 0; + //ȡĿĵ· + virtual void FUNCTION_CALL_MODE GetTargetInfo(BIZROUTE_INFO& targetInfo) = 0; + + //÷· + virtual void FUNCTION_CALL_MODE SetSendInfo(const BIZROUTE_INFO sendInfo) = 0; + //ȡ· + virtual void FUNCTION_CALL_MODE GetSendInfo(BIZROUTE_INFO& sendInfo) = 0; + + //ô + virtual void FUNCTION_CALL_MODE SetErrorNo(const int nErrorNo) = 0; + //ȡ + virtual int FUNCTION_CALL_MODE GetErrorNo() = 0; + + //ôϢ + virtual void FUNCTION_CALL_MODE SetErrorInfo(const char* strErrorInfo) = 0; + //ȡϢ + virtual const char* FUNCTION_CALL_MODE GetErrorInfo() = 0; + + //÷ + virtual void FUNCTION_CALL_MODE SetReturnCode(const int nReturnCode) = 0; + //ȡ + virtual int FUNCTION_CALL_MODE GetReturnCode() = 0; + + //ҵ + virtual void FUNCTION_CALL_MODE SetContent(void* lpContent,int iLen) = 0; + //ȡҵ + virtual const void* FUNCTION_CALL_MODE GetContent(int& iLen) = 0; + + //½ӿϢ1.0Ķ + //ö + virtual void FUNCTION_CALL_MODE SetIssueType(const int nIssueType) = 0; + //ȡ + virtual int FUNCTION_CALL_MODE GetIssueType() = 0; + + // + virtual void FUNCTION_CALL_MODE SetSequeceNo(const int nSequeceNo) = 0; + //ȡ + virtual int FUNCTION_CALL_MODE GetSequeceNo() = 0; + + //ùؼֶϢ + virtual void FUNCTION_CALL_MODE SetKeyInfo(void* lpKeyData,int iLen) = 0; + //ȡؼֶϢ + virtual const void* FUNCTION_CALL_MODE GetKeyInfo(int& iLen) = 0; + + //øݣʱԭ + virtual void FUNCTION_CALL_MODE SetAppData(const void* lpAppdata,int nAppLen) = 0; + //ȡݣʱԭ + virtual const void* FUNCTION_CALL_MODE GetAppData(int& nAppLen) = 0; + + //תӦ + virtual int FUNCTION_CALL_MODE ChangeReq2AnsMessage() = 0; + + //ȡ + virtual void* FUNCTION_CALL_MODE GetBuff(int& nBuffLen) = 0; + // + virtual int FUNCTION_CALL_MODE SetBuff(const void* lpBuff,int nBuffLen) = 0; + + //ϢڵֶΣ´θá + virtual void FUNCTION_CALL_MODE ReSet() = 0; + + //ù˾ + virtual void FUNCTION_CALL_MODE SetCompanyID(const int nCompanyID) = 0; + //ȡ˾ + virtual int FUNCTION_CALL_MODE GetCompanyID() = 0; + + //÷߹˾ + virtual void FUNCTION_CALL_MODE SetSenderCompanyID(const int nSenderCompanyID) = 0; + //ȡ߹˾ + virtual int FUNCTION_CALL_MODE GetSenderCompanyID() = 0; +}; + +#define IDENTITY_NAME_LENGTH 32 /**< ͻֳ */ +#define MAX_MACADDRESS_LEN 18 /**< MAC ַ */ +#define MAX_RAND_LEN 4 /**< */ + +/** ͻʶ */ +#define MAX_BIZNAME_LEN \ + IDENTITY_NAME_LENGTH+1+MAX_MACADDRESS_LEN+1+MAX_RAND_LEN+2 + +#define INIT_RECVQ_LEN 256 /**< նгʼ */ +#define STEP_RECVQ_LEN 512 /**< նչ */ +#define SIMPLIFIED_CHINESE 0 /**< Ϣ: */ +#define ENGLISH 1 /**< Ϣ:Ӣ */ +#define MAX_FILTERFIELD_LEN 63 /**< ֶγ */ + +/** ɿȼ */ +enum ReliableLevel +{ + LEVEL_DOBEST = 0, /**< Ϊ */ + LEVEL_DOBEST_BYSEQ = 1, /**< */ + LEVEL_MEM = 2, /**< ڴ */ + LEVEL_FILE = 3, /**< ļ */ + LEVEL_SYSTEM = 4 /**< ϵͳ */ +}; + +/** + * ӿ + */ +class CFilterInterface:public IKnown +{ +public: + /** + * ±ȡ + * @param index Ӧű + * @return ضӦ±֣򷵻NULL. + */ + virtual char* FUNCTION_CALL_MODE GetFilterNameByIndex(int index) = 0; + + /** + * ±ȡֵ + * @param index Ӧű + * @return ضӦ±ֵ򷵻NULL. + */ + virtual char* FUNCTION_CALL_MODE GetFilterValueByIndex(int index)= 0; + + /** + * ݹֻȡֵ + * @param fileName ӦĹ + * @return ضӦĹֵֵ򷵻NULL. + */ + virtual char* FUNCTION_CALL_MODE GetFilterValue(char* fileName)= 0; + + /** + * ȡĸ + * @return ضӦĸûз0 + */ + virtual int FUNCTION_CALL_MODE GetCount() = 0; + + /** + * ùݹֵֺ + * @param filterName ӦĹ + * @param filterValue ӦĹֵֵ + */ + virtual void FUNCTION_CALL_MODE SetFilter(char* filterName,char* filterValue) =0; +}; + +/** + * IJӿ + */ +class CSubscribeParamInterface:public IKnown +{ +public: + + /** + * + * @param szName Ӧ + */ + virtual void FUNCTION_CALL_MODE SetTopicName(char* szName) =0; + + /** + * ø + * @param lpData ݵ׵ַ + * @param iLen ݵij + */ + virtual void FUNCTION_CALL_MODE SetAppData(void* lpData,int iLen)=0; + + /** + * ӹ + * @param filterName + * @param filterValue ֵ + */ + virtual void FUNCTION_CALL_MODE SetFilter(char* filterName,char* filterValue)=0; + + /** + * ӷֶ + * @param filedName Ҫӵķֶ + */ + virtual void FUNCTION_CALL_MODE SetReturnFiled(char* filedName)=0; + + /** + * Ƿȱ־ + * @param bFromNow trueʾҪ֮ǰݣҲDzȱfalseʾҪȱ + */ + virtual void FUNCTION_CALL_MODE SetFromNow(bool bFromNow)=0; + + /** + * øǶı־ + * @param bReplace trueʾǶģȡ֮ǰжģֻǰĶģfalseʾ׷Ӷ + */ + virtual void FUNCTION_CALL_MODE SetReplace(bool bReplace)=0; + + /** + * ÷ͼ + * @param nSendInterval λ + */ + virtual void FUNCTION_CALL_MODE SetSendInterval(int nSendInterval)=0; + + /** + * ȡ + * @return Ϣ + */ + virtual char* FUNCTION_CALL_MODE GetTopicName() =0; + + /** + * ȡ + * @param iLen Σʾݵij + * @return ظ׵ַûзNULL + */ + virtual void* FUNCTION_CALL_MODE GetAppData(int *iLen) =0; + + /** + * ȡӦĹֶε + * @param index Ӧű + * @return ضӦ±֣򷵻NULL. + */ + virtual char* FUNCTION_CALL_MODE GetFilterNameByIndex(int index) = 0; + + /** + * ±ȡֵ + * @param index Ӧű + * @return ضӦ±ֵ򷵻NULL. + */ + virtual char* FUNCTION_CALL_MODE GetFilterValueByIndex(int index)= 0; + + /** + * ݹֻȡֵ + * @param fileName ӦĹ + * @return ضӦĹֵֵ򷵻NULL. + */ + virtual char* FUNCTION_CALL_MODE GetFilterValue(char* fileName)= 0; + + /** + * ȡĸ + * @return ضӦĸûз0 + */ + virtual int FUNCTION_CALL_MODE GetFilterCount() = 0; + + /** + * ȡֶ + * @return ضӦķֶϢ + */ + virtual char* FUNCTION_CALL_MODE GetReturnFiled()=0; + + /** + * ȡǷȱı־ + * @return ضӦIJȱ־ + */ + virtual bool FUNCTION_CALL_MODE GetFromNow()=0 ; + + /** + * ȡǷ񸲸Ƕĵı־ + * @return ضӦĸǶı־ + */ + virtual bool FUNCTION_CALL_MODE GetReplace() =0; + + /** + * ȡӦķƵ + * @return ضӦķͼ + */ + virtual int FUNCTION_CALL_MODE GetSendInterval()=0; + + /** + * ǷϢ + * @param bUpdate trueʾҪϢţfalseʾ + */ + virtual void FUNCTION_CALL_MODE SetUpdateMsgNo(bool bUpdate)=0; + + /** + * ȡǷϢ + * @return ǷϢ + */ + virtual bool FUNCTION_CALL_MODE GetUpdateMsgNo()=0; +}; + +class CSubscribeInterface; + +/** + * @brief Ļصӿڷصݶ壬˶Ҫҵ֮⣬Ҫص + */ +typedef struct tagSubscribeRecvData +{ + char* lpFilterData; /**< ֶεͷָ룬ý */ + int iFilterDataLen; /**< ֶεݳ */ + char* lpAppData; /**< ݵͷָ */ + int iAppDataLen; /**< ݵij */ + char szTopicName[260]; /**< */ + + /** + * tagSubscribeRecvData 캯 + */ + tagSubscribeRecvData() + { + memset(this,0,sizeof(tagSubscribeRecvData)); + } +}SUBSCRIBE_RECVDATA, *LPSUBSCRIBE_RECVDATA; + +/** + * ĻصӿڣϲӦͨӿڣƹϢ + */ +class CSubCallbackInterface: public IKnown +{ +public: + + /** + * յϢĻص + * @param lpSub صĶָ + * @param subscribeIndex ϢӦĶıʶʶSubscribeTopicķ + * @param lpData ϢĶָ룬һϢҵ + * @param nLength ݵij + * @param lpRecvData ϢֶηأҪ˸ݣϢ֣ϸοǰṹ嶨 + * @return + */ + virtual void FUNCTION_CALL_MODE OnReceived(CSubscribeInterface *lpSub,int subscribeIndex, const void *lpData, int nLength,LPSUBSCRIBE_RECVDATA lpRecvData) = 0; + + /** + * յ޳Ϣصһӵ˲Ե»صӿ,ص治ҪȡģײѾȡģֻһ֪ͨӿ + * @param lpSub صĶָ + * @param subscribeIndex ϢӦĶıʶʶSubscribeTopicķ + * @param TickMsgInfo ˵ĴϢҪǰظĶλϢ + * @return + */ + virtual void FUNCTION_CALL_MODE OnRecvTickMsg(CSubscribeInterface *lpSub,int subscribeIndex,const char* TickMsgInfo) = 0; +}; + + +/** + * ĽӿڵĶ + */ +class CSubscribeInterface: public IKnown +{ +public: + + /** + * + * @param lpSubscribeParamInter 涨ĶIJṹ + * @param uiTimeout ʱʱ + * @param lppBizUnPack ҵУʱʧܷصҵϢijɹûзأҪReleaseͷ + ҵУĴϢд£ + IF2UnPacker* lpBizUnPack =NULL; + SubscribeTopic(...,&lpBizUnPack); + ݷֵʧܵľж lpBizUnPack DzNULL. + Ϣȡ֮,ͷ + lpBizUnPack->Release(); + * @param lpBizPack ҵУҪӵҵֶԼֵûо͸ݹΪҵУֶ + * @return ֵ0ʾǰijɹĶıʶҪסʶͶ֮ӳϵʶҪȡĺͽϢĻص. + * ֵݴŻȡϢ. + */ + virtual int FUNCTION_CALL_MODE SubscribeTopic(CSubscribeParamInterface* lpSubscribeParamInter ,unsigned int uiTimeout,IF2UnPacker** lppBizUnPack=NULL,IF2Packer* lpBizPack=NULL) = 0; + + /** + * ȡ + * @param subscribeIndex ϢӦĶıʶʶSubscribeTopicķ + * @return 0ʾȡijɹֵݴŻȡϢ. + */ + virtual int FUNCTION_CALL_MODE CancelSubscribeTopic(int subscribeIndex) = 0; + + + /** + * ȡ + * @param topicName + * @param lpFilterInterface ӦĹ + * @return 0ʾȡijɹֵݴŻȡϢ. + */ + virtual int FUNCTION_CALL_MODE CancelSubscribeTopicEx(char* topicName,CFilterInterface* lpFilterInterface) = 0; + + + + /** + * ȡǰĽӿѾĵԼϢ + * @param lpPack 洫Ĵ + * @note packerֶ + - SubcribeIndex + - IsBornTopic + - TopicName + - TopicNo + - FilterRaw + - Appdata + - SendInterval + - ReturnFileds + - isReplace + - isFromNow + */ + virtual void FUNCTION_CALL_MODE GetSubcribeTopic(IF2Packer* lpPack)=0; + + + /** + * ȡַ + * @param lpPort ķ˿ڣΪNULL + * @return طַ + */ + virtual const char * FUNCTION_CALL_MODE GetServerAddress(int *lpPort) = 0; + /** + * ȡ˵Ϣ + * @param byForce ǷǿƴӺ̨ȡ + * @param iTimeOut ʱʱ + * @return ɹͷϢ + * @note Ҫreleaseӿڽͷ. + * @note packerֶ + * - TopicName + * - TopicNo + * - ReliableLevel + * - IssuePriority + * - MsgLifetime + * - Stutas + * - TickStrategy + * - BusinessVerify + * - Local + * - FilterField1 + * - FilterField2 + * - FilterField3 + * - FilterField4 + * - FilterField5 + * - FilterField6 + * - FilterField7 + * - FilterField8 + * - FilterField9 + * - FilterField10 + * - FilterField11 + * - FilterField12 + * - FilterField13 + * - FilterField14 + * - FilterField15 + * - FilterField16 + * - SubscribeStr + * - PublishStr + */ + virtual IF2UnPacker* FUNCTION_CALL_MODE GetTopic(bool byForce,int iTimeOut) = 0; + + + /** + *ĵĽӿ + *@param lpSubReqUnpack ļϣunpackʽ + *Ľֶ£ + *TopicName SendInterval ReturnFileds isFromNow AppData + *FilterField1 FilterValue1 FilterField2 FilterValue2 FilterField3 FilterValue3 FilterField4 FilterValue4 + *FilterField5 FilterValue5 FilterField6 FilterValue6 FilterField7 FilterValue7 FilterField8 FilterValue8 + *FilterField9 FilterValue9 FilterField10 FilterValue10 FilterField11 FilterValue11 FilterField12 FilterValue12 + *FilterField13 FilterValue13 FilterField14 FilterValue14 FilterField15 FilterValue15 FilterField16 FilterValue16 + *BizCheckPack(ڶӦҵУunpackƸʽ) + *@param lpSubAnsPacker ĽķأⲿһյĴڲÿĽ + *Ĵֶ£ + *TopicName SendInterval ReturnFileds isFromNow AppData + *FilterField1 FilterValue1 FilterField2 FilterValue2 FilterField3 FilterValue3 FilterField4 FilterValue4 + *FilterField5 FilterValue5 FilterField6 FilterValue6 FilterField7 FilterValue7 FilterField8 FilterValue8 + *FilterField9 FilterValue9 FilterField10 FilterValue10 FilterField11 FilterValue11 FilterField12 FilterValue12 + *FilterField13 FilterValue13 FilterField14 FilterValue14 FilterField15 FilterValue15 FilterField16 FilterValue16 + *BizCheckPack SubscribeIndex NotifyStatus ErrorNo ErrorInfo + *@param uiTimeout ĵijʱʱ,λ + *@return ɹͷ0ֵʾʧܣͨŻȡϢÿĵʧԭԲ鿴lpSubAnsPackerݡ + ////////////////////////////////////////////////////////////////////////////// + *ʵ + *IF2Packer* lpSubReqPack =NewPacker(2); + *lpSubReqPack->AddRef(); + *ӶҪĵIJղ˵ӡ + *IF2Packer* lpSubAnsPack =NewPacker(2); + *lpSubAnsPack->AddRef(); + *lpSubAnsPack->BeginPack(); + *BatchSubscribeTopic(lpSubReqPack->Unpack(),lpSubAnsPack,10000); + *lpSubAnsPack->EndPack(); + *IF2UnPacker* lpAnsUnPack=lpSubAnsPack->Unpack(); + *ݷزȡӦĶӦ + *lpSubReqPack->FreeMem(lpSubReqPack->GetPackBuf()); + *lpSubReqPack->Release(); + *lpSubAnsPack->FreeMem(lpSubAnsPack->GetPackBuf()); + *lpSubAnsPack->Release(); + ////////////////////////////////////////////////////////////////////////////// + */ + virtual int FUNCTION_CALL_MODE BatchSubscribeTopic(IF2UnPacker* lpSubReqUnpack,IF2Packer* lpSubAnsPacker,unsigned int uiTimeout) = 0; + + /** + * ȡĻỰ״̬ + * @return 0 ϢӶϿ + 1 ϢĽ + 2 Ϣѽ + */ + virtual int FUNCTION_CALL_MODE GetSessionStatus() = 0; +}; + +/** + * ӿ + */ +class CPublishInterface: public IKnown +{ +public: + + /** + * ҵʽݷӿ + * @param topicName ֣֪־ʹNULL + * @param lpUnPacker + * @param iTimeOut ʱʱ + * @param lppBizUnPack ҵУʱʧܷصҵϢɹûзأҪReleaseͷ + ҵУĴϢд£ + IF2UnPacker* lpBizUnPack =NULL; + PubMsgByPacker(...,&lpBizUnPack); + ݷֵʧܵľж lpBizUnPack DzNULL. + Ϣȡ֮,ͷ + lpBizUnPack->Release(); + * @param bAddTimeStamp Ƿʱϵܲ + * @return 0ʾɹֵݴŻȡϢ. + */ + virtual int FUNCTION_CALL_MODE PubMsgByPacker(char* topicName ,IF2UnPacker* lpUnPacker,int iTimeOut=-1, + IF2UnPacker** lppBizUnPack=NULL,bool bAddTimeStamp=false) = 0; + + /** + * ҵʽݷӿڣһƸʽķ + * @param topicName ֣֪־ʹNULL + * @param lpFilterInterface ҪϲԼָĬûй + * @param lpData + * @param nLength ݳ + * @param iTimeOut ʱʱ + * @param lppBizUnPack ҵУʱʧܷصҵϢɹûзأҪReleaseͷ + ҵУĴϢд£ + IF2UnPacker* lpBizUnPack =NULL; + PubMsgByPacker(...,&lpBizUnPack); + ݷֵʧܵľж lpBizUnPack DzNULL. + Ϣȡ֮,ͷ + lpBizUnPack->Release(); + * @param bAddTimeStamp Ƿʱϵܲ + * @return 0ʾɹֵݴŻȡϢ. + */ + virtual int FUNCTION_CALL_MODE PubMsg(char* topicName, CFilterInterface* lpFilterInterface, const void *lpData, int nLength,int iTimeOut=-1, + IF2UnPacker** lppBizUnPack=NULL,bool bAddTimeStamp=false) = 0; + + /** + * صǰķ + * @param topicName + * @return 0ʾûжӦ⣬ֵʾɹ + */ + virtual uint32 FUNCTION_CALL_MODE GetMsgNoByTopicName(char* topicName)=0; + + /** + * ȡַ + * @param lpPort ķ˿ڣΪNULL + * @return طַ + */ + virtual const char * FUNCTION_CALL_MODE GetServerAddress(int *lpPort) = 0; +}; +/** + * ļ»صӿ + */ +class CFileUpdateCallbackInterface: public IKnown +{ +public: + + /** + * յļбĻص + * @param lpData ضָ + * @param nLength ݵijȣΪΪ + * @param lpErrorInfo ΪNULLΪϢӦȥϢûȥôϢ + * @return + */ + virtual void FUNCTION_CALL_MODE OnRecvFileList(const void *lpData, int nLength, const char * lpErrorInfo) = 0; + + /** + * յ֪ͨļ½ + * @param iOneFileProcessBar ǰļ + * @param iTotalProcessBar ܽ + * @param lpErrorInfo ΪNULLΪϢӦȥϢûȥôϢ + * @return + */ + virtual void FUNCTION_CALL_MODE OnShowProcessBar(int iOneFileProcessBar, int iTotalProcessBar, const char * lpErrorInfo) = 0; + + /** + * յɹȡļ + * @return + */ + virtual void FUNCTION_CALL_MODE OnCancel() = 0; + + +}; +/** + * ļ½ӿ + */ +class CFileUpdateInterface: public IKnown +{ +public: + + /** + * ǰصʾļбûѡ·Ҫµļб + * @param lpPack ļбָ + * @return 0ʾɹֵʾʧ. + */ + virtual int FUNCTION_CALL_MODE UpdateFile(IF2Packer* lpPack) = 0; + + /** + * ȡڸеĸ¶ + * @return 0ʾɹֵʾʧ + */ + virtual int FUNCTION_CALL_MODE CancelUpdateFile() = 0; + + /** + * ȡļб + * @return ļбⲿֻܶͷ + * @note ֶμļdefineֶ,ע⣺OnRecvFileListصԺ÷Ч + */ + virtual IF2UnPacker* FUNCTION_CALL_MODE GetFileUpdateList() = 0; +}; +class CConnectionInterface; + +///Ӷ CConnectionInterface ҪĻصӿڶ +/** +* ӳɹӶϿɡյݵ¼ +*/ +class CCallbackInterface: public IKnown +{ +public: + /** + * ׽ӳɹ + * @param lpConnection ¼Ӷ + */ + virtual void FUNCTION_CALL_MODE OnConnect(CConnectionInterface *lpConnection) = 0; + + /** + * ɰȫ + * @param lpConnection ¼Ӷ + */ + virtual void FUNCTION_CALL_MODE OnSafeConnect(CConnectionInterface *lpConnection) = 0; + + /** + * ע + * @param lpConnection ¼Ӷ + */ + virtual void FUNCTION_CALL_MODE OnRegister(CConnectionInterface *lpConnection) = 0; + + /** + * ӱϿ + * @param lpConnection ¼Ӷ + */ + virtual void FUNCTION_CALL_MODE OnClose(CConnectionInterface *lpConnection) = 0; + + /** + * + * @param lpConnection ¼Ӷ + * @param hSend ; + * @param reserved1 ֶ + * @param reserved2 ֶ + * @param nQueuingData Ͷʣʹ߿ôֵƷ͵ٶȣСijֵʱз + * @see Send() + */ + virtual void FUNCTION_CALL_MODE OnSent(CConnectionInterface *lpConnection, int hSend, void *reserved1, void *reserved2, int nQueuingData) = 0; + + virtual void FUNCTION_CALL_MODE Reserved1(void *a, void *b, void *c, void *d) = 0; + + virtual void FUNCTION_CALL_MODE Reserved2(void *a, void *b, void *c, void *d) = 0; + + virtual int FUNCTION_CALL_MODE Reserved3() = 0; + + virtual void FUNCTION_CALL_MODE Reserved4() = 0; + + virtual void FUNCTION_CALL_MODE Reserved5() = 0; + + virtual void FUNCTION_CALL_MODE Reserved6() = 0; + + virtual void FUNCTION_CALL_MODE Reserved7() = 0; + + /** + * յSendBiz첽͵Ӧ + * @param lpConnection ¼Ӷ + * @param hSend ; + * @param lpUnPackerOrStr ָָߴϢ + * @param nResult հ + * nResult0ʾҵݽճɹҵɹlpUnPackerOrStrָһʱӦȽָתΪIF2UnPacker * + * nResult1ʾҵݽճɹҵʧˣlpUnPackerOrStrָһʱӦȽָתΪIF2UnPacker * + * nResult2ʾյҵϢlpUnPackerOrStrָһɶַϢ + * nResult3ʾҵʧܡlpUnPackerOrStrָNULL + * nResult4ʾҵΪաlpUnpackerOrStrָNULLlpRetDataⲿֽ + */ + virtual void FUNCTION_CALL_MODE OnReceivedBiz(CConnectionInterface *lpConnection, int hSend, const void *lpUnPackerOrStr, int nResult) = 0; + + /** + * յSendBiz첽͵Ӧ + * @param lpConnection ¼Ӷ + * @param hSend ; + * @param lpRetData ҪصӦݣҪȡ + * @param lpUnPackerOrStr ָָߴϢ + * @param nResult հ + * nResult0ʾҵݽճɹҵɹlpUnpackerOrStrָһʱӦȽָתΪIF2UnPacker * + * nResult1ʾҵݽճɹҵʧˣlpUnpackerOrStrָһʱӦȽָתΪIF2UnPacker * + * nResult2ʾյҵϢlpUnpackerOrStrָһɶַϢ + * nResult3ʾҵʧܡlpUnpackerOrStrָNULL + * nResult4ʾҵΪաlpUnpackerOrStrָNULLlpRetDataⲿֽ + */ + virtual void FUNCTION_CALL_MODE OnReceivedBizEx(CConnectionInterface *lpConnection, int hSend, LPRET_DATA lpRetData, const void *lpUnpackerOrStr, int nResult) = 0; + //20130624 xuxp صBizMessageӿ + /** + * յʱָReplyCallbackѡӦûжӦ + * @param lpConnection ¼Ӷ + * @param hSend ; + * @param lpMsg ҵϢָ + */ + virtual void FUNCTION_CALL_MODE OnReceivedBizMsg(CConnectionInterface *lpConnection, int hSend, IBizMessage* lpMsg) = 0; + + //20150709 majc ӻص + ~CCallbackInterface(){} + +}; + +///T2_SDKӶӿ +/** +* ӵĶ̲߳ȫͬʱһǹһ߳ãҪ߳ʹã +* ӡϿ͡յ +*/ +class CConnectionInterface: public IKnown +{ +public: + ///״̬ + enum ConnectionStatus + { + Disconnected = 0x0000, /**< δ */ + Connecting = 0x0001, /**< socket */ + Connected = 0x0002, /**< socket */ + SafeConnecting = 0x0004, /**< ڽȫ */ + SafeConnected = 0x0008, /**< ѽȫ */ + Registering = 0x0010, /**< ע */ + Registered = 0x0020, /**< ע */ + Rejected = 0x0040 /**< ܾر */ + }; + + ///ѡϣ0ʾճʱʱɾIDԿٴεRecvBizԽգ + enum RecvFlags + { + JustRemoveHandle = 0x0001 /**< ճʱʱpacket_idɾ */ + }; + + /** + * ʼӶ + * @param lpCallback ص + * @return 0ʾɹʾʧܣͨGetErrorMsgԻȡϸϢ + * ӦòҪκλص÷NULLԶصͶ + */ + virtual int FUNCTION_CALL_MODE Create(CCallbackInterface *lpCallback) = 0; + + /** + * ʼ/ע + * @param uiTimeout ʱʱ䣬λ룬0ʾȴʹôӷʱòã + * @return 0ʾɹʾʧܣͨGetErrorMsgԻȡϸϢ + */ + virtual int FUNCTION_CALL_MODE Connect(unsigned int uiTimeout) = 0; + + /** + * Ͽ + * @return 0ʾɹʾʧܣͨGetErrorMsgԻȡϸϢ + */ + virtual int FUNCTION_CALL_MODE Close() = 0; + + virtual int FUNCTION_CALL_MODE Reserved1() = 0; + + virtual int FUNCTION_CALL_MODE Reserved2() = 0; + + virtual int FUNCTION_CALL_MODE Reserved3() = 0; + + virtual int FUNCTION_CALL_MODE Reserved4() = 0; + + virtual int FUNCTION_CALL_MODE Reserved5() = 0; + + virtual int FUNCTION_CALL_MODE Reserved6() = 0; + + /** + * ȡַ + * @param lpPort ķ˿ڣΪNULL + * @return طַ + */ + virtual const char * FUNCTION_CALL_MODE GetServerAddress(int *lpPort) = 0; + + /** + * ȡ״̬ + * @return ״̬ + */ + virtual int FUNCTION_CALL_MODE GetStatus() = 0; + + /** + * ȡأʹ߿ͬʱʵͬʱӲͬķӵʱԼؾʹĸ + * @return طأǸԽʾԽæʾʧܣͨGetErrorMsgԻȡϸϢ + */ + virtual int FUNCTION_CALL_MODE GetServerLoad() = 0; + + /** + * ȡӦĴϢĿǰּ֧ĺӢģ֧ԿͨӶerrormsg + * @param nErrorCode + * @return شϢ + */ + virtual const char * FUNCTION_CALL_MODE GetErrorMsg(int nErrorCode) = 0; + + /** + * ȡӴţ޷עʱȿͨConnectķֵȡţ + * ҲͨñȡţȻøôŵGetErrorMsgɻȡɶĴϢ + * @return Ӵ + */ + virtual int FUNCTION_CALL_MODE GetConnectError() = 0; + + /** + * ҵ + * @param iFunID ܺ + * @param lpPacker ָ + * @param nAsy 0ʾͬʾ첽 + * @param iSystemNo iSystemNo > 0ϵͳ + * @param nCompressID ҵѹѹ㷨IDĿǰֻ֧ID = 1ѹ㷨 + * ID = 0ʾѹע⣬ѹֻSDK飬ǷѹȡڰʵʴС + * ͬ͵İͨRecvBizգ첽͵İյӦԶصOnReceivedBiz + * @return ط;ʾʧܣͨGetErrorMsgԻȡϸϢ + */ + virtual int FUNCTION_CALL_MODE SendBiz(int iFunID, IF2Packer *lpPacker, int nAsy = 0, int iSystemNo = 0, int nCompressID = 1) = 0; + + /** + * ҵ + * @param hSend ;SendBizijɹֵ + * @param lppUnPackerOrStr ֵ0ʾҵݽճɹҵɹ*lppUnPackerOrStrָһʱӦȽָתΪIF2UnPacker * + * ֵ1ʾҵݽճɹҵʧˣ*lppUnPackerOrStrָһʱӦȽָתΪIF2UnPacker * + * ֵ2ʾյҵϢ*lppUnPackerOrStrָһɶַϢ + * ֵ3ʾҵʧܡ*lppUnPackerOrStrԭָݲᱻı䡣 + * @param uiTimeout ʱʱ䣬λ롣 + * @param uiFlag ѡ0ʾճʱԿɼRecvBizգ + * JustRemoveHandleʾճʱ󣬰hSendɾ + * @return С0ʾRecvBizʧܣͨGetErrorMsgԻȡϸϢ + * ע⣡ⲿָָĽڴSDKڲⲿͷţ + * ע⣡lppUnPackerOrStrӦĽʱģϲ㲻Իָ룬ٴεӵRecvBizָָݾͻı + * ҪҪýGetPackBufƿȥ߳Ҫٽ + */ + virtual int FUNCTION_CALL_MODE RecvBiz(int hSend, void **lppUnPackerOrStr, unsigned uiTimeout = 1000, unsigned uiFlag = 0) = 0; + + //20101228 xuxp ͺͽܵӿںڶĺ + /** + * ҵ + * @param iFunID ܺ + * @param lpPacker ָ + * @param svrName ָмĽڵ + * @param nAsy 0ʾͬʾ첽 + * @param iSystemNo iSystemNo > 0ϵͳ + * @param nCompressID ҵѹѹ㷨IDĿǰֻ֧ID = 1ѹ㷨 + * ID = 0ʾѹע⣬ѹֻSDK飬ǷѹȡڰʵʴС + * ͬ͵İͨRecvBizExգ첽͵İյӦԶصOnReceivedBizEx + * @param branchNo Ӫҵš + * @param lpRequest ݣݽṹ嶨帳ֵ + * @return ط;ʾʧܣͨGetErrorMsgԻȡϸϢ + */ + virtual int FUNCTION_CALL_MODE SendBizEx(int iFunID, IF2Packer *lpPacker,char* svrName, int nAsy = 0, int iSystemNo = 0, int nCompressID = 1,int branchNo=0,LPREQ_DATA lpRequest=NULL) = 0; + + /** + * ҵ + * @param hSend ;SendBizijɹֵ + * @param lppUnPackerOrStr ֵ0ʾҵݽճɹҵɹ*lppUnPackerOrStrָһʱӦȽָתΪIF2UnPacker * + * ֵ1ʾҵݽճɹҵʧˣ*lppUnPackerOrStrָһʱӦȽָתΪIF2UnPacker * + * ֵ2ʾյҵϢ*lppUnPackerOrStrָһɶַϢ + * ֵ3ʾҵʧܡ*lppUnPackerOrStrԭָݲᱻı䡣 + * @param lpRetData ҪصӦݣҪȡ + * @param uiTimeout ʱʱ䣬λ룬0ʾȴ + * @param uiFlag ѡ0ʾճʱԿɼRecvBizգ + * JustRemoveHandleʾճʱ󣬰hSendɾ + * @return С0ʾRecvBizExʧܣͨGetErrorMsgԻȡϸϢ + * ע⣡ⲿָָĽڴSDKڲⲿͷţ + * ע⣡ⲿָָLPRET_DATAڴSDKڲⲿͷţ + * ע⣡lppUnPackerOrStrӦĽLPRET_DATAʱģϲ㲻Իָ룬ٴεӵRecvBizExָָݾͻı + * ҪҪýGetPackBufƿȥ߳Ҫٽ + * LPRET_DATAҪṹ帴 + */ + virtual int FUNCTION_CALL_MODE RecvBizEx(int hSend, void **lppUnpackerOrStr, LPRET_DATA* lpRetData, unsigned uiTimeout = 1000, unsigned uiFlag = 0) = 0; + + + //20101228 xuxp Create֤صµOnReceivedBizExĽӿ + /** + * ʼӶ + * @param lpCallback ص + * @return 0ʾɹʾʧܣͨGetErrorMsgԻȡϸϢ + * ӦòҪκλص÷NULLԶصͶ + */ + virtual int FUNCTION_CALL_MODE CreateEx(CCallbackInterface *lpCallback) = 0; + + + //20120111 dongpf GetRealAddressȡԼipַͶ˿ + /** + * ȡipַͶ˿ + * @return ȡipַͶ˿ڣʽipַ+˿ + */ + virtual const char* FUNCTION_CALL_MODE GetRealAddress() = 0; + + + virtual int FUNCTION_CALL_MODE Reserved8() = 0; + virtual int FUNCTION_CALL_MODE Reserved9() = 0; + + //20130527 xuxp GetSelfAddressȡԼصIPͶ˿ + /** + * ȡipַͶ˿ + * @return ȡipַͶ˿ڣʽipַ+˿ + */ + virtual const char* FUNCTION_CALL_MODE GetSelfAddress() = 0; + + //20130529 xuxp GetSelfMacȡԼʹõMAC + /** + * ȡMACַ + * @return MACĵַַʽơD067E5556D83,мûзָ + */ + virtual const char* FUNCTION_CALL_MODE GetSelfMac() = 0; + + //20130609 xuxp ķӿ + ///////////////////////////////////ӶķĽӿ/////////////////////////////////////// + + /** + * һ + * @param lpCallback صӿ + * @param SubScribeName ֣ඩߵֱ벻һͬ.󳤶32ֽ + * @param iTimeOut ʱʱ + * @param iInitRecvQLen ʼնеij + * @param iStepRecvQLen ܶеչ + * @return ضĽӿʵһỰӿڶӦһص. + */ + virtual CSubscribeInterface* FUNCTION_CALL_MODE NewSubscriber(CSubCallbackInterface *lpCallback,char* SubScribeName,int iTimeOut, + int iInitRecvQLen=INIT_RECVQ_LEN,int iStepRecvQLen=STEP_RECVQ_LEN) = 0; + + /** + * ȡ + * @param PublishName ҵ + * @param msgCount ػϢĸ + * @param iTimeOut ʼʱijʱʱ + * @param bResetNo Ƿ + * @return طͽӿʵضӦָ + */ + //virtual CPublishInterface* FUNCTION_CALL_MODE GetPublisher(int msgCount,int iTimeOut,bool bResetNo = false) = 0; + virtual CPublishInterface* FUNCTION_CALL_MODE NewPublisher(char* PublishName,int msgCount,int iTimeOut,bool bResetNo = false) = 0; + + + + + /** + * ȡ˵Ϣ + * @param byForce ǷǿƴӺ̨ȡ + * @param iTimeOut ʱʱ + * @return ɹͷϢ + * @note Ҫreleaseӿڽͷ. + * @note packerֶ + * - TopicName + * - TopicNo + * - ReliableLevel + * - IssuePriority + * - MsgLifetime + * - Stutas + * - TickStrategy + * - BusinessVerify + * - Local + * - FilterField1 + * - FilterField2 + * - FilterField3 + * - FilterField4 + * - FilterField5 + * - FilterField6 + * - FilterField7 + * - FilterField8 + * - FilterField9 + * - FilterField10 + * - FilterField11 + * - FilterField12 + * - FilterField13 + * - FilterField14 + * - FilterField15 + * - FilterField16 + * - SubscribeStr + * - PublishStr + + */ + virtual IF2UnPacker* FUNCTION_CALL_MODE GetTopic(bool byForce,int iTimeOut) = 0; + + /** + * ȡķ + */ + virtual const char* FUNCTION_CALL_MODE GetMCLastError() = 0; + //////////////////////////////////////////////////////////////////////////////// + + //20130624 xuxp ӽӿӿڣΪ˵Ľӿڣͻ˿ҲƼʹ + ///////////////////////////////////µһײӿ/////////////////////////////////////// + /** + * ʼӶ + * @param lpCallback ص + * @return 0ʾɹʾʧܣͨGetErrorMsgԻȡϸϢ + * ӦòҪκλص÷NULLԶصͶ + */ + virtual int FUNCTION_CALL_MODE Create2BizMsg(CCallbackInterface *lpCallback) = 0; + + /** + * ҵ + * @param lpMsg ҵϢӿָ + * @param nAsy 0ʾͬʾ첽 + * ͬ͵İͨRecvBizMsgգ첽͵İյӦԶصOnReceivedBizMsg + * @return ط;ʾʧܣͨGetErrorMsgԻȡϸϢ + */ + virtual int FUNCTION_CALL_MODE SendBizMsg(IBizMessage* lpMsg,int nAsy = 0) = 0; + + /** + * + * @param hSend ; + * @param lpMsg յҵϢָĵַ + * @param uiTimeout ʱʱ䣬λ룬0ʾȴ + * @param uiFlag ѡ0ʾճʱԿɼReceiveգ + * JustRemoveHandleʾճʱʱpacket_idɾԺյ첽ķʽյ + * @return 0ʾɹʾʧܣͨGetErrorMsgԻȡϸϢ + * ע⣡ⲿָָIBizMessageڴSDKڲⲿͷţ + * ע⣡lpMsgӦϢָʱģϲ㲻Իָ룬ٴεӵRecvBizMsgָָݾͻı + * ҪҪIBizMessageGetBuffƿȥ߳ҪٵSetBuff + */ + virtual int FUNCTION_CALL_MODE RecvBizMsg(int hSend, IBizMessage** lpMsg, unsigned uiTimeout = 1000, unsigned uiFlag = 0) = 0; + + //20141117 majc ļĿ¼ֶ + /** + * ȡļ,һֻһļ£ھͷ֮ǰĽӿ + * @param szTopicName ļ⣬ڷϢļ + * @param lpCallBack صӿ + * @param szScanDir ɨļĿ¼ + * @param szUpdateDir ļ´ŸĿ¼ + * @param iTimeOut ʱʱ + * @param szDirFilter Ŀ¼жĿ¼;Ÿ + * @return ļ½ӿָ + */ + virtual CFileUpdateInterface* FUNCTION_CALL_MODE NewFileUpdate(const char* szTopicName,CFileUpdateCallbackInterface* lpCallBack ,const char* szScanDir,const char* szUpdateDir,unsigned int uiTimeOut = 5000, const char * szDirFilter = NULL) = 0; + + /** + * ȡļµ + */ + virtual const char* FUNCTION_CALL_MODE GetFileUpdateLastError() = 0; + + //20140618 majc ӻȡһӦϸϢӿ + /** + * ȡشϢϸϢ + * @param bAsyError 0ʾͬ(Ĭ)ʾ첽 + * @return ϸϢ + * @note ϢʽpackType:xxx;funtionId:xxx;branchNo:zxx;systemNo:xxx;subSystemNO:xxx;packId:xxx;routerInfo:xxx,xxx,xxx,xxx,xxx,xxx;sendPath:xxx,xxx,xxx,xxx,xxx,xxx;returnCode:xxx;errorNo:xxx;errorInfo:xxx + * packType- + * funtionId-ܺ + * branchNo-֧ + * systemNo-ϵͳ + * subSystemNO-ϵͳ + * packId- + * routerInfo-Ŀ· + * sendPath-· + * returnCode-ش + * errorNo- + * errorInfo-Ϣ + * ˵1ͬʱReceiveصlppDataESBMessageRetuenCodeΪ0ʱãRecvBizRecvBizExڷֵΪ1234ʱãRecvBizMsgGetReturnCode()Ϊ0ʱ + * 2첽ʱصOnReceivedlpDataESBMessageRetuenCodeΪ0ʱãصOnReceivedBizOnReceivedBizExnResultΪ1234ʱãصOnReceivedBizMsglpMsgGetReturnCode()Ϊ0ʱ + */ + virtual const char * FUNCTION_CALL_MODE GetLastAnsError(bool bAsyError = 0) = 0; + + //////////////////////////////////////////////////////////////////////////////// + //20150209 majc Ľӿ + /** + * һ + * @param lpCallback صӿ + * @param SubScribeName ֣ඩߵֱ벻һͬ.󳤶32ֽ + * @param subRoterInfo ʱָ· + * @param iTimeOut ʱʱ + * @param iInitRecvQLen ʼնеij + * @param iStepRecvQLen ܶеչ + * @return ضĽӿʵһỰӿڶӦһص. + */ + virtual CSubscribeInterface* FUNCTION_CALL_MODE NewSubscriberEx(CSubCallbackInterface *lpCallback,char* SubScribeName,SUB_ROUTER_INFO &subRoterInfo,int iTimeOut, + int iInitRecvQLen=INIT_RECVQ_LEN,int iStepRecvQLen=STEP_RECVQ_LEN) = 0; + //20150514 majc user_token + virtual void FUNCTION_CALL_MODE SetUserToken(const char* szUserToken) = 0; + //////////////////////////////////////////////////////////////////////////////// + + //20150610 xuxp ȺߴĽӿ + /** + * һȺ + * @param lpCallback صӿ + * @param SubScribeName ֣ඩߵֱ벻һͬ.󳤶32ֽ + * @param iTimeOut ʱʱ + * @param iInitRecvQLen ʼնеij + * @param iStepRecvQLen ܶеչ + * @return ضĽӿʵһỰӿڶӦһص. + */ + virtual CSubscribeInterface* FUNCTION_CALL_MODE NewClusterSubscriber(CSubCallbackInterface *lpCallback,char* SubScribeName,SUB_ROUTER_INFO &subRoterInfo,int iTimeOut, + int iInitRecvQLen=INIT_RECVQ_LEN,int iStepRecvQLen=STEP_RECVQ_LEN) = 0; + + ///20150812 liuzl ӵķĽڵ,ar#0,֧F5 + ///20160614 zhouwh ޸Ľӿڶ壬FUNCTION_CALL_MODE + //virtual const char *GetServerNodeName() = 0; + virtual const char * FUNCTION_CALL_MODE GetServerNodeName() = 0; + + //20160614 zhouwh ͬģʽĶл + // note: ģʽ£ýӿڱãڴй¶ + /** + @param lpData ͬreceiveʱصָ + */ + virtual void FUNCTION_CALL_MODE RecycleDataBuf(void *lpData) = 0; + + //20161028 majc ӽӿΨһǰ׺ + /** + * @param lpPrefix Ψһǰ׺֧255ֽ + */ + virtual void FUNCTION_CALL_MODE SetUniquePrefix(const char* lpPrefix) = 0; + + //20161223 huxb Ͽӽӿ + /** + * @param bSafe ǷΪȫֹͣĬΪǰȫֹͣ + * @param uiTimeout ȫֹͣʱʱ䣬λΪms + */ + virtual int FUNCTION_CALL_MODE ActiveClose(bool bSafe = false, unsigned int uiTimeout = 5000) = 0; + + //20161223 huxb ÷ַӿ + //ע뵥̵߳ + /** + * @param szServers µķַ + */ + virtual int FUNCTION_CALL_MODE SetServers(const char * szServers) = 0; +}; + +extern "C" +{ + /** + * ȡT2_SDKİ汾 + * @return ǰT2_SDKİ汾 + * Ʃ磺汾Ϊ0x10000002ʾ1.0.0.2 + */ + int FUNCTION_CALL_MODE GetVersionInfo(); + + /** + * ȡһʵCConfigInterfaceӿڵָ + * @return ʵCConfigInterfaceӿڵָ + */ +CConfigInterface* FUNCTION_CALL_MODE NewConfig(); + + /** + * ȡһʵCConnectionInterfaceӿڵָ + * @param CConfigInterface ʵCConfigInterfaceӿڵָ + * @returnʵCConnectionInterfaceӿڵָ + */ +CConnectionInterface* FUNCTION_CALL_MODE NewConnection(CConfigInterface *lpConfig); + +/** +* @param int iVersion ҵʽ汾(ȡֵ:1 ִ,ֵ 0x20) +* Ƽʹ0x20 +* @return IPacker * ӿָ +*/ +IF2Packer * FUNCTION_CALL_MODE NewPacker(int iVersion); + +/** +* @param void * lpBuffer ҪݣARͨŰͷ +* @param unsigned int iLen ݳ +* @return IUnPacker * 汾2ӿָ +*/ +IF2UnPacker * FUNCTION_CALL_MODE NewUnPacker(void * lpBuffer, unsigned int iLen); + +/** +* @param void * lpBuffer ҪݣARͨŰͷ +* @param unsigned int iLen ݳ +* @return IUnPacker * 汾1ӿָ +*/ +IF2UnPacker * FUNCTION_CALL_MODE NewUnPackerV1(void * lpBuffer, unsigned int iLen); + +/** +* @param void * lpBuffer ҪݣARͨŰͷ +* @return 1ʾ汾1Ľݣ0x21~0x2F 汾2Ľ +*/ +int FUNCTION_CALL_MODE GetPackVersion(const void *lpBuffer); +/** +* @param char *EncodePass ɢнַȲ16'\0' +* @param const char* Password Ĵɢе +* @param int nReserve Ĭֵ +* @return char * ɢнַͬEncodePass +*/ +char * FUNCTION_CALL_MODE Encode(char *EncodePass, const char* Password, int nReserve = 0 ); + + +/** +*һṩļܺм +* @param const char* pIn Ĵַܵ +* @param const char* pOut ȺʹַСһⲿ +* @return +*/ +int FUNCTION_CALL_MODE EncodeEx(const char *pIn, char *pOut); + + +/** +* һӿָ +* @return NULLʾʧ. +*/ +CFilterInterface* FUNCTION_CALL_MODE NewFilter(); + +/** +* һԽӿָ +* @return NULLʾʧ. +*/ +CSubscribeParamInterface* FUNCTION_CALL_MODE NewSubscribeParam(); + +//20130625 xuxp ҵϢ +IBizMessage* FUNCTION_CALL_MODE NewBizMessage(); + +//20160317 zhouwh ҵϢѹ־ +IBizMessage* FUNCTION_CALL_MODE NewBizMessageEx(int nCompressID = 1); + +//20161027 majc ٶ˿ +/** +*lpRequestֶΣaddress port +*lpResult ֶΣɹconn_count net_delay net_speed last_error ʧܣerror_no error_info +*uiTimeOutʱʱ +* ֵ0 ɹ0ʧ +*/ +int FUNCTION_CALL_MODE GetMultiNetWorkSpeed(IF2UnPacker * lpRequest, IF2Packer * lpResult, unsigned int uiTimeOut); +} + +#endif diff --git a/vnpy/api/t2sdk/py_t2sdk/ufx_interface.cpp b/vnpy/api/t2sdk/py_t2sdk/ufx_interface.cpp new file mode 100644 index 0000000000..0ae1e2f968 --- /dev/null +++ b/vnpy/api/t2sdk/py_t2sdk/ufx_interface.cpp @@ -0,0 +1,1479 @@ +#include "ufx_interface.h" + +CRITICAL_SECTION* g_MsgQueueSection = NULL; +int iTreadNum = 0; +int GetThreadNum() +{ + if(g_MsgQueueSection == NULL) + { + g_MsgQueueSection = new CRITICAL_SECTION; + InitializeCriticalSection(g_MsgQueueSection); + } + EnterCriticalSection(g_MsgQueueSection); + iTreadNum++; + LeaveCriticalSection(g_MsgQueueSection); + return iTreadNum; +} + +c_IF2Packer::c_IF2Packer() +{ + lpPacker = NewPacker(2); + lpPacker->AddRef(); +} + +c_IF2Packer::~c_IF2Packer() +{ + +} + +void c_IF2Packer::SetBuffer(char* pBuf,int iBufSize,int iDataLen) +{ + lpPacker->SetBuffer(pBuf,iBufSize,iDataLen); +} + +void c_IF2Packer::BeginPack(void) +{ + lpPacker->BeginPack(); +} + +int c_IF2Packer::NewDataset(char *szDatasetName, int iReturnCode ) +{ + return lpPacker->NewDataset(szDatasetName,iReturnCode); +} + +int c_IF2Packer::AddField(char *szFieldName,char cFieldType,int iFieldWidth,int iFieldScale) +{ + return lpPacker->AddField(szFieldName,cFieldType,iFieldWidth,iFieldScale); +} + +int c_IF2Packer::AddStr(char *szValue) +{ + return lpPacker->AddStr(szValue); +} + +int c_IF2Packer::AddInt(int iValue) +{ + return lpPacker->AddInt(iValue); +} + +int c_IF2Packer::AddDouble(double fValue) +{ + return lpPacker->AddDouble(fValue); +} + +int c_IF2Packer::AddChar(char* cValue) +{ + return lpPacker->AddDouble(cValue[0]); +} + +int c_IF2Packer::AddRaw(char* lpBuff,int iLen) +{ + return lpPacker->AddRaw(lpBuff,iLen); +} + +void c_IF2Packer::EndPack() +{ + lpPacker->EndPack(); +} + +int* c_IF2Packer::GetPackBuf(void) +{ + char* lpBuff = (char*)(lpPacker->GetPackBuf()); + int iLength = lpPacker->GetPackLen(); + int* sValue = new int[iLength]; + for(int i=0;iGetPackLen(); +} + +int c_IF2Packer::GetPackBufSize(void) +{ + return lpPacker->GetPackBufSize(); +} + +int c_IF2Packer::GetVersion(void) +{ + return lpPacker->GetVersion(); +} + +void c_IF2Packer::SetReturnCode(long dwRetCode) +{ + return lpPacker->SetReturnCode(dwRetCode); +} + +c_IF2UnPacker* c_IF2Packer::UnPack(void) +{ + IF2UnPacker* lpUnpacker = lpPacker->UnPack(); + c_IF2UnPacker* lpcUnpacker = new c_IF2UnPacker(lpUnpacker); + return lpcUnpacker; + +} + +void c_IF2Packer::FreeMem() +{ + void* lpBuff = lpPacker->GetPackBuf(); + return lpPacker->FreeMem(lpBuff); +} + +void c_IF2Packer::ClearValue() +{ + return lpPacker->ClearValue(); +} + +void c_IF2Packer::BeginPackEx(char* szName) +{ + return lpPacker->BeginPackEx(szName); +} + +void c_IF2Packer::ClearDataSet() +{ + return lpPacker->ClearDataSet(); +} + +IF2Packer* c_IF2Packer::GetInstance() +{ + return lpPacker; +} + +void c_IF2Packer::Release() +{ + lpPacker->Release(); +} + +c_IF2UnPacker::c_IF2UnPacker(char* lpBuffer,int iLen) +{ + //printf("ʼ,%d\n",iLen); + lpBuf = malloc(iLen); + memcpy(lpBuf,(void*)lpBuffer,iLen); + lpUnPacker = NewUnPacker(lpBuf,iLen); + if(lpUnPacker == NULL) + printf("ʼʧ,%d\n",iLen); + lpUnPacker->AddRef(); + bRelease = true; +} + +c_IF2UnPacker::c_IF2UnPacker(IF2UnPacker* lpUnPack) +{ + lpBuf = NULL; + lpUnPacker = lpUnPack; + bRelease = false; +} + +c_IF2UnPacker::~c_IF2UnPacker() +{ + +} + +int c_IF2UnPacker::GetVersion(void) +{ + return lpUnPacker->GetVersion(); +} + +int c_IF2UnPacker::Open(char* lpBuffer,int iLen) +{ + return lpUnPacker->OpenAndCopy(lpBuffer,iLen); +} + +int c_IF2UnPacker::GetDatasetCount() +{ + return lpUnPacker->GetDatasetCount(); +} + +int c_IF2UnPacker::SetCurrentDatasetByIndex(int nIndex) +{ + return lpUnPacker->SetCurrentDatasetByIndex(nIndex); +} + +int c_IF2UnPacker::SetCurrentDataset(char *szDatasetName) +{ + return lpUnPacker->SetCurrentDataset(szDatasetName); +} + +char* c_IF2UnPacker::GetPackBuf(void) +{ + return (char*)(lpUnPacker->GetPackBuf()); +} + + +int c_IF2UnPacker::GetPackLen() +{ + return lpUnPacker->GetPackLen(); +} + +int c_IF2UnPacker::GetRowCount(void) +{ + return lpUnPacker->GetRowCount(); +} + +void c_IF2UnPacker::First() +{ + lpUnPacker->First(); +} + +void c_IF2UnPacker::Last() +{ + lpUnPacker->Last(); +} + +void c_IF2UnPacker::Go(int nRow) +{ + lpUnPacker->Go(nRow); +} + +char* c_IF2UnPacker::GetDatasetName() +{ + return (char*)(lpUnPacker->GetDatasetName()); +} + +int c_IF2UnPacker::OpenAndCopy(char* lpBuffer,int iLen) +{ + return lpUnPacker->OpenAndCopy(lpBuffer,iLen); +} + +char* c_IF2UnPacker::GetColTypeByName(char * columnName) +{ + char cType = lpUnPacker->GetColTypeByName(columnName); + char* sType=new char[2]; + sType[0]=cType; + sType[1]='\0'; + return sType; +} + +int c_IF2UnPacker::GetColScaleByName(char * columnName) +{ + return lpUnPacker->GetColScaleByName(columnName); +} + +int c_IF2UnPacker::GetColWidthByName(char * columnName) +{ + return lpUnPacker->GetColWidthByName(columnName); +} + +IF2UnPacker* c_IF2UnPacker::GetInstance() +{ + return lpUnPacker; +} + +int c_IF2UnPacker::GetColCount() +{ + return lpUnPacker->GetColCount(); +} + +char* c_IF2UnPacker::GetColName(int column) +{ + return (char*)lpUnPacker->GetColName(column); +} +char* c_IF2UnPacker::GetColType(int column) +{ + char cType = lpUnPacker->GetColType(column); + char* sType=new char[2]; + sType[0]=cType; + sType[1]='\0'; + return sType; +} +int c_IF2UnPacker::GetColScale(int column) +{ + return lpUnPacker->GetColScale(column); +} +int c_IF2UnPacker::GetColWidth(int column) +{ + return lpUnPacker->GetColWidth(column); +} +int c_IF2UnPacker::FindColIndex(char * columnName) +{ + return lpUnPacker->FindColIndex(columnName); +} +char* c_IF2UnPacker::GetStrByIndex(int column) +{ + return (char*)lpUnPacker->GetStrByIndex(column); +} +char* c_IF2UnPacker::GetStr(char * columnName) +{ + return (char*)lpUnPacker->GetStr(columnName); +} +char* c_IF2UnPacker::GetCharByIndex(int column) +{ + char cType = lpUnPacker->GetCharByIndex(column); + char* sType=new char[2]; + sType[0]=cType; + sType[1]='\0'; + return sType; +} +char* c_IF2UnPacker::GetChar(char * columnName) +{ + char cType = lpUnPacker->GetChar(columnName); + char* sType=new char[2]; + sType[0]=cType; + sType[1]='\0'; + return sType; +} +double c_IF2UnPacker::GetDoubleByIndex(int column) +{ + return lpUnPacker->GetDoubleByIndex(column); +} +double c_IF2UnPacker::GetDouble(char * columnName) +{ + return lpUnPacker->GetDouble(columnName); +} +int c_IF2UnPacker::GetIntByIndex(int column) +{ + return lpUnPacker->GetIntByIndex(column); +} +int c_IF2UnPacker::GetInt(char* columnName) +{ + return lpUnPacker->GetInt(columnName); +} +char* c_IF2UnPacker::GetRawByIndex(int column,int* lpRawLen) +{ + return (char*)lpUnPacker->GetRawByIndex(column,lpRawLen); +} +char* c_IF2UnPacker::GetRaw(char* columnName,int* lpRawLen) +{ + return (char*)lpUnPacker->GetRaw(columnName,lpRawLen); +} +int c_IF2UnPacker::WasNull() +{ + return lpUnPacker->WasNull(); +} +void c_IF2UnPacker::Next() +{ + lpUnPacker->Next(); +} +int c_IF2UnPacker::IsEOF() +{ + return lpUnPacker->IsEOF(); +} +int c_IF2UnPacker::IsEmpty() +{ + return lpUnPacker->IsEmpty(); +} +void c_IF2UnPacker::Destroy() +{ + lpUnPacker->Destroy(); +} + +void c_IF2UnPacker::Release() +{ + if (lpUnPacker && bRelease) + { + lpUnPacker->Release(); + lpUnPacker = NULL; + } + if (lpBuf) + { + free(lpBuf); + lpBuf = NULL; + } +} + +C_CConfigInterface::C_CConfigInterface() +{ + lpConfig = NewConfig(); + lpConfig->AddRef(); +} + +C_CConfigInterface::~C_CConfigInterface() +{ + +} + +int C_CConfigInterface::Load( char *szFileName) +{ + return lpConfig->Load(szFileName); +} + +int C_CConfigInterface::Save( char *szFileName) +{ + return lpConfig->Save(szFileName); +} + +char* C_CConfigInterface::GetString(char *szSection,char *szEntry,char *szDefault) +{ + return (char*)lpConfig->GetString(szSection,szEntry,szDefault); +} + +int C_CConfigInterface::GetInt(char *szSection,char *szEntry, int iDefault) +{ + return lpConfig->GetInt(szSection,szEntry,iDefault); +} + +int C_CConfigInterface::SetString( char *szSection, char *szEntry, char *szValue) +{ + return lpConfig->SetString(szSection,szEntry,szValue); +} + +int C_CConfigInterface::SetInt( char *szSection, char *szEntry, int iValue) +{ + return lpConfig->SetInt(szSection,szEntry,iValue); +} + +CConfigInterface* C_CConfigInterface::GetInstance() +{ + return lpConfig; +} + +void C_CConfigInterface::Release() +{ + lpConfig->Release(); +} + +c_IBizMessage::c_IBizMessage() +{ + lpBizMessage = NewBizMessage(); + lpBizMessage->AddRef(); +} + +c_IBizMessage::~c_IBizMessage() +{ + +} + +void c_IBizMessage::SetFunction(int nFUnctionNo) +{ + lpBizMessage->SetFunction(nFUnctionNo); +} + +int c_IBizMessage::GetFunction() +{ + return lpBizMessage->GetFunction(); +} + +void c_IBizMessage::SetPacketType(int nPacketType) +{ + lpBizMessage->SetPacketType(nPacketType); +} + +int c_IBizMessage::GetPacketType() +{ + return lpBizMessage->GetPacketType(); +} + +void c_IBizMessage::SetBranchNo(int nBranchNo) +{ + return lpBizMessage->SetBranchNo(nBranchNo); +} + +int c_IBizMessage::GetBranchNo() +{ + return lpBizMessage->GetBranchNo(); +} + +void c_IBizMessage::SetSystemNo(int nSystemNo) +{ + lpBizMessage->SetSystemNo(nSystemNo); +} + +int c_IBizMessage::GetSystemNo() +{ + return lpBizMessage->GetSystemNo(); +} + +void c_IBizMessage::SetSubSystemNo(int nSubSystemNo) +{ + return lpBizMessage->SetSubSystemNo(nSubSystemNo); +} + +int c_IBizMessage::GetSubSystemNo() +{ + return lpBizMessage->GetSubSystemNo(); +} + +void c_IBizMessage::SetSenderId(int nSenderId) +{ + lpBizMessage->SetSenderId(nSenderId); +} + +int c_IBizMessage::GetSenderId() +{ + return lpBizMessage->GetSenderId(); +} + +void c_IBizMessage::SetPacketId(int nPacketId) +{ + lpBizMessage->SetPacketId(nPacketId); +} + +int c_IBizMessage::GetPacketId() +{ + return lpBizMessage->GetPacketId(); +} + +void c_IBizMessage::SetErrorNo(int nErrorNo) +{ + lpBizMessage->SetErrorNo(nErrorNo); +} + +int c_IBizMessage::GetErrorNo() +{ + return lpBizMessage->GetErrorNo(); +} + +void c_IBizMessage::SetErrorInfo(char* strErrorInfo) +{ + lpBizMessage->SetErrorInfo(strErrorInfo); +} + +char* c_IBizMessage::GetErrorInfo() +{ + return (char*)(lpBizMessage->GetErrorInfo()); +} + +void c_IBizMessage::SetReturnCode(int nReturnCode) +{ + lpBizMessage->SetReturnCode(nReturnCode); +} + +int c_IBizMessage::GetReturnCode() +{ + return lpBizMessage->GetReturnCode(); +} + +void c_IBizMessage::SetContent(char* lpContent,int iLen) +{ + lpBizMessage->SetContent(lpContent,iLen); +} + +char* c_IBizMessage::GetContent(int& iLen) +{ + return (char*)(lpBizMessage->GetContent(iLen)); +} + +void c_IBizMessage::SetIssueType(int nIssueType) +{ + lpBizMessage->SetIssueType(nIssueType); +} + +int c_IBizMessage::GetIssueType() +{ + return lpBizMessage->GetIssueType(); +} + +void c_IBizMessage::SetSequeceNo(int nSequeceNo) +{ + return lpBizMessage->SetSequeceNo(nSequeceNo); +} + +int c_IBizMessage::GetSequeceNo() +{ + return lpBizMessage->GetSequeceNo(); +} + +void c_IBizMessage::SetKeyInfo(char* lpKeyData,int iLen) +{ + lpBizMessage->SetKeyInfo(lpKeyData,iLen); +} + +char* c_IBizMessage::GetKeyInfo(int& iLen) +{ + return (char*)lpBizMessage->GetKeyInfo(iLen); +} + +void c_IBizMessage::SetAppData(char* lpAppdata,int nAppLen) +{ + lpBizMessage->SetAppData(lpAppdata,nAppLen); +} + +char* c_IBizMessage::GetAppData(int& nAppLen) +{ + return (char*)lpBizMessage->GetAppData(nAppLen); +} + +int c_IBizMessage::ChangeReq2AnsMessage() +{ + return lpBizMessage->ChangeReq2AnsMessage(); +} + +char* c_IBizMessage::GetBuff(int& nBuffLen) +{ + return (char*)lpBizMessage->GetBuff(nBuffLen); +} + +int c_IBizMessage::SetBuff(char* lpBuff,int nBuffLen) +{ + return lpBizMessage->SetBuff(lpBuff,nBuffLen); +} + +void c_IBizMessage::ReSet() +{ + lpBizMessage->ReSet(); +} + +IBizMessage* c_IBizMessage::GetInstance() +{ + return lpBizMessage; +} + +void c_IBizMessage::Release() +{ + lpBizMessage->Release(); +} + +c_CSubscribeParamInterface::c_CSubscribeParamInterface() +{ + lpSubParam = NewSubscribeParam(); + lpSubParam->AddRef(); +} + +c_CSubscribeParamInterface::~c_CSubscribeParamInterface() +{ + +} + +void c_CSubscribeParamInterface::SetTopicName(char* szName) +{ + lpSubParam->SetTopicName(szName); +} + +void c_CSubscribeParamInterface::SetAppData(char* lpData,int iLen) +{ + lpSubParam->SetAppData(lpData,iLen); +} + +void c_CSubscribeParamInterface::SetFilter(char* filterName,char* filterValue) +{ + lpSubParam->SetFilter(filterName,filterValue); +} + +void c_CSubscribeParamInterface::SetReturnFiled(char* filedName) +{ + lpSubParam->SetReturnFiled(filedName); +} + +void c_CSubscribeParamInterface::SetFromNow(int bFromNow) +{ + bool bFN = false; + if(bFromNow > 0) + bFN = true; + lpSubParam->SetFromNow(bFN); +} + +void c_CSubscribeParamInterface::SetReplace(int bReplace) +{ + bool bRe = false; + if(bReplace > 0) + bRe = true; + lpSubParam->SetFromNow(bRe); +} + +void c_CSubscribeParamInterface::SetSendInterval(int nSendInterval) +{ + lpSubParam->SetSendInterval(nSendInterval); +} + +char* c_CSubscribeParamInterface::GetTopicName() +{ + return (char*)lpSubParam->GetTopicName(); +} + +char* c_CSubscribeParamInterface::GetAppData(int *iLen) +{ + return (char*)lpSubParam->GetAppData(iLen); +} + +char* c_CSubscribeParamInterface::GetFilterNameByIndex(int index) +{ + return (char*)lpSubParam->GetFilterNameByIndex(index); +} + +char* c_CSubscribeParamInterface::GetFilterValueByIndex(int index) +{ + return (char*)lpSubParam->GetFilterValueByIndex(index); +} + +char* c_CSubscribeParamInterface::GetFilterValue(char* fileName) +{ + return (char*)lpSubParam->GetFilterValue(fileName); +} + +int c_CSubscribeParamInterface::GetFilterCount() +{ + return lpSubParam->GetFilterCount(); +} + +char* c_CSubscribeParamInterface::GetReturnFiled() +{ + return (char*)lpSubParam->GetReturnFiled(); +} + +int c_CSubscribeParamInterface::GetFromNow() +{ + return lpSubParam->GetFromNow(); +} + +int c_CSubscribeParamInterface::GetReplace() +{ + return lpSubParam->GetReplace(); +} + +int c_CSubscribeParamInterface::GetSendInterval() +{ + return lpSubParam->GetSendInterval(); +} + +CSubscribeParamInterface* c_CSubscribeParamInterface::GetInstance() +{ + return lpSubParam; +} + +void c_CSubscribeParamInterface::Release() +{ + lpSubParam->Release(); +} + +c_SubCallBack::c_SubCallBack(char *lpMould,char *lpClass) +{ + strcpy_s(lpCallMould,lpMould); + strcpy_s(lpCallClass,lpClass); + DealMsgQueue = new std::queue(); + IsRun=true; + for (int i = 0; i < 2; i++) + { + char threadName[12] = {0}; + sprintf_s(threadName,"sub_thread%d",GetThreadNum()); + EventHandle[i] = CreateEvent(NULL, FALSE, FALSE, (LPCTSTR)threadName); + } + gMsgQueueSection = new CRITICAL_SECTION; + InitializeCriticalSection(gMsgQueueSection); +} + +c_SubCallBack::~c_SubCallBack() +{ + IsRun=false; + SetEvent(EventHandle[1]); + Py_Finalize(); +} + +c_SubCallBack::c_SubCallBack() +{ + if (!Py_IsInitialized()) + { + Py_Initialize(); + PyRun_SimpleString("import sys"); + PyRun_SimpleString("sys.path.append('./')"); + } +} + +int c_SubCallBack::initInstance() +{ + pModule = NULL; + if (!Py_IsInitialized()) + { + Py_Initialize(); + PyEval_InitThreads(); + PyRun_SimpleString("import sys"); + PyRun_SimpleString("sys.path.append('./')"); + } + pModule = PyImport_ImportModule(lpCallMould); + if (!pModule) + { + printf("Can`t open python file!\n"); + return -1; + } + pDict = PyModule_GetDict(pModule); + if(!pDict) + { + printf("Can`t open Get Dict!\n"); + return -1; + } + pClass = PyObject_GetAttrString(pModule, lpCallClass); + if(!pClass) + { + printf("Can`t open Get Class!\n"); + return -1; + } + pObject = PyEval_CallObject(pClass, NULL); + if(!pObject) + { + printf("%s Class init failed!\n",lpCallClass); + return -1; + } + pOnReceiveFunc=PyObject_GetAttrString(pObject, "OnReceived"); + if(!pOnReceiveFunc) + { + printf("OnReceived function init failed!\n"); + return -1; + } + Thread = new std::thread(&c_SubCallBack::run,this); + return 0; +} + +void c_SubCallBack::run() +{ + while(IsRun) + { + CSubCalBackPara* lpMsg; + int index = WaitForMultipleObjects(2, EventHandle, FALSE, INFINITE); + PyObject* list = NULL; + state = PyGILState_Ensure(); + Py_INCREF(pClass); + switch(index) + { + case WAIT_OBJECT_0: + EnterCriticalSection(gMsgQueueSection); + while( DealMsgQueue->size() > 0) + { + lpMsg = DealMsgQueue->front(); + DealMsgQueue->pop(); + LeaveCriticalSection(gMsgQueueSection); + int iLenght; + char* lpBuff = (char*)(lpMsg->lpBizMsg->GetBuff(iLenght)); + list = PyList_New(0); + for (int i = 0; i < iLenght; i++) + { + int iTemp = lpBuff[i]; + PyList_Append(list, Py_BuildValue("i", iTemp)); + } + char * lpTopic = lpMsg->szTopicName; + PyObject* call = PyObject_CallFunction(pOnReceiveFunc,"sOi",lpTopic,list,iLenght); + Py_CLEAR(call); + Py_DECREF(list); + delete lpMsg; + EnterCriticalSection(gMsgQueueSection); + } + LeaveCriticalSection(gMsgQueueSection); + break; + case WAIT_OBJECT_0 + 1: + IsRun = false; + break; + } + PyGILState_Release(state); + } +} + +void c_SubCallBack::OnReceived(CSubscribeInterface *lpSub,int subscribeIndex, const void *lpData, int nLength,LPSUBSCRIBE_RECVDATA lpRecvData) +{ + if (lpData == NULL || nLength <= 0) + { + printf("ָΪ\n"); + return; + } + CSubCalBackPara * lpPara = new CSubCalBackPara(); + lpPara->lpBizMsg = NewBizMessage(); + lpPara->lpBizMsg->AddRef(); + strncpy_s(lpPara->szTopicName,lpRecvData->szTopicName,sizeof(lpPara->szTopicName)-1); + lpPara->lpBizMsg->SetContent((void*)lpData,nLength); + lpPara->lpBizMsg->SetKeyInfo(lpRecvData->lpFilterData,lpRecvData->iFilterDataLen); + lpPara->lpBizMsg->SetAppData(lpRecvData->lpAppData,lpRecvData->iAppDataLen); + + EnterCriticalSection(gMsgQueueSection); + DealMsgQueue->push(lpPara); + LeaveCriticalSection(gMsgQueueSection); + SetEvent(EventHandle[0]); +} + +void c_SubCallBack::OnRecvTickMsg(CSubscribeInterface *lpSub,int subscribeIndex,const char* TickMsgInfo) +{ + printf("OnRecvTickMsg"); +} + +c_CSubscribeInterface::c_CSubscribeInterface(CSubscribeInterface* lpSub) +{ + lpSubscribe = lpSub; + lpSubscribe->AddRef(); +} + +c_CSubscribeInterface::~c_CSubscribeInterface() +{ + +} + +int c_CSubscribeInterface::SubscribeTopic(c_CSubscribeParamInterface* lpSubscribeParamInter ,unsigned int uiTimeout,c_IF2UnPacker** lppBizUnPack,c_IF2Packer* lpBizPack) +{ + CSubscribeParamInterface* lpParam = lpSubscribeParamInter->GetInstance(); + IF2UnPacker* lpUnpack = NULL; + IF2Packer* lpPack = NULL; + int ret = -1; + if(lpBizPack != NULL) + { + lpPack = lpBizPack->GetInstance(); + IF2UnPacker* lpTempUnPacker = NULL; + ret = lpSubscribe->SubscribeTopic(lpParam,uiTimeout,&lpTempUnPacker,lpPack); + if(lpTempUnPacker != NULL) + *lppBizUnPack = new c_IF2UnPacker(lpTempUnPacker); + } + else + { + ret = lpSubscribe->SubscribeTopic(lpParam,uiTimeout); + } + return ret; +} + + +int c_CSubscribeInterface::CancelSubscribeTopic(int subscribeIndex) +{ + return lpSubscribe->CancelSubscribeTopic(subscribeIndex); +} + +int c_CSubscribeInterface::CancelSubscribeTopicEx(char* topicName,CFilterInterface* lpFilterInterface) +{ + return lpSubscribe->CancelSubscribeTopicEx(topicName,lpFilterInterface); +} + +void c_CSubscribeInterface::GetSubcribeTopic(c_IF2Packer* lpPack) +{ + lpSubscribe->GetSubcribeTopic(lpPack->GetInstance()); +} +void c_CSubscribeInterface::Release() +{ + if (lpSubscribe) + { + lpSubscribe->Release(); + } +} + +c_CCallbackInterface::c_CCallbackInterface() +{ + if (!Py_IsInitialized()) + { + Py_Initialize(); + PyEval_InitThreads(); + PyRun_SimpleString("import sys"); + PyRun_SimpleString("sys.path.append('./')"); + } +} + +c_CCallbackInterface::c_CCallbackInterface(char* sMould,char* sClass) +{ + strcpy_s(sMouldName, sMould); + strcpy_s(sClassName, sClass); + DealMsgQueue = new std::queue(); + IsRun=true; + for (int i = 0; i < 2; i++) + { + char threadName[12] = {0}; + sprintf_s(threadName,"thread%d",GetThreadNum()); + EventHandle[i] = CreateEvent(NULL, FALSE, FALSE, (LPCTSTR)threadName); + } + gMsgQueueSection = new CRITICAL_SECTION; + InitializeCriticalSection(gMsgQueueSection); +} + +c_CCallbackInterface::~c_CCallbackInterface() +{ + IsRun=false; + SetEvent(EventHandle[1]); + Py_Finalize(); +} + +void c_CCallbackInterface::run() +{ + while(IsRun) + { + CCallBackParam* lpMsg; + int index = WaitForMultipleObjects(2, EventHandle, FALSE, INFINITE); + PyObject* list = NULL; + PyObject* call; + state = PyGILState_Ensure(); + Py_INCREF(pClass); + switch(index) + { + case WAIT_OBJECT_0: + EnterCriticalSection(gMsgQueueSection); + while( DealMsgQueue->size() > 0) + { + lpMsg = DealMsgQueue->front(); + DealMsgQueue->pop(); + LeaveCriticalSection(gMsgQueueSection); + + switch(lpMsg->iCallFuncType) + { + case 0: + //PyObject_CallFunction(pConnectFunc,NULL); + break; + case 1: + //PyObject_CallFunction(pSafeConnectFunc,NULL); + break; + case 2: + call = PyObject_CallFunction(pRegisterFunc,NULL); + Py_CLEAR(call); + break; + case 3: + call = PyObject_CallFunction(pCloseFunc,NULL); + Py_CLEAR(call); + break; + case 4: + //PyObject_CallFunction(pSendFunc,NULL); + break; + case 5: + if(lpMsg->iResult == 0 || lpMsg->iResult == 1) + { + char* lpBuff = (char*)(lpMsg->lpUnPacker->GetPackBuf()); + int iLenght = lpMsg->lpUnPacker->GetPackLen(); + list = PyList_New(0); + for (int i = 0; i < iLenght; i++) + { + int iTemp = lpBuff[i]; + PyList_Append(list, Py_BuildValue("i", iTemp)); + } + //PyObject_CallFunction(pReceivedBizFunc,"iOi",lpMsg->hSend,list,iLenght); + } + else + { + //PyObject_CallFunction(pReceivedBizFunc,"isi",lpMsg->hSend,lpMsg->sValue,strlen(lpMsg->sValue)); + } + break; + case 6: + if(lpMsg->iResult == 0 || lpMsg->iResult == 1) + { + char* lpBuff = (char*)(lpMsg->lpUnPacker->GetPackBuf()); + int iLenght = lpMsg->lpUnPacker->GetPackLen(); + list = PyList_New(0); + for (int i = 0; i < iLenght; i++) + { + int iTemp = lpBuff[i]; + PyList_Append(list, Py_BuildValue("i", iTemp)); + } + //PyObject_CallFunction(pReceivedBizExFunc,"iOi",lpMsg->hSend,list,iLenght); + } + else + { + //PyObject_CallFunction(pReceivedBizExFunc,"isi",lpMsg->hSend,lpMsg->sValue,strlen(lpMsg->sValue)); + } + break; + case 7: + { + //if(lpMsg->iResult == 0 || lpMsg->iResult == 1) + //{ + + int iLenght = 0; + //char* lpBuff = (char*)(lpMsg->lpBizMsg->GetContent(iLenght)); + char* lpBuff = (char*)lpMsg->lpBizMsg->GetBuff(iLenght); + list = PyList_New(0); + for (int i = 0; i < iLenght; i++) + { + int iTemp = lpBuff[i]; + PyList_Append(list, Py_BuildValue("i", iTemp)); + } + //PyObject_CallFunction(pReceivedBizExFunc,"iOi",lpMsg->hSend,list,iLenght); + //} + //else + //{ + // PyObject_CallFunction(pReceivedBizExFunc,"isi",lpMsg->hSend,lpMsg->sValue,strlen(lpMsg->sValue)); + //} + //PyObject_CallFunction(pReceivedBizMsgFunc,NULL); + call = PyObject_CallFunction(pReceivedBizMsgFunc,"iOi",lpMsg->hSend,list,iLenght); + Py_CLEAR(call); + Py_DECREF(list); + } + break; + default: + printf("unkown event\n"); + } + delete(lpMsg); + EnterCriticalSection(gMsgQueueSection); + } + LeaveCriticalSection(gMsgQueueSection); + break; + case WAIT_OBJECT_0 + 1: + IsRun = false; + break; + default: + printf("unkown wait\n"); + } + PyGILState_Release(state); + } +} + +int c_CCallbackInterface::InitInstance() +{ + pModule = NULL; + if (!Py_IsInitialized()) + { + Py_Initialize(); + PyEval_InitThreads(); + PyRun_SimpleString("import sys"); + PyRun_SimpleString("sys.path.append('./')"); + } + pModule = PyImport_ImportModule(sMouldName); + if (!pModule) + { + printf("Cant open python file!\n"); + return -1; + } + pDict = PyModule_GetDict(pModule); + if(!pDict) + { + printf("Cant open Get Dict!\n"); + return -1; + } + pClass = PyObject_GetAttrString(pModule, sClassName); + if(!pClass) + { + printf("Cant open Get Class!\n"); + return -1; + } + pObject = PyEval_CallObject(pClass, NULL); + if(!pObject) + { + printf("Class install failed!\n"); + return -1; + } + + // pConnectFunc=PyObject_GetAttrString(pObject, "OnConnect"); + //if(!pConnectFunc) + //{ + // printf("OnConnect function init failed!\n"); + // return -1; + //} + + //pSafeConnectFunc=PyObject_GetAttrString(pObject, "OnSafeConnect"); + //if(!pSafeConnectFunc) + //{ + // printf("OnSafeConnect function init failed!\n"); + // return -1; + //} + + pRegisterFunc=PyObject_GetAttrString(pObject, "OnRegister"); + if(!pRegisterFunc) + { + printf("OnRegister function init failed!\n"); + return -1; + } + + //pSendFunc=PyObject_GetAttrString(pObject, "OnSent"); + //if(!pSendFunc) + //{ + // printf("OnSent function init failed!\n"); + // return -1; + //} + + pCloseFunc=PyObject_GetAttrString(pObject, "OnClose"); + if(!pCloseFunc) + { + printf("OnClose function init failed!\n"); + return -1; + } + + //pReceivedBizFunc=PyObject_GetAttrString(pObject, "OnReceivedBiz"); + //if(!pReceivedBizFunc) + //{ + // printf("OnReceivedBiz function init failed!\n"); + // return -1; + //} + + //pReceivedBizExFunc=PyObject_GetAttrString(pObject, "OnReceivedBizEx"); + //if(!pReceivedBizExFunc) + //{ + // printf("OnReceivedBizEx function init failed!\n"); + // return -1; + //} + + pReceivedBizMsgFunc=PyObject_GetAttrString(pObject, "OnReceivedBizMsg"); + if(!pReceivedBizMsgFunc) + { + printf("OnReceivedBizMsg function init failed!\n"); + return -1; + } + Thread = new std::thread(&c_CCallbackInterface::run,this); + return 0; +} + +void c_CCallbackInterface::OnConnect(CConnectionInterface *lpConnection) +{ + //CCallBackParam* lpMsg = new CCallBackParam(); + //lpMsg->iResult = 0; + //lpMsg->iCallFuncType = 0; + //lpMsg->lpBizMsg = NULL; + //lpMsg->lpUnPacker = NULL; + //EnterCriticalSection(gMsgQueueSection); + // DealMsgQueue->push(lpMsg); + // LeaveCriticalSection(gMsgQueueSection); + //SetEvent(EventHandle[0]); +} + +void c_CCallbackInterface::OnSafeConnect(CConnectionInterface *lpConnection) +{ + //printf("OnSafeConnect!\n"); + //CCallBackParam* lpMsg = new CCallBackParam(); + //lpMsg->iResult = 0; + //lpMsg->iCallFuncType = 1; + //lpMsg->lpBizMsg = NULL; + //lpMsg->lpUnPacker = NULL; + //EnterCriticalSection(gMsgQueueSection); + // DealMsgQueue->push(lpMsg); + // LeaveCriticalSection(gMsgQueueSection); + ////state = PyGILState_Ensure(); + //SetEvent(EventHandle[0]); + ////PyObject_CallFunction(pSafeConnectFunc,NULL); + ////PyGILState_Release(state); +} + +void c_CCallbackInterface::OnRegister(CConnectionInterface *lpConnection) +{ + CCallBackParam* lpMsg = new CCallBackParam(); + lpMsg->iResult = 0; + lpMsg->iCallFuncType = 2; + lpMsg->lpBizMsg = NULL; + lpMsg->lpUnPacker = NULL; + EnterCriticalSection(gMsgQueueSection); + DealMsgQueue->push(lpMsg); + LeaveCriticalSection(gMsgQueueSection); + //state = PyGILState_Ensure(); + SetEvent(EventHandle[0]); + //PyObject_CallFunction(pRegisterFunc,NULL); + //PyGILState_Release(state); +} + +void c_CCallbackInterface::OnClose(CConnectionInterface *lpConnection) +{ + CCallBackParam* lpMsg = new CCallBackParam(); + lpMsg->iResult = 0; + lpMsg->iCallFuncType = 3; + lpMsg->lpBizMsg = NULL; + lpMsg->lpUnPacker = NULL; + EnterCriticalSection(gMsgQueueSection); + DealMsgQueue->push(lpMsg); + LeaveCriticalSection(gMsgQueueSection); + //state = PyGILState_Ensure(); + SetEvent(EventHandle[0]); + //PyObject_CallFunction(pCloseFunc,NULL); + //PyGILState_Release(state); +} + +void c_CCallbackInterface::OnSent(CConnectionInterface *lpConnection, int hSend, void *reserved1, void *reserved2, int nQueuingData) +{ + //printf("OnSent!\n"); + //CCallBackParam* lpMsg = new CCallBackParam(); + //lpMsg->iResult = 0; + //lpMsg->iCallFuncType = 4; + //lpMsg->lpBizMsg = NULL; + //lpMsg->lpUnPacker = NULL; + //EnterCriticalSection(gMsgQueueSection); + // DealMsgQueue->push(lpMsg); + // LeaveCriticalSection(gMsgQueueSection); + ////state = PyGILState_Ensure(); + //SetEvent(EventHandle[0]); + ////PyObject_CallFunction(pSendFunc,NULL); + ////PyGILState_Release(state); +} + +void c_CCallbackInterface::Reserved1(void *a, void *b, void *c, void *d) +{ +} + +void c_CCallbackInterface::Reserved2(void *a, void *b, void *c, void *d) +{ +} + +int c_CCallbackInterface::Reserved3() +{ + return 0; +} + +void c_CCallbackInterface::Reserved4() +{ +} + +void c_CCallbackInterface::Reserved5() +{ +} + +void c_CCallbackInterface::Reserved6() +{ +} + +void c_CCallbackInterface::Reserved7() +{ +} + +void c_CCallbackInterface::OnReceivedBiz(CConnectionInterface *lpConnection, int hSend, const void *lpUnPackerOrStr, int nResult) +{ + //printf("OnReceivedBiz!\n"); + //CCallBackParam* lpMsg = new CCallBackParam(); + //lpMsg->hSend = hSend; + //lpMsg->iResult = nResult; + //lpMsg->iCallFuncType = 5; + //lpMsg->lpBizMsg = NULL; + //if(nResult == 0 || nResult == 1) + //{ + // void* lpBuff = ((IF2UnPacker*)lpUnPackerOrStr)->GetPackBuf(); + // int iLen = ((IF2UnPacker*)lpUnPackerOrStr)->GetPackLen(); + // lpMsg->lpUnPacker = NewUnPacker(lpBuff,iLen); + //} + //else + //{ + // char* sInfo = (char*)lpUnPackerOrStr; + // lpMsg->sValue = (char*)malloc(sizeof(char)*strlen(sInfo)); + // strcpy_s(lpMsg->sValue,strlen(sInfo),sInfo); + //} + //EnterCriticalSection(gMsgQueueSection); + // DealMsgQueue->push(lpMsg); + // LeaveCriticalSection(gMsgQueueSection); + //SetEvent(EventHandle[0]); +} + +void c_CCallbackInterface::OnReceivedBizEx(CConnectionInterface *lpConnection, int hSend, LPRET_DATA lpRetData, const void *lpUnpackerOrStr, int nResult) +{ + //printf("OnReceivedBizEx!\n"); + //CCallBackParam* lpMsg = new CCallBackParam(); + //lpMsg->hSend = hSend; + //lpMsg->iResult = nResult; + //lpMsg->iCallFuncType = 6; + //lpMsg->lpBizMsg = NULL; + //if(nResult == 0 || nResult == 1) + //{ + // void* lpBuff = ((IF2UnPacker*)lpUnpackerOrStr)->GetPackBuf(); + // int iLen = ((IF2UnPacker*)lpUnpackerOrStr)->GetPackLen(); + // lpMsg->lpUnPacker = NewUnPacker(lpBuff,iLen); + //} + //else + //{ + // char* sInfo = (char*)lpUnpackerOrStr; + // lpMsg->sValue = (char*)malloc(sizeof(char)*strlen(sInfo)); + // strcpy_s(lpMsg->sValue,strlen(sInfo),sInfo); + //} + //EnterCriticalSection(gMsgQueueSection); + //DealMsgQueue->push(lpMsg); + //LeaveCriticalSection(gMsgQueueSection); + //state = PyGILState_Ensure(); + //SetEvent(EventHandle[0]); + //PyGILState_Release(state); +} + +void c_CCallbackInterface::OnReceivedBizMsg(CConnectionInterface *lpConnection, int hSend, IBizMessage* lpMsg) +{ + //printf("OnReceivedBizMsg!\n"); + CCallBackParam* lpCallMsg = new CCallBackParam(); + lpCallMsg->hSend = hSend; + lpCallMsg->iResult = 0; + lpCallMsg->iCallFuncType = 7; + lpCallMsg->lpUnPacker = NULL; + int iLen = 0; + const void* lpBuff = lpMsg->GetBuff(iLen); + lpCallMsg->lpBizMsg = NewBizMessage(); + lpCallMsg->lpBizMsg->AddRef(); + lpCallMsg->lpBizMsg->SetBuff((void*)lpBuff,iLen); + EnterCriticalSection(gMsgQueueSection); + DealMsgQueue->push(lpCallMsg); + LeaveCriticalSection(gMsgQueueSection); + state = PyGILState_Ensure(); + SetEvent(EventHandle[0]); + PyGILState_Release(state); +} + +c_CConnectionInterface::c_CConnectionInterface(C_CConfigInterface* lpConfig) +{ + lpConnect = NewConnection(lpConfig->GetInstance()); + lpConnect->AddRef(); +} + +c_CConnectionInterface::~c_CConnectionInterface() +{ +} + +int c_CConnectionInterface::Connect(unsigned int uiTimeout) +{ + return lpConnect->Connect(uiTimeout); +} + +int c_CConnectionInterface::Close() +{ + return lpConnect->Close(); +} + +char* c_CConnectionInterface::GetServerAddress(int* lpPort) +{ + return (char*)lpConnect->GetServerAddress(lpPort); +} + +int c_CConnectionInterface::GetStatus() +{ + return lpConnect->GetStatus(); +} + +int c_CConnectionInterface::GetServerLoad() +{ + return lpConnect->GetServerLoad(); +} + +char* c_CConnectionInterface::GetErrorMsg(int nErrorCode) +{ + return (char*)lpConnect->GetErrorMsg(nErrorCode); +} + +int c_CConnectionInterface::GetConnectError() +{ + return lpConnect->GetConnectError(); +} + +char* c_CConnectionInterface::GetRealAddress() +{ + return (char*)lpConnect->GetRealAddress(); +} +char* c_CConnectionInterface::GetSelfAddress() +{ + return (char*)lpConnect->GetSelfAddress(); +} + +char* c_CConnectionInterface::GetSelfMac() +{ + return (char*)lpConnect->GetSelfMac(); +} + +c_CSubscribeInterface* c_CConnectionInterface::NewSubscriber(c_SubCallBack *lpCallback,char* SubScribeName,int iTimeOut, + int iInitRecvQLen,int iStepRecvQLen) +{ + CSubscribeInterface* lpSub = lpConnect->NewSubscriber(lpCallback, SubScribeName,iTimeOut,iInitRecvQLen,iStepRecvQLen); + c_CSubscribeInterface* lp = NULL; + if (lpSub != NULL) + { + lp= new c_CSubscribeInterface(lpSub); + } + return lp; +} + +c_IF2UnPacker* c_CConnectionInterface::GetTopic(int byForce,int iTimeOut) +{ + bool bForce = false; + if(byForce > 0) + bForce = true; + IF2UnPacker* lpUnpack = lpConnect->GetTopic(bForce,iTimeOut); + c_IF2UnPacker* lpUnpacker = new c_IF2UnPacker(lpUnpack); + return lpUnpacker; +} + +char* c_CConnectionInterface::GetMCLastError() +{ + return (char*)lpConnect->GetMCLastError(); +} + +int c_CConnectionInterface::Create2BizMsg(c_CCallbackInterface *lpCallback) +{ + return lpConnect->Create2BizMsg(lpCallback); +} + +int c_CConnectionInterface::SendBizMsg(c_IBizMessage* lpMsg,int nAsy) +{ + return lpConnect->SendBizMsg(lpMsg->GetInstance(),nAsy); +} + +int c_CConnectionInterface::RecvBizMsg(int hSend, c_IBizMessage* lpMsg, unsigned uiTimeout, unsigned uiFlag) +{ + IBizMessage* lpBizMsg = lpMsg->GetInstance(); + IBizMessage* lpRecv = NULL; + int iRet = lpConnect->RecvBizMsg(hSend,&lpRecv,uiTimeout,uiFlag); + if (iRet == 0 && lpRecv != NULL) //ճɹ + { + int iLen = 0; + void * lpBuf = lpRecv->GetBuff(iLen); + lpBizMsg->SetBuff(lpBuf,iLen); + } + return iRet; +} +char* c_CConnectionInterface::GetLastAnsError(int bAsyError) +{ + bool bAs = false; + if(bAsyError > 0) + bAs = true; + return (char*)lpConnect->GetLastAnsError(bAs); +} +void c_CConnectionInterface::Release() +{ + lpConnect->Release(); +} + diff --git a/vnpy/api/t2sdk/py_t2sdk/ufx_interface.h b/vnpy/api/t2sdk/py_t2sdk/ufx_interface.h new file mode 100644 index 0000000000..643273364d --- /dev/null +++ b/vnpy/api/t2sdk/py_t2sdk/ufx_interface.h @@ -0,0 +1,388 @@ +#ifndef _UFX_INTERFACE_H_ +#define _UFX_INTERFACE_H_ +#include "t2sdk_interface.h" +#include "python.h" +#include +#include +#include +#include + + +class c_IF2Packer; +class c_IF2UnPacker; + +struct CCallBackParam{ + int hSend; + int iResult; + int iCallFuncType; //ص + IF2UnPacker* lpUnPacker; + IBizMessage* lpBizMsg; + char* sValue; + CCallBackParam() + { + memset(this , 0, sizeof(CCallBackParam)); + } + ~CCallBackParam() + { + if (lpUnPacker) + { + lpUnPacker->Release(); + lpUnPacker = NULL; + } + if (lpBizMsg) + { + lpBizMsg->Release(); + lpBizMsg = NULL; + } + if (sValue) + { + free(sValue); + sValue = NULL; + } + } +}; +struct CSubCalBackPara +{ + char szTopicName[256]; + IBizMessage* lpBizMsg; + CSubCalBackPara() + { + memset(this, 0, sizeof(CSubCalBackPara)); + } + ~CSubCalBackPara() + { + if (lpBizMsg) + { + lpBizMsg->Release(); + lpBizMsg = NULL; + } + } + +}; +class c_IF2Packer +{ +private: + IF2Packer* lpPacker; +public: + c_IF2Packer(); + ~c_IF2Packer(); + void SetBuffer(char* pBuf,int iBufSize,int iDataLen); + void BeginPack(); + int NewDataset(char *szDatasetName, int iReturnCode ); + int AddField(char *szFieldName,char cFieldType='S',int iFieldWidth=255,int iFieldScale=4); + int AddStr(char *szValue); + int AddInt(int iValue); + int AddDouble(double fValue); + int AddChar(char* cValue); + int AddRaw(char* lpBuff,int iLen); + void EndPack(); + int* GetPackBuf(); + int GetPackLen(); + int GetPackBufSize(); + int GetVersion(); + void SetReturnCode(long dwRetCode); + c_IF2UnPacker* UnPack(); + void FreeMem(); + void ClearValue(); + void BeginPackEx(char* szName = NULL); + void ClearDataSet(); + IF2Packer* GetInstance(); + void Release(); +}; + +class c_IF2UnPacker +{ +private: + IF2UnPacker* lpUnPacker; + void * lpBuf; + bool bRelease; +public: + c_IF2UnPacker(char* lpBuffer,int iLen); + c_IF2UnPacker(IF2UnPacker* lpUnPack); + ~c_IF2UnPacker(); + int GetVersion(void); + int Open(char* lpBuffer,int iLen); + int GetDatasetCount(); + int SetCurrentDatasetByIndex(int nIndex); + int SetCurrentDataset(char *szDatasetName); + char* GetPackBuf(); + int GetPackLen(); + int GetRowCount(); + void First(); + void Last(); + void Go(int nRow); + char* GetDatasetName(); + int OpenAndCopy(char* lpBuffer,int iLen); + char* GetColTypeByName(char * columnName); + int GetColScaleByName(char * columnName); + int GetColWidthByName(char * columnName); + IF2UnPacker* GetInstance(); + int GetColCount(); + char* GetColName(int column); + char* GetColType(int column); + int GetColScale(int column); + int GetColWidth(int column); + int FindColIndex(char * columnName); + char* GetStrByIndex(int column); + char* GetStr(char * columnName); + char* GetCharByIndex(int column); + char* GetChar(char * columnName); + double GetDoubleByIndex( int column); + double GetDouble(char * columnName); + int GetIntByIndex(int column); + int GetInt(char * columnName); + char* GetRawByIndex(int column,int * lpRawLen); + char* GetRaw(char * columnName,int * lpRawLen); + int WasNull(); + void Next(); + int IsEOF(); + int IsEmpty(); + void Destroy(); + void Release(); +}; + +class C_CConfigInterface +{ +private: + CConfigInterface* lpConfig; +public: + C_CConfigInterface(); + ~C_CConfigInterface(); + int Load( char *szFileName); + int Save( char *szFileName); + char * GetString( char *szSection, char *szEntry, char *szDefault); + int GetInt( char *szSection, char *szEntry, int iDefault); + int SetString( char *szSection, char *szEntry, char *szValue); + int SetInt( char *szSection, char *szEntry, int iValue); + CConfigInterface* GetInstance(); + void Release(); +}; + +class c_IBizMessage +{ +private: + IBizMessage* lpBizMessage; +public: + c_IBizMessage(); + ~c_IBizMessage(); + void SetFunction(int nFUnctionNo); + int GetFunction(); + void SetPacketType(int nPacketType); + int GetPacketType(); + void SetBranchNo(int nBranchNo); + int GetBranchNo(); + void SetSystemNo(int nSystemNo); + int GetSystemNo(); + void SetSubSystemNo(int nSubSystemNo); + int GetSubSystemNo(); + void SetSenderId(int nSenderId); + int GetSenderId(); + void SetPacketId(int nPacketId); + int GetPacketId(); + void SetErrorNo(int nErrorNo); + int GetErrorNo(); + void SetErrorInfo(char* strErrorInfo); + char* GetErrorInfo(); + void SetReturnCode(int nReturnCode); + int GetReturnCode(); + void SetContent(char* lpContent,int iLen); + char* GetContent(int& iLen); + void SetIssueType(int nIssueType); + int GetIssueType(); + void SetSequeceNo(int nSequeceNo); + int GetSequeceNo(); + void SetKeyInfo(char* lpKeyData,int iLen); + char* GetKeyInfo(int& iLen); + void SetAppData(char* lpAppdata,int nAppLen); + char* GetAppData(int& nAppLen); + int ChangeReq2AnsMessage(); + char* GetBuff(int& nBuffLen); + int SetBuff(char* lpBuff,int nBuffLen); + void ReSet(); + IBizMessage* GetInstance(); + void Release(); +}; + +class c_CSubscribeParamInterface +{ +private: + CSubscribeParamInterface* lpSubParam; +public: + c_CSubscribeParamInterface(); + ~c_CSubscribeParamInterface(); + void SetTopicName(char* szName); + void SetAppData(char* lpData,int iLen); + void SetFilter(char* filterName,char* filterValue); + void SetReturnFiled(char* filedName); + void SetFromNow(int bFromNow); + void SetReplace(int bReplace); + void SetSendInterval(int nSendInterval); + char* GetTopicName(); + char* GetAppData(int *iLen); + char* GetFilterNameByIndex(int index); + char* GetFilterValueByIndex(int index); + char* GetFilterValue(char* fileName); + int GetFilterCount(); + char* GetReturnFiled(); + int GetFromNow(); + int GetReplace(); + int GetSendInterval(); + CSubscribeParamInterface* GetInstance(); + void Release(); +}; + +class c_SubCallBack: public CSubCallbackInterface +{ +private: + PyObject* pModule; + PyObject* pDict; + PyObject* pClass; + PyObject* pObject; + PyObject* pOnReceiveFunc; + char lpCallMould[50]; + char lpCallClass[50]; + PyGILState_STATE state; + HANDLE EventHandle[2]; + std::thread* Thread; + std::queue* DealMsgQueue; + CRITICAL_SECTION* gMsgQueueSection; + bool IsRun; + void operator()() { + run(); + } + void run(); +public: + c_SubCallBack(char *lpMould,char *lpClass); + c_SubCallBack(); + ~c_SubCallBack(); + + int initInstance(); + unsigned long FUNCTION_CALL_MODE QueryInterface(const char *iid, IKnown **ppv) + { + return 0; + } + + unsigned long FUNCTION_CALL_MODE AddRef() + { + return 0; + } + + unsigned long FUNCTION_CALL_MODE Release() + { + return 0; + } + void FUNCTION_CALL_MODE OnReceived(CSubscribeInterface *lpSub,int subscribeIndex, const void *lpData, int nLength,LPSUBSCRIBE_RECVDATA lpRecvData); + void FUNCTION_CALL_MODE OnRecvTickMsg(CSubscribeInterface *lpSub,int subscribeIndex,const char* TickMsgInfo); +}; + +class c_CSubscribeInterface +{ +private: + CSubscribeInterface* lpSubscribe; +public: + c_CSubscribeInterface(CSubscribeInterface* lpSub); + ~c_CSubscribeInterface(); + int SubscribeTopic(c_CSubscribeParamInterface* lpSubscribeParamInter ,unsigned int uiTimeout,c_IF2UnPacker** lppBizUnPack=NULL,c_IF2Packer* lpBizPack=NULL); + int CancelSubscribeTopic(int subscribeIndex); + int CancelSubscribeTopicEx(char* topicName,CFilterInterface* lpFilterInterface); + void GetSubcribeTopic(c_IF2Packer* lpPack); + void Release(); +}; + +class c_CCallbackInterface: public CCallbackInterface +{ +private: + PyObject* pModuleT2; + PyObject* pT2Class; + PyObject* pModule; + PyObject* pDict; + PyObject* pClass; + PyObject* pObject; + //PyObject* pConnectFunc; + //PyObject* pSafeConnectFunc; + PyObject* pRegisterFunc; + PyObject* pCloseFunc; + //PyObject* pSendFunc; + //PyObject* pReceivedBizFunc; + //PyObject* pReceivedBizExFunc; + PyObject* pReceivedBizMsgFunc; + PyGILState_STATE state; + char sMouldName[50]; + char sClassName[50]; + HANDLE EventHandle[2]; + std::thread* Thread; + std::queue* DealMsgQueue; + CRITICAL_SECTION* gMsgQueueSection; + bool IsRun; + void operator()() { + run(); + } + void run(); +public: + c_CCallbackInterface(char* sMould,char* sClass); + c_CCallbackInterface(); + ~c_CCallbackInterface(); + int InitInstance(); + unsigned long FUNCTION_CALL_MODE QueryInterface(const char *iid, IKnown **ppv) + { + return 0; + } + + unsigned long FUNCTION_CALL_MODE AddRef() + { + return 0; + } + + unsigned long FUNCTION_CALL_MODE Release() + { + return 0; + } + void FUNCTION_CALL_MODE OnConnect(CConnectionInterface *lpConnection); + void FUNCTION_CALL_MODE OnSafeConnect(CConnectionInterface *lpConnection); + void FUNCTION_CALL_MODE OnRegister(CConnectionInterface *lpConnection); + void FUNCTION_CALL_MODE OnClose(CConnectionInterface *lpConnection); + void FUNCTION_CALL_MODE OnSent(CConnectionInterface *lpConnection, int hSend, void *reserved1, void *reserved2, int nQueuingData); + void FUNCTION_CALL_MODE Reserved1(void *a, void *b, void *c, void *d); + void FUNCTION_CALL_MODE Reserved2(void *a, void *b, void *c, void *d); + int FUNCTION_CALL_MODE Reserved3(); + void FUNCTION_CALL_MODE Reserved4(); + void FUNCTION_CALL_MODE Reserved5(); + void FUNCTION_CALL_MODE Reserved6(); + void FUNCTION_CALL_MODE Reserved7(); + void FUNCTION_CALL_MODE OnReceivedBiz(CConnectionInterface *lpConnection, int hSend, const void *lpUnPackerOrStr, int nResult); + void FUNCTION_CALL_MODE OnReceivedBizEx(CConnectionInterface *lpConnection, int hSend, LPRET_DATA lpRetData, const void *lpUnpackerOrStr, int nResult); + void FUNCTION_CALL_MODE OnReceivedBizMsg(CConnectionInterface *lpConnection, int hSend, IBizMessage* lpMsg); +}; + +class c_CConnectionInterface +{ +private: + CConnectionInterface* lpConnect; +public: + c_CConnectionInterface(C_CConfigInterface* lpConfig); + ~c_CConnectionInterface(); + int Connect(unsigned int uiTimeout); + int Close(); + char * GetServerAddress(int *lpPort); + int GetStatus(); + int GetServerLoad(); + char * GetErrorMsg(int nErrorCode); + int GetConnectError(); + char* GetRealAddress(); + char* GetSelfAddress(); + char* GetSelfMac(); + c_CSubscribeInterface* NewSubscriber(c_SubCallBack *lpCallback,char* SubScribeName,int iTimeOut, + int iInitRecvQLen=INIT_RECVQ_LEN,int iStepRecvQLen=STEP_RECVQ_LEN); + c_IF2UnPacker* GetTopic(int byForce,int iTimeOut); + char* GetMCLastError(); + int Create2BizMsg(c_CCallbackInterface *lpCallback); + int SendBizMsg(c_IBizMessage* lpMsg,int nAsy = 0); + int RecvBizMsg(int hSend, c_IBizMessage* lpMsg, unsigned uiTimeout = 1000, unsigned uiFlag = 0); + char * GetLastAnsError(int bAsyError = 0); + void Release(); +}; + + + + +#endif \ No newline at end of file diff --git a/vnpy/api/t2sdk/t2sdk.dll b/vnpy/api/t2sdk/t2sdk.dll new file mode 100644 index 0000000000..06ee784b59 Binary files /dev/null and b/vnpy/api/t2sdk/t2sdk.dll differ diff --git a/vnpy/api/tap/.gitignore b/vnpy/api/tap/.gitignore deleted file mode 100644 index 15338c00be..0000000000 --- a/vnpy/api/tap/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -vntap.lib - - diff --git a/vnpy/api/tap/__init__.py b/vnpy/api/tap/__init__.py index e69de29bb2..30a3f84518 100644 --- a/vnpy/api/tap/__init__.py +++ b/vnpy/api/tap/__init__.py @@ -0,0 +1,3 @@ +from .vntapmd import MdApi +from .vntaptd import TdApi +from .tap_constant import * \ No newline at end of file diff --git a/vnpy/api/tap/error_codes.py b/vnpy/api/tap/error_codes.py deleted file mode 100644 index d4ec6577a0..0000000000 --- a/vnpy/api/tap/error_codes.py +++ /dev/null @@ -1,288 +0,0 @@ -error_map = { - 0: None, - -1: "连接服务失败", - -2: "链路认证失败", - -3: "主机地址不可用", - -4: "发送数据错误", - -5: "测试编号不合法", - -6: "没准备好测试网络", - -7: "当前网络测试还没结束", - -8: "没用可用的接入前置", - -9: "数据路径不可用", - -10: "重复登录", - -11: "内部错误", - -12: "上一次请求还没有结束", - -13: "输入参数非法", - -14: "授权码不合法", - -15: "授权码超期", - -16: "授权码类型不匹配", - -17: "API还没有准备好", - -18: "UDP端口监听失败", - -19: "UDP正在监听", - -20: "接口未实现", - -21: "每次登陆只允许调用一次", - -22: "超过下单频率。", - -10000: "输入数据为NULL", - -10001: "输入错误的:TAPIYNFLAG", - -10002: "输入错误的:TAPILOGLEVEL", - -10003: "输入错误的:TAPICommodityType", - -10004: "输入错误的:TAPICallOrPutFlagType", - -12001: "输入错误的:TAPIAccountType", - -12003: "输入错误的:TAPIAccountState", - -12004: "输入错误的:TAPIAccountFamilyType", - -12005: "输入错误的:TAPIOrderTypeType", - -12006: "输入错误的:TAPIOrderSourceType", - -12007: "输入错误的:TAPITimeInForceType", - -12008: "输入错误的:TAPISideType", - -12009: "输入错误的:TAPIPositionEffectType", - -12010: "输入错误的:TAPIHedgeFlagType", - -12011: "输入错误的:TAPIOrderStateType", - -12012: "输入错误的:TAPICalculateModeType", - -12013: "输入错误的:TAPIMatchSourceType", - -12014: "输入错误的:TAPIOpenCloseModeType", - -12015: "输入错误的:TAPIFutureAlgType", - -12016: "输入错误的:TAPIOptionAlgType", - -12017: "输入错误的:TAPIBankAccountLWFlagType", - -12021: "输入错误的:TAPIMarginCalculateModeType", - -12022: "输入错误的:TAPIOptionMarginCalculateModeType", - -12023: "输入错误的:TAPICmbDirectType", - -12024: "输入错误的:TAPIDeliveryModeType", - -12025: "输入错误的:TAPIContractTypeType", - -12035: "输入错误的:TAPITacticsTypeType", - -12036: "输入错误的:TAPIORDERACT", - -12041: "输入错误的:TAPITriggerConditionType", - -12042: "输入错误的:TAPITriggerPriceTypeType", - -12043: "输入错误的:TAPITradingStateType", - -12044: "输入错误的:TAPIMarketLevelType", - -12045: "输入错误的:TAPIOrderQryTypeType", - 1: "主动断开", - 2: "被动断开", - 3: "读错误", - 4: "写错误", - 5: "缓冲区满", - 6: "异步操作错误", - 7: "解析数据错误", - 8: "连接超时", - 9: "初始化失败", - 10: "已经连接", - 11: "工作线程已结束", - 12: "操作正在进行,请稍后重试", - 13: "心跳检测失败", - 10001: "登录过程执行错误", - 10002: "登录用户不存在", - 10003: "需要进行动态认证", - 10004: "登录用户未授权", - 10005: "登录模块不正确", - 10006: "需要强制修改密码", - 10007: "登录状态禁止登陆", - 10008: "登录密码不正确", - 10009: "没有该模块登录权限", - 10010: "登录数量超限", - 10011: "登录用户不在服务器标识下可登录用户列表中", - 10012: "登录用户已被冻结", - 10013: "密码错误,用户冻结", - 10014: "客户状态不允许登录", - 10015: "需要进行二次认证", - 10016: None, - 10017: None, - 10018: "登录用户密码超过有效天数", - 10101: "登录用户信息查询失败", - 11001: "数据库操作失败", - 11501: "登录用户下属所有资金账号查询失败", - 11701: "登录用户密码修改失败", - 11702: "登录用户密码修改失败——原始密码错误", - 11703: "登录用户密码修改失败——不能与前n次密码相同", - 11704: "新密码不符合密码复杂度要求", - 20201: "资金账号信息查询失败", - 20701: "客户交易编码查询失败", - 22801: "合约信息查询失败", - 22901: "特殊期权标的查询失败", - 25501: "品种委托类型查询失败", - 25601: "品种委托时间有效性查询失败", - 28901: "用户下单频率查询失败", - 60001: "资金账号不存在", - 60002: "资金账号状态不正确", - 60003: "资金账号交易中心不一致", - 60004: "资金账号无期权交易权限", - 60005: "资金账号无品种交易权限", - 60006: "资金账号无开仓权限", - 60007: "资金账号风控项检查失败", - 60011: "下单无效的合约", - 60021: "客户权限禁止交易", - 60022: "客户品种分组禁止交易", - 60023: "客户合约特设禁止交易", - 60024: "系统权限禁止交易", - 60031: "持仓量超过最大限制", - 60032: "下单超过单笔最大量", - 60033: "下单合约无交易路由", - 60034: "委托价格超出偏离范围", - 60035: "超过GiveUp最大持仓量", - 60036: "下单自动审核失败", - 60037: "LME未准备就绪", - 60038: "平仓方式错误", - 60039: "下单对应的父账号资金不足", - 60040: "互换单的合约格式错误", - 60051: "下单资金不足", - 60052: "手续费参数错误", - 60053: "保证金参数错误", - 60061: "撤单无此系统号", - 60062: "此状态不允许撤单", - 60063: "录单不允许撤单", - 60071: "此状态不允许改单", - 60072: "人工单不允许改单", - 60081: "已删除报单不能转移", - 60082: "人工单不允许改单", - 60091: "录单重复", - 60092: "保证金参数错误", - 60100: "操作账号只可查询", - 60101: "合约行情价格修改失败", - 60102: "即使子帐号又是做市商不能应价", - 60103: "下单找不到交易编码", - 60104: "操作账号只可开仓", - 60105: "操作账号没有上期挂单查询权限", - 60106: "限期有效单不能小于当前交易日", - 60107: "该编码不允许申请或拆分组合", - 60108: "非本服务器标记下的账号不允许操作", - 60109: "行权或弃权量超过可用量", - 60110: "没有订单审核权限", - 60111: "下单超过上手单笔最大量", - 60115: "非大连应价单不允许两笔委托量不一致", - 60117: "申请不允许重复提交", - 60118: "超过账号下单频率限制", - 60119: "组合表不存在的组合方向或投保标志", - 61001: "订单操作频率过高", - 61002: "委托查询返回前不能进行下次查询", - 72001: "超过行情最大总订阅数", - 72002: "超过该交易所行情最大订阅数", - 72101: "没有该行情的订阅权限", - 72102: "没有该交易所下行情的订阅权限", - 72103: "品种不存在", - 72104: "合约可能不存在", - 83001: "不支持的行情协议", - 14001: "二次验证失败", - 14002: "二次验证超时", - 11000: "数据库连接失败", - 11002: "不允许一对多", - 11003: "删除失败-存在关联信息,", - 11004: "删除分组失败-分组有下属或在操作员下属中", - 12001: "登录用户密码修改失败-原始密码错误", - 12002: "登录用户密码修改失败-不能与前n次密码相同", - 12003: "登录用户密码修改失败-新密码不符合密码复杂度要求", - 13001: "一个币种组只能设置一个基币", - 13002: "基币只能是美元或港币", - 60012: "LME未准备就绪", - 60013: "不支持的下单类型", - 60014: "错误的埋单类型", - 60015: "不合法的委托类型", - 60025: "客户权限只可平仓", - 60026: "客户合约特设只可平仓", - 60027: "系统权限只可平仓", - 60028: "只可平仓提前天数限制只可平仓", - 60029: "客户品种风控权限禁止交易", - 60030: "客户品种风控权限只可平仓", - 60041: "未登录网关", - 60042: "未找到网关信息", - 60054: "总基币资金不足", - 60055: "超过保证金额度", - 60056: "总基币超过开仓比例限制", - 60057: "独立币种组超过开仓比例限制", - 60058: "风险阵列参数错误", - 60073: "风险报单不允许改单", - 60074: "成交量大于改单量", - 60075: "预埋单不允许改单", - 60112: "下单超过上手最大持仓量", - 60121: "开平方式错误", - 60122: "委托平仓持仓不足", - 60123: "成交平仓失败", - 60131: "未找到本地委托", - 60132: "与网关断开连接", - 60141: "录单成交重复", - 60142: "录单成交未找到对应委托", - 60143: "录单成交合约不存在", - 60144: "录单成交参数错误", - 60145: "录单成交委托状态错误", - 60151: "成交删除未找到成交", - 60152: "此状态成交不可删", - 60161: "不允许录入此状态订单", - 60162: "错误的修改订单请求", - 60163: "订单不可删,存在对应成交", - 60164: "不合法的委托状态", - 60165: "此状态不允许订单转移", - 60166: "订单不允许删除", - 60171: "做市商双边撤单未找到委托", - 60172: "做市商双边撤单客户不一致", - 60173: "做市商双边撤单品种不一致", - 60174: "做市商双边撤单合约不一致", - 60175: "做市商双边撤单买卖方向相同", - 60176: "做市商双边撤单买卖方向错误", - 60177: "做市商单边检查未通过", - 60181: "埋单激活失败,订单未找到", - 60182: "埋单激活失败,非有效状态", - 80001: "网关未就绪,未连接上手", - 80002: "品种错误", - 80003: "合约错误", - 80004: "报单字段有误", - 80005: "价格不合法", - 80006: "数量不合法", - 80007: "报单类型不合法", - 80008: "委托模式不合法", - 80009: "委托不存在(改单、撤单)", - 80010: "发送报单失败", - 80011: "被上手拒绝", - 90001: "前置不允许该模块登录", - 90002: "一次请求太多数据", - 90003: "前置没有所要数据", - 90004: "所查询的操作员信息不存在", - 90011: "前置与交易断开", - 90012: "前置与管理断开", - 90021: "下属资金账号不存在", - 90022: "该操作员不允许交易", - 90023: "查询频率过快", - 90024: "该授权不予许登录", - 90025: "自成交验证不通过", - -23: "查询频率太快。", - -24: "不符合调用条件。", - -25: "改单撤单时没有找到对应订单。", - -26: "日志路径为空。", - -27: "打开日志文件失败", - -28: "没有交易员登录权限", - -29: "没有订单录入或者成交录入", - -30: "没有订单修改和订单删除权限,成交删除权限", - -31: "没有订单转移权限", - -32: "成交录入时系统号为空", - -33: "成交删除时成交号为空。", - -34: "成交删除时没有找到对应的成交", - -35: "订单修改时客户账号变动。", - -36: "订单转移时客户账号没有变动", - -37: "修改的电话密码位数不对或者包含特殊字符。", - -38: "未绑定的二次认证信息", - -39: "二次认证有效期内不能再申请二次认证码", - -40: "没有设置客户密码的权限。", - -41: "风险保单单客户无法撤销或更改", - -42: "改单是客户账号填写与订单客户账号不一致", - -11001: "输入错误的:TAPIBucketDateFlag", - -11002: "输入错误的:TAPIHisQuoteType", - -12002: "输入错误的:TAPIUserTypeType", - -12018: "输入错误的:TAPIBankAccountStateType", - -12019: "输入错误的:TAPIBankAccountSwapStateType", - -12020: "输入错误的:TAPIBankAccountTransferStateType", - -12026: "输入错误的:TAPIPartyTypeType", - -12027: "输入错误的:TAPIPartyCertificateTypeType", - -12028: "输入错误的:TAPIMsgReceiverType", - -12029: "输入错误的:TAPIMsgTypeType", - -12030: "输入错误的:TAPIMsgLevelType", - -12031: "输入错误的:TAPITransferDirectType", - -12032: "输入错误的:TAPITransferStateType", - -12033: "输入错误的:TAPITransferTypeType", - -12034: "输入错误的:TAPITransferDeviceIDType", - -12037: "输入错误的:TAPIBillTypeType", - -12038: "输入错误的:TAPIBillFileTypeType", - -12039: "输入错误的:TAPIOFFFlagType", - -12040: "输入错误的:TAPICashAdjustTypeType", - -12046: "输入错误的: ClientID,ClientID包含特殊字符。", - -13001: "历史行情查询参数不合法", - -13002: "价格和数量中包含NAN或者INF不合法的数值", - -12047: "输入错误的到期日", - -12048: "错误的密码类型", - -12049: "错误的结算数据类型", -} diff --git a/vnpy/api/tap/generate_error_map.py b/vnpy/api/tap/generate_error_map.py deleted file mode 100644 index 5c48c470d7..0000000000 --- a/vnpy/api/tap/generate_error_map.py +++ /dev/null @@ -1,25 +0,0 @@ -from typing import Dict - -import black - -from autocxxpy.core.cxxparser import CxxFileParser - -parser = CxxFileParser( - files=["iTapAPIError.h", - "TapAPIError.h", - ], - include_paths=['vntap/include'] -) -result = parser.parse() -error_map: Dict[int, str] = {} -for v in result.g.variables.values(): - error_map[v.value] = v.brief_comment -for v in result.g.namespaces['ITapTrade'].variables.values(): - error_map[v.value] = v.brief_comment - -result = f'error_map = {repr(error_map)}' - -output_file = 'error_codes.py' -with open(output_file, "wt", encoding='utf-8') as f: - f.write(result) -black.main([output_file]) diff --git a/vnpy/api/tap/generate_tap.sh b/vnpy/api/tap/generate_tap.sh deleted file mode 100644 index 5ef84f5791..0000000000 --- a/vnpy/api/tap/generate_tap.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -c2py generate \ - vntap \ - iTapTradeAPI.h TapQuoteAPI.h TapAPIError.h iTapAPIError.h \ - -I vntap/include \ - -A custom/custom_wrappers.hpp\ - --output-dir vntap/generated_files \ - --copy-c2py-includes vntap/include \ - --pyi-output-dir . \ - \ - --no-clear-pyi-output-dir \ - \ - --output-arg-pattern \ - "(.*API::.*(sessionID$|.*ClientBuyOrderNo$|.*ClientSellOrderNo$|.*ClientOrderNo$))|(.*Result)" \ - \ - --no-callback-pattern \ - ".*API::.*" \ - --no-transform-pattern \ - ".*Notify::On.*" \ - \ - --string-encoding-windows .936 \ - --string-encoding-linux zh_CN.GB18030 \ - \ - --enforce-version 0.5.4 - -# python generate_error_map.py diff --git a/vnpy/api/tap/generator/generate_api_commdef.py b/vnpy/api/tap/generator/generate_api_commdef.py new file mode 100644 index 0000000000..13ec7d8744 --- /dev/null +++ b/vnpy/api/tap/generator/generate_api_commdef.py @@ -0,0 +1,199 @@ +"""""" +import importlib + + +class CommenTypeGenerator: + """DataType生成器""" + + def __init__(self, filename: str, prefix: str, name: str) -> None: + """Constructor""" + self.filename: str = filename + self.prefix: str = prefix + self.name: str = name + self.typedefs = {} + + def load_constant(self): + """""" + module_name = f"{self.prefix}_{self.name}_commen_typedef" + module = importlib.import_module(module_name) + + for name in dir(module): + if "__" not in name: + self.typedefs[name] = getattr(module, name) + + def run(self) -> None: + """主函数""" + self.f_cpp = open(self.filename, "r", encoding="UTF-8") + self.f_define = open(f"{self.prefix}_{self.name}_commen_constant.py", "w", encoding="UTF-8") + self.f_typedef = open(f"{self.prefix}_{self.name}_commen_typedef.py", "w", encoding="UTF-8") + self.f_struct = open(f"{self.prefix}_{self.name}_commen_struct.py", "w", encoding="UTF-8") + + self.add_supplement() + + for line in self.f_cpp: + self.process_line(line) + + self.f_cpp.close() + self.f_define.close() + self.f_typedef.close() + + self.load_constant() + self.process_struct() + + self.f_cpp.close() + self.f_struct.close() + + print(f"{self.name}_CommenType生成完毕") + + def process_struct(self) -> None: + f_cpp_struct = open(self.filename, "r", encoding="UTF-8") + for line in f_cpp_struct: + line = line.replace(";", "") + line = line.replace("\n", "") + + if "struct" in line: + self.process_declare(line) + elif "{" in line: + self.process_start(line) + elif line.startswith("}") and self.name == "md": + self.process_end(line) + elif line.startswith(" }") and self.name == "td": + self.process_end(line) + elif "///<" in line: + self.process_member(line) + + f_cpp_struct.close() + + def process_declare(self, line: str): + """处理声明""" + words = line.split(" ") + name = words[-1] + end = "{" + + new_line = f"{name} = {end}\n" + self.f_struct.write(new_line) + + def process_start(self, line: str): + """处理开始""" + pass + + def process_end(self, line: str): + """处理结束""" + new_line = "}\n\n" + self.f_struct.write(new_line) + + def process_member(self, line: str) -> None: + sector = line.split("///<")[0] + words = sector.split("\t") + words = [word for word in words if word != ""] + + if len(words) == 1: + words = words[0].split(" ") + words = [word for word in words if word != ""] + + name = words[1].strip() + py_type = self.typedefs.get(words[0].strip(), "dict") + new_line = f" \"{name}\": \"{py_type}\",\n" + self.f_struct.write(new_line) + + def process_line(self, line: str) -> None: + """处理每行""" + line = line.replace("\n", "") + line = line.replace(";", "") + + # MD + if self.name == "md": + if line.startswith("typedef char"): + self.process_char_md(line) + elif line.startswith("const"): + self.process_const_md(line) + # TD + elif self.name == "td": + if line.startswith(" typedef char"): + self.process_char_td(line) + elif line.startswith(" const"): + self.process_const_td(line) + + def process_char_md(self, line: str) -> None: + """处理类型定义""" + if "\t\t\t\t" in line: + name = line.split("\t\t\t\t")[1] + new_line = f"{name} = \"char\"\n" + else: + name = line.split("\t")[1].split("[")[0] + new_line = f"{name} = \"string\"\n" + + self.f_typedef.write(new_line) + + def process_char_td(self, line: str) -> None: + words = line.split(" ") + words = [word for word in words if word != ""] + + name = words[-1] + + if "[" in name: + name = name.split("[")[0] + new_line = f"{name} = \"string\"\n" + else: + new_line = f"{name} = \"char\"\n" + + self.f_typedef.write(new_line) + + def process_const_md(self, line: str) -> None: + """""" + sectors = line.split("=") + value = sectors[1].replace("\'", "\"").strip() + + words = sectors[0].split("\t") + words = [word for word in words if word != ""] + name = words[1].strip() + + new_line = f"{name} = {value}\n" + self.f_define.write(new_line) + + def process_const_td(self, line: str): + sectors = line.split("=") + value = sectors[1].replace("\'", "\"").strip() + + words = sectors[0].split(" ") + words = [word for word in words if word != ""] + + name = words[-1].strip() + + new_line = f"{name} = {value}\n" + self.f_define.write(new_line) + + def add_supplement(self): + self.f_typedef.write("TAPIINT32 = \"int\"\n") + self.f_typedef.write("TAPIUINT32 = \"unsigned int\"\n") + self.f_typedef.write("TAPIINT64 = \"long long\"\n") + self.f_typedef.write("TAPIUINT64 = \"unsigned long long\"\n") + self.f_typedef.write("TAPIUINT16 = \"unsigned short\"\n") + self.f_typedef.write("TAPIUINT8 = \"unsigned char\"\n") + self.f_typedef.write("TAPIREAL64 = \"double\"\n") + + if self.name == "md": + self.f_typedef.write("TAPIYNFLAG = \"char\"\n") + self.f_typedef.write("TAPILOGLEVEL = \"char\"\n") + self.f_typedef.write("TAPICommodityType = \"char\"\n") + self.f_typedef.write("TAPICallOrPutFlagType = \"char\"\n") + + self.f_typedef.write("TAPIMACTYPE = \"string\"\n") + self.f_typedef.write("TAPISecondSerialIDType = \"string\"\n") + self.f_typedef.write("TAPIClientIDType = \"string\"\n") + + elif self.name == "td": + self.f_typedef.write("TAPIYNFLAG = \"char\"\n") + self.f_typedef.write("TAPIPasswordType = \"char\"\n") + self.f_typedef.write("TAPILOGLEVEL = \"char\"\n") + self.f_typedef.write("TAPIOptionType = \"char\"\n") + self.f_typedef.write("TAPICommodityType = \"char\"\n") + self.f_typedef.write("TAPICallOrPutFlagType = \"char\"\n") + + +if __name__ == "__main__": + md_generator = CommenTypeGenerator("../include/tap/TapAPICommDef.h", "tap", "md") + md_generator.run() + + td_generator = CommenTypeGenerator("../include/tap/iTapAPICommDef.h", "tap", "td") + td_generator.run() diff --git a/vnpy/api/tap/generator/generate_api_error.py b/vnpy/api/tap/generator/generate_api_error.py new file mode 100644 index 0000000000..25b63f931e --- /dev/null +++ b/vnpy/api/tap/generator/generate_api_error.py @@ -0,0 +1,57 @@ +"""""" + + +class ErrorTypeGenerator: + """DataType生成器""" + + def __init__(self, filename: str, prefix: str, name: str) -> None: + """Constructor""" + self.filename: str = filename + self.prefix: str = prefix + self.name: str = name + + def run(self) -> None: + """主函数""" + self.f_cpp = open(self.filename, "r", encoding="UTF-8") + self.f_define = open(f"{self.prefix}_{self.name}_error_constant.py", "w", encoding="UTF-8") + + for line in self.f_cpp: + self.process_line(line) + + self.f_cpp.close() + self.f_define.close() + + print(f"{self.name}_ErrorType生成完毕") + + def process_line(self, line: str) -> None: + """处理每行""" + line = line.replace("\n", "") + line = line.replace(";", "") + + # MD + if self.name == "md": + if line.startswith("const int"): + self.process_int(line) + # TD + elif self.name == "td": + if line.startswith(" const int"): + self.process_int(line) + + def process_int(self, line: str) -> None: + """处理类型定义""" + sectors = line.split("=") + value = sectors[1].strip() + + words = sectors[0].split(" ") + words = [word for word in words if word != ""] + name = words[-1].strip() + new_line = f"{name} = {value}\n" + self.f_define.write(new_line) + + +if __name__ == "__main__": + md_generator = ErrorTypeGenerator("../include/tap/TapAPIError.h", "tap", "md") + md_generator.run() + + td_generator = ErrorTypeGenerator("../include/tap/iTapAPIError.h", "tap", "td") + td_generator.run() diff --git a/vnpy/api/tap/generator/generate_api_functions.py b/vnpy/api/tap/generator/generate_api_functions.py new file mode 100644 index 0000000000..a1886beff4 --- /dev/null +++ b/vnpy/api/tap/generator/generate_api_functions.py @@ -0,0 +1,435 @@ +"""""" +import importlib + + +class ApiGenerator: + """API生成器""""" + + def __init__(self, filename: str, prefix: str, name: str, class_name: str): + """Constructor""" + self.filename = filename + self.prefix = prefix + self.name = name + self.class_name = class_name + + self.callbacks = {} + self.functions = {} + self.lines = {} + + self.structs = {} + self.typedefs = {} + self.load_constant() + self.load_struct() + + def load_constant(self) -> None: + """""" + if self.name == "md": + module_names = ["tap_md_commen_typedef", "tap_md_data_typedef"] + elif self.name == "td": + module_names = ["tap_td_commen_typedef", "tap_td_data_typedef"] + + for module_name in module_names: + module = importlib.import_module(module_name) + + for name in dir(module): + if "__" not in name: + self.typedefs[name] = getattr(module, name) + + def load_struct(self): + """加载Struct""" + module_names = ["tap_md_data_struct", "tap_md_commen_struct", "tap_td_data_struct", "tap_td_commen_struct"] + + for module_name in module_names: + module = importlib.import_module(module_name) + + for name in dir(module): + if "__" not in name: + self.structs[name] = getattr(module, name) + + def run(self): + """运行生成""" + self.f_cpp = open(self.filename, "r", encoding="UTF-8") + + for line in self.f_cpp: + self.process_line(line) + + self.f_cpp.close() + # print("self.callbacks=",self.callbacks,"\n\n") + # print("self.functions=", self.functions,"\n\n") + # print("self.lines=", self.lines,"\n\n") + + # print("self.structs=", self.structs,"\n\n") + # print("self.typedefs=", self.typedefs,"\n\n") + + self.generate_header_define() + self.generate_header_process() + self.generate_header_on() + self.generate_header_function() + + self.generate_source_task() + self.generate_source_switch() + self.generate_source_process() + self.generate_source_function() + self.generate_source_on() + self.generate_source_module() + + print(f"{self.name}_API生成成功") + + def process_line(self, line: str): + """处理每行""" + line = line.replace(";", "") + line = line.replace("\n", "") + line = line.replace("\t", "") + line = line.replace("{}", "") + + if "virtual void TAP_CDECL On" in line: + self.process_callback(line) + elif "virtual ITapTrade::TAPIINT32 TAP_CDECL Qry" in line: + self.process_function(line) + elif "virtual TAPIINT32 TAP_CDECL Qry" in line: + self.process_function(line) + + def process_callback(self, line: str): + """处理回掉函数""" + name = line[line.index("On"):line.index("(")] + line = line.replace(" ", "") + new_line = self.standard_format(line) + self.lines[name] = new_line + + d = self.generate_arg_dict(line) + self.callbacks[name] = d + + def standard_format(self, line: str): + """""" + line = line.split("=")[0] + line = line.replace("virtual void TAP_CDECL", "virtual void") + header = line.split("(")[0] + + args_str = line[line.index("(") + 1:line.index(")")] + if not args_str: + f_content = "" + else: + args = args_str.split(",") + content = "" + for arg in args: + words = arg.split(" ") + if len(words) > 2: + tap_type = words[-2] + name = words[-1] + + if "::" in tap_type: + tap_type = tap_type.split("::")[1] + + cpp_type = self.typedefs.get(tap_type, "dict") + if cpp_type == "dict": + cpp_type = tap_type + + item = f"{cpp_type} {name}, " + content = content + item + elif len(words) == 2: + tap_type = words[0] + name = words[1] + + if "::" in tap_type: + tap_type = tap_type.split("::")[1] + cpp_type = self.typedefs[tap_type] + + item = f"{cpp_type} {name}, " + content = content + item + f_content = content[:-2] + + new_line = f"{header}({f_content})" + return new_line + + def process_function(self, line: str): + """处理主动函数""" + name = line[line.index("Qry"):line.index("(")] + + d = self.generate_arg_dict(line) + self.functions[name] = d + + def generate_arg_dict(self, line: str): + """生成参数字典""" + args_str = line[line.index("(") + 1:line.index(")")] + if not args_str: + return {} + args = args_str.split(",") + + d = {} + for arg in args: + words = arg.split(" ") + words = [word for word in words if word] + + tap_type = words[-2].replace("*", "") + name = words[-1].replace("*", "") + if "::" in tap_type: + tap_type = tap_type.split("::")[1] + + cpp_type = self.typedefs.get(tap_type, tap_type) + if cpp_type == "dict": + cpp_type = tap_type + d[name] = cpp_type + return d + + def generate_header_define(self): + """""" + filename = f"{self.prefix}_{self.name}_header_define.h" + with open(filename, "w") as f: + for n, name in enumerate(self.callbacks.keys()): + line = f"#define {name.upper()} {n}\n" + f.write(line) + + def generate_header_process(self): + """""" + filename = f"{self.prefix}_{self.name}_header_process.h" + with open(filename, "w") as f: + for name in self.callbacks.keys(): + name = name.replace("On", "process") + line = f"void {name}(Task *task);\n\n" + f.write(line) + + def generate_header_on(self): + """""" + filename = f"{self.prefix}_{self.name}_header_on.h" + with open(filename, "w") as f: + for function_name, d in self.callbacks.items(): + function_name = function_name.replace("On", "on") + + args_list = [] + for name, type_ in d.items(): + if type_ == "unsigned int": + args_list.append("unsigned int session") + elif type_ == "int": + if name == "errorCode": + args_list.append("int error") + elif name == "reasonCode": + args_list.append("int reason") + else: + args_list.append(f"int {name}") + elif type_ == "char": + args_list.append("char last") + elif type_ == "string": + args_list.append(f"string {name}") + else: + args_list.append("const dict &data") + + args_str = ", ".join(args_list) + line = f"virtual void {function_name}({args_str}) {{}};\n\n" + + f.write(line) + + def generate_header_function(self): + """""" + filename = f"{self.prefix}_{self.name}_header_function.h" + with open(filename, "w") as f: + for function_name, d in self.functions.items(): + function_name = function_name.replace("Qry", "qry") + + args_list = [] + for name, type_ in d.items(): + if type_ == "unsigned int": + args_list.append("unsigned int session") + else: + args_list.append("const dict &data") + + args_str = ", ".join(args_list) + line = f"int {function_name}({args_str});\n\n" + f.write(line) + + def generate_source_task(self): + """""" + filename = f"{self.prefix}_{self.name}_source_task.cpp" + with open(filename, "w") as f: + for name, d in self.callbacks.items(): + line = self.lines[name] + + f.write(line.replace("virtual void ", + f"void {self.class_name}::") + "\n") + f.write("{\n") + f.write("\tTask task = Task();\n") + f.write(f"\ttask.task_name = {name.upper()};\n") + + for field, type_ in d.items(): + if type_ == "unsigned int": + f.write(f"\ttask.task_id = {field};\n") + elif type_ == "int": + f.write(f"\ttask.task_int = {field};\n") + elif type_ == "char": + f.write(f"\ttask.task_last = {field};\n") + elif type_ == "string": + f.write(f"\ttask.task_string = {field};\n") + else: + f.write(f"\tif ({field})\n") + f.write("\t{\n") + f.write(f"\t\t{type_} *task_data = new {type_}();\n") + f.write(f"\t\t*task_data = *{field};\n") + f.write(f"\t\ttask.task_data = task_data;\n") + f.write("\t}\n") + + f.write(f"\tthis->task_queue.push(task);\n") + f.write("};\n\n") + + def generate_source_switch(self): + """""" + filename = f"{self.prefix}_{self.name}_source_switch.cpp" + with open(filename, "w") as f: + for name in self.callbacks.keys(): + process_name = name.replace("On", "process") + f.write(f"case {name.upper()}:\n") + f.write("{\n") + f.write(f"\tthis->{process_name}(&task);\n") + f.write(f"\tbreak;\n") + f.write("}\n\n") + + def generate_source_process(self): + """""" + filename = f"{self.prefix}_{self.name}_source_process.cpp" + with open(filename, "w") as f: + for name, d in self.callbacks.items(): + process_name = name.replace("On", "process") + on_name = name.replace("On", "on") + + f.write( + f"void {self.class_name}::{process_name}(Task *task)\n") + f.write("{\n") + if len(d.keys()) == 0: + f.write(f"\tthis->{on_name}();\n") + f.write("};\n\n") + else: + f.write("\tgil_scoped_acquire acquire;\n") + args = [] + for field, type_ in d.items(): + if type_ == "unsigned int": + args.append("task->task_id") + elif type_ == "int": + args.append("task->task_int") + elif type_ == "string": + args.append("task->task_string") + elif type_ == "char": + args.append("task->task_last") + else: + args.append("data") + f.write("\tdict data;\n") + f.write("\tif (task->task_data)\n") + f.write("\t{\n") + f.write( + f"\t\t{type_} *task_data = ({type_}*)task->task_data;\n") + + struct_fields = self.structs[type_] + for struct_field, struct_type in struct_fields.items(): + if struct_type == "string": + f.write( + f"\t\tdata[\"{struct_field}\"] = toUtf(task_data->{struct_field});\n") + else: + f.write( + f"\t\tdata[\"{struct_field}\"] = task_data->{struct_field};\n") + + f.write("\t\tdelete task_data;\n") + f.write("\t}\n") + + args_str = ", ".join(args) + f.write(f"\tthis->{on_name}({args_str});\n") + f.write("};\n\n") + + def generate_source_function(self): + """""" + filename = f"{self.prefix}_{self.name}_source_function.cpp" + with open(filename, "w") as f: + for name, d in self.functions.items(): + req_name = name.replace("Qry", "qry") + + length = len(d.keys()) + if length == 1: + f.write(f"int {self.class_name}::{req_name}(unsigned int session)\n") + f.write("{\n") + f.write(f"\tint i = this->api->{name}(session);\n") + f.write("\treturn i;\n") + f.write("};\n\n") + else: + type_ = list(d.values())[1] + f.write( + f"int {self.class_name}::{req_name}(unsigned int session, const dict &req)\n") + f.write("{\n") + f.write(f"\t{type_} myreq = {type_}();\n") + f.write("\tmemset(&myreq, 0, sizeof(myreq));\n") + + struct_fields = self.structs[type_] + for struct_field, struct_type in struct_fields.items(): + if struct_type == "string": + line = f"\tgetString(req, \"{struct_field}\", myreq.{struct_field});\n" + else: + line = f"\tget{struct_type.capitalize()}(req, \"{struct_field}\", &myreq.{struct_field});\n" + f.write(line) + + f.write(f"\tint i = this->api->{name}(session, &myreq);\n") + f.write("\treturn i;\n") + f.write("};\n\n") + + def generate_source_on(self): + """""" + filename = f"{self.prefix}_{self.name}_source_on.cpp" + with open(filename, "w") as f: + for name, d in self.callbacks.items(): + on_name = name.replace("On", "on") + + args = [] + bind_args = ["void", self.class_name, on_name] + for field, type_ in d.items(): + if type_ == "unsigned int": + args.append("unsigned int session") + bind_args.append("session") + elif type_ == "char": + args.append("char last") + bind_args.append("last") + elif type_ == "int": + if field == "errorCode": + args.append("int error") + bind_args.append("error") + else: + args.append(f"int {field}") + bind_args.append(f"{field}") + elif type_ == "string": + args.append(f"string {field}") + bind_args.append(f"{field}") + else: + args.append("const dict &data") + bind_args.append("data") + + args_str = ", ".join(args) + bind_args_str = ", ".join(bind_args) + + f.write(f"void {on_name}({args_str}) override\n") + f.write("{\n") + f.write("\ttry\n") + f.write("\t{\n") + f.write(f"\t\tPYBIND11_OVERLOAD({bind_args_str});\n") + f.write("\t}\n") + f.write("\tcatch (const error_already_set &e)\n") + f.write("\t{\n") + f.write(f"\t\tcout << e.what() << endl;\n") + f.write("\t}\n") + f.write("};\n\n") + + def generate_source_module(self): + """""" + filename = f"{self.prefix}_{self.name}_source_module.cpp" + with open(filename, "w") as f: + for name in self.functions.keys(): + name = name.replace("Qry", "qry") + f.write(f".def(\"{name}\", &{self.class_name}::{name})\n") + + f.write("\n") + + for name in self.callbacks.keys(): + name = name.replace("On", "on") + f.write(f".def(\"{name}\", &{self.class_name}::{name})\n") + + f.write(";\n") + + +if __name__ == "__main__": + md_generator = ApiGenerator("../include/tap/TapQuoteAPI.h", "tap", "md", "MdApi") + md_generator.run() + + td_generator = ApiGenerator("../include/tap/iTapTradeAPI.h", "tap", "td", "TdApi") + td_generator.run() diff --git a/vnpy/api/tap/generator/generate_data_type.py b/vnpy/api/tap/generator/generate_data_type.py new file mode 100644 index 0000000000..1277c7c5d7 --- /dev/null +++ b/vnpy/api/tap/generator/generate_data_type.py @@ -0,0 +1,183 @@ +"""""" +import importlib + + +class DataTypeGenerator: + """DataType生成器""" + + def __init__(self, filename: str, prefix: str, name: str) -> None: + """Constructor""" + self.filename: str = filename + self.prefix: str = prefix + self.name: str = name + self.typedefs = {} + + def load_constant(self) -> None: + """""" + module_names = ["tap_td_commen_typedef", "tap_md_commen_typedef"] + for module_name in module_names: + module = importlib.import_module(module_name) + + for name in dir(module): + if "__" not in name: + self.typedefs[name] = getattr(module, name) + + def run(self) -> None: + """主函数""" + self.f_cpp = open(self.filename, "r", encoding="UTF-8") + if self.name == "td": + self.f_define = open(f"{self.prefix}_{self.name}_data_constant.py", "w", encoding="UTF-8") + self.f_typedef = open(f"{self.prefix}_{self.name}_data_typedef.py", "w", encoding="UTF-8") + self.f_struct = open(f"{self.prefix}_{self.name}_data_struct.py", "w", encoding="UTF-8") + + self.load_constant() + + for line in self.f_cpp: + self.process_line(line) + + self.f_cpp.close() + if self.name == "td": + self.f_define.close() + self.f_typedef.close() + self.f_struct.close() + + print(f"{self.name}_DataType生成完毕") + + def process_line(self, line: str) -> None: + """处理每行""" + line = line.replace("\n", "") + line = line.replace(";", "") + + # MD + if self.name == "md": + if line.startswith("typedef"): + self.process_typedef_md(line) + elif "struct" in line: + self.process_declare(line) + elif "{" in line: + self.process_start(line) + elif "}" in line and "@" not in line: + self.process_end(line) + elif "///<" in line: + self.process_member(line) + # TD + elif self.name == "td": + if line.startswith(" typedef"): + self.process_typedef_td(line) + elif line.startswith(" const"): + self.process_const(line) + elif "struct" in line: + self.process_declare(line) + elif line.startswith(" {"): + self.process_start(line) + elif line.startswith(" }"): + self.process_end(line) + elif "///<" in line: + self.process_member(line) + elif "#" not in line and "!" not in line and "=" not in line and "*" not in line and "(" not in line and "namespace" not in line and "TapTradeAPI" not in line and len(line) != 0: + self.process_special(line) + + def process_special(self, line: str) -> None: + words = line.split(" ") + words = [word for word in words if word != ""] + + if len(words) == 2 or len(words) == 3: + name = words[1] + if "//" in name: + name = name.split("//")[0] + if "[" in name: + name = name.split("[")[0] + + type_ = words[0] + if "//" in type_: + type_ = type_.split("//")[1] + py_type = self.typedefs.get(type_, "dict") + + new_line = f" \"{name}\": \"{py_type}\",\n" + self.f_struct.write(new_line) + + def process_declare(self, line: str) -> None: + """处理声明""" + words = line.split(" ") + name = words[-1] + end = "{" + + new_line = f"{name} = {end}\n" + self.f_struct.write(new_line) + + def process_start(self, line: str): + """处理开始""" + pass + + def process_end(self, line: str) -> None: + """处理结束""" + new_line = "}\n\n" + self.f_struct.write(new_line) + + def process_member(self, line: str) -> None: + sector = line.split("///<")[0] + words = sector.split("\t") + words = [word for word in words if word != ""] + + if len(words) == 1: + words = words[0].split(" ") + words = [word for word in words if word != ""] + + name = words[1].strip() + if "[" in name: + name = name.split("[")[0] + py_type = self.typedefs.get(words[0].strip(), "dict") + new_line = f" \"{name}\": \"{py_type}\",\n" + self.f_struct.write(new_line) + + def process_typedef_md(self, line: str) -> None: + """处理类型定义""" + words = line.split(" ")[-1].split("\t") + words = [word for word in words if word != ""] + + name = words[-1] + py_type = self.typedefs[words[0]] + new_line = f"{name} = \"{py_type}\"\n" + + self.f_typedef.write(new_line) + self.typedefs[name] = py_type + + if py_type == "dict": + short2full = f"{name} = {words[-2]}\n" + self.f_struct.write(short2full) + + def process_typedef_td(self, line: str) -> None: + """处理类型定义""" + words = line.split(" ") + words = [word for word in words if word != ""] + + name = words[-1] + py_type = self.typedefs.get(words[1], "dict") + new_line = f"{name} = \"{py_type}\"\n" + + self.f_typedef.write(new_line) + self.typedefs[name] = py_type + + if py_type == "dict": + short2full = f"{name} = {words[-2]}\n" + self.f_struct.write(short2full) + + def process_const(self, line: str) -> None: + sectors = line.split("=") + value = sectors[1].replace("\'", "\"").strip() + + words = sectors[0].split(" ") + words = [word for word in words if word != ""] + + name = words[-1].strip() + + new_line = f"{name} = {value}\n" + self.f_define.write(new_line) + + +if __name__ == "__main__": + md_generator = DataTypeGenerator("../include/tap/TapQuoteAPIDataType.h", "tap", "md") + md_generator.run() + + td_generator = DataTypeGenerator("../include/tap/iTapTradeAPIDataType.h", "tap", "td") + td_generator.run() diff --git a/vnpy/api/tap/generator/tap_md_commen_constant.py b/vnpy/api/tap/generator/tap_md_commen_constant.py new file mode 100644 index 0000000000..7fa721c3de --- /dev/null +++ b/vnpy/api/tap/generator/tap_md_commen_constant.py @@ -0,0 +1,30 @@ +APIYNFLAG_YES = "Y" +APIYNFLAG_NO = "N" +APILOGLEVEL_NONE = "N" +APILOGLEVEL_ERROR = "E" +APILOGLEVEL_WARNING = "W" +APILOGLEVEL_DEBUG = "D" +TAPI_COMMODITY_TYPE_NONE = "N" +TAPI_COMMODITY_TYPE_SPOT = "P" +TAPI_COMMODITY_TYPE_FUTURES = "F" +TAPI_COMMODITY_TYPE_OPTION = "O" +TAPI_COMMODITY_TYPE_SPREAD_MONTH = "S" +TAPI_COMMODITY_TYPE_SPREAD_COMMODITY = "M" +TAPI_COMMODITY_TYPE_BUL = "U" +TAPI_COMMODITY_TYPE_BER = "E" +TAPI_COMMODITY_TYPE_STD = "D" +TAPI_COMMODITY_TYPE_STG = "G" +TAPI_COMMODITY_TYPE_PRT = "R" +TAPI_COMMODITY_TYPE_BLT = "L" +TAPI_COMMODITY_TYPE_BRT = "Q" +TAPI_COMMODITY_TYPE_DIRECTFOREX = "X" +TAPI_COMMODITY_TYPE_INDIRECTFOREX = "I" +TAPI_COMMODITY_TYPE_CROSSFOREX = "C" +TAPI_COMMODITY_TYPE_INDEX = "Z" +TAPI_COMMODITY_TYPE_STOCK = "T" +TAPI_COMMODITY_TYPE_SPOT_TRADINGDEFER = "Y" +TAPI_COMMODITY_TYPE_FUTURE_LOCK = "J" +TAPI_COMMODITY_TYPE_EFP = "A" +TAPI_CALLPUT_FLAG_CALL = "C" +TAPI_CALLPUT_FLAG_PUT = "P" +TAPI_CALLPUT_FLAG_NONE = "N" diff --git a/vnpy/api/tap/generator/tap_md_commen_struct.py b/vnpy/api/tap/generator/tap_md_commen_struct.py new file mode 100644 index 0000000000..acee45ec74 --- /dev/null +++ b/vnpy/api/tap/generator/tap_md_commen_struct.py @@ -0,0 +1,30 @@ +TapAPIApplicationInfo = { + "AuthCode": "string", + "KeyOperationLogPath": "string", +} + +TapAPICommodity = { + "ExchangeNo": "string", + "CommodityType": "char", + "CommodityNo": "string", +} + +TapAPIContract = { + "Commodity": "dict", + "ContractNo1": "string", + "StrikePrice1": "string", + "CallOrPutFlag1": "char", + "ContractNo2": "string", + "StrikePrice2": "string", + "CallOrPutFlag2": "char", +} + +TapAPIExchangeInfo = { + "ExchangeNo": "string", + "ExchangeName": "string", +} + +TapAPIChangePasswordReq = { + "OldPassword": "string", + "NewPassword": "string", +} diff --git a/vnpy/api/tap/generator/tap_md_commen_typedef.py b/vnpy/api/tap/generator/tap_md_commen_typedef.py new file mode 100644 index 0000000000..c0d22d36d4 --- /dev/null +++ b/vnpy/api/tap/generator/tap_md_commen_typedef.py @@ -0,0 +1,30 @@ +TAPIINT32 = "int" +TAPIUINT32 = "unsigned int" +TAPIINT64 = "long long" +TAPIUINT64 = "unsigned long long" +TAPIUINT16 = "unsigned short" +TAPIUINT8 = "unsigned char" +TAPIREAL64 = "double" +TAPIYNFLAG = "char" +TAPILOGLEVEL = "char" +TAPICommodityType = "char" +TAPICallOrPutFlagType = "char" +TAPIMACTYPE = "string" +TAPISecondSerialIDType = "string" +TAPIClientIDType = "string" +TAPISTR_10 = "string" +TAPISTR_20 = "string" +TAPISTR_30 = "string" +TAPISTR_40 = "string" +TAPISTR_50 = "string" +TAPISTR_70 = "string" +TAPISTR_100 = "string" +TAPISTR_300 = "string" +TAPISTR_500 = "string" +TAPISTR_2000 = "string" +TAPIAUTHCODE = "string" +TAPICHAR = "char" +TAPIDTSTAMP = "string" +TAPIDATETIME = "string" +TAPIDATE = "string" +TAPITIME = "string" diff --git a/vnpy/api/tap/generator/tap_md_data_struct.py b/vnpy/api/tap/generator/tap_md_data_struct.py new file mode 100644 index 0000000000..49a9b426b4 --- /dev/null +++ b/vnpy/api/tap/generator/tap_md_data_struct.py @@ -0,0 +1,99 @@ +TapAPIQuoteLoginAuth = { + "UserNo": "string", + "ISModifyPassword": "char", + "Password": "string", + "NewPassword": "string", + "QuoteTempPassword": "string", + "ISDDA": "char", + "DDASerialNo": "string", +} + +TapAPIQuotLoginRspInfo = { + "UserNo": "string", + "UserType": "int", + "UserName": "string", + "QuoteTempPassword": "string", + "ReservedInfo": "string", + "LastLoginIP": "string", + "LastLoginProt": "unsigned int", + "LastLoginTime": "string", + "LastLogoutTime": "string", + "TradeDate": "string", + "LastSettleTime": "string", + "StartTime": "string", + "InitTime": "string", +} + +TapAPIQuoteCommodityInfo = { + "Commodity": "dict", + "CommodityName": "string", + "CommodityEngName": "string", + "ContractSize": "double", + "CommodityTickSize": "double", + "CommodityDenominator": "int", + "CmbDirect": "char", + "CommodityContractLen": "int", + "IsDST": "char", + "RelateCommodity1": "dict", + "RelateCommodity2": "dict", +} + +TapAPIQuoteContractInfo = { + "Contract": "dict", + "ContractType": "char", + "QuoteUnderlyingContract": "string", + "ContractName": "string", + "ContractExpDate": "string", + "LastTradeDate": "string", + "FirstNoticeDate": "string", +} + +TapAPIQuoteWhole = { + "Contract": "dict", + "CurrencyNo": "string", + "TradingState": "char", + "DateTimeStamp": "string", + "QPreClosingPrice": "double", + "QPreSettlePrice": "double", + "QPrePositionQty": "unsigned long long", + "QOpeningPrice": "double", + "QLastPrice": "double", + "QHighPrice": "double", + "QLowPrice": "double", + "QHisHighPrice": "double", + "QHisLowPrice": "double", + "QLimitUpPrice": "double", + "QLimitDownPrice": "double", + "QTotalQty": "unsigned long long", + "QTotalTurnover": "double", + "QPositionQty": "unsigned long long", + "QAveragePrice": "double", + "QClosingPrice": "double", + "QSettlePrice": "double", + "QLastQty": "unsigned long long", + "QBidPrice": "double", + "QBidQty": "unsigned long long", + "QAskPrice": "double", + "QAskQty": "unsigned long long", + "QImpliedBidPrice": "double", + "QImpliedBidQty": "unsigned long long", + "QImpliedAskPrice": "double", + "QImpliedAskQty": "unsigned long long", + "QPreDelta": "double", + "QCurrDelta": "double", + "QInsideQty": "unsigned long long", + "QOutsideQty": "unsigned long long", + "QTurnoverRate": "double", + "Q5DAvgQty": "unsigned long long", + "QPERatio": "double", + "QTotalValue": "double", + "QNegotiableValue": "double", + "QPositionTrend": "long long", + "QChangeSpeed": "double", + "QChangeRate": "double", + "QChangeValue": "double", + "QSwing": "double", + "QTotalBidQty": "unsigned long long", + "QTotalAskQty": "unsigned long long", + "UnderlyContract": "dict", +} diff --git a/vnpy/api/tap/generator/tap_md_data_typedef.py b/vnpy/api/tap/generator/tap_md_data_typedef.py new file mode 100644 index 0000000000..a0a84fe900 --- /dev/null +++ b/vnpy/api/tap/generator/tap_md_data_typedef.py @@ -0,0 +1,3 @@ +TAPIQPRICE = "double" +TAPIQVOLUME = "unsigned long long" +TAPIQDIFF = "long long" diff --git a/vnpy/api/tap/generator/tap_md_error_constant.py b/vnpy/api/tap/generator/tap_md_error_constant.py new file mode 100644 index 0000000000..351140a914 --- /dev/null +++ b/vnpy/api/tap/generator/tap_md_error_constant.py @@ -0,0 +1,160 @@ +TAPIERROR_SUCCEED = 0 +TAPIERROR_ConnectFail = -1 +TAPIERROR_LinkAuthFail = -2 +TAPIERROR_HostUnavailable = -3 +TAPIERROR_SendDataError = -4 +TAPIERROR_TestIDError = -5 +TAPIERROR_NotReadyTestNetwork = -6 +TAPIERROR_CurTestNotOver = -7 +TAPIERROR_NOFrontAvailable = -8 +TAPIERROR_DataPathAvaiable = -9 +TAPIERROR_RepeatLogin = -10 +TAPIERROR_InnerError = -11 +TAPIERROR_LastReqNotFinish = -12 +TAPIERROR_InputValueError = -13 +TAPIERROR_AuthCode_Invalid = -14 +TAPIERROR_AuthCode_Expired = -15 +TAPIERROR_AuthCode_TypeNotMatch = -16 +TAPIERROR_API_NotReady = -17 +TAPIERROR_UDP_LISTEN_FAILED = -18 +TAPIERROR_UDP_LISTENING = -19 +TAPIERROR_NotImplemented = -20 +TAPIERROR_CallOneTimeOnly = -21 +TAPIERROR_Frequently = -22 +TAPIERROR_INPUTERROR_NULL = -10000 +TAPIERROR_INPUTERROR_TAPIYNFLAG = -10001 +TAPIERROR_INPUTERROR_TAPILOGLEVEL = -10002 +TAPIERROR_INPUTERROR_TAPICommodityType = -10003 +TAPIERROR_INPUTERROR_TAPICallOrPutFlagType = -10004 +TAPIERROR_INPUTERROR_TAPIAccountType = -12001 +TAPIERROR_INPUTERROR_TAPIAccountState = -12003 +TAPIERROR_INPUTERROR_TAPIAccountFamilyType = -12004 +TAPIERROR_INPUTERROR_TAPIOrderTypeType = -12005 +TAPIERROR_INPUTERROR_TAPIOrderSourceType = -12006 +TAPIERROR_INPUTERROR_TAPITimeInForceType = -12007 +TAPIERROR_INPUTERROR_TAPISideType = -12008 +TAPIERROR_INPUTERROR_TAPIPositionEffectType = -12009 +TAPIERROR_INPUTERROR_TAPIHedgeFlagType = -12010 +TAPIERROR_INPUTERROR_TAPIOrderStateType = -12011 +TAPIERROR_INPUTERROR_TAPICalculateModeType = -12012 +TAPIERROR_INPUTERROR_TAPIMatchSourceType = -12013 +TAPIERROR_INPUTERROR_TAPIOpenCloseModeType = -12014 +TAPIERROR_INPUTERROR_TAPIFutureAlgType = -12015 +TAPIERROR_INPUTERROR_TAPIOptionAlgType = -12016 +TAPIERROR_INPUTERROR_TAPIBankAccountLWFlagType = -12017 +TAPIERROR_INPUTERROR_TAPIMarginCalculateModeType = -12021 +TAPIERROR_INPUTERROR_TAPIOptionMarginCalculateModeType = -12022 +TAPIERROR_INPUTERROR_TAPICmbDirectType = -12023 +TAPIERROR_INPUTERROR_TAPIDeliveryModeType = -12024 +TAPIERROR_INPUTERROR_TAPIContractTypeType = -12025 +TAPIERROR_INPUTERROR_TAPITacticsTypeType = -12035 +TAPIERROR_INPUTERROR_TAPIORDERACT = -12036 +TAPIERROR_INPUTERROR_TAPITriggerConditionType = -12041 +TAPIERROR_INPUTERROR_TAPITriggerPriceTypeType = -12042 +TAPIERROR_INPUTERROR_TAPITradingStateType = -12043 +TAPIERROR_INPUTERROR_TAPIMarketLevelType = -12044 +TAPIERROR_INPUTERROR_TAPIOrderQryTypeType = -12045 +TAPIERROR_DISCONNECT_CLOSE_INIT = 1 +TAPIERROR_DISCONNECT_CLOSE_PASS = 2 +TAPIERROR_DISCONNECT_READ_ERROR = 3 +TAPIERROR_DISCONNECT_WRITE_ERROR = 4 +TAPIERROR_DISCONNECT_BUF_FULL = 5 +TAPIERROR_DISCONNECT_IOCP_ERROR = 6 +TAPIERROR_DISCONNECT_PARSE_ERROR = 7 +TAPIERROR_DISCONNECT_CONNECT_TIMEOUT = 8 +TAPIERROR_DISCONNECT_INIT_ERROR = 9 +TAPIERROR_DISCONNECT_HAS_CONNECTED = 10 +TAPIERROR_DISCONNECT_HAS_EXIT = 11 +TAPIERROR_DISCONNECT_TRY_LATER = 12 +TAPIERROR_DISCONNECT_HEARTBEAT_FAILED = 13 +TAPIERROR_LOGIN = 10001 +TAPIERROR_LOGIN_USER = 10002 +TAPIERROR_LOGIN_DDA = 10003 +TAPIERROR_LOGIN_LICENSE = 10004 +TAPIERROR_LOGIN_MODULE = 10005 +TAPIERROR_LOGIN_FORCE = 10006 +TAPIERROR_LOGIN_STATE = 10007 +TAPIERROR_LOGIN_PASS = 10008 +TAPIERROR_LOGIN_RIGHT = 10009 +TAPIERROR_LOGIN_COUNT = 10010 +TAPIERROR_LOGIN_NOTIN_SERVERFLAGUSRES = 10011 +TAPIERROR_LOGIN_USER_EXPIRED = 10012 +TAPIERROR_LOGIN_NO_ACCOUNT = 10013 +TAPIERROR_LOGIN_NO_JGT = 10014 +TAPIERROR_LOGIN_ERROR_TIMES = 10015 +TAPIERROR_LOGIN_ERROR_AUTHTYPE = 10016 +TAPIERROR_LOGIN_ERROR_AUTHEXPIRED = 10017 +TAPIERROR_LOGIN_ERROR_PASSWDEXPIRED = 10018 +TAPIERROR_USERINFO_QRY = 10101 +TAPIERROR_USERALLRIGHT_QRY = 11001 +TAPIERROR_USERALLACCOUNT_QRY = 11501 +TAPIERROR_USERPASSWORD_MOD = 11701 +TAPIERROR_USERPASSWORD_MOD_SOURCE = 11702 +TAPIERROR_USERPASSWORD_MOD_SAME = 11703 +TAPIERROR_USERPASSWORD_MOD_COMPLEXITY = 11704 +TAPIERROR_ACCOUNTINFO_QRY = 20201 +TAPIERROR_TRADENO_QRY = 20701 +TAPIERROR_CONTRACTINFO_QRY = 22801 +TAPIERROR_SPECIALOPTIONFUTURE_QRY = 22901 +TAPIERROR_COMMODITYORDERTYPE_QRY = 25501 +TAPIERROR_ORDERTIMEINFORCE_QRY = 25601 +TAPIERROR_USER_ORDER_FREQUENCE_QRY = 28901 +TAPIERROR_ORDERINSERT_ACCOUNT = 60001 +TAPIERROR_ORDERINSERT_ACCOUNT_STATE = 60002 +TAPIERROR_ORDERINSERT_SIDE_TRADE = 60003 +TAPIERROR_ORDERINSERT_OPTIONS_TRADE = 60004 +TAPIERROR_ORDERINSERT_COMMODITY_TRADE = 60005 +TAPIERROR_ORDERINSERT_OPEN_RIGHT = 60006 +TAPIERROR_ORDERINSERT_RISK_CHECK = 60007 +TAPIERROR_ORDERINSERT_CONTRACT = 60011 +TAPIERROR_ORDERINSERT_TRADEROUTE = 60021 +TAPIERROR_ORDERINSERT_POSITIONMAX = 60022 +TAPIERROR_ORDER_NOTRADE = 60023 +TAPIERROR_ORDER_CLOSE = 60024 +TAPIERROR_ORDERINSERT_NOTENOUGHFUND = 60031 +TAPIERROR_ORDERINSERT_ORDERTYPE = 60032 +TAPIERROR_ORDERINSERT_TIMEINFORCE = 60033 +TAPIERROR_ORDERINSERT_NO_TACTICS = 60034 +TAPIERROR_ORDERINSERT_POSITION_CANNOT_CLOSE = 60035 +TAPIERROR_ORDERINSERT_AUTOCHECK_FAIL = 60036 +TAPIERROR_ORDERINSERT_LME_NOTREADY = 60037 +TAPIERROR_ORDERINSERT_CLOSEMODE = 60038 +TAPIERROR_ORDERINSERT_PARENTNOTENOUGHFUND = 60039 +TAPIERROR_SWAP_CONTRACT = 60040 +TAPIERROR_USERNO_NOTHAS_ACCOUNT = 60051 +TAPIERROR_UPPERCHANNEL_BROKEN = 60052 +TAPIERROR_UPPERCHANNEL_NOT_EXIST = 60053 +TAPIERROR_ORDERDELETE_NOT_SYSNO = 60061 +TAPIERROR_ORDERDELETE_NOT_STATE = 60062 +TAPIERROR_ORDERACTIVE_NOT_STATE = 60063 +TAPIERROR_ORDERCHECK_NOT_STATE = 60071 +TAPIERROR_ORDERCHECK_FAIL = 60072 +TAPIERROR_ORDERMODIFY_NOT_STATE = 60081 +TAPIERROR_ORDERMODIFY_BACK_INPUT = 60082 +TAPIERROR_ORDERINSERT_FEE = 60091 +TAPIERROR_ORDERINSERT_MARGIN = 60092 +TAPIERROR_ORDER_NO_PERMIT = 60100 +TAPIERROR_RSPQUOTE_NO_PERMIT = 60101 +TAPIERROR_RSPQUOTE_CHILD_NO_PERMIT = 60102 +TAPIERROR_TRADENO_NOT_FIND = 60103 +TAPIERROR_ORDER_NO_CLOSE = 60104 +TAPIERROR_QRY_QUOTE_NO_PERMIT = 60105 +TAPIERROR_EXPIREDATE_NO_PERMIT = 60106 +TAPIERROR_CMB_NO_PERMIT = 60107 +TAPIERROR_ORDERSERVER_NO_PERMIT = 60108 +TAPIERROR_POSITION_CANNOT_EXEC_OR_ABANDON = 60109 +TAPIERROR_ORDERCHECK_NO_PERMIT = 60110 +TAPIERROR_ORDERMAXOPENVOL_NO_PERMIT = 60111 +TAPIERROR_ORDER_QTY_NO_PERMIT = 60115 +TAPIERROR_ORDER_APPLY_NO_PERMIT = 60117 +TAPIERROR_ORDER_FREQ_OVERRUN = 60118 +TAPIERROR_COMB_NO_SIDEORHEDGE = 60119 +TAPIERROR_ORDER_FREQUENCY = 61001 +TAPIERROR_ORDER_QUERYING = 61002 +TAPIERROR_SUBSCRIBEQUOTE_MAX = 72001 +TAPIERROR_SUBSCRIBEQUOTE_EXCHANGE_MAX = 72002 +TAPIERROR_SUBSCRIBEQUOTE_NO_RIGHT = 72101 +TAPIERROR_SUBSCRIBEQUOTE_NO_EXCHANGE_RIGHT = 72102 +TAPIERROR_SUBSCRIBEQUOTE_COMMODITY_NOT_EXIST = 72103 +TAPIERROR_SUBSCRIBEQUOTE_CONTRACT_MAY_NOT_EXIST = 72104 +TAPIERROR_QUOTEFRONT_UNKNOWN_PROTOCOL = 83001 diff --git a/vnpy/api/tap/generator/tap_md_header_define.h b/vnpy/api/tap/generator/tap_md_header_define.h new file mode 100644 index 0000000000..9ee4138fbe --- /dev/null +++ b/vnpy/api/tap/generator/tap_md_header_define.h @@ -0,0 +1,8 @@ +#define ONRSPLOGIN 0 +#define ONAPIREADY 1 +#define ONDISCONNECT 2 +#define ONRSPQRYCOMMODITY 3 +#define ONRSPQRYCONTRACT 4 +#define ONRSPSUBSCRIBEQUOTE 5 +#define ONRSPUNSUBSCRIBEQUOTE 6 +#define ONRTNQUOTE 7 diff --git a/vnpy/api/tap/generator/tap_md_header_function.h b/vnpy/api/tap/generator/tap_md_header_function.h new file mode 100644 index 0000000000..6b73c4d9c4 --- /dev/null +++ b/vnpy/api/tap/generator/tap_md_header_function.h @@ -0,0 +1,4 @@ +int qryCommodity(unsigned int session); + +int qryContract(unsigned int session, const dict &data); + diff --git a/vnpy/api/tap/generator/tap_md_header_on.h b/vnpy/api/tap/generator/tap_md_header_on.h new file mode 100644 index 0000000000..78f3f64886 --- /dev/null +++ b/vnpy/api/tap/generator/tap_md_header_on.h @@ -0,0 +1,16 @@ +virtual void onRspLogin(int error, const dict &data) {}; + +virtual void onAPIReady() {}; + +virtual void onDisconnect(int reason) {}; + +virtual void onRspQryCommodity(unsigned int session, int error, char last, const dict &data) {}; + +virtual void onRspQryContract(unsigned int session, int error, char last, const dict &data) {}; + +virtual void onRspSubscribeQuote(unsigned int session, int error, char last, const dict &data) {}; + +virtual void onRspUnSubscribeQuote(unsigned int session, int error, char last, const dict &data) {}; + +virtual void onRtnQuote(const dict &data) {}; + diff --git a/vnpy/api/tap/generator/tap_md_header_process.h b/vnpy/api/tap/generator/tap_md_header_process.h new file mode 100644 index 0000000000..36517cbe50 --- /dev/null +++ b/vnpy/api/tap/generator/tap_md_header_process.h @@ -0,0 +1,16 @@ +void processRspLogin(Task *task); + +void processAPIReady(Task *task); + +void processDisconnect(Task *task); + +void processRspQryCommodity(Task *task); + +void processRspQryContract(Task *task); + +void processRspSubscribeQuote(Task *task); + +void processRspUnSubscribeQuote(Task *task); + +void processRtnQuote(Task *task); + diff --git a/vnpy/api/tap/generator/tap_md_source_function.cpp b/vnpy/api/tap/generator/tap_md_source_function.cpp new file mode 100644 index 0000000000..81b19663cc --- /dev/null +++ b/vnpy/api/tap/generator/tap_md_source_function.cpp @@ -0,0 +1,17 @@ +int MdApi::qryCommodity(unsigned int session) +{ + int i = this->api->QryCommodity(session); + return i; +}; + +int MdApi::qryContract(unsigned int session, const dict &req) +{ + TapAPICommodity myreq = TapAPICommodity(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "ExchangeNo", myreq.ExchangeNo); + getChar(req, "CommodityType", &myreq.CommodityType); + getString(req, "CommodityNo", myreq.CommodityNo); + int i = this->api->QryContract(session, &myreq); + return i; +}; + diff --git a/vnpy/api/tap/generator/tap_md_source_module.cpp b/vnpy/api/tap/generator/tap_md_source_module.cpp new file mode 100644 index 0000000000..050b32742d --- /dev/null +++ b/vnpy/api/tap/generator/tap_md_source_module.cpp @@ -0,0 +1,12 @@ +.def("qryCommodity", &MdApi::qryCommodity) +.def("qryContract", &MdApi::qryContract) + +.def("onRspLogin", &MdApi::onRspLogin) +.def("onAPIReady", &MdApi::onAPIReady) +.def("onDisconnect", &MdApi::onDisconnect) +.def("onRspQryCommodity", &MdApi::onRspQryCommodity) +.def("onRspQryContract", &MdApi::onRspQryContract) +.def("onRspSubscribeQuote", &MdApi::onRspSubscribeQuote) +.def("onRspUnSubscribeQuote", &MdApi::onRspUnSubscribeQuote) +.def("onRtnQuote", &MdApi::onRtnQuote) +; diff --git a/vnpy/api/tap/generator/tap_md_source_on.cpp b/vnpy/api/tap/generator/tap_md_source_on.cpp new file mode 100644 index 0000000000..fd5691aa56 --- /dev/null +++ b/vnpy/api/tap/generator/tap_md_source_on.cpp @@ -0,0 +1,96 @@ +void onRspLogin(int error, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, MdApi, onRspLogin, error, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onAPIReady() override +{ + try + { + PYBIND11_OVERLOAD(void, MdApi, onAPIReady); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onDisconnect(int reasonCode) override +{ + try + { + PYBIND11_OVERLOAD(void, MdApi, onDisconnect, reasonCode); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspQryCommodity(unsigned int session, int error, char last, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, MdApi, onRspQryCommodity, session, error, last, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspQryContract(unsigned int session, int error, char last, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, MdApi, onRspQryContract, session, error, last, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspSubscribeQuote(unsigned int session, int error, char last, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, MdApi, onRspSubscribeQuote, session, error, last, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspUnSubscribeQuote(unsigned int session, int error, char last, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, MdApi, onRspUnSubscribeQuote, session, error, last, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRtnQuote(const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, MdApi, onRtnQuote, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + diff --git a/vnpy/api/tap/generator/tap_md_source_process.cpp b/vnpy/api/tap/generator/tap_md_source_process.cpp new file mode 100644 index 0000000000..5d9f32358c --- /dev/null +++ b/vnpy/api/tap/generator/tap_md_source_process.cpp @@ -0,0 +1,215 @@ +void MdApi::processRspLogin(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIQuotLoginRspInfo *task_data = (TapAPIQuotLoginRspInfo*)task->task_data; + data["UserNo"] = toUtf(task_data->UserNo); + data["UserType"] = task_data->UserType; + data["UserName"] = toUtf(task_data->UserName); + data["QuoteTempPassword"] = toUtf(task_data->QuoteTempPassword); + data["ReservedInfo"] = toUtf(task_data->ReservedInfo); + data["LastLoginIP"] = toUtf(task_data->LastLoginIP); + data["LastLoginProt"] = task_data->LastLoginProt; + data["LastLoginTime"] = toUtf(task_data->LastLoginTime); + data["LastLogoutTime"] = toUtf(task_data->LastLogoutTime); + data["TradeDate"] = toUtf(task_data->TradeDate); + data["LastSettleTime"] = toUtf(task_data->LastSettleTime); + data["StartTime"] = toUtf(task_data->StartTime); + data["InitTime"] = toUtf(task_data->InitTime); + delete task_data; + } + this->onRspLogin(task->task_int, data); +}; + +void MdApi::processAPIReady(Task *task) +{ + this->onAPIReady(); +}; + +void MdApi::processDisconnect(Task *task) +{ + gil_scoped_acquire acquire; + this->onDisconnect(task->task_int); +}; + +void MdApi::processRspQryCommodity(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIQuoteCommodityInfo *task_data = (TapAPIQuoteCommodityInfo*)task->task_data; + data["Commodity"] = task_data->Commodity; + data["CommodityName"] = toUtf(task_data->CommodityName); + data["CommodityEngName"] = toUtf(task_data->CommodityEngName); + data["ContractSize"] = task_data->ContractSize; + data["CommodityTickSize"] = task_data->CommodityTickSize; + data["CommodityDenominator"] = task_data->CommodityDenominator; + data["CmbDirect"] = task_data->CmbDirect; + data["CommodityContractLen"] = task_data->CommodityContractLen; + data["IsDST"] = task_data->IsDST; + data["RelateCommodity1"] = task_data->RelateCommodity1; + data["RelateCommodity2"] = task_data->RelateCommodity2; + delete task_data; + } + this->onRspQryCommodity(task->task_id, task->task_int, task->task_last, data); +}; + +void MdApi::processRspQryContract(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIQuoteContractInfo *task_data = (TapAPIQuoteContractInfo*)task->task_data; + data["Contract"] = task_data->Contract; + data["ContractType"] = task_data->ContractType; + data["QuoteUnderlyingContract"] = toUtf(task_data->QuoteUnderlyingContract); + data["ContractName"] = toUtf(task_data->ContractName); + data["ContractExpDate"] = toUtf(task_data->ContractExpDate); + data["LastTradeDate"] = toUtf(task_data->LastTradeDate); + data["FirstNoticeDate"] = toUtf(task_data->FirstNoticeDate); + delete task_data; + } + this->onRspQryContract(task->task_id, task->task_int, task->task_last, data); +}; + +void MdApi::processRspSubscribeQuote(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIQuoteWhole *task_data = (TapAPIQuoteWhole*)task->task_data; + data["Contract"] = task_data->Contract; + data["CurrencyNo"] = toUtf(task_data->CurrencyNo); + data["TradingState"] = task_data->TradingState; + data["DateTimeStamp"] = toUtf(task_data->DateTimeStamp); + data["QPreClosingPrice"] = task_data->QPreClosingPrice; + data["QPreSettlePrice"] = task_data->QPreSettlePrice; + data["QPrePositionQty"] = task_data->QPrePositionQty; + data["QOpeningPrice"] = task_data->QOpeningPrice; + data["QLastPrice"] = task_data->QLastPrice; + data["QHighPrice"] = task_data->QHighPrice; + data["QLowPrice"] = task_data->QLowPrice; + data["QHisHighPrice"] = task_data->QHisHighPrice; + data["QHisLowPrice"] = task_data->QHisLowPrice; + data["QLimitUpPrice"] = task_data->QLimitUpPrice; + data["QLimitDownPrice"] = task_data->QLimitDownPrice; + data["QTotalQty"] = task_data->QTotalQty; + data["QTotalTurnover"] = task_data->QTotalTurnover; + data["QPositionQty"] = task_data->QPositionQty; + data["QAveragePrice"] = task_data->QAveragePrice; + data["QClosingPrice"] = task_data->QClosingPrice; + data["QSettlePrice"] = task_data->QSettlePrice; + data["QLastQty"] = task_data->QLastQty; + data["QBidPrice"] = task_data->QBidPrice; + data["QBidQty"] = task_data->QBidQty; + data["QAskPrice"] = task_data->QAskPrice; + data["QAskQty"] = task_data->QAskQty; + data["QImpliedBidPrice"] = task_data->QImpliedBidPrice; + data["QImpliedBidQty"] = task_data->QImpliedBidQty; + data["QImpliedAskPrice"] = task_data->QImpliedAskPrice; + data["QImpliedAskQty"] = task_data->QImpliedAskQty; + data["QPreDelta"] = task_data->QPreDelta; + data["QCurrDelta"] = task_data->QCurrDelta; + data["QInsideQty"] = task_data->QInsideQty; + data["QOutsideQty"] = task_data->QOutsideQty; + data["QTurnoverRate"] = task_data->QTurnoverRate; + data["Q5DAvgQty"] = task_data->Q5DAvgQty; + data["QPERatio"] = task_data->QPERatio; + data["QTotalValue"] = task_data->QTotalValue; + data["QNegotiableValue"] = task_data->QNegotiableValue; + data["QPositionTrend"] = task_data->QPositionTrend; + data["QChangeSpeed"] = task_data->QChangeSpeed; + data["QChangeRate"] = task_data->QChangeRate; + data["QChangeValue"] = task_data->QChangeValue; + data["QSwing"] = task_data->QSwing; + data["QTotalBidQty"] = task_data->QTotalBidQty; + data["QTotalAskQty"] = task_data->QTotalAskQty; + data["UnderlyContract"] = task_data->UnderlyContract; + delete task_data; + } + this->onRspSubscribeQuote(task->task_id, task->task_int, task->task_last, data); +}; + +void MdApi::processRspUnSubscribeQuote(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIContract *task_data = (TapAPIContract*)task->task_data; + data["Commodity"] = task_data->Commodity; + data["ContractNo1"] = toUtf(task_data->ContractNo1); + data["StrikePrice1"] = toUtf(task_data->StrikePrice1); + data["CallOrPutFlag1"] = task_data->CallOrPutFlag1; + data["ContractNo2"] = toUtf(task_data->ContractNo2); + data["StrikePrice2"] = toUtf(task_data->StrikePrice2); + data["CallOrPutFlag2"] = task_data->CallOrPutFlag2; + delete task_data; + } + this->onRspUnSubscribeQuote(task->task_id, task->task_int, task->task_last, data); +}; + +void MdApi::processRtnQuote(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIQuoteWhole *task_data = (TapAPIQuoteWhole*)task->task_data; + data["Contract"] = task_data->Contract; + data["CurrencyNo"] = toUtf(task_data->CurrencyNo); + data["TradingState"] = task_data->TradingState; + data["DateTimeStamp"] = toUtf(task_data->DateTimeStamp); + data["QPreClosingPrice"] = task_data->QPreClosingPrice; + data["QPreSettlePrice"] = task_data->QPreSettlePrice; + data["QPrePositionQty"] = task_data->QPrePositionQty; + data["QOpeningPrice"] = task_data->QOpeningPrice; + data["QLastPrice"] = task_data->QLastPrice; + data["QHighPrice"] = task_data->QHighPrice; + data["QLowPrice"] = task_data->QLowPrice; + data["QHisHighPrice"] = task_data->QHisHighPrice; + data["QHisLowPrice"] = task_data->QHisLowPrice; + data["QLimitUpPrice"] = task_data->QLimitUpPrice; + data["QLimitDownPrice"] = task_data->QLimitDownPrice; + data["QTotalQty"] = task_data->QTotalQty; + data["QTotalTurnover"] = task_data->QTotalTurnover; + data["QPositionQty"] = task_data->QPositionQty; + data["QAveragePrice"] = task_data->QAveragePrice; + data["QClosingPrice"] = task_data->QClosingPrice; + data["QSettlePrice"] = task_data->QSettlePrice; + data["QLastQty"] = task_data->QLastQty; + data["QBidPrice"] = task_data->QBidPrice; + data["QBidQty"] = task_data->QBidQty; + data["QAskPrice"] = task_data->QAskPrice; + data["QAskQty"] = task_data->QAskQty; + data["QImpliedBidPrice"] = task_data->QImpliedBidPrice; + data["QImpliedBidQty"] = task_data->QImpliedBidQty; + data["QImpliedAskPrice"] = task_data->QImpliedAskPrice; + data["QImpliedAskQty"] = task_data->QImpliedAskQty; + data["QPreDelta"] = task_data->QPreDelta; + data["QCurrDelta"] = task_data->QCurrDelta; + data["QInsideQty"] = task_data->QInsideQty; + data["QOutsideQty"] = task_data->QOutsideQty; + data["QTurnoverRate"] = task_data->QTurnoverRate; + data["Q5DAvgQty"] = task_data->Q5DAvgQty; + data["QPERatio"] = task_data->QPERatio; + data["QTotalValue"] = task_data->QTotalValue; + data["QNegotiableValue"] = task_data->QNegotiableValue; + data["QPositionTrend"] = task_data->QPositionTrend; + data["QChangeSpeed"] = task_data->QChangeSpeed; + data["QChangeRate"] = task_data->QChangeRate; + data["QChangeValue"] = task_data->QChangeValue; + data["QSwing"] = task_data->QSwing; + data["QTotalBidQty"] = task_data->QTotalBidQty; + data["QTotalAskQty"] = task_data->QTotalAskQty; + data["UnderlyContract"] = task_data->UnderlyContract; + delete task_data; + } + this->onRtnQuote(data); +}; + diff --git a/vnpy/api/tap/generator/tap_md_source_switch.cpp b/vnpy/api/tap/generator/tap_md_source_switch.cpp new file mode 100644 index 0000000000..fd5edaef51 --- /dev/null +++ b/vnpy/api/tap/generator/tap_md_source_switch.cpp @@ -0,0 +1,48 @@ +case ONRSPLOGIN: +{ + this->processRspLogin(&task); + break; +} + +case ONAPIREADY: +{ + this->processAPIReady(&task); + break; +} + +case ONDISCONNECT: +{ + this->processDisconnect(&task); + break; +} + +case ONRSPQRYCOMMODITY: +{ + this->processRspQryCommodity(&task); + break; +} + +case ONRSPQRYCONTRACT: +{ + this->processRspQryContract(&task); + break; +} + +case ONRSPSUBSCRIBEQUOTE: +{ + this->processRspSubscribeQuote(&task); + break; +} + +case ONRSPUNSUBSCRIBEQUOTE: +{ + this->processRspUnSubscribeQuote(&task); + break; +} + +case ONRTNQUOTE: +{ + this->processRtnQuote(&task); + break; +} + diff --git a/vnpy/api/tap/generator/tap_md_source_task.cpp b/vnpy/api/tap/generator/tap_md_source_task.cpp new file mode 100644 index 0000000000..09336fb1dc --- /dev/null +++ b/vnpy/api/tap/generator/tap_md_source_task.cpp @@ -0,0 +1,106 @@ +void MdApi::OnRspLogin(int errorCode, TapAPIQuotLoginRspInfo *info) +{ + Task task = Task(); + task.task_name = ONRSPLOGIN; + task.task_int = errorCode; + if (info) + { + TapAPIQuotLoginRspInfo *task_data = new TapAPIQuotLoginRspInfo(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void MdApi::OnAPIReady() +{ + Task task = Task(); + task.task_name = ONAPIREADY; + this->task_queue.push(task); +}; + +void MdApi::OnDisconnect(int reasonCode) +{ + Task task = Task(); + task.task_name = ONDISCONNECT; + task.task_int = reasonCode; + this->task_queue.push(task); +}; + +void MdApi::OnRspQryCommodity(unsigned int sessionID, int errorCode, char isLast, TapAPIQuoteCommodityInfo *info) +{ + Task task = Task(); + task.task_name = ONRSPQRYCOMMODITY; + task.task_id = sessionID; + task.task_int = errorCode; + task.task_last = isLast; + if (info) + { + TapAPIQuoteCommodityInfo *task_data = new TapAPIQuoteCommodityInfo(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void MdApi::OnRspQryContract(unsigned int sessionID, int errorCode, char isLast, TapAPIQuoteContractInfo *info) +{ + Task task = Task(); + task.task_name = ONRSPQRYCONTRACT; + task.task_id = sessionID; + task.task_int = errorCode; + task.task_last = isLast; + if (info) + { + TapAPIQuoteContractInfo *task_data = new TapAPIQuoteContractInfo(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void MdApi::OnRspSubscribeQuote(unsigned int sessionID, int errorCode, char isLast, TapAPIQuoteWhole *info) +{ + Task task = Task(); + task.task_name = ONRSPSUBSCRIBEQUOTE; + task.task_id = sessionID; + task.task_int = errorCode; + task.task_last = isLast; + if (info) + { + TapAPIQuoteWhole *task_data = new TapAPIQuoteWhole(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void MdApi::OnRspUnSubscribeQuote(unsigned int sessionID, int errorCode, char isLast, TapAPIContract *info) +{ + Task task = Task(); + task.task_name = ONRSPUNSUBSCRIBEQUOTE; + task.task_id = sessionID; + task.task_int = errorCode; + task.task_last = isLast; + if (info) + { + TapAPIContract *task_data = new TapAPIContract(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void MdApi::OnRtnQuote(TapAPIQuoteWhole *info) +{ + Task task = Task(); + task.task_name = ONRTNQUOTE; + if (info) + { + TapAPIQuoteWhole *task_data = new TapAPIQuoteWhole(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + diff --git a/vnpy/api/tap/generator/tap_td_commen_constant.py b/vnpy/api/tap/generator/tap_td_commen_constant.py new file mode 100644 index 0000000000..aa6dd53e18 --- /dev/null +++ b/vnpy/api/tap/generator/tap_td_commen_constant.py @@ -0,0 +1,31 @@ +APIYNFLAG_YES = "Y" +APIYNFLAG_NO = "N" +APIPASSWORD_TRADE = "T" +APIPASSWORD_PHONE = "P" +APILOGLEVEL_NONE = "N" +APILOGLEVEL_ERROR = "E" +APILOGLEVEL_WARNING = "W" +APILOGLEVEL_DEBUG = "D" +TAPI_OPTION_TYPE_AMERICAN = "A" +TAPI_OPTION_TYPE_AMERICAN2 = "B" +TAPI_OPTION_TYPE_EUROPEAN = "E" +TAPI_OPTION_TYPE_EUROPEAN2 = "F" +TAPI_COMMODITY_TYPE_NONE = "N" +TAPI_COMMODITY_TYPE_SPOT = "P" +TAPI_COMMODITY_TYPE_FUTURES = "F" +TAPI_COMMODITY_TYPE_OPTION = "O" +TAPI_COMMODITY_TYPE_SPREAD_MONTH = "S" +TAPI_COMMODITY_TYPE_SPREAD_COMMODITY = "M" +TAPI_COMMODITY_TYPE_BUL = "U" +TAPI_COMMODITY_TYPE_BER = "E" +TAPI_COMMODITY_TYPE_STD = "D" +TAPI_COMMODITY_TYPE_STG = "G" +TAPI_COMMODITY_TYPE_PRT = "R" +TAPI_COMMODITY_TYPE_DIRECTFOREX = "X" +TAPI_COMMODITY_TYPE_INDIRECTFOREX = "I" +TAPI_COMMODITY_TYPE_CROSSFOREX = "C" +TAPI_COMMODITY_TYPE_INDEX = "Z" +TAPI_COMMODITY_TYPE_STOCK = "T" +TAPI_CALLPUT_FLAG_CALL = "C" +TAPI_CALLPUT_FLAG_PUT = "P" +TAPI_CALLPUT_FLAG_NONE = "N" diff --git a/vnpy/api/tap/generator/tap_td_commen_struct.py b/vnpy/api/tap/generator/tap_td_commen_struct.py new file mode 100644 index 0000000000..25511a8326 --- /dev/null +++ b/vnpy/api/tap/generator/tap_td_commen_struct.py @@ -0,0 +1,37 @@ +TapAPIApplicationInfo = { + "AuthCode": "string", + "KeyOperationLogPath": "string", +} + +TapAPICommodity = { + "ExchangeNo": "string", + "CommodityType": "char", + "CommodityNo": "string", +} + +TapAPIContract = { + "Commodity": "dict", + "ContractNo1": "string", + "StrikePrice1": "string", + "CallOrPutFlag1": "char", + "ContractNo2": "string", + "StrikePrice2": "string", + "CallOrPutFlag2": "char", +} + +TapAPIExchangeInfo = { + "ExchangeNo": "string", + "ExchangeName": "string", +} + +TapAPIChangePasswordReq = { + "PasswordType": "char", + "OldPassword": "string", + "NewPassword": "string", +} + +TapAPIAuthPasswordReq = { + "AccountNo": "string", + "PasswordType": "char", + "Password": "string", +} diff --git a/vnpy/api/tap/generator/tap_td_commen_typedef.py b/vnpy/api/tap/generator/tap_td_commen_typedef.py new file mode 100644 index 0000000000..68a098d13a --- /dev/null +++ b/vnpy/api/tap/generator/tap_td_commen_typedef.py @@ -0,0 +1,32 @@ +TAPIINT32 = "int" +TAPIUINT32 = "unsigned int" +TAPIINT64 = "long long" +TAPIUINT64 = "unsigned long long" +TAPIUINT16 = "unsigned short" +TAPIUINT8 = "unsigned char" +TAPIREAL64 = "double" +TAPIYNFLAG = "char" +TAPIPasswordType = "char" +TAPILOGLEVEL = "char" +TAPIOptionType = "char" +TAPICommodityType = "char" +TAPICallOrPutFlagType = "char" +TAPISTR_10 = "string" +TAPISTR_20 = "string" +TAPISTR_30 = "string" +TAPISTR_40 = "string" +TAPISTR_50 = "string" +TAPISTR_70 = "string" +TAPISTR_100 = "string" +TAPISTR_300 = "string" +TAPISTR_500 = "string" +TAPISTR_2000 = "string" +TAPIAUTHCODE = "string" +TAPIMACTYPE = "string" +TAPISecondSerialIDType = "string" +TAPICHAR = "char" +TAPIClientIDType = "string" +TAPIDTSTAMP = "string" +TAPIDATETIME = "string" +TAPIDATE = "string" +TAPITIME = "string" diff --git a/vnpy/api/tap/generator/tap_td_data_constant.py b/vnpy/api/tap/generator/tap_td_data_constant.py new file mode 100644 index 0000000000..f2e5129fc6 --- /dev/null +++ b/vnpy/api/tap/generator/tap_td_data_constant.py @@ -0,0 +1,175 @@ +TAPI_ACCOUNT_TYPE_PERSON = "P" +TAPI_ACCOUNT_TYPE_ORGANIZATION = "O" +TAPI_ACCOUNT_TYPE_AGENT = "A" +TAPI_ACCOUNT_TYPE_MARGIN = "M" +TAPI_ACCOUNT_TYPE_HOUSE = "H" +TAPI_ACCOUNT_TYPE_STOCK = "S" +TAPI_RIGHT_ORDER_DEL = 30001 +TAPI_RIGHT_ORDER_CHECK = 30002 +TAPI_RIGHT_ONLY_QRY = 31000 +TAPI_RIGHT_ONLY_OPEN = 31001 +TAPI_USERTYPE_CLIENT = 10000 +TAPI_USERTYPE_BROKER = 20000 +TAPI_USERTYPE_TRADER = 30000 +TAPI_USERTYPE_RISK = 40000 +TAPI_USERTYPE_MANAGER = 50000 +TAPI_USERTYPE_QUOTE = 60000 +TAPI_ACCOUNT_STATE_NORMAL = "N" +TAPI_ACCOUNT_STATE_CANCEL = "C" +TAPI_ACCOUNT_STATE_SLEEP = "S" +TAPI_ACCOUNT_TRADING_RIGHT_NORMAL = "0" +TAPI_ACCOUNT_TRADING_RIGHT_NOTRADE = "1" +TAPI_ACCOUNT_TRADING_RIGHT_CLOSE = "2" +TAPI_ORDER_TYPE_MARKET = "1" +TAPI_ORDER_TYPE_LIMIT = "2" +TAPI_ORDER_TYPE_STOP_MARKET = "3" +TAPI_ORDER_TYPE_STOP_LIMIT = "4" +TAPI_ORDER_TYPE_OPT_EXEC = "5" +TAPI_ORDER_TYPE_OPT_ABANDON = "6" +TAPI_ORDER_TYPE_REQQUOT = "7" +TAPI_ORDER_TYPE_RSPQUOT = "8" +TAPI_ORDER_TYPE_ICEBERG = "9" +TAPI_ORDER_TYPE_GHOST = "A" +TAPI_ORDER_TYPE_HKEX_AUCTION = "B" +TAPI_ORDER_TYPE_SWAP = "C" +TAPI_ORDER_SOURCE_SELF_ETRADER = "1" +TAPI_ORDER_SOURCE_PROXY_ETRADER = "2" +TAPI_ORDER_SOURCE_JTRADER = "3" +TAPI_ORDER_SOURCE_MANUAL = "4" +TAPI_ORDER_SOURCE_CARRY = "5" +TAPI_ORDER_SOURCE_PROGRAM = "6" +TAPI_ORDER_SOURCE_DELIVERY = "7" +TAPI_ORDER_SOURCE_ABANDON = "8" +TAPI_ORDER_SOURCE_CHANNEL = "9" +TAPI_ORDER_TIMEINFORCE_GFD = "0" +TAPI_ORDER_TIMEINFORCE_GTC = "1" +TAPI_ORDER_TIMEINFORCE_GTD = "2" +TAPI_ORDER_TIMEINFORCE_FAK = "3" +TAPI_ORDER_TIMEINFORCE_FOK = "4" +TAPI_SIDE_NONE = "N" +TAPI_SIDE_BUY = "B" +TAPI_SIDE_SELL = "S" +TAPI_PositionEffect_NONE = "N" +TAPI_PositionEffect_OPEN = "O" +TAPI_PositionEffect_COVER = "C" +TAPI_PositionEffect_COVER_TODAY = "T" +TAPI_HEDGEFLAG_NONE = "N" +TAPI_HEDGEFLAG_T = "T" +TAPI_HEDGEFLAG_B = "B" +TAPI_HEDGEFLAG_L = "L" +TAPI_ORDER_STATE_SUBMIT = "0" +TAPI_ORDER_STATE_ACCEPT = "1" +TAPI_ORDER_STATE_TRIGGERING = "2" +TAPI_ORDER_STATE_EXCTRIGGERING = "3" +TAPI_ORDER_STATE_QUEUED = "4" +TAPI_ORDER_STATE_PARTFINISHED = "5" +TAPI_ORDER_STATE_FINISHED = "6" +TAPI_ORDER_STATE_CANCELING = "7" +TAPI_ORDER_STATE_MODIFYING = "8" +TAPI_ORDER_STATE_CANCELED = "9" +TAPI_ORDER_STATE_LEFTDELETED = "A" +TAPI_ORDER_STATE_FAIL = "B" +TAPI_ORDER_STATE_DELETED = "C" +TAPI_ORDER_STATE_SUPPENDED = "D" +TAPI_ORDER_STATE_DELETEDFOREXPIRE = "E" +TAPI_ORDER_STATE_EFFECT = "F" +TAPI_ORDER_STATE_APPLY = "G" +TAPI_CALULATE_MODE_COMBINE = "0" +TAPI_CALCULATE_MODE_PERCENTAGE = "1" +TAPI_CALCULATE_MODE_QUOTA = "2" +TAPI_CALCULATE_MODE_CHAPERCENTAGE = "3" +TAPI_CALCULATE_MODE_CHAQUOTA = "4" +TAPI_CALCULATE_MODE_DISCOUNT = "5" +TAPI_MATCH_SOURCE_ALL = "0" +TAPI_MATCH_SOURCE_SELF_ETRADER = "1" +TAPI_MATCH_SOURCE_PROXY_ETRADER = "2" +TAPI_MATCH_SOURCE_JTRADER = "3" +TAPI_MATCH_SOURCE_MANUAL = "4" +TAPI_MATCH_SOURCE_CARRY = "5" +TAPI_MATCH_SOURCE_PROGRAM = "6" +TAPI_MATCH_SOURCE_DELIVERY = "7" +TAPI_MATCH_SOURCE_ABANDON = "8" +TAPI_MATCH_SOURCE_CHANNEL = "9" +TAPI_MATCH_SOURCE_ESUNNY_API = "A" +TAPI_CLOSE_MODE_NONE = "N" +TAPI_CLOSE_MODE_UNFINISHED = "U" +TAPI_CLOSE_MODE_OPENCOVER = "C" +TAPI_CLOSE_MODE_CLOSETODAY = "T" +TAPI_FUTURES_ALG_ZHUBI = "1" +TAPI_FUTURES_ALG_DINGSHI = "2" +TAPI_OPTION_ALG_FUTURES = "1" +TAPI_OPTION_ALG_OPTION = "2" +SENDTYPE_SMS = "S" +SENDTYPE_MAIL = "M" +TAPI_LWFlag_L = "L" +TAPI_LWFlag_W = "W" +TAPI_CASHINOUT_MODE_FEEADJUST = "0" +TAPI_CASHINOUT_MODE_YKADJUST = "1" +TAPI_CASHINOUT_MODE_PLEDGE = "2" +TAPI_CASHINOUT_MODE_INTERESTREVENUE = "3" +TAPI_CASHINOUT_MODE_COLLECTIONCOST = "4" +TAPI_CASHINOUT_MODE_OTHER = "5" +TAPI_CASHINOUT_MODE_COMPANY = "6" +TAPI_DEPOSITCALCULATE_MODE_FEN = "1" +TAPI_DEPOSITCALCULATE_MODE_SUO = "2" +TAPI_CMB_DIRECT_FIRST = "1" +TAPI_CMB_DIRECT_SECOND = "2" +TAPI_DELIVERY_MODE_GOODS = "G" +TAPI_DELIVERY_MODE_CASH = "C" +TAPI_DELIVERY_MODE_EXECUTE = "E" +TAPI_DELIVERY_MODE_ABANDON = "A" +TAPI_DELIVERY_MODE_HKF = "H" +TAPI_CONTRACT_TYPE_TRADEQUOTE = "1" +TAPI_CONTRACT_TYPE_QUOTE = "2" +TAPI_TACTICS_TYPE_NONE = "N" +TAPI_TACTICS_TYPE_READY = "M" +TAPI_TACTICS_TYPE_ATUO = "A" +TAPI_TACTICS_TYPE_CONDITION = "C" +APIORDER_INSERT = "1" +APIORDER_MODIFY = "2" +APIORDER_DELETE = "3" +APIORDER_SUSPEND = "4" +APIORDER_ACTIVATE = "5" +APIORDER_SYSTEM_DELETE = "6" +TAPI_TRIGGER_CONDITION_NONE = "N" +TAPI_TRIGGER_CONDITION_GREAT = "G" +TAPI_TRIGGER_CONDITION_LITTLE = "L" +TAPI_TRIGGER_PRICE_NONE = "N" +TAPI_TRIGGER_PRICE_BUY = "B" +TAPI_TRIGGER_PRICE_SELL = "S" +TAPI_TRIGGER_PRICE_LAST = "L" +TAPI_TRADE_STATE_BID = "1" +TAPI_TRADE_STATE_MATCH = "2" +TAPI_TRADE_STATE_CONTINUOUS = "3" +TAPI_TRADE_STATE_PAUSED = "4" +TAPI_TRADE_STATE_CLOSE = "5" +TAPI_TRADE_STATE_DEALLAST = "6" +TAPI_TRADE_STATE_GWDISCONNECT = "0" +TAPI_TRADE_STATE_UNKNOWN = "N" +TAPI_TRADE_STATE_INITIALIZE = "I" +TAPI_TRADE_STATE_READY = "R" +TAPI_NOTICE_IGNORE_NONE = 0x00000000 +TAPI_NOTICE_IGNORE_ALL = 0xFFFFFFFF +TAPI_NOTICE_IGNORE_FUND = 0x00000001 +TAPI_NOTICE_IGNORE_ORDER = 0x00000002 +TAPI_NOTICE_IGNORE_FILL = 0x00000004 +TAPI_NOTICE_IGNORE_POSITION = 0x00000008 +TAPI_NOTICE_IGNORE_CLOSE = 0x00000010 +TAPI_NOTICE_IGNORE_POSITIONPROFIT = 0x00000020 +TAPI_ORDER_QRY_TYPE_ALL = "A" +TAPI_ORDER_QRY_TYPE_UNENDED = "U" +TAPI_MSG_RECEIVER_ACCOUNTNO = "1" +TAPI_MSG_RECEIVER_ACCOUNTGROUPNO = "2" +TAPI_MSG_RECEIVER_ATTRIBUTE = "3" +TAPI_MSG_RECEIVER_USERNO = "4" +TAPI_MSG_LEVEL_NORMAL = "1" +TAPI_MSG_LEVEL_IMPORTANT = "2" +TAPI_MSG_LEVEL_IMERGENCY = "3" +TAPI_Msg_TYPE_MANAGER = "1" +TAPI_Msg_TYPE_RISKCONTROL = "2" +TAPI_BILL_DATE = "D" +TAPI_BILL_MONTH = "M" +TAPI_BILL_FILE_TXT = "T" +TAPI_BILL_FILE_PDF = "F" +SettleFlag_AutoSettle = "0" +SettleFlagh_Manual = "2" diff --git a/vnpy/api/tap/generator/tap_td_data_struct.py b/vnpy/api/tap/generator/tap_td_data_struct.py new file mode 100644 index 0000000000..95cb932db6 --- /dev/null +++ b/vnpy/api/tap/generator/tap_td_data_struct.py @@ -0,0 +1,946 @@ +TapAPITradeLoginAuth = { + "UserNo": "string", + "ISModifyPassword": "char", + "Password": "string", + "NewPassword": "string", +} + +TapAPITradeLoginRspInfo = { + "UserNo": "string", + "UserType": "int", + "UserName": "string", + "ReservedInfo": "string", + "LastLoginIP": "string", + "LastLoginProt": "unsigned int", + "LastLoginTime": "string", + "LastLogoutTime": "string", + "TradeDate": "string", + "LastSettleTime": "string", + "StartTime": "string", + "InitTime": "string", +} + +TapAPIRequestVertificateCodeRsp = { + "SecondSerialID": "string", + "Effective": "int", +} + +TapAPIAccQryReq = { +} + +TapAPIAccountInfo = { + "AccountNo": "string", + "AccountType": "char", + "AccountState": "char", + "AccountTradeRight": "char", + "CommodityGroupNo": "string", + "AccountShortName": "string", + "AccountEnShortName": "string", +} + +TapAPINewOrder = { + "AccountNo": "string", + "ExchangeNo": "string", + "CommodityType": "char", + "CommodityNo": "string", + "ContractNo": "string", + "StrikePrice": "string", + "CallOrPutFlag": "char", + "ContractNo2": "string", + "StrikePrice2": "string", + "CallOrPutFlag2": "char", + "OrderType": "char", + "OrderSource": "char", + "TimeInForce": "char", + "ExpireTime": "string", + "IsRiskOrder": "char", + "OrderSide": "char", + "PositionEffect": "char", + "PositionEffect2": "char", + "InquiryNo": "string", + "HedgeFlag": "char", + "OrderPrice": "double", + "OrderPrice2": "double", + "StopPrice": "double", + "OrderQty": "unsigned int", + "OrderMinQty": "unsigned int", + "MinClipSize": "unsigned int", + "MaxClipSize": "unsigned int", + "RefInt": "int", + "RefDouble": "double", + "RefString": "string", + "ClientID": "string", + "TacticsType": "char", + "TriggerCondition": "char", + "TriggerPriceType": "char", + "AddOneIsValid": "char", +} + +TapAPIOrderInfo = { + "AccountNo": "string", + "ExchangeNo": "string", + "CommodityType": "char", + "CommodityNo": "string", + "ContractNo": "string", + "StrikePrice": "string", + "CallOrPutFlag": "char", + "ContractNo2": "string", + "StrikePrice2": "string", + "CallOrPutFlag2": "char", + "OrderType": "char", + "OrderSource": "char", + "TimeInForce": "char", + "ExpireTime": "string", + "IsRiskOrder": "char", + "OrderSide": "char", + "PositionEffect": "char", + "PositionEffect2": "char", + "InquiryNo": "string", + "HedgeFlag": "char", + "OrderPrice": "double", + "OrderPrice2": "double", + "StopPrice": "double", + "OrderQty": "unsigned int", + "OrderMinQty": "unsigned int", + "RefInt": "int", + "RefDouble": "double", + "RefString": "string", + "MinClipSize": "unsigned int", + "MaxClipSize": "unsigned int", + "LicenseNo": "string", + "ServerFlag": "char", + "OrderNo": "string", + "ClientOrderNo": "string", + "ClientID": "string", + "TacticsType": "char", + "TriggerCondition": "char", + "TriggerPriceType": "char", + "AddOneIsValid": "char", + "ClientLocalIP": "string", + "ClientMac": "string", + "ClientIP": "string", + "OrderStreamID": "unsigned int", + "UpperNo": "string", + "UpperChannelNo": "string", + "OrderLocalNo": "string", + "UpperStreamID": "unsigned int", + "OrderSystemNo": "string", + "OrderExchangeSystemNo": "string", + "OrderParentSystemNo": "string", + "OrderInsertUserNo": "string", + "OrderInsertTime": "string", + "OrderCommandUserNo": "string", + "OrderUpdateUserNo": "string", + "OrderUpdateTime": "string", + "OrderState": "char", + "OrderMatchPrice": "double", + "OrderMatchPrice2": "double", + "OrderMatchQty": "unsigned int", + "OrderMatchQty2": "unsigned int", + "ErrorCode": "unsigned int", + "ErrorText": "string", + "IsBackInput": "char", + "IsDeleted": "char", + "IsAddOne": "char", +} + +TapAPIOrderInfoNotice = { + "SessionID": "unsigned int", + "ErrorCode": "unsigned int", + "OrderInfo": "dict", +} + +TapAPIOrderActionRsp = { + "ActionType": "char", + "OrderInfo": "dict", +} + +TapAPIAmendOrder = { + "ReqData": "dict", + "ServerFlag": "char", + "OrderNo": "string", +} + +TapAPIOrderCancelReq = { + "RefInt": "int", + "RefDouble": "double", + "RefString": "string", + "ServerFlag": "char", + "OrderNo": "string", +} + +TapAPIOrderDeactivateReq = TapAPIOrderCancelReq +TapAPIOrderActivateReq = TapAPIOrderCancelReq +TapAPIOrderDeleteReq = TapAPIOrderCancelReq +TapAPIOrderQryReq = { + "AccountNo": "string", + "ExchangeNo": "string", + "CommodityType": "char", + "CommodityNo": "string", + "OrderType": "char", + "OrderSource": "char", + "TimeInForce": "char", + "ExpireTime": "string", + "IsRiskOrder": "char", + "ServerFlag": "char", + "OrderNo": "string", + "IsBackInput": "char", + "IsDeleted": "char", + "IsAddOne": "char", +} + +TapAPIOrderProcessQryReq = { + "ServerFlag": "char", + "OrderNo": "string", +} + +TapAPIFillQryReq = { + "AccountNo": "string", + "ExchangeNo": "string", + "CommodityType": "char", + "CommodityNo": "string", + "ContractNo": "string", + "StrikePrice": "string", + "CallOrPutFlag": "char", + "MatchSource": "char", + "MatchSide": "char", + "PositionEffect": "char", + "ServerFlag": "char", + "OrderNo": "string", + "UpperNo": "string", + "IsDeleted": "char", + "IsAddOne": "char", +} + +TapAPIFillInfo = { + "AccountNo": "string", + "ExchangeNo": "string", + "CommodityType": "char", + "CommodityNo": "string", + "ContractNo": "string", + "StrikePrice": "string", + "CallOrPutFlag": "char", + "MatchSource": "char", + "MatchSide": "char", + "PositionEffect": "char", + "ServerFlag": "char", + "OrderNo": "string", + "OrderSystemNo": "string", + "MatchNo": "string", + "UpperMatchNo": "string", + "ExchangeMatchNo": "string", + "MatchDateTime": "string", + "UpperMatchDateTime": "string", + "UpperNo": "string", + "MatchPrice": "double", + "MatchQty": "unsigned int", + "IsDeleted": "char", + "IsAddOne": "char", + "FeeCurrencyGroup": "string", + "FeeCurrency": "string", + "FeeValue": "double", + "IsManualFee": "char", + "ClosePrositionPrice": "double", +} + +TapAPICloseQryReq = { + "AccountNo": "string", + "ExchangeNo": "string", + "CommodityType": "char", + "CommodityNo": "string", +} + +TapAPICloseInfo = { + "AccountNo": "string", + "ExchangeNo": "string", + "CommodityType": "char", + "CommodityNo": "string", + "ContractNo": "string", + "StrikePrice": "string", + "CallOrPutFlag": "char", + "CloseSide": "char", + "CloseQty": "unsigned int", + "OpenPrice": "double", + "ClosePrice": "double", + "OpenMatchNo": "string", + "OpenMatchDateTime": "string", + "CloseMatchNo": "string", + "CloseMatchDateTime": "string", + "CloseStreamId": "unsigned int", + "CommodityCurrencyGroup": "string", + "CommodityCurrency": "string", + "CloseProfit": "double", +} + +TapAPIPositionQryReq = { + "AccountNo": "string", +} + +TapAPIPositionInfo = { + "AccountNo": "string", + "ExchangeNo": "string", + "CommodityType": "char", + "CommodityNo": "string", + "ContractNo": "string", + "StrikePrice": "string", + "CallOrPutFlag": "char", + "MatchSide": "char", + "HedgeFlag": "char", + "PositionNo": "string", + "ServerFlag": "char", + "OrderNo": "string", + "MatchNo": "string", + "UpperNo": "string", + "PositionPrice": "double", + "PositionQty": "unsigned int", + "PositionStreamId": "unsigned int", + "CommodityCurrencyGroup": "string", + "CommodityCurrency": "string", + "CalculatePrice": "double", + "AccountInitialMargin": "double", + "AccountMaintenanceMargin": "double", + "UpperInitialMargin": "double", + "UpperMaintenanceMargin": "double", + "PositionProfit": "double", + "LMEPositionProfit": "double", + "OptionMarketValue": "double", + "IsHistory": "char", +} + +TapAPIPositionProfit = { + "PositionNo": "string", + "PositionStreamId": "unsigned int", + "PositionProfit": "double", + "LMEPositionProfit": "double", + "OptionMarketValue": "double", + "CalculatePrice": "double", +} + +TapAPIPositionProfitNotice = { + "IsLast": "char", + "Data": "dict", +} + +TapAPIPositionSummary = { + "AccountNo": "string", + "ExchangeNo": "string", + "CommodityType": "char", + "CommodityNo": "string", + "ContractNo": "string", + "StrikePrice": "string", + "CallOrPutFlag": "char", + "MatchSide": "char", + "PositionPrice": "double", + "PositionQty": "unsigned int", + "HisPositionQty": "unsigned int", +} + +TapAPIFundReq = { + "AccountNo": "string", +} + +TapAPIFundData = { + "AccountNo": "string", + "CurrencyGroupNo": "string", + "CurrencyNo": "string", + "TradeRate": "double", + "FutureAlg": "char", + "OptionAlg": "char", + "PreBalance": "double", + "PreUnExpProfit": "double", + "PreLMEPositionProfit": "double", + "PreEquity": "double", + "PreAvailable1": "double", + "PreMarketEquity": "double", + "CashInValue": "double", + "CashOutValue": "double", + "CashAdjustValue": "double", + "CashPledged": "double", + "FrozenFee": "double", + "FrozenDeposit": "double", + "AccountFee": "double", + "SwapInValue": "double", + "SwapOutValue": "double", + "PremiumIncome": "double", + "PremiumPay": "double", + "CloseProfit": "double", + "FrozenFund": "double", + "UnExpProfit": "double", + "ExpProfit": "double", + "PositionProfit": "double", + "LmePositionProfit": "double", + "OptionMarketValue": "double", + "AccountIntialMargin": "double", + "AccountMaintenanceMargin": "double", + "UpperInitalMargin": "double", + "UpperMaintenanceMargin": "double", + "Discount": "double", + "Balance": "double", + "Equity": "double", + "Available": "double", + "CanDraw": "double", + "MarketEquity": "double", + "AuthMoney": "double", +} + +TapAPICommodityInfo = { + "ExchangeNo": "string", + "CommodityType": "char", + "CommodityNo": "string", + "CommodityName": "string", + "CommodityEngName": "string", + "RelateExchangeNo": "string", + "RelateCommodityType": "char", + "RelateCommodityNo": "string", + "RelateExchangeNo2": "string", + "RelateCommodityType2": "char", + "RelateCommodityNo2": "string", + "CurrencyGroupNo": "string", + "TradeCurrency": "string", + "ContractSize": "double", + "OpenCloseMode": "char", + "StrikePriceTimes": "double", + "CommodityTickSize": "double", + "CommodityDenominator": "int", + "CmbDirect": "char", + "DeliveryMode": "char", + "DeliveryDays": "int", + "AddOneTime": "string", + "CommodityTimeZone": "int", + "IsAddOne": "char", +} + +TapAPITradeContractInfo = { + "ExchangeNo": "string", + "CommodityType": "char", + "CommodityNo": "string", + "ContractNo1": "string", + "StrikePrice1": "string", + "CallOrPutFlag1": "char", + "ContractNo2": "string", + "StrikePrice2": "string", + "CallOrPutFlag2": "char", + "ContractType": "char", + "QuoteUnderlyingContract": "string", + "ContractName": "string", + "ContractExpDate": "string", + "LastTradeDate": "string", + "FirstNoticeDate": "string", +} + +TapAPICurrencyInfo = { + "CurrencyNo": "string", + "CurrencyGroupNo": "string", + "TradeRate": "double", + "TradeRate2": "double", + "FutureAlg": "char", + "OptionAlg": "char", +} + +TapAPITradeMessageReq = { + "AccountNo": "string", + "AccountAttributeNo": "string", + "BenginSendDateTime": "string", + "EndSendDateTime": "string", +} + +TapAPITradeMessage = { + "SerialID": "unsigned int", + "AccountNo": "string", + "TMsgValidDateTime": "string", + "TMsgTitle": "string", + "TMsgContent": "string", + "TMsgType": "char", + "TMsgLevel": "char", + "IsSendBySMS": "char", + "IsSendByEMail": "char", + "Sender": "string", + "SendDateTime": "string", +} + +TapAPIBillQryReq = { + "UserNo": "string", + "BillType": "char", + "BillDate": "string", + "BillFileType": "char", +} + +TapAPIBillQryRsp = { + "Reqdata": "dict", + "BillLen": "int", + "BillText": "char", +} + +TapAPIHisOrderQryReq = { + "AccountNo": "string", + "AccountAttributeNo": "string", + "BeginDate": "string", + "EndDate": "string", +} + +TapAPIHisOrderQryRsp = { + "Date": "string", + "AccountNo": "string", + "ExchangeNo": "string", + "CommodityType": "char", + "CommodityNo": "string", + "ContractNo": "string", + "StrikePrice": "string", + "CallOrPutFlag": "char", + "ContractNo2": "string", + "StrikePrice2": "string", + "CallOrPutFlag2": "char", + "OrderType": "char", + "OrderSource": "char", + "TimeInForce": "char", + "ExpireTime": "string", + "IsRiskOrder": "char", + "OrderSide": "char", + "PositionEffect": "char", + "PositionEffect2": "char", + "InquiryNo": "string", + "HedgeFlag": "char", + "OrderPrice": "double", + "OrderPrice2": "double", + "StopPrice": "double", + "OrderQty": "unsigned int", + "OrderMinQty": "unsigned int", + "OrderCanceledQty": "unsigned int", + "RefInt": "int", + "RefDouble": "double", + "RefString": "string", + "ServerFlag": "char", + "OrderNo": "string", + "OrderStreamID": "unsigned int", + "UpperNo": "string", + "UpperChannelNo": "string", + "OrderLocalNo": "string", + "UpperStreamID": "unsigned int", + "OrderSystemNo": "string", + "OrderExchangeSystemNo": "string", + "OrderParentSystemNo": "string", + "OrderInsertUserNo": "string", + "OrderInsertTime": "string", + "OrderCommandUserNo": "string", + "OrderUpdateUserNo": "string", + "OrderUpdateTime": "string", + "OrderState": "char", + "OrderMatchPrice": "double", + "OrderMatchPrice2": "double", + "OrderMatchQty": "unsigned int", + "OrderMatchQty2": "unsigned int", + "ErrorCode": "unsigned int", + "ErrorText": "string", + "IsBackInput": "char", + "IsDeleted": "char", + "IsAddOne": "char", + "AddOneIsValid": "char", + "MinClipSize": "unsigned int", + "MaxClipSize": "unsigned int", + "LicenseNo": "string", + "TacticsType": "char", + "TriggerCondition": "char", + "TriggerPriceType": "char", +} + +TapAPIHisMatchQryReq = { + "AccountNo": "string", + "AccountAttributeNo": "string", + "BeginDate": "string", + "EndDate": "string", + "CountType": "char", +} + +TapAPIHisMatchQryRsp = { + "SettleDate": "string", + "TradeDate": "string", + "AccountNo": "string", + "ExchangeNo": "string", + "CommodityType": "char", + "CommodityNo": "string", + "ContractNo": "string", + "StrikePrice": "string", + "CallOrPutFlag": "char", + "MatchSource": "char", + "MatchSide": "char", + "PositionEffect": "char", + "HedgeFlag": "char", + "MatchPrice": "double", + "MatchQty": "unsigned int", + "OrderNo": "string", + "MatchNo": "string", + "MatchStreamID": "unsigned int", + "UpperNo": "string", + "MatchCmbNo": "string", + "ExchangeMatchNo": "string", + "MatchUpperStreamID": "unsigned int", + "CommodityCurrencyGroup": "string", + "CommodityCurrency": "string", + "Turnover": "double", + "PremiumIncome": "double", + "PremiumPay": "double", + "AccountFee": "double", + "AccountFeeCurrencyGroup": "string", + "AccountFeeCurrency": "string", + "IsManualFee": "char", + "AccountOtherFee": "double", + "UpperFee": "double", + "UpperFeeCurrencyGroup": "string", + "UpperFeeCurrency": "string", + "IsUpperManualFee": "char", + "UpperOtherFee": "double", + "MatchDateTime": "string", + "UpperMatchDateTime": "string", + "CloseProfit": "double", + "ClosePrice": "double", + "CloseQty": "unsigned int", + "SettleGroupNo": "string", + "OperatorNo": "string", + "OperateTime": "string", +} + +TapAPIHisOrderProcessQryReq = { + "Date": "string", + "OrderNo": "string", +} + +TapAPIHisOrderProcessQryRsp = TapAPIHisOrderQryRsp +TapAPIHisPositionQryReq = { + "AccountNo": "string", + "AccountAttributeNo": "dict", + "Date": "string", + "CountType": "dict", + "SettleFlag": "char", +} + +TapAPIHisPositionQryRsp = { + "SettleDate": "string", + "OpenDate": "string", + "AccountNo": "string", + "ExchangeNo": "string", + "CommodityType": "char", + "CommodityNo": "string", + "ContractNo": "string", + "StrikePrice": "string", + "CallOrPutFlag": "char", + "MatchSide": "char", + "HedgeFlag": "char", + "PositionPrice": "double", + "PositionQty": "unsigned int", + "OrderNo": "string", + "PositionNo": "string", + "UpperNo": "string", + "CurrencyGroup": "string", + "Currency": "string", + "PreSettlePrice": "double", + "SettlePrice": "double", + "PositionDProfit": "double", + "LMEPositionProfit": "double", + "OptionMarketValue": "double", + "AccountInitialMargin": "double", + "AccountMaintenanceMargin": "double", + "UpperInitialMargin": "double", + "UpperMaintenanceMargin": "double", + "SettleGroupNo": "string", +} + +TapAPIHisDeliveryQryReq = { + "AccountNo": "string", + "AccountAttributeNo": "string", + "BeginDate": "string", + "EndDate": "string", + "CountType": "char", +} + +TapAPIHisDeliveryQryRsp = { + "DeliveryDate": "string", + "OpenDate": "string", + "AccountNo": "string", + "ExchangeNo": "string", + "CommodityType": "char", + "CommodityNo": "string", + "ContractNo": "string", + "StrikePrice": "string", + "CallOrPutFlag": "char", + "MatchSource": "char", + "OpenSide": "char", + "OpenPrice": "double", + "DeliveryPrice": "double", + "DeliveryQty": "unsigned int", + "FrozenQty": "unsigned int", + "OpenNo": "string", + "UpperNo": "string", + "CommodityCurrencyGroupy": "string", + "CommodityCurrency": "string", + "PreSettlePrice": "double", + "DeliveryProfit": "double", + "AccountFrozenInitialMargin": "double", + "AccountFrozenMaintenanceMargin": "double", + "UpperFrozenInitialMargin": "double", + "UpperFrozenMaintenanceMargin": "double", + "AccountFeeCurrencyGroup": "string", + "AccountFeeCurrency": "string", + "AccountDeliveryFee": "double", + "UpperFeeCurrencyGroup": "string", + "UpperFeeCurrency": "string", + "UpperDeliveryFee": "double", + "DeliveryMode": "char", + "OperatorNo": "string", + "OperateTime": "string", + "SettleGourpNo": "string", +} + +TapAPIAccountCashAdjustQryReq = { + "SerialID": "unsigned int", + "AccountNo": "string", + "AccountAttributeNo": "string", + "BeginDate": "string", + "EndDate": "string", +} + +TapAPIAccountCashAdjustQryRsp = { + "Date": "string", + "AccountNo": "string", + "CashAdjustType": "char", + "CurrencyGroupNo": "string", + "CurrencyNo": "string", + "CashAdjustValue": "double", + "CashAdjustRemark": "string", + "OperateTime": "string", + "OperatorNo": "string", + "AccountBank": "string", + "BankAccount": "string", + "AccountLWFlag": "char", + "CompanyBank": "string", + "InternalBankAccount": "string", + "CompanyLWFlag": "char", +} + +TapAPIAccountFeeRentQryReq = { + "AccountNo": "string", +} + +TapAPIAccountFeeRentQryRsp = { + "AccountNo": "string", + "ExchangeNo": "string", + "CommodityType": "char", + "CommodityNo": "string", + "MatchSource": "char", + "CalculateMode": "char", + "CurrencyGroupNo": "string", + "CurrencyNo": "string", + "OpenCloseFee": "double", + "CloseTodayFee": "double", +} + +TapAPIAccountMarginRentQryReq = { + "AccountNo": "string", + "ExchangeNo": "string", + "CommodityType": "char", + "CommodityNo": "string", + "ContractNo": "string", +} + +TapAPIAccountMarginRentQryRsp = { + "AccountNo": "string", + "ExchangeNo": "string", + "CommodityType": "char", + "CommodityNo": "string", + "ContractNo": "string", + "StrikePrice": "string", + "CallOrPutFlag": "char", + "CalculateMode": "char", + "CurrencyGroupNo": "string", + "CurrencyNo": "string", + "InitialMargin": "double", + "MaintenanceMargin": "double", + "SellInitialMargin": "double", + "SellMaintenanceMargin": "double", + "LockMargin": "double", +} + +TapAPIOrderQuoteMarketNotice = { + "ExchangeNo": "string", + "CommodityType": "char", + "CommodityNo": "string", + "ContractNo": "string", + "StrikePrice": "string", + "CallOrPutFlag": "char", + "OrderSide": "char", + "OrderQty": "unsigned int", +} + +TapAPIOrderMarketInsertReq = { + "AccountNo": "string", + "ExchangeNo": "string", + "CommodityType": "char", + "CommodityNo": "string", + "ContractNo": "string", + "StrikePrice": "string", + "CallOrPutFlag": "char", + "OrderType": "char", + "TimeInForce": "char", + "ExpireTime": "string", + "OrderSource": "char", + "BuyPositionEffect": "char", + "SellPositionEffect": "char", + "AddOneIsValid": "char", + "OrderBuyPrice": "double", + "OrderSellPrice": "double", + "OrderBuyQty": "unsigned int", + "OrderSellQty": "unsigned int", + "ClientBuyOrderNo": "string", + "ClientSellOrderNo": "string", + "RefInt": "int", + "RefDouble": "double", + "RefString": "string", + "Remark": "string", +} + +TapAPIOrderMarketInsertRsp = { + "AccountNo": "string", + "ExchangeNo": "string", + "CommodityType": "char", + "CommodityNo": "string", + "ContractNo": "string", + "StrikePrice": "string", + "CallOrPutFlag": "char", + "OrderType": "char", + "TimeInForce": "char", + "ExpireTime": "string", + "OrderSource": "char", + "BuyPositionEffect": "char", + "SellPositionEffect": "char", + "OrderBuyPrice": "double", + "OrderSellPrice": "double", + "OrderBuyQty": "unsigned int", + "OrderSellQty": "unsigned int", + "ServerFlag": "char", + "OrderBuyNo": "string", + "OrderSellNo": "string", + "AddOneIsValid": "char", + "OrderMarketUserNo": "string", + "OrderMarketTime": "string", + "RefInt": "int", + "RefDouble": "double", + "RefString": "string", + "ClientBuyOrderNo": "string", + "ClientSellOrderNo": "string", + "ErrorCode": "unsigned int", + "ErrorText": "string", + "ClientLocalIP": "string", + "ClientMac": "string", + "ClientIP": "string", + "Remark": "string", +} + +TapAPIOrderMarketDeleteReq = { + "ServerFlag": "char", + "OrderBuyNo": "string", + "OrderSellNo": "string", +} + +TapAPIOrderMarketDeleteRsp = TapAPIOrderMarketInsertRsp +TapAPIOrderLocalRemoveReq = { + "ServerFlag": "char", + "OrderNo": "string", +} + +TapAPIOrderLocalRemoveRsp = { + "req": "dict", + "ClientLocalIP": "string", + "ClientMac": "string", + "ClientIP": "string", +} + +TapAPIOrderLocalInputReq = { + "AccountNo": "string", + "ExchangeNo": "string", + "CommodityType": "char", + "CommodityNo": "string", + "ContractNo": "string", + "StrikePrice": "string", + "CallOrPutFlag": "char", + "ContractNo2": "string", + "StrikePrice2": "string", + "CallOrPutFlag2": "char", + "OrderType": "char", + "OrderSource": "char", + "TimeInForce": "char", + "ExpireTime": "string", + "IsRiskOrder": "char", + "OrderSide": "char", + "PositionEffect": "char", + "PositionEffect2": "char", + "InquiryNo": "string", + "HedgeFlag": "char", + "OrderPrice": "double", + "OrderPrice2": "double", + "StopPrice": "double", + "OrderQty": "unsigned int", + "OrderMinQty": "unsigned int", + "OrderSystemNo": "string", + "OrderExchangeSystemNo": "string", + "UpperNo": "string", + "OrderMatchPrice": "double", + "OrderMatchPrice2": "double", + "OrderMatchQty": "unsigned int", + "OrderMatchQty2": "unsigned int", + "OrderState": "char", + "IsAddOne": "char", +} + +TapAPIOrderLocalInputRsp = TapAPIOrderInfo +TapAPIOrderLocalModifyReq = { + "req": "dict", + "ServerFlag": "char", + "OrderNo": "string", +} + +TapAPIOrderLocalModifyRsp = TapAPIOrderInfo +TapAPIOrderLocalTransferReq = { + "AccountNo": "string", + "ServerFlag": "char", + "OrderNo": "string", +} + +TapAPIOrderLocalTransferRsp = TapAPIOrderInfo +TapAPIFillLocalInputReq = { + "AccountNo": "string", + "ExchangeNo": "string", + "CommodityType": "char", + "CommodityNo": "string", + "ContractNo": "string", + "StrikePrice": "string", + "CallOrPutFlag": "char", + "MatchSide": "char", + "PositionEffect": "char", + "HedgeFlag": "char", + "MatchPrice": "double", + "MatchQty": "unsigned int", + "OrderSystemNo": "string", + "UpperMatchNo": "string", + "MatchDateTime": "string", + "UpperMatchDateTime": "string", + "UpperNo": "string", + "IsAddOne": "char", + "FeeCurrencyGroup": "string", + "FeeCurrency": "string", + "FeeValue": "double", + "IsManualFee": "char", + "ClosePositionPrice": "double", +} + +TapAPIFillLocalInputRsp = TapAPIFillLocalInputReq +TapAPIFillLocalRemoveReq = { + "ServerFlag": "char", + "MatchNo": "string", +} + +TapAPIFillLocalRemoveRsp = TapAPIFillLocalRemoveReq +TapAPITradingCalendarQryRsp = { + "CurrTradeDate": "string", + "LastSettlementDate": "string", + "PromptDate": "string", + "LastPromptDate": "string", +} diff --git a/vnpy/api/tap/generator/tap_td_data_typedef.py b/vnpy/api/tap/generator/tap_td_data_typedef.py new file mode 100644 index 0000000000..c50282f38d --- /dev/null +++ b/vnpy/api/tap/generator/tap_td_data_typedef.py @@ -0,0 +1,48 @@ +TAPIAccountType = "char" +TAPIRightIDType = "int" +TAPIUserTypeType = "int" +TAPIAccountState = "char" +TAPIAccountRightType = "char" +TAPIOrderTypeType = "char" +TAPIOrderSourceType = "char" +TAPITimeInForceType = "char" +TAPISideType = "char" +TAPIPositionEffectType = "char" +TAPIHedgeFlagType = "char" +TAPIOrderStateType = "char" +TAPICalculateModeType = "char" +TAPIMatchSourceType = "char" +TAPIOpenCloseModeType = "char" +TAPIFutureAlgType = "char" +TAPIOptionAlgType = "char" +TAPISendType = "char" +TAPIBankAccountLWFlagType = "char" +TAPICashAdjustTypeType = "char" +TAPIMarginCalculateModeType = "char" +TAPIOptionMarginCalculateModeType = "char" +TAPICmbDirectType = "char" +TAPIDeliveryModeType = "char" +TAPIContractTypeType = "char" +TAPITacticsTypeType = "char" +TAPIORDERACT = "char" +TAPITriggerConditionType = "char" +TAPITriggerPriceTypeType = "char" +TAPITradingStateType = "char" +TAPINoticeIgnoreFlagType = "unsigned int" +TAPIOrderQryTypeType = "char" +TapAPIOrderDeactivateReq = "dict" +TapAPIOrderActivateReq = "dict" +TapAPIOrderDeleteReq = "dict" +TAPIMsgReceiverType = "char" +TAPIMsgLevelType = "char" +TAPIMsgTypeType = "char" +TAPIBillTypeType = "char" +TAPIBillFileTypeType = "char" +TapAPIHisOrderProcessQryRsp = "dict" +TAPISettleFlagType = "char" +TapAPIOrderMarketDeleteRsp = "dict" +TapAPIOrderLocalInputRsp = "dict" +TapAPIOrderLocalModifyRsp = "dict" +TapAPIOrderLocalTransferRsp = "dict" +TapAPIFillLocalInputRsp = "dict" +TapAPIFillLocalRemoveRsp = "dict" diff --git a/vnpy/api/tap/generator/tap_td_error_constant.py b/vnpy/api/tap/generator/tap_td_error_constant.py new file mode 100644 index 0000000000..6a2d41905f --- /dev/null +++ b/vnpy/api/tap/generator/tap_td_error_constant.py @@ -0,0 +1,235 @@ +TAPIERROR_LOGIN = 10001 +TAPIERROR_LOGIN_USER = 10002 +TAPIERROR_LOGIN_DDA = 10003 +TAPIERROR_LOGIN_LICENSE = 10004 +TAPIERROR_LOGIN_MODULE = 10005 +TAPIERROR_LOGIN_FORCE = 10006 +TAPIERROR_LOGIN_STATE = 10007 +TAPIERROR_LOGIN_PASS = 10008 +TAPIERROR_LOGIN_RIGHT = 10009 +TAPIERROR_LOGIN_COUNT = 10010 +TAPIERROR_LOGIN_NOTIN_SERVERFLAGUSRES = 10011 +TAPIERROR_LOGIN_FREEZE = 10012 +TAPIERROR_LOGIN_TOFREEZE = 10013 +TAPIERROR_LOGIN_ACCOUNTSTATE = 10014 +TAPIERROR_LOGIN_SECCERTIFI = 10015 +TAPIERROR_LOGIN_NOSECONDSET = 10016 +TAPIERROR_LOGIN_NOTURSTHOST = 10017 +TAPITAPIERROR_SECONDCERTIFICATION_FAIL = 14001 +TAPITAPIERROR_SECONDCERTIFICATION_TIMEOVER = 14002 +TAPIERROR_CONN_DATABASE = 11000 +TAPIERROR_OPER_DATABASE = 11001 +TAPIERROR_NEED_ONETOONE = 11002 +TAPIERROR_EXIST_RELATEINFO = 11003 +TAPIERROR_EXIST_RELATEINFOOFGROUP = 11004 +TAPIERROR_USERPASSWORD_MOD_SOURCE = 12001 +TAPIERROR_USERPASSWORD_MOD_SAME = 12002 +TAPIERROR_USERPASSWORD_MOD_COMPLEXITY = 12003 +TAPIERROR_CURRENCY_ONLY_ONEBASE = 13001 +TAPIERROR_CURRENCY_ONLY_USDHKD = 13002 +TAPIERROR_ORDERINSERT_ACCOUNT = 60001 +TAPIERROR_ORDERINSERT_ACCOUNT_STATE = 60002 +TAPIERROR_ORDERINSERT_TRADECENT_ERROR = 60003 +TAPIERROR_ORDERINSERT_CONTRACT = 60011 +TAPIERROR_ORDERINSERT_LME_NOTREADY = 60012 +TAPIERROR_ORDERINSERT_ERROR_ORDER_TYPE = 60013 +TAPIERROR_ORDERINSERT_READY_TYPE_ERROR = 60014 +TAPIERROR_ORDERINSERT_ORDER_TYPE_ERROR = 60015 +TAPIERROR_ORDER_NOTRADE_ACCOUNT = 60021 +TAPIERROR_ORDER_NOTRADE_COM_GROUP = 60022 +TAPIERROR_ORDER_NOTRADE_ACC_CONTRACT = 60023 +TAPIERROR_ORDER_NOTRADE_SYSTEM = 60024 +TAPIERROR_ORDER_CLOSE_ACCOUNT = 60025 +TAPIERROR_ORDER_CLOSE_ACC_CONTRACT = 60026 +TAPIERROR_ORDER_CLOSE_SYSTEM = 60027 +TAPIERROR_ORDER_CLOSE_DAYS = 60028 +TAPIERROR_ORDER_NOTRADE_RISK = 60029 +TAPIERROR_ORDER_CLOSE_RISK = 60030 +TAPIERROR_ORDERINSERT_POSITIONMAX = 60031 +TAPIERROR_ORDERINSERT_ONCEMAX = 60032 +TAPIERROR_ORDERINSERT_TRADEROUTE = 60033 +TAPIERROR_ORDER_IN_MOD_PRICE_ERROR = 60034 +TAPIERROR_ORDER_IN_GIVEUP_POS_MAX = 60035 +TAPIERROR_UPPERCHANNEL_NOT_LOGIN = 60041 +TAPIERROR_UPPERCHANNEL_NOT_FOUND = 60042 +TAPIERROR_ORDERINSERT_NOTENOUGHFUND = 60051 +TAPIERROR_ORDERINSERT_FEE = 60052 +TAPIERROR_ORDERINSERT_MARGIN = 60053 +TAPIERROR_ORDERINSERT_BASENOFUND = 60054 +TAPIERROR_ORDERINSERT_MARGINAMOUNT = 60055 +TAPIERROR_ORDERINSERT_OPENRATIO = 60056 +TAPIERROR_ORDERINSERT_GROUP_OPENRATIO = 60057 +TAPIERROR_ORDERINSERT_RISKARRAY = 60058 +TAPIERROR_ORDERDELETE_NOT_SYSNO = 60061 +TAPIERROR_ORDERDELETE_NOT_STATE = 60062 +TAPIERROR_ORDERDELETE_NO_INPUT = 60063 +TAPIERROR_ORDERMODIFY_NOT_STATE = 60071 +TAPIERROR_ORDERMODIFY_BACK_INPUT = 60072 +TAPIERROR_ORDERMODIFY_RISK_ORDER = 60073 +TAPIERROR_ORDERMODIFY_ERROR_QTY = 60074 +TAPIERROR_ORDERMODIFY_ERROR_READY = 60075 +TAPIERROR_ORDERINPUT_CANNOTMOVE = 60081 +TAPIERROR_ORDERINPUT_REPEAT = 60091 +TAPIERROR_CONTRACT_QUOTE = 60101 +TAPIERROR_UPPER_ONCEMAX = 60111 +TAPIERROR_UPPER_POSITIONMAX = 60112 +TAPIERROR_ORDERINSERT_CLOSEMODE = 60121 +TAPIERROR_CLOSE_ORDER = 60122 +TAPIERROR_CLOSE_MATCH = 60123 +TAPIERROR_MOD_DEL_NO_ORDER = 60131 +TAPIERROR_MOD_DEL_GATEWAY_DISCON = 60132 +TAPIERROR_MATCHINPUT_REPEAT = 60141 +TAPIERROR_MATCHINPUT_NO_ORDER = 60142 +TAPIERROR_MATCHINPUT_NO_CONTRACT = 60143 +TAPIERROR_MATCHINPUT_PARM_ERROR = 60144 +TAPIERROR_MATCHINPUT_OSTATE_ERROR = 60145 +TAPIERROR_MATCHREMOVE_NO_MATCH = 60151 +TAPIERROR_MATCHREMOVE_STATE_ERROR = 60152 +TAPIERROR_ORDERINPUT_STATE_ERROR = 60161 +TAPIERROR_ORDERINPUT_MOD_ERROR = 60162 +TAPIERROR_ORDERREMOVE_ERROR = 60163 +TAPIERROR_ORDERINPUT_MOD_STATE_ERROR = 60164 +TAPIERROR_ORDEREXCHANGE_STATE_ERROR = 60165 +TAPIERROR_ORDERREMOVE_NOT_ERROR = 60166 +TAPIERROR_ORDERMARKET_DELETE_NOTFOUND = 60171 +TAPIERROR_ORDERMARKET_DEL_ACCOUNT_NE = 60172 +TAPIERROR_ORDERMARKET_DEL_COMMODITY_NE = 60173 +TAPIERROR_ORDERMARKET_DEL_CONTRACT_NE = 60174 +TAPIERROR_ORDERMARKET_DEL_SIDE_EQ = 60175 +TAPIERROR_ORDERMARKET_DEL_SIDE_ERROR = 60176 +TAPIERROR_ORDERMARKET_OTHER_SIDE_ERROR = 60177 +TAPIERROR_ORDERACTIVATE_NOTFOUND_ERROR = 60181 +TAPIERROR_ORDERACTIVATE_STATE_ERROR = 60182 +TAPIERROR_GW_NOT_READY = 80001 +TAPIERROR_GW_INVALID_COMMODITY = 80002 +TAPIERROR_GW_INVALID_CONTRACT = 80003 +TAPIERROR_GW_INVALID_FIELD = 80004 +TAPIERROR_GW_INVALID_PRICE = 80005 +TAPIERROR_GW_INVALID_VOLUME = 80006 +TAPIERROR_GW_INVALID_TYPE = 80007 +TAPIERROR_GW_INVALID_MODE = 80008 +TAPIERROR_GW_ORDER_NOT_EXIST = 80009 +TAPIERROR_GW_SEND_FAIL = 80010 +TAPIERROR_GW_REJ_BYUPPER = 80011 +TAPIERROR_TRADEFRONT_MODULETYPEERR = 90001 +TAPIERROR_TRADEFRONT_TOOMANYDATA = 90002 +TAPIERROR_TRADEFRONT_NODATA = 90003 +TAPIERROT_TRADEFRONT_NOUSER = 90004 +TAPIERROR_TRADEFRONT_DISCONNECT_TRADE = 90011 +TAPIERROR_TRADEFRONT_DISCONNECT_MANAGE = 90012 +TAPIERROR_TRADEFRONT_ACCOUNT = 90021 +TAPIERROR_TRADEFRONT_ORDER = 90022 +TAPIERROR_TRADEFRONT_FREQUENCY = 90023 +TAPIERROR_TRADEFRONT_RUFUSE = 90024 +TAPIERROR_TRADEFRONT_SELFMATCH = 90025 +TAPIERROR_SUCCEED = 0 +TAPIERROR_ConnectFail = -1 +TAPIERROR_LinkAuthFail = -2 +TAPIERROR_HostUnavailable = -3 +TAPIERROR_SendDataError = -4 +TAPIERROR_TestIDError = -5 +TAPIERROR_NotReadyTestNetwork = -6 +TAPIERROR_CurTestNotOver = -7 +TAPIERROR_NOFrontAvailable = -8 +TAPIERROR_DataPathAvaiable = -9 +TAPIERROR_RepeatLogin = -10 +TAPIERROR_InnerError = -11 +TAPIERROR_LastReqNotFinish = -12 +TAPIERROR_InputValueError = -13 +TAPIERROR_AuthCode_Invalid = -14 +TAPIERROR_AuthCode_Expired = -15 +TAPIERROR_AuthCode_TypeNotMatch = -16 +TAPIERROR_API_NotReady = -17 +TAPIERROR_UDP_LISTEN_FAILED = -18 +TAPIERROR_UDP_LISTENING = -19 +TAPIERROR_NotImplemented = -20 +TAPIERROR_CallOneTimeOnly = -21 +TAPIERROR_ORDER_FREQUENCY = -22 +TAPIERROR_RENTQRY_TOOFAST = -23 +TAPIERROR_CALL_NOCONDITION = -24 +TAPIERROR_ORDER_NOTFOUND = -25 +TAPIERROR_LOGPATH_EMPTY = -26 +TAPIERROR_LOGPATH_FAILOPEN = -27 +TAPIERROR_RIGHT_TRADER = -28 +TAPIERROR_RIGHT_ORDERINPUT = -29 +TAPIERROR_RIGHT_LOCALOPERATION = -30 +TAPIERROR_RIGHT_ORDERTRANSFER = -31 +TAPIERROR_FILLINPUT_SYSTEMNO = -32 +TAPIERROR_FILLREMOVE_MATCHNO = -33 +TAPIERROR_FILLREQMOVE_NOFUND = -34 +TAPIERROR_LOCALMODIFY_ACCOUNT = -35 +TAPIERROR_LOCALTRANSFER_ACCOUNT = -36 +TAPIERROR_INPUTERROR_PHONE = -37 +TAPIERROR_ERROR_CONTACT = -38 +TAPIERROR_ERROR_REJESTVERTIFICATE = -39 +TAPIERROR_RIGHT_SETPASSWORD = -40 +TAPIERROR_RISK_OPERERROR = -41 +TAPIERROR_ORDER_MODACCOUNT = -42 +TAPIERROR_INPUTERROR_NULL = -10000 +TAPIERROR_INPUTERROR_TAPIYNFLAG = -10001 +TAPIERROR_INPUTERROR_TAPILOGLEVEL = -10002 +TAPIERROR_INPUTERROR_TAPICommodityType = -10003 +TAPIERROR_INPUTERROR_TAPICallOrPutFlagType = -10004 +TAPIERROR_INPUTERROR_TAPIBucketDateFlag = -11001 +TAPIERROR_INPUTERROR_TAPIHisQuoteType = -11002 +TAPIERROR_INPUTERROR_TAPIAccountType = -12001 +TAPIERROR_INPUTERROR_TAPIUserTypeType = -12002 +TAPIERROR_INPUTERROR_TAPIAccountState = -12003 +TAPIERROR_INPUTERROR_TAPIAccountFamilyType = -12004 +TAPIERROR_INPUTERROR_TAPIOrderTypeType = -12005 +TAPIERROR_INPUTERROR_TAPIOrderSourceType = -12006 +TAPIERROR_INPUTERROR_TAPITimeInForceType = -12007 +TAPIERROR_INPUTERROR_TAPISideType = -12008 +TAPIERROR_INPUTERROR_TAPIPositionEffectType = -12009 +TAPIERROR_INPUTERROR_TAPIHedgeFlagType = -12010 +TAPIERROR_INPUTERROR_TAPIOrderStateType = -12011 +TAPIERROR_INPUTERROR_TAPICalculateModeType = -12012 +TAPIERROR_INPUTERROR_TAPIMatchSourceType = -12013 +TAPIERROR_INPUTERROR_TAPIOpenCloseModeType = -12014 +TAPIERROR_INPUTERROR_TAPIFutureAlgType = -12015 +TAPIERROR_INPUTERROR_TAPIOptionAlgType = -12016 +TAPIERROR_INPUTERROR_TAPIBankAccountLWFlagType = -12017 +TAPIERROR_INPUTERROR_TAPIBankAccountStateType = -12018 +TAPIERROR_INPUTERROR_TAPIBankAccountSwapStateType = -12019 +TAPIERROR_INPUTERROR_TAPIBankAccountTransferStateType = -12020 +TAPIERROR_INPUTERROR_TAPIMarginCalculateModeType = -12021 +TAPIERROR_INPUTERROR_TAPIOptionMarginCalculateModeType = -12022 +TAPIERROR_INPUTERROR_TAPICmbDirectType = -12023 +TAPIERROR_INPUTERROR_TAPIDeliveryModeType = -12024 +TAPIERROR_INPUTERROR_TAPIContractTypeType = -12025 +TAPIERROR_INPUTERROR_TAPIPartyTypeType = -12026 +TAPIERROR_INPUTERROR_TAPIPartyCertificateTypeType = -12027 +TAPIERROR_INPUTERROR_TAPIMsgReceiverType = -12028 +TAPIERROR_INPUTERROR_TAPIMsgTypeType = -12029 +TAPIERROR_INPUTERROR_TAPIMsgLevelType = -12030 +TAPIERROR_INPUTERROR_TAPITransferDirectType = -12031 +TAPIERROR_INPUTERROR_TAPITransferStateType = -12032 +TAPIERROR_INPUTERROR_TAPITransferTypeType = -12033 +TAPIERROR_INPUTERROR_TAPITransferDeviceIDType = -12034 +TAPIERROR_INPUTERROR_TAPITacticsTypeType = -12035 +TAPIERROR_INPUTERROR_TAPIORDERACT = -12036 +TAPIERROR_INPUTERROR_TAPIBillTypeType = -12037 +TAPIERROR_INPUTERROR_TAPIBillFileTypeType = -12038 +TAPIERROR_INPUTERROR_TAPIOFFFlagType = -12039 +TAPIERROR_INPUTERROR_TAPICashAdjustTypeType = -12040 +TAPIERROR_INPUTERROR_TAPITriggerConditionType = -12041 +TAPIERROR_INPUTERROR_TAPITriggerPriceTypeType = -12042 +TAPIERROR_INPUTERROR_TAPITradingStateType = -12043 +TAPIERROR_INPUTERROR_TAPIMarketLevelType = -12044 +TAPIERROR_INPUTERROR_TAPIOrderQryTypeType = -12045 +TAPIERROR_INPUTERROR_TAPIClientID = -12046 +TAPIERROR_INPUTERROR_QryHisQuoteParam = -13001 +TAPIERROR_INPUTERROR_TAPIIncludeNAN = -13002 +TAPIERROR_INPUTERROR_TAPIPasswordType = -12048 +TAPIERROR_DISCONNECT_CLOSE_INIT = 1 +TAPIERROR_DISCONNECT_CLOSE_PASS = 2 +TAPIERROR_DISCONNECT_READ_ERROR = 3 +TAPIERROR_DISCONNECT_WRITE_ERROR = 4 +TAPIERROR_DISCONNECT_BUF_FULL = 5 +TAPIERROR_DISCONNECT_IOCP_ERROR = 6 +TAPIERROR_DISCONNECT_PARSE_ERROR = 7 +TAPIERROR_DISCONNECT_CONNECT_TIMEOUT = 8 +TAPIERROR_DISCONNECT_INIT_ERROR = 9 +TAPIERROR_DISCONNECT_HAS_CONNECTED = 10 +TAPIERROR_DISCONNECT_HAS_EXIT = 11 +TAPIERROR_DISCONNECT_TRY_LATER = 12 diff --git a/vnpy/api/tap/generator/tap_td_header_define.h b/vnpy/api/tap/generator/tap_td_header_define.h new file mode 100644 index 0000000000..f77c022ff5 --- /dev/null +++ b/vnpy/api/tap/generator/tap_td_header_define.h @@ -0,0 +1,50 @@ +#define ONCONNECT 0 +#define ONRSPLOGIN 1 +#define ONRTNCONTACTINFO 2 +#define ONRSPREQUESTVERTIFICATECODE 3 +#define ONEXPRIATIONDATE 4 +#define ONAPIREADY 5 +#define ONDISCONNECT 6 +#define ONRSPCHANGEPASSWORD 7 +#define ONRSPAUTHPASSWORD 8 +#define ONRSPQRYTRADINGDATE 9 +#define ONRSPSETRESERVEDINFO 10 +#define ONRSPQRYACCOUNT 11 +#define ONRSPQRYFUND 12 +#define ONRTNFUND 13 +#define ONRSPQRYEXCHANGE 14 +#define ONRSPQRYCOMMODITY 15 +#define ONRSPQRYCONTRACT 16 +#define ONRTNCONTRACT 17 +#define ONRSPORDERACTION 18 +#define ONRTNORDER 19 +#define ONRSPQRYORDER 20 +#define ONRSPQRYORDERPROCESS 21 +#define ONRSPQRYFILL 22 +#define ONRTNFILL 23 +#define ONRSPQRYPOSITION 24 +#define ONRTNPOSITION 25 +#define ONRSPQRYPOSITIONSUMMARY 26 +#define ONRTNPOSITIONSUMMARY 27 +#define ONRTNPOSITIONPROFIT 28 +#define ONRSPQRYCURRENCY 29 +#define ONRSPQRYTRADEMESSAGE 30 +#define ONRTNTRADEMESSAGE 31 +#define ONRSPQRYHISORDER 32 +#define ONRSPQRYHISORDERPROCESS 33 +#define ONRSPQRYHISMATCH 34 +#define ONRSPQRYHISPOSITION 35 +#define ONRSPQRYHISDELIVERY 36 +#define ONRSPQRYACCOUNTCASHADJUST 37 +#define ONRSPQRYBILL 38 +#define ONRSPQRYACCOUNTFEERENT 39 +#define ONRSPQRYACCOUNTMARGINRENT 40 +#define ONRSPHKMARKETORDERINSERT 41 +#define ONRSPHKMARKETORDERDELETE 42 +#define ONHKMARKETQUOTENOTICE 43 +#define ONRSPORDERLOCALREMOVE 44 +#define ONRSPORDERLOCALINPUT 45 +#define ONRSPORDERLOCALMODIFY 46 +#define ONRSPORDERLOCALTRANSFER 47 +#define ONRSPFILLLOCALINPUT 48 +#define ONRSPFILLLOCALREMOVE 49 diff --git a/vnpy/api/tap/generator/tap_td_header_function.h b/vnpy/api/tap/generator/tap_td_header_function.h new file mode 100644 index 0000000000..1b495a1de6 --- /dev/null +++ b/vnpy/api/tap/generator/tap_td_header_function.h @@ -0,0 +1,44 @@ +int qryTradingDate(unsigned int session); + +int qryAccount(unsigned int session, const dict &data); + +int qryFund(unsigned int session, const dict &data); + +int qryExchange(unsigned int session); + +int qryCommodity(unsigned int session); + +int qryContract(unsigned int session, const dict &data); + +int qryOrder(unsigned int session, const dict &data); + +int qryOrderProcess(unsigned int session, const dict &data); + +int qryFill(unsigned int session, const dict &data); + +int qryPosition(unsigned int session, const dict &data); + +int qryPositionSummary(unsigned int session, const dict &data); + +int qryCurrency(unsigned int session); + +int qryAccountCashAdjust(unsigned int session, const dict &data); + +int qryTradeMessage(unsigned int session, const dict &data); + +int qryBill(unsigned int session, const dict &data); + +int qryHisOrder(unsigned int session, const dict &data); + +int qryHisOrderProcess(unsigned int session, const dict &data); + +int qryHisMatch(unsigned int session, const dict &data); + +int qryHisPosition(unsigned int session, const dict &data); + +int qryHisDelivery(unsigned int session, const dict &data); + +int qryAccountFeeRent(unsigned int session, const dict &data); + +int qryAccountMarginRent(unsigned int session, const dict &data); + diff --git a/vnpy/api/tap/generator/tap_td_header_on.h b/vnpy/api/tap/generator/tap_td_header_on.h new file mode 100644 index 0000000000..9ae0623879 --- /dev/null +++ b/vnpy/api/tap/generator/tap_td_header_on.h @@ -0,0 +1,100 @@ +virtual void onConnect() {}; + +virtual void onRspLogin(int error, const dict &data) {}; + +virtual void onRtnContactInfo(int error, char last, string ContactInfo) {}; + +virtual void onRspRequestVertificateCode(unsigned int session, int error, const dict &data) {}; + +virtual void onExpriationDate(string date, int days) {}; + +virtual void onAPIReady(int error) {}; + +virtual void onDisconnect(int reason) {}; + +virtual void onRspChangePassword(unsigned int session, int error) {}; + +virtual void onRspAuthPassword(unsigned int session, int error) {}; + +virtual void onRspQryTradingDate(unsigned int session, int error, const dict &data) {}; + +virtual void onRspSetReservedInfo(unsigned int session, int error, string info) {}; + +virtual void onRspQryAccount(unsigned int session, unsigned int session, char last, const dict &data) {}; + +virtual void onRspQryFund(unsigned int session, int error, char last, const dict &data) {}; + +virtual void onRtnFund(const dict &data) {}; + +virtual void onRspQryExchange(unsigned int session, int error, char last, const dict &data) {}; + +virtual void onRspQryCommodity(unsigned int session, int error, char last, const dict &data) {}; + +virtual void onRspQryContract(unsigned int session, int error, char last, const dict &data) {}; + +virtual void onRtnContract(const dict &data) {}; + +virtual void onRspOrderAction(unsigned int session, int error, const dict &data) {}; + +virtual void onRtnOrder(const dict &data) {}; + +virtual void onRspQryOrder(unsigned int session, int error, char last, const dict &data) {}; + +virtual void onRspQryOrderProcess(unsigned int session, int error, char last, const dict &data) {}; + +virtual void onRspQryFill(unsigned int session, int error, char last, const dict &data) {}; + +virtual void onRtnFill(const dict &data) {}; + +virtual void onRspQryPosition(unsigned int session, int error, char last, const dict &data) {}; + +virtual void onRtnPosition(const dict &data) {}; + +virtual void onRspQryPositionSummary(unsigned int session, int error, char last, const dict &data) {}; + +virtual void onRtnPositionSummary(const dict &data) {}; + +virtual void onRtnPositionProfit(const dict &data) {}; + +virtual void onRspQryCurrency(unsigned int session, int error, char last, const dict &data) {}; + +virtual void onRspQryTradeMessage(unsigned int session, int error, char last, const dict &data) {}; + +virtual void onRtnTradeMessage(const dict &data) {}; + +virtual void onRspQryHisOrder(unsigned int session, int error, char last, const dict &data) {}; + +virtual void onRspQryHisOrderProcess(unsigned int session, int error, char last, const dict &data) {}; + +virtual void onRspQryHisMatch(unsigned int session, int error, char last, const dict &data) {}; + +virtual void onRspQryHisPosition(unsigned int session, int error, char last, const dict &data) {}; + +virtual void onRspQryHisDelivery(unsigned int session, int error, char last, const dict &data) {}; + +virtual void onRspQryAccountCashAdjust(unsigned int session, int error, char last, const dict &data) {}; + +virtual void onRspQryBill(unsigned int session, int error, char last, const dict &data) {}; + +virtual void onRspQryAccountFeeRent(unsigned int session, int error, char last, const dict &data) {}; + +virtual void onRspQryAccountMarginRent(unsigned int session, int error, char last, const dict &data) {}; + +virtual void onRspHKMarketOrderInsert(unsigned int session, int error, const dict &data) {}; + +virtual void onRspHKMarketOrderDelete(unsigned int session, int error, const dict &data) {}; + +virtual void onHKMarketQuoteNotice(const dict &data) {}; + +virtual void onRspOrderLocalRemove(unsigned int session, int error, const dict &data) {}; + +virtual void onRspOrderLocalInput(unsigned int session, int error, const dict &data) {}; + +virtual void onRspOrderLocalModify(unsigned int session, int error, const dict &data) {}; + +virtual void onRspOrderLocalTransfer(unsigned int session, int error, const dict &data) {}; + +virtual void onRspFillLocalInput(unsigned int session, int error, const dict &data) {}; + +virtual void onRspFillLocalRemove(unsigned int session, int error, const dict &data) {}; + diff --git a/vnpy/api/tap/generator/tap_td_header_process.h b/vnpy/api/tap/generator/tap_td_header_process.h new file mode 100644 index 0000000000..9203b0af61 --- /dev/null +++ b/vnpy/api/tap/generator/tap_td_header_process.h @@ -0,0 +1,100 @@ +void processConnect(Task *task); + +void processRspLogin(Task *task); + +void processRtnContactInfo(Task *task); + +void processRspRequestVertificateCode(Task *task); + +void processExpriationDate(Task *task); + +void processAPIReady(Task *task); + +void processDisconnect(Task *task); + +void processRspChangePassword(Task *task); + +void processRspAuthPassword(Task *task); + +void processRspQryTradingDate(Task *task); + +void processRspSetReservedInfo(Task *task); + +void processRspQryAccount(Task *task); + +void processRspQryFund(Task *task); + +void processRtnFund(Task *task); + +void processRspQryExchange(Task *task); + +void processRspQryCommodity(Task *task); + +void processRspQryContract(Task *task); + +void processRtnContract(Task *task); + +void processRspOrderAction(Task *task); + +void processRtnOrder(Task *task); + +void processRspQryOrder(Task *task); + +void processRspQryOrderProcess(Task *task); + +void processRspQryFill(Task *task); + +void processRtnFill(Task *task); + +void processRspQryPosition(Task *task); + +void processRtnPosition(Task *task); + +void processRspQryPositionSummary(Task *task); + +void processRtnPositionSummary(Task *task); + +void processRtnPositionProfit(Task *task); + +void processRspQryCurrency(Task *task); + +void processRspQryTradeMessage(Task *task); + +void processRtnTradeMessage(Task *task); + +void processRspQryHisOrder(Task *task); + +void processRspQryHisOrderProcess(Task *task); + +void processRspQryHisMatch(Task *task); + +void processRspQryHisPosition(Task *task); + +void processRspQryHisDelivery(Task *task); + +void processRspQryAccountCashAdjust(Task *task); + +void processRspQryBill(Task *task); + +void processRspQryAccountFeeRent(Task *task); + +void processRspQryAccountMarginRent(Task *task); + +void processRspHKMarketOrderInsert(Task *task); + +void processRspHKMarketOrderDelete(Task *task); + +void processHKMarketQuoteNotice(Task *task); + +void processRspOrderLocalRemove(Task *task); + +void processRspOrderLocalInput(Task *task); + +void processRspOrderLocalModify(Task *task); + +void processRspOrderLocalTransfer(Task *task); + +void processRspFillLocalInput(Task *task); + +void processRspFillLocalRemove(Task *task); + diff --git a/vnpy/api/tap/generator/tap_td_source_function.cpp b/vnpy/api/tap/generator/tap_td_source_function.cpp new file mode 100644 index 0000000000..b3c8eb73f5 --- /dev/null +++ b/vnpy/api/tap/generator/tap_td_source_function.cpp @@ -0,0 +1,245 @@ +int TdApi::qryTradingDate(unsigned int session) +{ + int i = this->api->QryTradingDate(session); + return i; +}; + +int TdApi::qryAccount(unsigned int session, const dict &req) +{ + TapAPIAccQryReq myreq = TapAPIAccQryReq(); + memset(&myreq, 0, sizeof(myreq)); + int i = this->api->QryAccount(session, &myreq); + return i; +}; + +int TdApi::qryFund(unsigned int session, const dict &req) +{ + TapAPIFundReq myreq = TapAPIFundReq(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "AccountNo", myreq.AccountNo); + int i = this->api->QryFund(session, &myreq); + return i; +}; + +int TdApi::qryExchange(unsigned int session) +{ + int i = this->api->QryExchange(session); + return i; +}; + +int TdApi::qryCommodity(unsigned int session) +{ + int i = this->api->QryCommodity(session); + return i; +}; + +int TdApi::qryContract(unsigned int session, const dict &req) +{ + TapAPICommodity myreq = TapAPICommodity(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "ExchangeNo", myreq.ExchangeNo); + getChar(req, "CommodityType", &myreq.CommodityType); + getString(req, "CommodityNo", myreq.CommodityNo); + int i = this->api->QryContract(session, &myreq); + return i; +}; + +int TdApi::qryOrder(unsigned int session, const dict &req) +{ + TapAPIOrderQryReq myreq = TapAPIOrderQryReq(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "AccountNo", myreq.AccountNo); + getString(req, "ExchangeNo", myreq.ExchangeNo); + getChar(req, "CommodityType", &myreq.CommodityType); + getString(req, "CommodityNo", myreq.CommodityNo); + getChar(req, "OrderType", &myreq.OrderType); + getChar(req, "OrderSource", &myreq.OrderSource); + getChar(req, "TimeInForce", &myreq.TimeInForce); + getString(req, "ExpireTime", myreq.ExpireTime); + getChar(req, "IsRiskOrder", &myreq.IsRiskOrder); + getChar(req, "ServerFlag", &myreq.ServerFlag); + getString(req, "OrderNo", myreq.OrderNo); + getChar(req, "IsBackInput", &myreq.IsBackInput); + getChar(req, "IsDeleted", &myreq.IsDeleted); + getChar(req, "IsAddOne", &myreq.IsAddOne); + int i = this->api->QryOrder(session, &myreq); + return i; +}; + +int TdApi::qryOrderProcess(unsigned int session, const dict &req) +{ + TapAPIOrderProcessQryReq myreq = TapAPIOrderProcessQryReq(); + memset(&myreq, 0, sizeof(myreq)); + getChar(req, "ServerFlag", &myreq.ServerFlag); + getString(req, "OrderNo", myreq.OrderNo); + int i = this->api->QryOrderProcess(session, &myreq); + return i; +}; + +int TdApi::qryFill(unsigned int session, const dict &req) +{ + TapAPIFillQryReq myreq = TapAPIFillQryReq(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "AccountNo", myreq.AccountNo); + getString(req, "ExchangeNo", myreq.ExchangeNo); + getChar(req, "CommodityType", &myreq.CommodityType); + getString(req, "CommodityNo", myreq.CommodityNo); + getString(req, "ContractNo", myreq.ContractNo); + getString(req, "StrikePrice", myreq.StrikePrice); + getChar(req, "CallOrPutFlag", &myreq.CallOrPutFlag); + getChar(req, "MatchSource", &myreq.MatchSource); + getChar(req, "MatchSide", &myreq.MatchSide); + getChar(req, "PositionEffect", &myreq.PositionEffect); + getChar(req, "ServerFlag", &myreq.ServerFlag); + getString(req, "OrderNo", myreq.OrderNo); + getString(req, "UpperNo", myreq.UpperNo); + getChar(req, "IsDeleted", &myreq.IsDeleted); + getChar(req, "IsAddOne", &myreq.IsAddOne); + int i = this->api->QryFill(session, &myreq); + return i; +}; + +int TdApi::qryPosition(unsigned int session, const dict &req) +{ + TapAPIPositionQryReq myreq = TapAPIPositionQryReq(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "AccountNo", myreq.AccountNo); + int i = this->api->QryPosition(session, &myreq); + return i; +}; + +int TdApi::qryPositionSummary(unsigned int session, const dict &req) +{ + TapAPIPositionQryReq myreq = TapAPIPositionQryReq(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "AccountNo", myreq.AccountNo); + int i = this->api->QryPositionSummary(session, &myreq); + return i; +}; + +int TdApi::qryCurrency(unsigned int session) +{ + int i = this->api->QryCurrency(session); + return i; +}; + +int TdApi::qryAccountCashAdjust(unsigned int session, const dict &req) +{ + TapAPIAccountCashAdjustQryReq myreq = TapAPIAccountCashAdjustQryReq(); + memset(&myreq, 0, sizeof(myreq)); + getUnsigned int(req, "SerialID", &myreq.SerialID); + getString(req, "AccountNo", myreq.AccountNo); + getString(req, "AccountAttributeNo", myreq.AccountAttributeNo); + getString(req, "BeginDate", myreq.BeginDate); + getString(req, "EndDate", myreq.EndDate); + int i = this->api->QryAccountCashAdjust(session, &myreq); + return i; +}; + +int TdApi::qryTradeMessage(unsigned int session, const dict &req) +{ + TapAPITradeMessageReq myreq = TapAPITradeMessageReq(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "AccountNo", myreq.AccountNo); + getString(req, "AccountAttributeNo", myreq.AccountAttributeNo); + getString(req, "BenginSendDateTime", myreq.BenginSendDateTime); + getString(req, "EndSendDateTime", myreq.EndSendDateTime); + int i = this->api->QryTradeMessage(session, &myreq); + return i; +}; + +int TdApi::qryBill(unsigned int session, const dict &req) +{ + TapAPIBillQryReq myreq = TapAPIBillQryReq(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "UserNo", myreq.UserNo); + getChar(req, "BillType", &myreq.BillType); + getString(req, "BillDate", myreq.BillDate); + getChar(req, "BillFileType", &myreq.BillFileType); + int i = this->api->QryBill(session, &myreq); + return i; +}; + +int TdApi::qryHisOrder(unsigned int session, const dict &req) +{ + TapAPIHisOrderQryReq myreq = TapAPIHisOrderQryReq(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "AccountNo", myreq.AccountNo); + getString(req, "AccountAttributeNo", myreq.AccountAttributeNo); + getString(req, "BeginDate", myreq.BeginDate); + getString(req, "EndDate", myreq.EndDate); + int i = this->api->QryHisOrder(session, &myreq); + return i; +}; + +int TdApi::qryHisOrderProcess(unsigned int session, const dict &req) +{ + TapAPIHisOrderProcessQryReq myreq = TapAPIHisOrderProcessQryReq(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "Date", myreq.Date); + getString(req, "OrderNo", myreq.OrderNo); + int i = this->api->QryHisOrderProcess(session, &myreq); + return i; +}; + +int TdApi::qryHisMatch(unsigned int session, const dict &req) +{ + TapAPIHisMatchQryReq myreq = TapAPIHisMatchQryReq(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "AccountNo", myreq.AccountNo); + getString(req, "AccountAttributeNo", myreq.AccountAttributeNo); + getString(req, "BeginDate", myreq.BeginDate); + getString(req, "EndDate", myreq.EndDate); + getChar(req, "CountType", &myreq.CountType); + int i = this->api->QryHisMatch(session, &myreq); + return i; +}; + +int TdApi::qryHisPosition(unsigned int session, const dict &req) +{ + TapAPIHisPositionQryReq myreq = TapAPIHisPositionQryReq(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "AccountNo", myreq.AccountNo); + getDict(req, "AccountAttributeNo", &myreq.AccountAttributeNo); + getString(req, "Date", myreq.Date); + getDict(req, "CountType", &myreq.CountType); + getChar(req, "SettleFlag", &myreq.SettleFlag); + int i = this->api->QryHisPosition(session, &myreq); + return i; +}; + +int TdApi::qryHisDelivery(unsigned int session, const dict &req) +{ + TapAPIHisDeliveryQryReq myreq = TapAPIHisDeliveryQryReq(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "AccountNo", myreq.AccountNo); + getString(req, "AccountAttributeNo", myreq.AccountAttributeNo); + getString(req, "BeginDate", myreq.BeginDate); + getString(req, "EndDate", myreq.EndDate); + getChar(req, "CountType", &myreq.CountType); + int i = this->api->QryHisDelivery(session, &myreq); + return i; +}; + +int TdApi::qryAccountFeeRent(unsigned int session, const dict &req) +{ + TapAPIAccountFeeRentQryReq myreq = TapAPIAccountFeeRentQryReq(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "AccountNo", myreq.AccountNo); + int i = this->api->QryAccountFeeRent(session, &myreq); + return i; +}; + +int TdApi::qryAccountMarginRent(unsigned int session, const dict &req) +{ + TapAPIAccountMarginRentQryReq myreq = TapAPIAccountMarginRentQryReq(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "AccountNo", myreq.AccountNo); + getString(req, "ExchangeNo", myreq.ExchangeNo); + getChar(req, "CommodityType", &myreq.CommodityType); + getString(req, "CommodityNo", myreq.CommodityNo); + getString(req, "ContractNo", myreq.ContractNo); + int i = this->api->QryAccountMarginRent(session, &myreq); + return i; +}; + diff --git a/vnpy/api/tap/generator/tap_td_source_module.cpp b/vnpy/api/tap/generator/tap_td_source_module.cpp new file mode 100644 index 0000000000..692ddead35 --- /dev/null +++ b/vnpy/api/tap/generator/tap_td_source_module.cpp @@ -0,0 +1,74 @@ +.def("qryTradingDate", &TdApi::qryTradingDate) +.def("qryAccount", &TdApi::qryAccount) +.def("qryFund", &TdApi::qryFund) +.def("qryExchange", &TdApi::qryExchange) +.def("qryCommodity", &TdApi::qryCommodity) +.def("qryContract", &TdApi::qryContract) +.def("qryOrder", &TdApi::qryOrder) +.def("qryOrderProcess", &TdApi::qryOrderProcess) +.def("qryFill", &TdApi::qryFill) +.def("qryPosition", &TdApi::qryPosition) +.def("qryPositionSummary", &TdApi::qryPositionSummary) +.def("qryCurrency", &TdApi::qryCurrency) +.def("qryAccountCashAdjust", &TdApi::qryAccountCashAdjust) +.def("qryTradeMessage", &TdApi::qryTradeMessage) +.def("qryBill", &TdApi::qryBill) +.def("qryHisOrder", &TdApi::qryHisOrder) +.def("qryHisOrderProcess", &TdApi::qryHisOrderProcess) +.def("qryHisMatch", &TdApi::qryHisMatch) +.def("qryHisPosition", &TdApi::qryHisPosition) +.def("qryHisDelivery", &TdApi::qryHisDelivery) +.def("qryAccountFeeRent", &TdApi::qryAccountFeeRent) +.def("qryAccountMarginRent", &TdApi::qryAccountMarginRent) + +.def("onConnect", &TdApi::onConnect) +.def("onRspLogin", &TdApi::onRspLogin) +.def("onRtnContactInfo", &TdApi::onRtnContactInfo) +.def("onRspRequestVertificateCode", &TdApi::onRspRequestVertificateCode) +.def("onExpriationDate", &TdApi::onExpriationDate) +.def("onAPIReady", &TdApi::onAPIReady) +.def("onDisconnect", &TdApi::onDisconnect) +.def("onRspChangePassword", &TdApi::onRspChangePassword) +.def("onRspAuthPassword", &TdApi::onRspAuthPassword) +.def("onRspQryTradingDate", &TdApi::onRspQryTradingDate) +.def("onRspSetReservedInfo", &TdApi::onRspSetReservedInfo) +.def("onRspQryAccount", &TdApi::onRspQryAccount) +.def("onRspQryFund", &TdApi::onRspQryFund) +.def("onRtnFund", &TdApi::onRtnFund) +.def("onRspQryExchange", &TdApi::onRspQryExchange) +.def("onRspQryCommodity", &TdApi::onRspQryCommodity) +.def("onRspQryContract", &TdApi::onRspQryContract) +.def("onRtnContract", &TdApi::onRtnContract) +.def("onRspOrderAction", &TdApi::onRspOrderAction) +.def("onRtnOrder", &TdApi::onRtnOrder) +.def("onRspQryOrder", &TdApi::onRspQryOrder) +.def("onRspQryOrderProcess", &TdApi::onRspQryOrderProcess) +.def("onRspQryFill", &TdApi::onRspQryFill) +.def("onRtnFill", &TdApi::onRtnFill) +.def("onRspQryPosition", &TdApi::onRspQryPosition) +.def("onRtnPosition", &TdApi::onRtnPosition) +.def("onRspQryPositionSummary", &TdApi::onRspQryPositionSummary) +.def("onRtnPositionSummary", &TdApi::onRtnPositionSummary) +.def("onRtnPositionProfit", &TdApi::onRtnPositionProfit) +.def("onRspQryCurrency", &TdApi::onRspQryCurrency) +.def("onRspQryTradeMessage", &TdApi::onRspQryTradeMessage) +.def("onRtnTradeMessage", &TdApi::onRtnTradeMessage) +.def("onRspQryHisOrder", &TdApi::onRspQryHisOrder) +.def("onRspQryHisOrderProcess", &TdApi::onRspQryHisOrderProcess) +.def("onRspQryHisMatch", &TdApi::onRspQryHisMatch) +.def("onRspQryHisPosition", &TdApi::onRspQryHisPosition) +.def("onRspQryHisDelivery", &TdApi::onRspQryHisDelivery) +.def("onRspQryAccountCashAdjust", &TdApi::onRspQryAccountCashAdjust) +.def("onRspQryBill", &TdApi::onRspQryBill) +.def("onRspQryAccountFeeRent", &TdApi::onRspQryAccountFeeRent) +.def("onRspQryAccountMarginRent", &TdApi::onRspQryAccountMarginRent) +.def("onRspHKMarketOrderInsert", &TdApi::onRspHKMarketOrderInsert) +.def("onRspHKMarketOrderDelete", &TdApi::onRspHKMarketOrderDelete) +.def("onHKMarketQuoteNotice", &TdApi::onHKMarketQuoteNotice) +.def("onRspOrderLocalRemove", &TdApi::onRspOrderLocalRemove) +.def("onRspOrderLocalInput", &TdApi::onRspOrderLocalInput) +.def("onRspOrderLocalModify", &TdApi::onRspOrderLocalModify) +.def("onRspOrderLocalTransfer", &TdApi::onRspOrderLocalTransfer) +.def("onRspFillLocalInput", &TdApi::onRspFillLocalInput) +.def("onRspFillLocalRemove", &TdApi::onRspFillLocalRemove) +; diff --git a/vnpy/api/tap/generator/tap_td_source_on.cpp b/vnpy/api/tap/generator/tap_td_source_on.cpp new file mode 100644 index 0000000000..64f1f9aa8b --- /dev/null +++ b/vnpy/api/tap/generator/tap_td_source_on.cpp @@ -0,0 +1,600 @@ +void onConnect() override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onConnect); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspLogin(int error, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspLogin, error, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRtnContactInfo(int error, char last, string ContactInfo) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnContactInfo, error, last, ContactInfo); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspRequestVertificateCode(unsigned int session, int error, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspRequestVertificateCode, session, error, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onExpriationDate(string date, int days) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onExpriationDate, date, days); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onAPIReady(int error) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onAPIReady, error); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onDisconnect(int reasonCode) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onDisconnect, reasonCode); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspChangePassword(unsigned int session, int error) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspChangePassword, session, error); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspAuthPassword(unsigned int session, int error) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspAuthPassword, session, error); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspQryTradingDate(unsigned int session, int error, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryTradingDate, session, error, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspSetReservedInfo(unsigned int session, int error, string info) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspSetReservedInfo, session, error, info); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspQryAccount(unsigned int session, unsigned int session, char last, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryAccount, session, session, last, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspQryFund(unsigned int session, int error, char last, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryFund, session, error, last, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRtnFund(const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnFund, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspQryExchange(unsigned int session, int error, char last, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryExchange, session, error, last, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspQryCommodity(unsigned int session, int error, char last, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryCommodity, session, error, last, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspQryContract(unsigned int session, int error, char last, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryContract, session, error, last, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRtnContract(const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnContract, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspOrderAction(unsigned int session, int error, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspOrderAction, session, error, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRtnOrder(const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnOrder, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspQryOrder(unsigned int session, int error, char last, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryOrder, session, error, last, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspQryOrderProcess(unsigned int session, int error, char last, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryOrderProcess, session, error, last, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspQryFill(unsigned int session, int error, char last, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryFill, session, error, last, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRtnFill(const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnFill, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspQryPosition(unsigned int session, int error, char last, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryPosition, session, error, last, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRtnPosition(const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnPosition, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspQryPositionSummary(unsigned int session, int error, char last, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryPositionSummary, session, error, last, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRtnPositionSummary(const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnPositionSummary, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRtnPositionProfit(const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnPositionProfit, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspQryCurrency(unsigned int session, int error, char last, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryCurrency, session, error, last, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspQryTradeMessage(unsigned int session, int error, char last, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryTradeMessage, session, error, last, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRtnTradeMessage(const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnTradeMessage, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspQryHisOrder(unsigned int session, int error, char last, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryHisOrder, session, error, last, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspQryHisOrderProcess(unsigned int session, int error, char last, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryHisOrderProcess, session, error, last, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspQryHisMatch(unsigned int session, int error, char last, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryHisMatch, session, error, last, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspQryHisPosition(unsigned int session, int error, char last, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryHisPosition, session, error, last, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspQryHisDelivery(unsigned int session, int error, char last, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryHisDelivery, session, error, last, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspQryAccountCashAdjust(unsigned int session, int error, char last, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryAccountCashAdjust, session, error, last, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspQryBill(unsigned int session, int error, char last, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryBill, session, error, last, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspQryAccountFeeRent(unsigned int session, int error, char last, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryAccountFeeRent, session, error, last, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspQryAccountMarginRent(unsigned int session, int error, char last, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryAccountMarginRent, session, error, last, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspHKMarketOrderInsert(unsigned int session, int error, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspHKMarketOrderInsert, session, error, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspHKMarketOrderDelete(unsigned int session, int error, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspHKMarketOrderDelete, session, error, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onHKMarketQuoteNotice(const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onHKMarketQuoteNotice, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspOrderLocalRemove(unsigned int session, int error, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspOrderLocalRemove, session, error, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspOrderLocalInput(unsigned int session, int error, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspOrderLocalInput, session, error, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspOrderLocalModify(unsigned int session, int error, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspOrderLocalModify, session, error, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspOrderLocalTransfer(unsigned int session, int error, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspOrderLocalTransfer, session, error, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspFillLocalInput(unsigned int session, int error, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspFillLocalInput, session, error, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + +void onRspFillLocalRemove(unsigned int session, int error, const dict &data) override +{ + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspFillLocalRemove, session, error, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } +}; + diff --git a/vnpy/api/tap/generator/tap_td_source_process.cpp b/vnpy/api/tap/generator/tap_td_source_process.cpp new file mode 100644 index 0000000000..dd83edcaf7 --- /dev/null +++ b/vnpy/api/tap/generator/tap_td_source_process.cpp @@ -0,0 +1,1588 @@ +void TdApi::processConnect(Task *task) +{ + this->onConnect(); +}; + +void TdApi::processRspLogin(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPITradeLoginRspInfo *task_data = (TapAPITradeLoginRspInfo*)task->task_data; + data["UserNo"] = toUtf(task_data->UserNo); + data["UserType"] = task_data->UserType; + data["UserName"] = toUtf(task_data->UserName); + data["ReservedInfo"] = toUtf(task_data->ReservedInfo); + data["LastLoginIP"] = toUtf(task_data->LastLoginIP); + data["LastLoginProt"] = task_data->LastLoginProt; + data["LastLoginTime"] = toUtf(task_data->LastLoginTime); + data["LastLogoutTime"] = toUtf(task_data->LastLogoutTime); + data["TradeDate"] = toUtf(task_data->TradeDate); + data["LastSettleTime"] = toUtf(task_data->LastSettleTime); + data["StartTime"] = toUtf(task_data->StartTime); + data["InitTime"] = toUtf(task_data->InitTime); + delete task_data; + } + this->onRspLogin(task->task_int, data); +}; + +void TdApi::processRtnContactInfo(Task *task) +{ + gil_scoped_acquire acquire; + this->onRtnContactInfo(task->task_int, task->task_last, task->task_string); +}; + +void TdApi::processRspRequestVertificateCode(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIRequestVertificateCodeRsp *task_data = (TapAPIRequestVertificateCodeRsp*)task->task_data; + data["SecondSerialID"] = toUtf(task_data->SecondSerialID); + data["Effective"] = task_data->Effective; + delete task_data; + } + this->onRspRequestVertificateCode(task->task_id, task->task_int, data); +}; + +void TdApi::processExpriationDate(Task *task) +{ + gil_scoped_acquire acquire; + this->onExpriationDate(task->task_string, task->task_int); +}; + +void TdApi::processAPIReady(Task *task) +{ + gil_scoped_acquire acquire; + this->onAPIReady(task->task_int); +}; + +void TdApi::processDisconnect(Task *task) +{ + gil_scoped_acquire acquire; + this->onDisconnect(task->task_int); +}; + +void TdApi::processRspChangePassword(Task *task) +{ + gil_scoped_acquire acquire; + this->onRspChangePassword(task->task_id, task->task_int); +}; + +void TdApi::processRspAuthPassword(Task *task) +{ + gil_scoped_acquire acquire; + this->onRspAuthPassword(task->task_id, task->task_int); +}; + +void TdApi::processRspQryTradingDate(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPITradingCalendarQryRsp *task_data = (TapAPITradingCalendarQryRsp*)task->task_data; + data["CurrTradeDate"] = toUtf(task_data->CurrTradeDate); + data["LastSettlementDate"] = toUtf(task_data->LastSettlementDate); + data["PromptDate"] = toUtf(task_data->PromptDate); + data["LastPromptDate"] = toUtf(task_data->LastPromptDate); + delete task_data; + } + this->onRspQryTradingDate(task->task_id, task->task_int, data); +}; + +void TdApi::processRspSetReservedInfo(Task *task) +{ + gil_scoped_acquire acquire; + this->onRspSetReservedInfo(task->task_id, task->task_int, task->task_string); +}; + +void TdApi::processRspQryAccount(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIAccountInfo *task_data = (TapAPIAccountInfo*)task->task_data; + data["AccountNo"] = toUtf(task_data->AccountNo); + data["AccountType"] = task_data->AccountType; + data["AccountState"] = task_data->AccountState; + data["AccountTradeRight"] = task_data->AccountTradeRight; + data["CommodityGroupNo"] = toUtf(task_data->CommodityGroupNo); + data["AccountShortName"] = toUtf(task_data->AccountShortName); + data["AccountEnShortName"] = toUtf(task_data->AccountEnShortName); + delete task_data; + } + this->onRspQryAccount(task->task_id, task->task_id, task->task_last, data); +}; + +void TdApi::processRspQryFund(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIFundData *task_data = (TapAPIFundData*)task->task_data; + data["AccountNo"] = toUtf(task_data->AccountNo); + data["CurrencyGroupNo"] = toUtf(task_data->CurrencyGroupNo); + data["CurrencyNo"] = toUtf(task_data->CurrencyNo); + data["TradeRate"] = task_data->TradeRate; + data["FutureAlg"] = task_data->FutureAlg; + data["OptionAlg"] = task_data->OptionAlg; + data["PreBalance"] = task_data->PreBalance; + data["PreUnExpProfit"] = task_data->PreUnExpProfit; + data["PreLMEPositionProfit"] = task_data->PreLMEPositionProfit; + data["PreEquity"] = task_data->PreEquity; + data["PreAvailable1"] = task_data->PreAvailable1; + data["PreMarketEquity"] = task_data->PreMarketEquity; + data["CashInValue"] = task_data->CashInValue; + data["CashOutValue"] = task_data->CashOutValue; + data["CashAdjustValue"] = task_data->CashAdjustValue; + data["CashPledged"] = task_data->CashPledged; + data["FrozenFee"] = task_data->FrozenFee; + data["FrozenDeposit"] = task_data->FrozenDeposit; + data["AccountFee"] = task_data->AccountFee; + data["SwapInValue"] = task_data->SwapInValue; + data["SwapOutValue"] = task_data->SwapOutValue; + data["PremiumIncome"] = task_data->PremiumIncome; + data["PremiumPay"] = task_data->PremiumPay; + data["CloseProfit"] = task_data->CloseProfit; + data["FrozenFund"] = task_data->FrozenFund; + data["UnExpProfit"] = task_data->UnExpProfit; + data["ExpProfit"] = task_data->ExpProfit; + data["PositionProfit"] = task_data->PositionProfit; + data["LmePositionProfit"] = task_data->LmePositionProfit; + data["OptionMarketValue"] = task_data->OptionMarketValue; + data["AccountIntialMargin"] = task_data->AccountIntialMargin; + data["AccountMaintenanceMargin"] = task_data->AccountMaintenanceMargin; + data["UpperInitalMargin"] = task_data->UpperInitalMargin; + data["UpperMaintenanceMargin"] = task_data->UpperMaintenanceMargin; + data["Discount"] = task_data->Discount; + data["Balance"] = task_data->Balance; + data["Equity"] = task_data->Equity; + data["Available"] = task_data->Available; + data["CanDraw"] = task_data->CanDraw; + data["MarketEquity"] = task_data->MarketEquity; + data["AuthMoney"] = task_data->AuthMoney; + delete task_data; + } + this->onRspQryFund(task->task_id, task->task_int, task->task_last, data); +}; + +void TdApi::processRtnFund(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIFundData *task_data = (TapAPIFundData*)task->task_data; + data["AccountNo"] = toUtf(task_data->AccountNo); + data["CurrencyGroupNo"] = toUtf(task_data->CurrencyGroupNo); + data["CurrencyNo"] = toUtf(task_data->CurrencyNo); + data["TradeRate"] = task_data->TradeRate; + data["FutureAlg"] = task_data->FutureAlg; + data["OptionAlg"] = task_data->OptionAlg; + data["PreBalance"] = task_data->PreBalance; + data["PreUnExpProfit"] = task_data->PreUnExpProfit; + data["PreLMEPositionProfit"] = task_data->PreLMEPositionProfit; + data["PreEquity"] = task_data->PreEquity; + data["PreAvailable1"] = task_data->PreAvailable1; + data["PreMarketEquity"] = task_data->PreMarketEquity; + data["CashInValue"] = task_data->CashInValue; + data["CashOutValue"] = task_data->CashOutValue; + data["CashAdjustValue"] = task_data->CashAdjustValue; + data["CashPledged"] = task_data->CashPledged; + data["FrozenFee"] = task_data->FrozenFee; + data["FrozenDeposit"] = task_data->FrozenDeposit; + data["AccountFee"] = task_data->AccountFee; + data["SwapInValue"] = task_data->SwapInValue; + data["SwapOutValue"] = task_data->SwapOutValue; + data["PremiumIncome"] = task_data->PremiumIncome; + data["PremiumPay"] = task_data->PremiumPay; + data["CloseProfit"] = task_data->CloseProfit; + data["FrozenFund"] = task_data->FrozenFund; + data["UnExpProfit"] = task_data->UnExpProfit; + data["ExpProfit"] = task_data->ExpProfit; + data["PositionProfit"] = task_data->PositionProfit; + data["LmePositionProfit"] = task_data->LmePositionProfit; + data["OptionMarketValue"] = task_data->OptionMarketValue; + data["AccountIntialMargin"] = task_data->AccountIntialMargin; + data["AccountMaintenanceMargin"] = task_data->AccountMaintenanceMargin; + data["UpperInitalMargin"] = task_data->UpperInitalMargin; + data["UpperMaintenanceMargin"] = task_data->UpperMaintenanceMargin; + data["Discount"] = task_data->Discount; + data["Balance"] = task_data->Balance; + data["Equity"] = task_data->Equity; + data["Available"] = task_data->Available; + data["CanDraw"] = task_data->CanDraw; + data["MarketEquity"] = task_data->MarketEquity; + data["AuthMoney"] = task_data->AuthMoney; + delete task_data; + } + this->onRtnFund(data); +}; + +void TdApi::processRspQryExchange(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIExchangeInfo *task_data = (TapAPIExchangeInfo*)task->task_data; + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["ExchangeName"] = toUtf(task_data->ExchangeName); + delete task_data; + } + this->onRspQryExchange(task->task_id, task->task_int, task->task_last, data); +}; + +void TdApi::processRspQryCommodity(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPICommodityInfo *task_data = (TapAPICommodityInfo*)task->task_data; + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["CommodityType"] = task_data->CommodityType; + data["CommodityNo"] = toUtf(task_data->CommodityNo); + data["CommodityName"] = toUtf(task_data->CommodityName); + data["CommodityEngName"] = toUtf(task_data->CommodityEngName); + data["RelateExchangeNo"] = toUtf(task_data->RelateExchangeNo); + data["RelateCommodityType"] = task_data->RelateCommodityType; + data["RelateCommodityNo"] = toUtf(task_data->RelateCommodityNo); + data["RelateExchangeNo2"] = toUtf(task_data->RelateExchangeNo2); + data["RelateCommodityType2"] = task_data->RelateCommodityType2; + data["RelateCommodityNo2"] = toUtf(task_data->RelateCommodityNo2); + data["CurrencyGroupNo"] = toUtf(task_data->CurrencyGroupNo); + data["TradeCurrency"] = toUtf(task_data->TradeCurrency); + data["ContractSize"] = task_data->ContractSize; + data["OpenCloseMode"] = task_data->OpenCloseMode; + data["StrikePriceTimes"] = task_data->StrikePriceTimes; + data["CommodityTickSize"] = task_data->CommodityTickSize; + data["CommodityDenominator"] = task_data->CommodityDenominator; + data["CmbDirect"] = task_data->CmbDirect; + data["DeliveryMode"] = task_data->DeliveryMode; + data["DeliveryDays"] = task_data->DeliveryDays; + data["AddOneTime"] = toUtf(task_data->AddOneTime); + data["CommodityTimeZone"] = task_data->CommodityTimeZone; + data["IsAddOne"] = task_data->IsAddOne; + delete task_data; + } + this->onRspQryCommodity(task->task_id, task->task_int, task->task_last, data); +}; + +void TdApi::processRspQryContract(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPITradeContractInfo *task_data = (TapAPITradeContractInfo*)task->task_data; + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["CommodityType"] = task_data->CommodityType; + data["CommodityNo"] = toUtf(task_data->CommodityNo); + data["ContractNo1"] = toUtf(task_data->ContractNo1); + data["StrikePrice1"] = toUtf(task_data->StrikePrice1); + data["CallOrPutFlag1"] = task_data->CallOrPutFlag1; + data["ContractNo2"] = toUtf(task_data->ContractNo2); + data["StrikePrice2"] = toUtf(task_data->StrikePrice2); + data["CallOrPutFlag2"] = task_data->CallOrPutFlag2; + data["ContractType"] = task_data->ContractType; + data["QuoteUnderlyingContract"] = toUtf(task_data->QuoteUnderlyingContract); + data["ContractName"] = toUtf(task_data->ContractName); + data["ContractExpDate"] = toUtf(task_data->ContractExpDate); + data["LastTradeDate"] = toUtf(task_data->LastTradeDate); + data["FirstNoticeDate"] = toUtf(task_data->FirstNoticeDate); + delete task_data; + } + this->onRspQryContract(task->task_id, task->task_int, task->task_last, data); +}; + +void TdApi::processRtnContract(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPITradeContractInfo *task_data = (TapAPITradeContractInfo*)task->task_data; + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["CommodityType"] = task_data->CommodityType; + data["CommodityNo"] = toUtf(task_data->CommodityNo); + data["ContractNo1"] = toUtf(task_data->ContractNo1); + data["StrikePrice1"] = toUtf(task_data->StrikePrice1); + data["CallOrPutFlag1"] = task_data->CallOrPutFlag1; + data["ContractNo2"] = toUtf(task_data->ContractNo2); + data["StrikePrice2"] = toUtf(task_data->StrikePrice2); + data["CallOrPutFlag2"] = task_data->CallOrPutFlag2; + data["ContractType"] = task_data->ContractType; + data["QuoteUnderlyingContract"] = toUtf(task_data->QuoteUnderlyingContract); + data["ContractName"] = toUtf(task_data->ContractName); + data["ContractExpDate"] = toUtf(task_data->ContractExpDate); + data["LastTradeDate"] = toUtf(task_data->LastTradeDate); + data["FirstNoticeDate"] = toUtf(task_data->FirstNoticeDate); + delete task_data; + } + this->onRtnContract(data); +}; + +void TdApi::processRspOrderAction(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIOrderActionRsp *task_data = (TapAPIOrderActionRsp*)task->task_data; + data["ActionType"] = task_data->ActionType; + data["OrderInfo"] = task_data->OrderInfo; + delete task_data; + } + this->onRspOrderAction(task->task_id, task->task_int, data); +}; + +void TdApi::processRtnOrder(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIOrderInfoNotice *task_data = (TapAPIOrderInfoNotice*)task->task_data; + data["SessionID"] = task_data->SessionID; + data["ErrorCode"] = task_data->ErrorCode; + data["OrderInfo"] = task_data->OrderInfo; + delete task_data; + } + this->onRtnOrder(data); +}; + +void TdApi::processRspQryOrder(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIOrderInfo *task_data = (TapAPIOrderInfo*)task->task_data; + data["AccountNo"] = toUtf(task_data->AccountNo); + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["CommodityType"] = task_data->CommodityType; + data["CommodityNo"] = toUtf(task_data->CommodityNo); + data["ContractNo"] = toUtf(task_data->ContractNo); + data["StrikePrice"] = toUtf(task_data->StrikePrice); + data["CallOrPutFlag"] = task_data->CallOrPutFlag; + data["ContractNo2"] = toUtf(task_data->ContractNo2); + data["StrikePrice2"] = toUtf(task_data->StrikePrice2); + data["CallOrPutFlag2"] = task_data->CallOrPutFlag2; + data["OrderType"] = task_data->OrderType; + data["OrderSource"] = task_data->OrderSource; + data["TimeInForce"] = task_data->TimeInForce; + data["ExpireTime"] = toUtf(task_data->ExpireTime); + data["IsRiskOrder"] = task_data->IsRiskOrder; + data["OrderSide"] = task_data->OrderSide; + data["PositionEffect"] = task_data->PositionEffect; + data["PositionEffect2"] = task_data->PositionEffect2; + data["InquiryNo"] = toUtf(task_data->InquiryNo); + data["HedgeFlag"] = task_data->HedgeFlag; + data["OrderPrice"] = task_data->OrderPrice; + data["OrderPrice2"] = task_data->OrderPrice2; + data["StopPrice"] = task_data->StopPrice; + data["OrderQty"] = task_data->OrderQty; + data["OrderMinQty"] = task_data->OrderMinQty; + data["RefInt"] = task_data->RefInt; + data["RefDouble"] = task_data->RefDouble; + data["RefString"] = toUtf(task_data->RefString); + data["MinClipSize"] = task_data->MinClipSize; + data["MaxClipSize"] = task_data->MaxClipSize; + data["LicenseNo"] = toUtf(task_data->LicenseNo); + data["ServerFlag"] = task_data->ServerFlag; + data["OrderNo"] = toUtf(task_data->OrderNo); + data["ClientOrderNo"] = toUtf(task_data->ClientOrderNo); + data["ClientID"] = toUtf(task_data->ClientID); + data["TacticsType"] = task_data->TacticsType; + data["TriggerCondition"] = task_data->TriggerCondition; + data["TriggerPriceType"] = task_data->TriggerPriceType; + data["AddOneIsValid"] = task_data->AddOneIsValid; + data["ClientLocalIP"] = toUtf(task_data->ClientLocalIP); + data["ClientMac"] = toUtf(task_data->ClientMac); + data["ClientIP"] = toUtf(task_data->ClientIP); + data["OrderStreamID"] = task_data->OrderStreamID; + data["UpperNo"] = toUtf(task_data->UpperNo); + data["UpperChannelNo"] = toUtf(task_data->UpperChannelNo); + data["OrderLocalNo"] = toUtf(task_data->OrderLocalNo); + data["UpperStreamID"] = task_data->UpperStreamID; + data["OrderSystemNo"] = toUtf(task_data->OrderSystemNo); + data["OrderExchangeSystemNo"] = toUtf(task_data->OrderExchangeSystemNo); + data["OrderParentSystemNo"] = toUtf(task_data->OrderParentSystemNo); + data["OrderInsertUserNo"] = toUtf(task_data->OrderInsertUserNo); + data["OrderInsertTime"] = toUtf(task_data->OrderInsertTime); + data["OrderCommandUserNo"] = toUtf(task_data->OrderCommandUserNo); + data["OrderUpdateUserNo"] = toUtf(task_data->OrderUpdateUserNo); + data["OrderUpdateTime"] = toUtf(task_data->OrderUpdateTime); + data["OrderState"] = task_data->OrderState; + data["OrderMatchPrice"] = task_data->OrderMatchPrice; + data["OrderMatchPrice2"] = task_data->OrderMatchPrice2; + data["OrderMatchQty"] = task_data->OrderMatchQty; + data["OrderMatchQty2"] = task_data->OrderMatchQty2; + data["ErrorCode"] = task_data->ErrorCode; + data["ErrorText"] = toUtf(task_data->ErrorText); + data["IsBackInput"] = task_data->IsBackInput; + data["IsDeleted"] = task_data->IsDeleted; + data["IsAddOne"] = task_data->IsAddOne; + delete task_data; + } + this->onRspQryOrder(task->task_id, task->task_int, task->task_last, data); +}; + +void TdApi::processRspQryOrderProcess(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIOrderInfo *task_data = (TapAPIOrderInfo*)task->task_data; + data["AccountNo"] = toUtf(task_data->AccountNo); + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["CommodityType"] = task_data->CommodityType; + data["CommodityNo"] = toUtf(task_data->CommodityNo); + data["ContractNo"] = toUtf(task_data->ContractNo); + data["StrikePrice"] = toUtf(task_data->StrikePrice); + data["CallOrPutFlag"] = task_data->CallOrPutFlag; + data["ContractNo2"] = toUtf(task_data->ContractNo2); + data["StrikePrice2"] = toUtf(task_data->StrikePrice2); + data["CallOrPutFlag2"] = task_data->CallOrPutFlag2; + data["OrderType"] = task_data->OrderType; + data["OrderSource"] = task_data->OrderSource; + data["TimeInForce"] = task_data->TimeInForce; + data["ExpireTime"] = toUtf(task_data->ExpireTime); + data["IsRiskOrder"] = task_data->IsRiskOrder; + data["OrderSide"] = task_data->OrderSide; + data["PositionEffect"] = task_data->PositionEffect; + data["PositionEffect2"] = task_data->PositionEffect2; + data["InquiryNo"] = toUtf(task_data->InquiryNo); + data["HedgeFlag"] = task_data->HedgeFlag; + data["OrderPrice"] = task_data->OrderPrice; + data["OrderPrice2"] = task_data->OrderPrice2; + data["StopPrice"] = task_data->StopPrice; + data["OrderQty"] = task_data->OrderQty; + data["OrderMinQty"] = task_data->OrderMinQty; + data["RefInt"] = task_data->RefInt; + data["RefDouble"] = task_data->RefDouble; + data["RefString"] = toUtf(task_data->RefString); + data["MinClipSize"] = task_data->MinClipSize; + data["MaxClipSize"] = task_data->MaxClipSize; + data["LicenseNo"] = toUtf(task_data->LicenseNo); + data["ServerFlag"] = task_data->ServerFlag; + data["OrderNo"] = toUtf(task_data->OrderNo); + data["ClientOrderNo"] = toUtf(task_data->ClientOrderNo); + data["ClientID"] = toUtf(task_data->ClientID); + data["TacticsType"] = task_data->TacticsType; + data["TriggerCondition"] = task_data->TriggerCondition; + data["TriggerPriceType"] = task_data->TriggerPriceType; + data["AddOneIsValid"] = task_data->AddOneIsValid; + data["ClientLocalIP"] = toUtf(task_data->ClientLocalIP); + data["ClientMac"] = toUtf(task_data->ClientMac); + data["ClientIP"] = toUtf(task_data->ClientIP); + data["OrderStreamID"] = task_data->OrderStreamID; + data["UpperNo"] = toUtf(task_data->UpperNo); + data["UpperChannelNo"] = toUtf(task_data->UpperChannelNo); + data["OrderLocalNo"] = toUtf(task_data->OrderLocalNo); + data["UpperStreamID"] = task_data->UpperStreamID; + data["OrderSystemNo"] = toUtf(task_data->OrderSystemNo); + data["OrderExchangeSystemNo"] = toUtf(task_data->OrderExchangeSystemNo); + data["OrderParentSystemNo"] = toUtf(task_data->OrderParentSystemNo); + data["OrderInsertUserNo"] = toUtf(task_data->OrderInsertUserNo); + data["OrderInsertTime"] = toUtf(task_data->OrderInsertTime); + data["OrderCommandUserNo"] = toUtf(task_data->OrderCommandUserNo); + data["OrderUpdateUserNo"] = toUtf(task_data->OrderUpdateUserNo); + data["OrderUpdateTime"] = toUtf(task_data->OrderUpdateTime); + data["OrderState"] = task_data->OrderState; + data["OrderMatchPrice"] = task_data->OrderMatchPrice; + data["OrderMatchPrice2"] = task_data->OrderMatchPrice2; + data["OrderMatchQty"] = task_data->OrderMatchQty; + data["OrderMatchQty2"] = task_data->OrderMatchQty2; + data["ErrorCode"] = task_data->ErrorCode; + data["ErrorText"] = toUtf(task_data->ErrorText); + data["IsBackInput"] = task_data->IsBackInput; + data["IsDeleted"] = task_data->IsDeleted; + data["IsAddOne"] = task_data->IsAddOne; + delete task_data; + } + this->onRspQryOrderProcess(task->task_id, task->task_int, task->task_last, data); +}; + +void TdApi::processRspQryFill(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIFillInfo *task_data = (TapAPIFillInfo*)task->task_data; + data["AccountNo"] = toUtf(task_data->AccountNo); + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["CommodityType"] = task_data->CommodityType; + data["CommodityNo"] = toUtf(task_data->CommodityNo); + data["ContractNo"] = toUtf(task_data->ContractNo); + data["StrikePrice"] = toUtf(task_data->StrikePrice); + data["CallOrPutFlag"] = task_data->CallOrPutFlag; + data["MatchSource"] = task_data->MatchSource; + data["MatchSide"] = task_data->MatchSide; + data["PositionEffect"] = task_data->PositionEffect; + data["ServerFlag"] = task_data->ServerFlag; + data["OrderNo"] = toUtf(task_data->OrderNo); + data["OrderSystemNo"] = toUtf(task_data->OrderSystemNo); + data["MatchNo"] = toUtf(task_data->MatchNo); + data["UpperMatchNo"] = toUtf(task_data->UpperMatchNo); + data["ExchangeMatchNo"] = toUtf(task_data->ExchangeMatchNo); + data["MatchDateTime"] = toUtf(task_data->MatchDateTime); + data["UpperMatchDateTime"] = toUtf(task_data->UpperMatchDateTime); + data["UpperNo"] = toUtf(task_data->UpperNo); + data["MatchPrice"] = task_data->MatchPrice; + data["MatchQty"] = task_data->MatchQty; + data["IsDeleted"] = task_data->IsDeleted; + data["IsAddOne"] = task_data->IsAddOne; + data["FeeCurrencyGroup"] = toUtf(task_data->FeeCurrencyGroup); + data["FeeCurrency"] = toUtf(task_data->FeeCurrency); + data["FeeValue"] = task_data->FeeValue; + data["IsManualFee"] = task_data->IsManualFee; + data["ClosePrositionPrice"] = task_data->ClosePrositionPrice; + delete task_data; + } + this->onRspQryFill(task->task_id, task->task_int, task->task_last, data); +}; + +void TdApi::processRtnFill(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIFillInfo *task_data = (TapAPIFillInfo*)task->task_data; + data["AccountNo"] = toUtf(task_data->AccountNo); + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["CommodityType"] = task_data->CommodityType; + data["CommodityNo"] = toUtf(task_data->CommodityNo); + data["ContractNo"] = toUtf(task_data->ContractNo); + data["StrikePrice"] = toUtf(task_data->StrikePrice); + data["CallOrPutFlag"] = task_data->CallOrPutFlag; + data["MatchSource"] = task_data->MatchSource; + data["MatchSide"] = task_data->MatchSide; + data["PositionEffect"] = task_data->PositionEffect; + data["ServerFlag"] = task_data->ServerFlag; + data["OrderNo"] = toUtf(task_data->OrderNo); + data["OrderSystemNo"] = toUtf(task_data->OrderSystemNo); + data["MatchNo"] = toUtf(task_data->MatchNo); + data["UpperMatchNo"] = toUtf(task_data->UpperMatchNo); + data["ExchangeMatchNo"] = toUtf(task_data->ExchangeMatchNo); + data["MatchDateTime"] = toUtf(task_data->MatchDateTime); + data["UpperMatchDateTime"] = toUtf(task_data->UpperMatchDateTime); + data["UpperNo"] = toUtf(task_data->UpperNo); + data["MatchPrice"] = task_data->MatchPrice; + data["MatchQty"] = task_data->MatchQty; + data["IsDeleted"] = task_data->IsDeleted; + data["IsAddOne"] = task_data->IsAddOne; + data["FeeCurrencyGroup"] = toUtf(task_data->FeeCurrencyGroup); + data["FeeCurrency"] = toUtf(task_data->FeeCurrency); + data["FeeValue"] = task_data->FeeValue; + data["IsManualFee"] = task_data->IsManualFee; + data["ClosePrositionPrice"] = task_data->ClosePrositionPrice; + delete task_data; + } + this->onRtnFill(data); +}; + +void TdApi::processRspQryPosition(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIPositionInfo *task_data = (TapAPIPositionInfo*)task->task_data; + data["AccountNo"] = toUtf(task_data->AccountNo); + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["CommodityType"] = task_data->CommodityType; + data["CommodityNo"] = toUtf(task_data->CommodityNo); + data["ContractNo"] = toUtf(task_data->ContractNo); + data["StrikePrice"] = toUtf(task_data->StrikePrice); + data["CallOrPutFlag"] = task_data->CallOrPutFlag; + data["MatchSide"] = task_data->MatchSide; + data["HedgeFlag"] = task_data->HedgeFlag; + data["PositionNo"] = toUtf(task_data->PositionNo); + data["ServerFlag"] = task_data->ServerFlag; + data["OrderNo"] = toUtf(task_data->OrderNo); + data["MatchNo"] = toUtf(task_data->MatchNo); + data["UpperNo"] = toUtf(task_data->UpperNo); + data["PositionPrice"] = task_data->PositionPrice; + data["PositionQty"] = task_data->PositionQty; + data["PositionStreamId"] = task_data->PositionStreamId; + data["CommodityCurrencyGroup"] = toUtf(task_data->CommodityCurrencyGroup); + data["CommodityCurrency"] = toUtf(task_data->CommodityCurrency); + data["CalculatePrice"] = task_data->CalculatePrice; + data["AccountInitialMargin"] = task_data->AccountInitialMargin; + data["AccountMaintenanceMargin"] = task_data->AccountMaintenanceMargin; + data["UpperInitialMargin"] = task_data->UpperInitialMargin; + data["UpperMaintenanceMargin"] = task_data->UpperMaintenanceMargin; + data["PositionProfit"] = task_data->PositionProfit; + data["LMEPositionProfit"] = task_data->LMEPositionProfit; + data["OptionMarketValue"] = task_data->OptionMarketValue; + data["IsHistory"] = task_data->IsHistory; + delete task_data; + } + this->onRspQryPosition(task->task_id, task->task_int, task->task_last, data); +}; + +void TdApi::processRtnPosition(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIPositionInfo *task_data = (TapAPIPositionInfo*)task->task_data; + data["AccountNo"] = toUtf(task_data->AccountNo); + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["CommodityType"] = task_data->CommodityType; + data["CommodityNo"] = toUtf(task_data->CommodityNo); + data["ContractNo"] = toUtf(task_data->ContractNo); + data["StrikePrice"] = toUtf(task_data->StrikePrice); + data["CallOrPutFlag"] = task_data->CallOrPutFlag; + data["MatchSide"] = task_data->MatchSide; + data["HedgeFlag"] = task_data->HedgeFlag; + data["PositionNo"] = toUtf(task_data->PositionNo); + data["ServerFlag"] = task_data->ServerFlag; + data["OrderNo"] = toUtf(task_data->OrderNo); + data["MatchNo"] = toUtf(task_data->MatchNo); + data["UpperNo"] = toUtf(task_data->UpperNo); + data["PositionPrice"] = task_data->PositionPrice; + data["PositionQty"] = task_data->PositionQty; + data["PositionStreamId"] = task_data->PositionStreamId; + data["CommodityCurrencyGroup"] = toUtf(task_data->CommodityCurrencyGroup); + data["CommodityCurrency"] = toUtf(task_data->CommodityCurrency); + data["CalculatePrice"] = task_data->CalculatePrice; + data["AccountInitialMargin"] = task_data->AccountInitialMargin; + data["AccountMaintenanceMargin"] = task_data->AccountMaintenanceMargin; + data["UpperInitialMargin"] = task_data->UpperInitialMargin; + data["UpperMaintenanceMargin"] = task_data->UpperMaintenanceMargin; + data["PositionProfit"] = task_data->PositionProfit; + data["LMEPositionProfit"] = task_data->LMEPositionProfit; + data["OptionMarketValue"] = task_data->OptionMarketValue; + data["IsHistory"] = task_data->IsHistory; + delete task_data; + } + this->onRtnPosition(data); +}; + +void TdApi::processRspQryPositionSummary(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIPositionSummary *task_data = (TapAPIPositionSummary*)task->task_data; + data["AccountNo"] = toUtf(task_data->AccountNo); + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["CommodityType"] = task_data->CommodityType; + data["CommodityNo"] = toUtf(task_data->CommodityNo); + data["ContractNo"] = toUtf(task_data->ContractNo); + data["StrikePrice"] = toUtf(task_data->StrikePrice); + data["CallOrPutFlag"] = task_data->CallOrPutFlag; + data["MatchSide"] = task_data->MatchSide; + data["PositionPrice"] = task_data->PositionPrice; + data["PositionQty"] = task_data->PositionQty; + data["HisPositionQty"] = task_data->HisPositionQty; + delete task_data; + } + this->onRspQryPositionSummary(task->task_id, task->task_int, task->task_last, data); +}; + +void TdApi::processRtnPositionSummary(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIPositionSummary *task_data = (TapAPIPositionSummary*)task->task_data; + data["AccountNo"] = toUtf(task_data->AccountNo); + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["CommodityType"] = task_data->CommodityType; + data["CommodityNo"] = toUtf(task_data->CommodityNo); + data["ContractNo"] = toUtf(task_data->ContractNo); + data["StrikePrice"] = toUtf(task_data->StrikePrice); + data["CallOrPutFlag"] = task_data->CallOrPutFlag; + data["MatchSide"] = task_data->MatchSide; + data["PositionPrice"] = task_data->PositionPrice; + data["PositionQty"] = task_data->PositionQty; + data["HisPositionQty"] = task_data->HisPositionQty; + delete task_data; + } + this->onRtnPositionSummary(data); +}; + +void TdApi::processRtnPositionProfit(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIPositionProfitNotice *task_data = (TapAPIPositionProfitNotice*)task->task_data; + data["IsLast"] = task_data->IsLast; + data["Data"] = task_data->Data; + delete task_data; + } + this->onRtnPositionProfit(data); +}; + +void TdApi::processRspQryCurrency(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPICurrencyInfo *task_data = (TapAPICurrencyInfo*)task->task_data; + data["CurrencyNo"] = toUtf(task_data->CurrencyNo); + data["CurrencyGroupNo"] = toUtf(task_data->CurrencyGroupNo); + data["TradeRate"] = task_data->TradeRate; + data["TradeRate2"] = task_data->TradeRate2; + data["FutureAlg"] = task_data->FutureAlg; + data["OptionAlg"] = task_data->OptionAlg; + delete task_data; + } + this->onRspQryCurrency(task->task_id, task->task_int, task->task_last, data); +}; + +void TdApi::processRspQryTradeMessage(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPITradeMessage *task_data = (TapAPITradeMessage*)task->task_data; + data["SerialID"] = task_data->SerialID; + data["AccountNo"] = toUtf(task_data->AccountNo); + data["TMsgValidDateTime"] = toUtf(task_data->TMsgValidDateTime); + data["TMsgTitle"] = toUtf(task_data->TMsgTitle); + data["TMsgContent"] = toUtf(task_data->TMsgContent); + data["TMsgType"] = task_data->TMsgType; + data["TMsgLevel"] = task_data->TMsgLevel; + data["IsSendBySMS"] = task_data->IsSendBySMS; + data["IsSendByEMail"] = task_data->IsSendByEMail; + data["Sender"] = toUtf(task_data->Sender); + data["SendDateTime"] = toUtf(task_data->SendDateTime); + delete task_data; + } + this->onRspQryTradeMessage(task->task_id, task->task_int, task->task_last, data); +}; + +void TdApi::processRtnTradeMessage(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPITradeMessage *task_data = (TapAPITradeMessage*)task->task_data; + data["SerialID"] = task_data->SerialID; + data["AccountNo"] = toUtf(task_data->AccountNo); + data["TMsgValidDateTime"] = toUtf(task_data->TMsgValidDateTime); + data["TMsgTitle"] = toUtf(task_data->TMsgTitle); + data["TMsgContent"] = toUtf(task_data->TMsgContent); + data["TMsgType"] = task_data->TMsgType; + data["TMsgLevel"] = task_data->TMsgLevel; + data["IsSendBySMS"] = task_data->IsSendBySMS; + data["IsSendByEMail"] = task_data->IsSendByEMail; + data["Sender"] = toUtf(task_data->Sender); + data["SendDateTime"] = toUtf(task_data->SendDateTime); + delete task_data; + } + this->onRtnTradeMessage(data); +}; + +void TdApi::processRspQryHisOrder(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIHisOrderQryRsp *task_data = (TapAPIHisOrderQryRsp*)task->task_data; + data["Date"] = toUtf(task_data->Date); + data["AccountNo"] = toUtf(task_data->AccountNo); + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["CommodityType"] = task_data->CommodityType; + data["CommodityNo"] = toUtf(task_data->CommodityNo); + data["ContractNo"] = toUtf(task_data->ContractNo); + data["StrikePrice"] = toUtf(task_data->StrikePrice); + data["CallOrPutFlag"] = task_data->CallOrPutFlag; + data["ContractNo2"] = toUtf(task_data->ContractNo2); + data["StrikePrice2"] = toUtf(task_data->StrikePrice2); + data["CallOrPutFlag2"] = task_data->CallOrPutFlag2; + data["OrderType"] = task_data->OrderType; + data["OrderSource"] = task_data->OrderSource; + data["TimeInForce"] = task_data->TimeInForce; + data["ExpireTime"] = toUtf(task_data->ExpireTime); + data["IsRiskOrder"] = task_data->IsRiskOrder; + data["OrderSide"] = task_data->OrderSide; + data["PositionEffect"] = task_data->PositionEffect; + data["PositionEffect2"] = task_data->PositionEffect2; + data["InquiryNo"] = toUtf(task_data->InquiryNo); + data["HedgeFlag"] = task_data->HedgeFlag; + data["OrderPrice"] = task_data->OrderPrice; + data["OrderPrice2"] = task_data->OrderPrice2; + data["StopPrice"] = task_data->StopPrice; + data["OrderQty"] = task_data->OrderQty; + data["OrderMinQty"] = task_data->OrderMinQty; + data["OrderCanceledQty"] = task_data->OrderCanceledQty; + data["RefInt"] = task_data->RefInt; + data["RefDouble"] = task_data->RefDouble; + data["RefString"] = toUtf(task_data->RefString); + data["ServerFlag"] = task_data->ServerFlag; + data["OrderNo"] = toUtf(task_data->OrderNo); + data["OrderStreamID"] = task_data->OrderStreamID; + data["UpperNo"] = toUtf(task_data->UpperNo); + data["UpperChannelNo"] = toUtf(task_data->UpperChannelNo); + data["OrderLocalNo"] = toUtf(task_data->OrderLocalNo); + data["UpperStreamID"] = task_data->UpperStreamID; + data["OrderSystemNo"] = toUtf(task_data->OrderSystemNo); + data["OrderExchangeSystemNo"] = toUtf(task_data->OrderExchangeSystemNo); + data["OrderParentSystemNo"] = toUtf(task_data->OrderParentSystemNo); + data["OrderInsertUserNo"] = toUtf(task_data->OrderInsertUserNo); + data["OrderInsertTime"] = toUtf(task_data->OrderInsertTime); + data["OrderCommandUserNo"] = toUtf(task_data->OrderCommandUserNo); + data["OrderUpdateUserNo"] = toUtf(task_data->OrderUpdateUserNo); + data["OrderUpdateTime"] = toUtf(task_data->OrderUpdateTime); + data["OrderState"] = task_data->OrderState; + data["OrderMatchPrice"] = task_data->OrderMatchPrice; + data["OrderMatchPrice2"] = task_data->OrderMatchPrice2; + data["OrderMatchQty"] = task_data->OrderMatchQty; + data["OrderMatchQty2"] = task_data->OrderMatchQty2; + data["ErrorCode"] = task_data->ErrorCode; + data["ErrorText"] = toUtf(task_data->ErrorText); + data["IsBackInput"] = task_data->IsBackInput; + data["IsDeleted"] = task_data->IsDeleted; + data["IsAddOne"] = task_data->IsAddOne; + data["AddOneIsValid"] = task_data->AddOneIsValid; + data["MinClipSize"] = task_data->MinClipSize; + data["MaxClipSize"] = task_data->MaxClipSize; + data["LicenseNo"] = toUtf(task_data->LicenseNo); + data["TacticsType"] = task_data->TacticsType; + data["TriggerCondition"] = task_data->TriggerCondition; + data["TriggerPriceType"] = task_data->TriggerPriceType; + delete task_data; + } + this->onRspQryHisOrder(task->task_id, task->task_int, task->task_last, data); +}; + +void TdApi::processRspQryHisOrderProcess(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIHisOrderProcessQryRsp *task_data = (TapAPIHisOrderProcessQryRsp*)task->task_data; + data["Date"] = toUtf(task_data->Date); + data["AccountNo"] = toUtf(task_data->AccountNo); + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["CommodityType"] = task_data->CommodityType; + data["CommodityNo"] = toUtf(task_data->CommodityNo); + data["ContractNo"] = toUtf(task_data->ContractNo); + data["StrikePrice"] = toUtf(task_data->StrikePrice); + data["CallOrPutFlag"] = task_data->CallOrPutFlag; + data["ContractNo2"] = toUtf(task_data->ContractNo2); + data["StrikePrice2"] = toUtf(task_data->StrikePrice2); + data["CallOrPutFlag2"] = task_data->CallOrPutFlag2; + data["OrderType"] = task_data->OrderType; + data["OrderSource"] = task_data->OrderSource; + data["TimeInForce"] = task_data->TimeInForce; + data["ExpireTime"] = toUtf(task_data->ExpireTime); + data["IsRiskOrder"] = task_data->IsRiskOrder; + data["OrderSide"] = task_data->OrderSide; + data["PositionEffect"] = task_data->PositionEffect; + data["PositionEffect2"] = task_data->PositionEffect2; + data["InquiryNo"] = toUtf(task_data->InquiryNo); + data["HedgeFlag"] = task_data->HedgeFlag; + data["OrderPrice"] = task_data->OrderPrice; + data["OrderPrice2"] = task_data->OrderPrice2; + data["StopPrice"] = task_data->StopPrice; + data["OrderQty"] = task_data->OrderQty; + data["OrderMinQty"] = task_data->OrderMinQty; + data["OrderCanceledQty"] = task_data->OrderCanceledQty; + data["RefInt"] = task_data->RefInt; + data["RefDouble"] = task_data->RefDouble; + data["RefString"] = toUtf(task_data->RefString); + data["ServerFlag"] = task_data->ServerFlag; + data["OrderNo"] = toUtf(task_data->OrderNo); + data["OrderStreamID"] = task_data->OrderStreamID; + data["UpperNo"] = toUtf(task_data->UpperNo); + data["UpperChannelNo"] = toUtf(task_data->UpperChannelNo); + data["OrderLocalNo"] = toUtf(task_data->OrderLocalNo); + data["UpperStreamID"] = task_data->UpperStreamID; + data["OrderSystemNo"] = toUtf(task_data->OrderSystemNo); + data["OrderExchangeSystemNo"] = toUtf(task_data->OrderExchangeSystemNo); + data["OrderParentSystemNo"] = toUtf(task_data->OrderParentSystemNo); + data["OrderInsertUserNo"] = toUtf(task_data->OrderInsertUserNo); + data["OrderInsertTime"] = toUtf(task_data->OrderInsertTime); + data["OrderCommandUserNo"] = toUtf(task_data->OrderCommandUserNo); + data["OrderUpdateUserNo"] = toUtf(task_data->OrderUpdateUserNo); + data["OrderUpdateTime"] = toUtf(task_data->OrderUpdateTime); + data["OrderState"] = task_data->OrderState; + data["OrderMatchPrice"] = task_data->OrderMatchPrice; + data["OrderMatchPrice2"] = task_data->OrderMatchPrice2; + data["OrderMatchQty"] = task_data->OrderMatchQty; + data["OrderMatchQty2"] = task_data->OrderMatchQty2; + data["ErrorCode"] = task_data->ErrorCode; + data["ErrorText"] = toUtf(task_data->ErrorText); + data["IsBackInput"] = task_data->IsBackInput; + data["IsDeleted"] = task_data->IsDeleted; + data["IsAddOne"] = task_data->IsAddOne; + data["AddOneIsValid"] = task_data->AddOneIsValid; + data["MinClipSize"] = task_data->MinClipSize; + data["MaxClipSize"] = task_data->MaxClipSize; + data["LicenseNo"] = toUtf(task_data->LicenseNo); + data["TacticsType"] = task_data->TacticsType; + data["TriggerCondition"] = task_data->TriggerCondition; + data["TriggerPriceType"] = task_data->TriggerPriceType; + delete task_data; + } + this->onRspQryHisOrderProcess(task->task_id, task->task_int, task->task_last, data); +}; + +void TdApi::processRspQryHisMatch(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIHisMatchQryRsp *task_data = (TapAPIHisMatchQryRsp*)task->task_data; + data["SettleDate"] = toUtf(task_data->SettleDate); + data["TradeDate"] = toUtf(task_data->TradeDate); + data["AccountNo"] = toUtf(task_data->AccountNo); + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["CommodityType"] = task_data->CommodityType; + data["CommodityNo"] = toUtf(task_data->CommodityNo); + data["ContractNo"] = toUtf(task_data->ContractNo); + data["StrikePrice"] = toUtf(task_data->StrikePrice); + data["CallOrPutFlag"] = task_data->CallOrPutFlag; + data["MatchSource"] = task_data->MatchSource; + data["MatchSide"] = task_data->MatchSide; + data["PositionEffect"] = task_data->PositionEffect; + data["HedgeFlag"] = task_data->HedgeFlag; + data["MatchPrice"] = task_data->MatchPrice; + data["MatchQty"] = task_data->MatchQty; + data["OrderNo"] = toUtf(task_data->OrderNo); + data["MatchNo"] = toUtf(task_data->MatchNo); + data["MatchStreamID"] = task_data->MatchStreamID; + data["UpperNo"] = toUtf(task_data->UpperNo); + data["MatchCmbNo"] = toUtf(task_data->MatchCmbNo); + data["ExchangeMatchNo"] = toUtf(task_data->ExchangeMatchNo); + data["MatchUpperStreamID"] = task_data->MatchUpperStreamID; + data["CommodityCurrencyGroup"] = toUtf(task_data->CommodityCurrencyGroup); + data["CommodityCurrency"] = toUtf(task_data->CommodityCurrency); + data["Turnover"] = task_data->Turnover; + data["PremiumIncome"] = task_data->PremiumIncome; + data["PremiumPay"] = task_data->PremiumPay; + data["AccountFee"] = task_data->AccountFee; + data["AccountFeeCurrencyGroup"] = toUtf(task_data->AccountFeeCurrencyGroup); + data["AccountFeeCurrency"] = toUtf(task_data->AccountFeeCurrency); + data["IsManualFee"] = task_data->IsManualFee; + data["AccountOtherFee"] = task_data->AccountOtherFee; + data["UpperFee"] = task_data->UpperFee; + data["UpperFeeCurrencyGroup"] = toUtf(task_data->UpperFeeCurrencyGroup); + data["UpperFeeCurrency"] = toUtf(task_data->UpperFeeCurrency); + data["IsUpperManualFee"] = task_data->IsUpperManualFee; + data["UpperOtherFee"] = task_data->UpperOtherFee; + data["MatchDateTime"] = toUtf(task_data->MatchDateTime); + data["UpperMatchDateTime"] = toUtf(task_data->UpperMatchDateTime); + data["CloseProfit"] = task_data->CloseProfit; + data["ClosePrice"] = task_data->ClosePrice; + data["CloseQty"] = task_data->CloseQty; + data["SettleGroupNo"] = toUtf(task_data->SettleGroupNo); + data["OperatorNo"] = toUtf(task_data->OperatorNo); + data["OperateTime"] = toUtf(task_data->OperateTime); + delete task_data; + } + this->onRspQryHisMatch(task->task_id, task->task_int, task->task_last, data); +}; + +void TdApi::processRspQryHisPosition(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIHisPositionQryRsp *task_data = (TapAPIHisPositionQryRsp*)task->task_data; + data["SettleDate"] = toUtf(task_data->SettleDate); + data["OpenDate"] = toUtf(task_data->OpenDate); + data["AccountNo"] = toUtf(task_data->AccountNo); + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["CommodityType"] = task_data->CommodityType; + data["CommodityNo"] = toUtf(task_data->CommodityNo); + data["ContractNo"] = toUtf(task_data->ContractNo); + data["StrikePrice"] = toUtf(task_data->StrikePrice); + data["CallOrPutFlag"] = task_data->CallOrPutFlag; + data["MatchSide"] = task_data->MatchSide; + data["HedgeFlag"] = task_data->HedgeFlag; + data["PositionPrice"] = task_data->PositionPrice; + data["PositionQty"] = task_data->PositionQty; + data["OrderNo"] = toUtf(task_data->OrderNo); + data["PositionNo"] = toUtf(task_data->PositionNo); + data["UpperNo"] = toUtf(task_data->UpperNo); + data["CurrencyGroup"] = toUtf(task_data->CurrencyGroup); + data["Currency"] = toUtf(task_data->Currency); + data["PreSettlePrice"] = task_data->PreSettlePrice; + data["SettlePrice"] = task_data->SettlePrice; + data["PositionDProfit"] = task_data->PositionDProfit; + data["LMEPositionProfit"] = task_data->LMEPositionProfit; + data["OptionMarketValue"] = task_data->OptionMarketValue; + data["AccountInitialMargin"] = task_data->AccountInitialMargin; + data["AccountMaintenanceMargin"] = task_data->AccountMaintenanceMargin; + data["UpperInitialMargin"] = task_data->UpperInitialMargin; + data["UpperMaintenanceMargin"] = task_data->UpperMaintenanceMargin; + data["SettleGroupNo"] = toUtf(task_data->SettleGroupNo); + delete task_data; + } + this->onRspQryHisPosition(task->task_id, task->task_int, task->task_last, data); +}; + +void TdApi::processRspQryHisDelivery(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIHisDeliveryQryRsp *task_data = (TapAPIHisDeliveryQryRsp*)task->task_data; + data["DeliveryDate"] = toUtf(task_data->DeliveryDate); + data["OpenDate"] = toUtf(task_data->OpenDate); + data["AccountNo"] = toUtf(task_data->AccountNo); + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["CommodityType"] = task_data->CommodityType; + data["CommodityNo"] = toUtf(task_data->CommodityNo); + data["ContractNo"] = toUtf(task_data->ContractNo); + data["StrikePrice"] = toUtf(task_data->StrikePrice); + data["CallOrPutFlag"] = task_data->CallOrPutFlag; + data["MatchSource"] = task_data->MatchSource; + data["OpenSide"] = task_data->OpenSide; + data["OpenPrice"] = task_data->OpenPrice; + data["DeliveryPrice"] = task_data->DeliveryPrice; + data["DeliveryQty"] = task_data->DeliveryQty; + data["FrozenQty"] = task_data->FrozenQty; + data["OpenNo"] = toUtf(task_data->OpenNo); + data["UpperNo"] = toUtf(task_data->UpperNo); + data["CommodityCurrencyGroupy"] = toUtf(task_data->CommodityCurrencyGroupy); + data["CommodityCurrency"] = toUtf(task_data->CommodityCurrency); + data["PreSettlePrice"] = task_data->PreSettlePrice; + data["DeliveryProfit"] = task_data->DeliveryProfit; + data["AccountFrozenInitialMargin"] = task_data->AccountFrozenInitialMargin; + data["AccountFrozenMaintenanceMargin"] = task_data->AccountFrozenMaintenanceMargin; + data["UpperFrozenInitialMargin"] = task_data->UpperFrozenInitialMargin; + data["UpperFrozenMaintenanceMargin"] = task_data->UpperFrozenMaintenanceMargin; + data["AccountFeeCurrencyGroup"] = toUtf(task_data->AccountFeeCurrencyGroup); + data["AccountFeeCurrency"] = toUtf(task_data->AccountFeeCurrency); + data["AccountDeliveryFee"] = task_data->AccountDeliveryFee; + data["UpperFeeCurrencyGroup"] = toUtf(task_data->UpperFeeCurrencyGroup); + data["UpperFeeCurrency"] = toUtf(task_data->UpperFeeCurrency); + data["UpperDeliveryFee"] = task_data->UpperDeliveryFee; + data["DeliveryMode"] = task_data->DeliveryMode; + data["OperatorNo"] = toUtf(task_data->OperatorNo); + data["OperateTime"] = toUtf(task_data->OperateTime); + data["SettleGourpNo"] = toUtf(task_data->SettleGourpNo); + delete task_data; + } + this->onRspQryHisDelivery(task->task_id, task->task_int, task->task_last, data); +}; + +void TdApi::processRspQryAccountCashAdjust(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIAccountCashAdjustQryRsp *task_data = (TapAPIAccountCashAdjustQryRsp*)task->task_data; + data["Date"] = toUtf(task_data->Date); + data["AccountNo"] = toUtf(task_data->AccountNo); + data["CashAdjustType"] = task_data->CashAdjustType; + data["CurrencyGroupNo"] = toUtf(task_data->CurrencyGroupNo); + data["CurrencyNo"] = toUtf(task_data->CurrencyNo); + data["CashAdjustValue"] = task_data->CashAdjustValue; + data["CashAdjustRemark"] = toUtf(task_data->CashAdjustRemark); + data["OperateTime"] = toUtf(task_data->OperateTime); + data["OperatorNo"] = toUtf(task_data->OperatorNo); + data["AccountBank"] = toUtf(task_data->AccountBank); + data["BankAccount"] = toUtf(task_data->BankAccount); + data["AccountLWFlag"] = task_data->AccountLWFlag; + data["CompanyBank"] = toUtf(task_data->CompanyBank); + data["InternalBankAccount"] = toUtf(task_data->InternalBankAccount); + data["CompanyLWFlag"] = task_data->CompanyLWFlag; + delete task_data; + } + this->onRspQryAccountCashAdjust(task->task_id, task->task_int, task->task_last, data); +}; + +void TdApi::processRspQryBill(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIBillQryRsp *task_data = (TapAPIBillQryRsp*)task->task_data; + data["Reqdata"] = task_data->Reqdata; + data["BillLen"] = task_data->BillLen; + data["BillText"] = task_data->BillText; + delete task_data; + } + this->onRspQryBill(task->task_id, task->task_int, task->task_last, data); +}; + +void TdApi::processRspQryAccountFeeRent(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIAccountFeeRentQryRsp *task_data = (TapAPIAccountFeeRentQryRsp*)task->task_data; + data["AccountNo"] = toUtf(task_data->AccountNo); + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["CommodityType"] = task_data->CommodityType; + data["CommodityNo"] = toUtf(task_data->CommodityNo); + data["MatchSource"] = task_data->MatchSource; + data["CalculateMode"] = task_data->CalculateMode; + data["CurrencyGroupNo"] = toUtf(task_data->CurrencyGroupNo); + data["CurrencyNo"] = toUtf(task_data->CurrencyNo); + data["OpenCloseFee"] = task_data->OpenCloseFee; + data["CloseTodayFee"] = task_data->CloseTodayFee; + delete task_data; + } + this->onRspQryAccountFeeRent(task->task_id, task->task_int, task->task_last, data); +}; + +void TdApi::processRspQryAccountMarginRent(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIAccountMarginRentQryRsp *task_data = (TapAPIAccountMarginRentQryRsp*)task->task_data; + data["AccountNo"] = toUtf(task_data->AccountNo); + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["CommodityType"] = task_data->CommodityType; + data["CommodityNo"] = toUtf(task_data->CommodityNo); + data["ContractNo"] = toUtf(task_data->ContractNo); + data["StrikePrice"] = toUtf(task_data->StrikePrice); + data["CallOrPutFlag"] = task_data->CallOrPutFlag; + data["CalculateMode"] = task_data->CalculateMode; + data["CurrencyGroupNo"] = toUtf(task_data->CurrencyGroupNo); + data["CurrencyNo"] = toUtf(task_data->CurrencyNo); + data["InitialMargin"] = task_data->InitialMargin; + data["MaintenanceMargin"] = task_data->MaintenanceMargin; + data["SellInitialMargin"] = task_data->SellInitialMargin; + data["SellMaintenanceMargin"] = task_data->SellMaintenanceMargin; + data["LockMargin"] = task_data->LockMargin; + delete task_data; + } + this->onRspQryAccountMarginRent(task->task_id, task->task_int, task->task_last, data); +}; + +void TdApi::processRspHKMarketOrderInsert(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIOrderMarketInsertRsp *task_data = (TapAPIOrderMarketInsertRsp*)task->task_data; + data["AccountNo"] = toUtf(task_data->AccountNo); + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["CommodityType"] = task_data->CommodityType; + data["CommodityNo"] = toUtf(task_data->CommodityNo); + data["ContractNo"] = toUtf(task_data->ContractNo); + data["StrikePrice"] = toUtf(task_data->StrikePrice); + data["CallOrPutFlag"] = task_data->CallOrPutFlag; + data["OrderType"] = task_data->OrderType; + data["TimeInForce"] = task_data->TimeInForce; + data["ExpireTime"] = toUtf(task_data->ExpireTime); + data["OrderSource"] = task_data->OrderSource; + data["BuyPositionEffect"] = task_data->BuyPositionEffect; + data["SellPositionEffect"] = task_data->SellPositionEffect; + data["OrderBuyPrice"] = task_data->OrderBuyPrice; + data["OrderSellPrice"] = task_data->OrderSellPrice; + data["OrderBuyQty"] = task_data->OrderBuyQty; + data["OrderSellQty"] = task_data->OrderSellQty; + data["ServerFlag"] = task_data->ServerFlag; + data["OrderBuyNo"] = toUtf(task_data->OrderBuyNo); + data["OrderSellNo"] = toUtf(task_data->OrderSellNo); + data["AddOneIsValid"] = task_data->AddOneIsValid; + data["OrderMarketUserNo"] = toUtf(task_data->OrderMarketUserNo); + data["OrderMarketTime"] = toUtf(task_data->OrderMarketTime); + data["RefInt"] = task_data->RefInt; + data["RefDouble"] = task_data->RefDouble; + data["RefString"] = toUtf(task_data->RefString); + data["ClientBuyOrderNo"] = toUtf(task_data->ClientBuyOrderNo); + data["ClientSellOrderNo"] = toUtf(task_data->ClientSellOrderNo); + data["ErrorCode"] = task_data->ErrorCode; + data["ErrorText"] = toUtf(task_data->ErrorText); + data["ClientLocalIP"] = toUtf(task_data->ClientLocalIP); + data["ClientMac"] = toUtf(task_data->ClientMac); + data["ClientIP"] = toUtf(task_data->ClientIP); + data["Remark"] = toUtf(task_data->Remark); + delete task_data; + } + this->onRspHKMarketOrderInsert(task->task_id, task->task_int, data); +}; + +void TdApi::processRspHKMarketOrderDelete(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIOrderMarketDeleteRsp *task_data = (TapAPIOrderMarketDeleteRsp*)task->task_data; + data["AccountNo"] = toUtf(task_data->AccountNo); + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["CommodityType"] = task_data->CommodityType; + data["CommodityNo"] = toUtf(task_data->CommodityNo); + data["ContractNo"] = toUtf(task_data->ContractNo); + data["StrikePrice"] = toUtf(task_data->StrikePrice); + data["CallOrPutFlag"] = task_data->CallOrPutFlag; + data["OrderType"] = task_data->OrderType; + data["TimeInForce"] = task_data->TimeInForce; + data["ExpireTime"] = toUtf(task_data->ExpireTime); + data["OrderSource"] = task_data->OrderSource; + data["BuyPositionEffect"] = task_data->BuyPositionEffect; + data["SellPositionEffect"] = task_data->SellPositionEffect; + data["OrderBuyPrice"] = task_data->OrderBuyPrice; + data["OrderSellPrice"] = task_data->OrderSellPrice; + data["OrderBuyQty"] = task_data->OrderBuyQty; + data["OrderSellQty"] = task_data->OrderSellQty; + data["ServerFlag"] = task_data->ServerFlag; + data["OrderBuyNo"] = toUtf(task_data->OrderBuyNo); + data["OrderSellNo"] = toUtf(task_data->OrderSellNo); + data["AddOneIsValid"] = task_data->AddOneIsValid; + data["OrderMarketUserNo"] = toUtf(task_data->OrderMarketUserNo); + data["OrderMarketTime"] = toUtf(task_data->OrderMarketTime); + data["RefInt"] = task_data->RefInt; + data["RefDouble"] = task_data->RefDouble; + data["RefString"] = toUtf(task_data->RefString); + data["ClientBuyOrderNo"] = toUtf(task_data->ClientBuyOrderNo); + data["ClientSellOrderNo"] = toUtf(task_data->ClientSellOrderNo); + data["ErrorCode"] = task_data->ErrorCode; + data["ErrorText"] = toUtf(task_data->ErrorText); + data["ClientLocalIP"] = toUtf(task_data->ClientLocalIP); + data["ClientMac"] = toUtf(task_data->ClientMac); + data["ClientIP"] = toUtf(task_data->ClientIP); + data["Remark"] = toUtf(task_data->Remark); + delete task_data; + } + this->onRspHKMarketOrderDelete(task->task_id, task->task_int, data); +}; + +void TdApi::processHKMarketQuoteNotice(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIOrderQuoteMarketNotice *task_data = (TapAPIOrderQuoteMarketNotice*)task->task_data; + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["CommodityType"] = task_data->CommodityType; + data["CommodityNo"] = toUtf(task_data->CommodityNo); + data["ContractNo"] = toUtf(task_data->ContractNo); + data["StrikePrice"] = toUtf(task_data->StrikePrice); + data["CallOrPutFlag"] = task_data->CallOrPutFlag; + data["OrderSide"] = task_data->OrderSide; + data["OrderQty"] = task_data->OrderQty; + delete task_data; + } + this->onHKMarketQuoteNotice(data); +}; + +void TdApi::processRspOrderLocalRemove(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIOrderLocalRemoveRsp *task_data = (TapAPIOrderLocalRemoveRsp*)task->task_data; + data["req"] = task_data->req; + data["ClientLocalIP"] = toUtf(task_data->ClientLocalIP); + data["ClientMac"] = toUtf(task_data->ClientMac); + data["ClientIP"] = toUtf(task_data->ClientIP); + delete task_data; + } + this->onRspOrderLocalRemove(task->task_id, task->task_int, data); +}; + +void TdApi::processRspOrderLocalInput(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIOrderLocalInputRsp *task_data = (TapAPIOrderLocalInputRsp*)task->task_data; + data["AccountNo"] = toUtf(task_data->AccountNo); + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["CommodityType"] = task_data->CommodityType; + data["CommodityNo"] = toUtf(task_data->CommodityNo); + data["ContractNo"] = toUtf(task_data->ContractNo); + data["StrikePrice"] = toUtf(task_data->StrikePrice); + data["CallOrPutFlag"] = task_data->CallOrPutFlag; + data["ContractNo2"] = toUtf(task_data->ContractNo2); + data["StrikePrice2"] = toUtf(task_data->StrikePrice2); + data["CallOrPutFlag2"] = task_data->CallOrPutFlag2; + data["OrderType"] = task_data->OrderType; + data["OrderSource"] = task_data->OrderSource; + data["TimeInForce"] = task_data->TimeInForce; + data["ExpireTime"] = toUtf(task_data->ExpireTime); + data["IsRiskOrder"] = task_data->IsRiskOrder; + data["OrderSide"] = task_data->OrderSide; + data["PositionEffect"] = task_data->PositionEffect; + data["PositionEffect2"] = task_data->PositionEffect2; + data["InquiryNo"] = toUtf(task_data->InquiryNo); + data["HedgeFlag"] = task_data->HedgeFlag; + data["OrderPrice"] = task_data->OrderPrice; + data["OrderPrice2"] = task_data->OrderPrice2; + data["StopPrice"] = task_data->StopPrice; + data["OrderQty"] = task_data->OrderQty; + data["OrderMinQty"] = task_data->OrderMinQty; + data["RefInt"] = task_data->RefInt; + data["RefDouble"] = task_data->RefDouble; + data["RefString"] = toUtf(task_data->RefString); + data["MinClipSize"] = task_data->MinClipSize; + data["MaxClipSize"] = task_data->MaxClipSize; + data["LicenseNo"] = toUtf(task_data->LicenseNo); + data["ServerFlag"] = task_data->ServerFlag; + data["OrderNo"] = toUtf(task_data->OrderNo); + data["ClientOrderNo"] = toUtf(task_data->ClientOrderNo); + data["ClientID"] = toUtf(task_data->ClientID); + data["TacticsType"] = task_data->TacticsType; + data["TriggerCondition"] = task_data->TriggerCondition; + data["TriggerPriceType"] = task_data->TriggerPriceType; + data["AddOneIsValid"] = task_data->AddOneIsValid; + data["ClientLocalIP"] = toUtf(task_data->ClientLocalIP); + data["ClientMac"] = toUtf(task_data->ClientMac); + data["ClientIP"] = toUtf(task_data->ClientIP); + data["OrderStreamID"] = task_data->OrderStreamID; + data["UpperNo"] = toUtf(task_data->UpperNo); + data["UpperChannelNo"] = toUtf(task_data->UpperChannelNo); + data["OrderLocalNo"] = toUtf(task_data->OrderLocalNo); + data["UpperStreamID"] = task_data->UpperStreamID; + data["OrderSystemNo"] = toUtf(task_data->OrderSystemNo); + data["OrderExchangeSystemNo"] = toUtf(task_data->OrderExchangeSystemNo); + data["OrderParentSystemNo"] = toUtf(task_data->OrderParentSystemNo); + data["OrderInsertUserNo"] = toUtf(task_data->OrderInsertUserNo); + data["OrderInsertTime"] = toUtf(task_data->OrderInsertTime); + data["OrderCommandUserNo"] = toUtf(task_data->OrderCommandUserNo); + data["OrderUpdateUserNo"] = toUtf(task_data->OrderUpdateUserNo); + data["OrderUpdateTime"] = toUtf(task_data->OrderUpdateTime); + data["OrderState"] = task_data->OrderState; + data["OrderMatchPrice"] = task_data->OrderMatchPrice; + data["OrderMatchPrice2"] = task_data->OrderMatchPrice2; + data["OrderMatchQty"] = task_data->OrderMatchQty; + data["OrderMatchQty2"] = task_data->OrderMatchQty2; + data["ErrorCode"] = task_data->ErrorCode; + data["ErrorText"] = toUtf(task_data->ErrorText); + data["IsBackInput"] = task_data->IsBackInput; + data["IsDeleted"] = task_data->IsDeleted; + data["IsAddOne"] = task_data->IsAddOne; + delete task_data; + } + this->onRspOrderLocalInput(task->task_id, task->task_int, data); +}; + +void TdApi::processRspOrderLocalModify(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIOrderLocalModifyRsp *task_data = (TapAPIOrderLocalModifyRsp*)task->task_data; + data["AccountNo"] = toUtf(task_data->AccountNo); + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["CommodityType"] = task_data->CommodityType; + data["CommodityNo"] = toUtf(task_data->CommodityNo); + data["ContractNo"] = toUtf(task_data->ContractNo); + data["StrikePrice"] = toUtf(task_data->StrikePrice); + data["CallOrPutFlag"] = task_data->CallOrPutFlag; + data["ContractNo2"] = toUtf(task_data->ContractNo2); + data["StrikePrice2"] = toUtf(task_data->StrikePrice2); + data["CallOrPutFlag2"] = task_data->CallOrPutFlag2; + data["OrderType"] = task_data->OrderType; + data["OrderSource"] = task_data->OrderSource; + data["TimeInForce"] = task_data->TimeInForce; + data["ExpireTime"] = toUtf(task_data->ExpireTime); + data["IsRiskOrder"] = task_data->IsRiskOrder; + data["OrderSide"] = task_data->OrderSide; + data["PositionEffect"] = task_data->PositionEffect; + data["PositionEffect2"] = task_data->PositionEffect2; + data["InquiryNo"] = toUtf(task_data->InquiryNo); + data["HedgeFlag"] = task_data->HedgeFlag; + data["OrderPrice"] = task_data->OrderPrice; + data["OrderPrice2"] = task_data->OrderPrice2; + data["StopPrice"] = task_data->StopPrice; + data["OrderQty"] = task_data->OrderQty; + data["OrderMinQty"] = task_data->OrderMinQty; + data["RefInt"] = task_data->RefInt; + data["RefDouble"] = task_data->RefDouble; + data["RefString"] = toUtf(task_data->RefString); + data["MinClipSize"] = task_data->MinClipSize; + data["MaxClipSize"] = task_data->MaxClipSize; + data["LicenseNo"] = toUtf(task_data->LicenseNo); + data["ServerFlag"] = task_data->ServerFlag; + data["OrderNo"] = toUtf(task_data->OrderNo); + data["ClientOrderNo"] = toUtf(task_data->ClientOrderNo); + data["ClientID"] = toUtf(task_data->ClientID); + data["TacticsType"] = task_data->TacticsType; + data["TriggerCondition"] = task_data->TriggerCondition; + data["TriggerPriceType"] = task_data->TriggerPriceType; + data["AddOneIsValid"] = task_data->AddOneIsValid; + data["ClientLocalIP"] = toUtf(task_data->ClientLocalIP); + data["ClientMac"] = toUtf(task_data->ClientMac); + data["ClientIP"] = toUtf(task_data->ClientIP); + data["OrderStreamID"] = task_data->OrderStreamID; + data["UpperNo"] = toUtf(task_data->UpperNo); + data["UpperChannelNo"] = toUtf(task_data->UpperChannelNo); + data["OrderLocalNo"] = toUtf(task_data->OrderLocalNo); + data["UpperStreamID"] = task_data->UpperStreamID; + data["OrderSystemNo"] = toUtf(task_data->OrderSystemNo); + data["OrderExchangeSystemNo"] = toUtf(task_data->OrderExchangeSystemNo); + data["OrderParentSystemNo"] = toUtf(task_data->OrderParentSystemNo); + data["OrderInsertUserNo"] = toUtf(task_data->OrderInsertUserNo); + data["OrderInsertTime"] = toUtf(task_data->OrderInsertTime); + data["OrderCommandUserNo"] = toUtf(task_data->OrderCommandUserNo); + data["OrderUpdateUserNo"] = toUtf(task_data->OrderUpdateUserNo); + data["OrderUpdateTime"] = toUtf(task_data->OrderUpdateTime); + data["OrderState"] = task_data->OrderState; + data["OrderMatchPrice"] = task_data->OrderMatchPrice; + data["OrderMatchPrice2"] = task_data->OrderMatchPrice2; + data["OrderMatchQty"] = task_data->OrderMatchQty; + data["OrderMatchQty2"] = task_data->OrderMatchQty2; + data["ErrorCode"] = task_data->ErrorCode; + data["ErrorText"] = toUtf(task_data->ErrorText); + data["IsBackInput"] = task_data->IsBackInput; + data["IsDeleted"] = task_data->IsDeleted; + data["IsAddOne"] = task_data->IsAddOne; + delete task_data; + } + this->onRspOrderLocalModify(task->task_id, task->task_int, data); +}; + +void TdApi::processRspOrderLocalTransfer(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIOrderLocalTransferRsp *task_data = (TapAPIOrderLocalTransferRsp*)task->task_data; + data["AccountNo"] = toUtf(task_data->AccountNo); + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["CommodityType"] = task_data->CommodityType; + data["CommodityNo"] = toUtf(task_data->CommodityNo); + data["ContractNo"] = toUtf(task_data->ContractNo); + data["StrikePrice"] = toUtf(task_data->StrikePrice); + data["CallOrPutFlag"] = task_data->CallOrPutFlag; + data["ContractNo2"] = toUtf(task_data->ContractNo2); + data["StrikePrice2"] = toUtf(task_data->StrikePrice2); + data["CallOrPutFlag2"] = task_data->CallOrPutFlag2; + data["OrderType"] = task_data->OrderType; + data["OrderSource"] = task_data->OrderSource; + data["TimeInForce"] = task_data->TimeInForce; + data["ExpireTime"] = toUtf(task_data->ExpireTime); + data["IsRiskOrder"] = task_data->IsRiskOrder; + data["OrderSide"] = task_data->OrderSide; + data["PositionEffect"] = task_data->PositionEffect; + data["PositionEffect2"] = task_data->PositionEffect2; + data["InquiryNo"] = toUtf(task_data->InquiryNo); + data["HedgeFlag"] = task_data->HedgeFlag; + data["OrderPrice"] = task_data->OrderPrice; + data["OrderPrice2"] = task_data->OrderPrice2; + data["StopPrice"] = task_data->StopPrice; + data["OrderQty"] = task_data->OrderQty; + data["OrderMinQty"] = task_data->OrderMinQty; + data["RefInt"] = task_data->RefInt; + data["RefDouble"] = task_data->RefDouble; + data["RefString"] = toUtf(task_data->RefString); + data["MinClipSize"] = task_data->MinClipSize; + data["MaxClipSize"] = task_data->MaxClipSize; + data["LicenseNo"] = toUtf(task_data->LicenseNo); + data["ServerFlag"] = task_data->ServerFlag; + data["OrderNo"] = toUtf(task_data->OrderNo); + data["ClientOrderNo"] = toUtf(task_data->ClientOrderNo); + data["ClientID"] = toUtf(task_data->ClientID); + data["TacticsType"] = task_data->TacticsType; + data["TriggerCondition"] = task_data->TriggerCondition; + data["TriggerPriceType"] = task_data->TriggerPriceType; + data["AddOneIsValid"] = task_data->AddOneIsValid; + data["ClientLocalIP"] = toUtf(task_data->ClientLocalIP); + data["ClientMac"] = toUtf(task_data->ClientMac); + data["ClientIP"] = toUtf(task_data->ClientIP); + data["OrderStreamID"] = task_data->OrderStreamID; + data["UpperNo"] = toUtf(task_data->UpperNo); + data["UpperChannelNo"] = toUtf(task_data->UpperChannelNo); + data["OrderLocalNo"] = toUtf(task_data->OrderLocalNo); + data["UpperStreamID"] = task_data->UpperStreamID; + data["OrderSystemNo"] = toUtf(task_data->OrderSystemNo); + data["OrderExchangeSystemNo"] = toUtf(task_data->OrderExchangeSystemNo); + data["OrderParentSystemNo"] = toUtf(task_data->OrderParentSystemNo); + data["OrderInsertUserNo"] = toUtf(task_data->OrderInsertUserNo); + data["OrderInsertTime"] = toUtf(task_data->OrderInsertTime); + data["OrderCommandUserNo"] = toUtf(task_data->OrderCommandUserNo); + data["OrderUpdateUserNo"] = toUtf(task_data->OrderUpdateUserNo); + data["OrderUpdateTime"] = toUtf(task_data->OrderUpdateTime); + data["OrderState"] = task_data->OrderState; + data["OrderMatchPrice"] = task_data->OrderMatchPrice; + data["OrderMatchPrice2"] = task_data->OrderMatchPrice2; + data["OrderMatchQty"] = task_data->OrderMatchQty; + data["OrderMatchQty2"] = task_data->OrderMatchQty2; + data["ErrorCode"] = task_data->ErrorCode; + data["ErrorText"] = toUtf(task_data->ErrorText); + data["IsBackInput"] = task_data->IsBackInput; + data["IsDeleted"] = task_data->IsDeleted; + data["IsAddOne"] = task_data->IsAddOne; + delete task_data; + } + this->onRspOrderLocalTransfer(task->task_id, task->task_int, data); +}; + +void TdApi::processRspFillLocalInput(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIFillLocalInputRsp *task_data = (TapAPIFillLocalInputRsp*)task->task_data; + data["AccountNo"] = toUtf(task_data->AccountNo); + data["ExchangeNo"] = toUtf(task_data->ExchangeNo); + data["CommodityType"] = task_data->CommodityType; + data["CommodityNo"] = toUtf(task_data->CommodityNo); + data["ContractNo"] = toUtf(task_data->ContractNo); + data["StrikePrice"] = toUtf(task_data->StrikePrice); + data["CallOrPutFlag"] = task_data->CallOrPutFlag; + data["MatchSide"] = task_data->MatchSide; + data["PositionEffect"] = task_data->PositionEffect; + data["HedgeFlag"] = task_data->HedgeFlag; + data["MatchPrice"] = task_data->MatchPrice; + data["MatchQty"] = task_data->MatchQty; + data["OrderSystemNo"] = toUtf(task_data->OrderSystemNo); + data["UpperMatchNo"] = toUtf(task_data->UpperMatchNo); + data["MatchDateTime"] = toUtf(task_data->MatchDateTime); + data["UpperMatchDateTime"] = toUtf(task_data->UpperMatchDateTime); + data["UpperNo"] = toUtf(task_data->UpperNo); + data["IsAddOne"] = task_data->IsAddOne; + data["FeeCurrencyGroup"] = toUtf(task_data->FeeCurrencyGroup); + data["FeeCurrency"] = toUtf(task_data->FeeCurrency); + data["FeeValue"] = task_data->FeeValue; + data["IsManualFee"] = task_data->IsManualFee; + data["ClosePositionPrice"] = task_data->ClosePositionPrice; + delete task_data; + } + this->onRspFillLocalInput(task->task_id, task->task_int, data); +}; + +void TdApi::processRspFillLocalRemove(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + TapAPIFillLocalRemoveRsp *task_data = (TapAPIFillLocalRemoveRsp*)task->task_data; + data["ServerFlag"] = task_data->ServerFlag; + data["MatchNo"] = toUtf(task_data->MatchNo); + delete task_data; + } + this->onRspFillLocalRemove(task->task_id, task->task_int, data); +}; + diff --git a/vnpy/api/tap/generator/tap_td_source_switch.cpp b/vnpy/api/tap/generator/tap_td_source_switch.cpp new file mode 100644 index 0000000000..83ceff47b9 --- /dev/null +++ b/vnpy/api/tap/generator/tap_td_source_switch.cpp @@ -0,0 +1,300 @@ +case ONCONNECT: +{ + this->processConnect(&task); + break; +} + +case ONRSPLOGIN: +{ + this->processRspLogin(&task); + break; +} + +case ONRTNCONTACTINFO: +{ + this->processRtnContactInfo(&task); + break; +} + +case ONRSPREQUESTVERTIFICATECODE: +{ + this->processRspRequestVertificateCode(&task); + break; +} + +case ONEXPRIATIONDATE: +{ + this->processExpriationDate(&task); + break; +} + +case ONAPIREADY: +{ + this->processAPIReady(&task); + break; +} + +case ONDISCONNECT: +{ + this->processDisconnect(&task); + break; +} + +case ONRSPCHANGEPASSWORD: +{ + this->processRspChangePassword(&task); + break; +} + +case ONRSPAUTHPASSWORD: +{ + this->processRspAuthPassword(&task); + break; +} + +case ONRSPQRYTRADINGDATE: +{ + this->processRspQryTradingDate(&task); + break; +} + +case ONRSPSETRESERVEDINFO: +{ + this->processRspSetReservedInfo(&task); + break; +} + +case ONRSPQRYACCOUNT: +{ + this->processRspQryAccount(&task); + break; +} + +case ONRSPQRYFUND: +{ + this->processRspQryFund(&task); + break; +} + +case ONRTNFUND: +{ + this->processRtnFund(&task); + break; +} + +case ONRSPQRYEXCHANGE: +{ + this->processRspQryExchange(&task); + break; +} + +case ONRSPQRYCOMMODITY: +{ + this->processRspQryCommodity(&task); + break; +} + +case ONRSPQRYCONTRACT: +{ + this->processRspQryContract(&task); + break; +} + +case ONRTNCONTRACT: +{ + this->processRtnContract(&task); + break; +} + +case ONRSPORDERACTION: +{ + this->processRspOrderAction(&task); + break; +} + +case ONRTNORDER: +{ + this->processRtnOrder(&task); + break; +} + +case ONRSPQRYORDER: +{ + this->processRspQryOrder(&task); + break; +} + +case ONRSPQRYORDERPROCESS: +{ + this->processRspQryOrderProcess(&task); + break; +} + +case ONRSPQRYFILL: +{ + this->processRspQryFill(&task); + break; +} + +case ONRTNFILL: +{ + this->processRtnFill(&task); + break; +} + +case ONRSPQRYPOSITION: +{ + this->processRspQryPosition(&task); + break; +} + +case ONRTNPOSITION: +{ + this->processRtnPosition(&task); + break; +} + +case ONRSPQRYPOSITIONSUMMARY: +{ + this->processRspQryPositionSummary(&task); + break; +} + +case ONRTNPOSITIONSUMMARY: +{ + this->processRtnPositionSummary(&task); + break; +} + +case ONRTNPOSITIONPROFIT: +{ + this->processRtnPositionProfit(&task); + break; +} + +case ONRSPQRYCURRENCY: +{ + this->processRspQryCurrency(&task); + break; +} + +case ONRSPQRYTRADEMESSAGE: +{ + this->processRspQryTradeMessage(&task); + break; +} + +case ONRTNTRADEMESSAGE: +{ + this->processRtnTradeMessage(&task); + break; +} + +case ONRSPQRYHISORDER: +{ + this->processRspQryHisOrder(&task); + break; +} + +case ONRSPQRYHISORDERPROCESS: +{ + this->processRspQryHisOrderProcess(&task); + break; +} + +case ONRSPQRYHISMATCH: +{ + this->processRspQryHisMatch(&task); + break; +} + +case ONRSPQRYHISPOSITION: +{ + this->processRspQryHisPosition(&task); + break; +} + +case ONRSPQRYHISDELIVERY: +{ + this->processRspQryHisDelivery(&task); + break; +} + +case ONRSPQRYACCOUNTCASHADJUST: +{ + this->processRspQryAccountCashAdjust(&task); + break; +} + +case ONRSPQRYBILL: +{ + this->processRspQryBill(&task); + break; +} + +case ONRSPQRYACCOUNTFEERENT: +{ + this->processRspQryAccountFeeRent(&task); + break; +} + +case ONRSPQRYACCOUNTMARGINRENT: +{ + this->processRspQryAccountMarginRent(&task); + break; +} + +case ONRSPHKMARKETORDERINSERT: +{ + this->processRspHKMarketOrderInsert(&task); + break; +} + +case ONRSPHKMARKETORDERDELETE: +{ + this->processRspHKMarketOrderDelete(&task); + break; +} + +case ONHKMARKETQUOTENOTICE: +{ + this->processHKMarketQuoteNotice(&task); + break; +} + +case ONRSPORDERLOCALREMOVE: +{ + this->processRspOrderLocalRemove(&task); + break; +} + +case ONRSPORDERLOCALINPUT: +{ + this->processRspOrderLocalInput(&task); + break; +} + +case ONRSPORDERLOCALMODIFY: +{ + this->processRspOrderLocalModify(&task); + break; +} + +case ONRSPORDERLOCALTRANSFER: +{ + this->processRspOrderLocalTransfer(&task); + break; +} + +case ONRSPFILLLOCALINPUT: +{ + this->processRspFillLocalInput(&task); + break; +} + +case ONRSPFILLLOCALREMOVE: +{ + this->processRspFillLocalRemove(&task); + break; +} + diff --git a/vnpy/api/tap/generator/tap_td_source_task.cpp b/vnpy/api/tap/generator/tap_td_source_task.cpp new file mode 100644 index 0000000000..6a7e701307 --- /dev/null +++ b/vnpy/api/tap/generator/tap_td_source_task.cpp @@ -0,0 +1,702 @@ +void TdApi::OnConnect() +{ + Task task = Task(); + task.task_name = ONCONNECT; + this->task_queue.push(task); +}; + +void TdApi::OnRspLogin(int errorCode, TapAPITradeLoginRspInfo *loginRspInfo) +{ + Task task = Task(); + task.task_name = ONRSPLOGIN; + task.task_int = errorCode; + if (loginRspInfo) + { + TapAPITradeLoginRspInfo *task_data = new TapAPITradeLoginRspInfo(); + *task_data = *loginRspInfo; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRtnContactInfo(int errorCode, char isLast, string ContactInfo) +{ + Task task = Task(); + task.task_name = ONRTNCONTACTINFO; + task.task_int = errorCode; + task.task_last = isLast; + task.task_string = ContactInfo; + this->task_queue.push(task); +}; + +void TdApi::OnRspRequestVertificateCode(unsigned int sessionID, int errorCode, TapAPIRequestVertificateCodeRsp *rsp) +{ + Task task = Task(); + task.task_name = ONRSPREQUESTVERTIFICATECODE; + task.task_id = sessionID; + task.task_int = errorCode; + if (rsp) + { + TapAPIRequestVertificateCodeRsp *task_data = new TapAPIRequestVertificateCodeRsp(); + *task_data = *rsp; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnExpriationDate(string date, int days) +{ + Task task = Task(); + task.task_name = ONEXPRIATIONDATE; + task.task_string = date; + task.task_int = days; + this->task_queue.push(task); +}; + +void TdApi::OnAPIReady(int errorCode) +{ + Task task = Task(); + task.task_name = ONAPIREADY; + task.task_int = errorCode; + this->task_queue.push(task); +}; + +void TdApi::OnDisconnect(int reasonCode) +{ + Task task = Task(); + task.task_name = ONDISCONNECT; + task.task_int = reasonCode; + this->task_queue.push(task); +}; + +void TdApi::OnRspChangePassword(unsigned int sessionID, int errorCode) +{ + Task task = Task(); + task.task_name = ONRSPCHANGEPASSWORD; + task.task_id = sessionID; + task.task_int = errorCode; + this->task_queue.push(task); +}; + +void TdApi::OnRspAuthPassword(unsigned int sessionID, int errorCode) +{ + Task task = Task(); + task.task_name = ONRSPAUTHPASSWORD; + task.task_id = sessionID; + task.task_int = errorCode; + this->task_queue.push(task); +}; + +void TdApi::OnRspQryTradingDate(unsigned int sessionID, int errorCode, TapAPITradingCalendarQryRsp *info) +{ + Task task = Task(); + task.task_name = ONRSPQRYTRADINGDATE; + task.task_id = sessionID; + task.task_int = errorCode; + if (info) + { + TapAPITradingCalendarQryRsp *task_data = new TapAPITradingCalendarQryRsp(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspSetReservedInfo(unsigned int sessionID, int errorCode, string info) +{ + Task task = Task(); + task.task_name = ONRSPSETRESERVEDINFO; + task.task_id = sessionID; + task.task_int = errorCode; + task.task_string = info; + this->task_queue.push(task); +}; + +void TdApi::OnRspQryAccount(unsigned int sessionID, unsigned int errorCode, char isLast, TapAPIAccountInfo *info) +{ + Task task = Task(); + task.task_name = ONRSPQRYACCOUNT; + task.task_id = sessionID; + task.task_id = errorCode; + task.task_last = isLast; + if (info) + { + TapAPIAccountInfo *task_data = new TapAPIAccountInfo(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspQryFund(unsigned int sessionID, int errorCode, char isLast, TapAPIFundData *info) +{ + Task task = Task(); + task.task_name = ONRSPQRYFUND; + task.task_id = sessionID; + task.task_int = errorCode; + task.task_last = isLast; + if (info) + { + TapAPIFundData *task_data = new TapAPIFundData(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRtnFund(TapAPIFundData *info) +{ + Task task = Task(); + task.task_name = ONRTNFUND; + if (info) + { + TapAPIFundData *task_data = new TapAPIFundData(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspQryExchange(unsigned int sessionID, int errorCode, char isLast, TapAPIExchangeInfo *info) +{ + Task task = Task(); + task.task_name = ONRSPQRYEXCHANGE; + task.task_id = sessionID; + task.task_int = errorCode; + task.task_last = isLast; + if (info) + { + TapAPIExchangeInfo *task_data = new TapAPIExchangeInfo(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspQryCommodity(unsigned int sessionID, int errorCode, char isLast, TapAPICommodityInfo *info) +{ + Task task = Task(); + task.task_name = ONRSPQRYCOMMODITY; + task.task_id = sessionID; + task.task_int = errorCode; + task.task_last = isLast; + if (info) + { + TapAPICommodityInfo *task_data = new TapAPICommodityInfo(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspQryContract(unsigned int sessionID, int errorCode, char isLast, TapAPITradeContractInfo *info) +{ + Task task = Task(); + task.task_name = ONRSPQRYCONTRACT; + task.task_id = sessionID; + task.task_int = errorCode; + task.task_last = isLast; + if (info) + { + TapAPITradeContractInfo *task_data = new TapAPITradeContractInfo(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRtnContract(TapAPITradeContractInfo *info) +{ + Task task = Task(); + task.task_name = ONRTNCONTRACT; + if (info) + { + TapAPITradeContractInfo *task_data = new TapAPITradeContractInfo(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspOrderAction(unsigned int sessionID, int errorCode, TapAPIOrderActionRsp *info) +{ + Task task = Task(); + task.task_name = ONRSPORDERACTION; + task.task_id = sessionID; + task.task_int = errorCode; + if (info) + { + TapAPIOrderActionRsp *task_data = new TapAPIOrderActionRsp(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRtnOrder(TapAPIOrderInfoNotice *info) +{ + Task task = Task(); + task.task_name = ONRTNORDER; + if (info) + { + TapAPIOrderInfoNotice *task_data = new TapAPIOrderInfoNotice(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspQryOrder(unsigned int sessionID, int errorCode, char isLast, TapAPIOrderInfo *info) +{ + Task task = Task(); + task.task_name = ONRSPQRYORDER; + task.task_id = sessionID; + task.task_int = errorCode; + task.task_last = isLast; + if (info) + { + TapAPIOrderInfo *task_data = new TapAPIOrderInfo(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspQryOrderProcess(unsigned int sessionID, int errorCode, char isLast, TapAPIOrderInfo *info) +{ + Task task = Task(); + task.task_name = ONRSPQRYORDERPROCESS; + task.task_id = sessionID; + task.task_int = errorCode; + task.task_last = isLast; + if (info) + { + TapAPIOrderInfo *task_data = new TapAPIOrderInfo(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspQryFill(unsigned int sessionID, int errorCode, char isLast, TapAPIFillInfo *info) +{ + Task task = Task(); + task.task_name = ONRSPQRYFILL; + task.task_id = sessionID; + task.task_int = errorCode; + task.task_last = isLast; + if (info) + { + TapAPIFillInfo *task_data = new TapAPIFillInfo(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRtnFill(TapAPIFillInfo *info) +{ + Task task = Task(); + task.task_name = ONRTNFILL; + if (info) + { + TapAPIFillInfo *task_data = new TapAPIFillInfo(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspQryPosition(unsigned int sessionID, int errorCode, char isLast, TapAPIPositionInfo *info) +{ + Task task = Task(); + task.task_name = ONRSPQRYPOSITION; + task.task_id = sessionID; + task.task_int = errorCode; + task.task_last = isLast; + if (info) + { + TapAPIPositionInfo *task_data = new TapAPIPositionInfo(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRtnPosition(TapAPIPositionInfo *info) +{ + Task task = Task(); + task.task_name = ONRTNPOSITION; + if (info) + { + TapAPIPositionInfo *task_data = new TapAPIPositionInfo(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspQryPositionSummary(unsigned int sessionID, int errorCode, char isLast, TapAPIPositionSummary *info) +{ + Task task = Task(); + task.task_name = ONRSPQRYPOSITIONSUMMARY; + task.task_id = sessionID; + task.task_int = errorCode; + task.task_last = isLast; + if (info) + { + TapAPIPositionSummary *task_data = new TapAPIPositionSummary(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRtnPositionSummary(TapAPIPositionSummary *info) +{ + Task task = Task(); + task.task_name = ONRTNPOSITIONSUMMARY; + if (info) + { + TapAPIPositionSummary *task_data = new TapAPIPositionSummary(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRtnPositionProfit(TapAPIPositionProfitNotice *info) +{ + Task task = Task(); + task.task_name = ONRTNPOSITIONPROFIT; + if (info) + { + TapAPIPositionProfitNotice *task_data = new TapAPIPositionProfitNotice(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspQryCurrency(unsigned int sessionID, int errorCode, char isLast, TapAPICurrencyInfo *info) +{ + Task task = Task(); + task.task_name = ONRSPQRYCURRENCY; + task.task_id = sessionID; + task.task_int = errorCode; + task.task_last = isLast; + if (info) + { + TapAPICurrencyInfo *task_data = new TapAPICurrencyInfo(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspQryTradeMessage(unsigned int sessionID, int errorCode, char isLast, TapAPITradeMessage *info) +{ + Task task = Task(); + task.task_name = ONRSPQRYTRADEMESSAGE; + task.task_id = sessionID; + task.task_int = errorCode; + task.task_last = isLast; + if (info) + { + TapAPITradeMessage *task_data = new TapAPITradeMessage(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRtnTradeMessage(TapAPITradeMessage *info) +{ + Task task = Task(); + task.task_name = ONRTNTRADEMESSAGE; + if (info) + { + TapAPITradeMessage *task_data = new TapAPITradeMessage(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspQryHisOrder(unsigned int sessionID, int errorCode, char isLast, TapAPIHisOrderQryRsp *info) +{ + Task task = Task(); + task.task_name = ONRSPQRYHISORDER; + task.task_id = sessionID; + task.task_int = errorCode; + task.task_last = isLast; + if (info) + { + TapAPIHisOrderQryRsp *task_data = new TapAPIHisOrderQryRsp(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspQryHisOrderProcess(unsigned int sessionID, int errorCode, char isLast, TapAPIHisOrderProcessQryRsp *info) +{ + Task task = Task(); + task.task_name = ONRSPQRYHISORDERPROCESS; + task.task_id = sessionID; + task.task_int = errorCode; + task.task_last = isLast; + if (info) + { + TapAPIHisOrderProcessQryRsp *task_data = new TapAPIHisOrderProcessQryRsp(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspQryHisMatch(unsigned int sessionID, int errorCode, char isLast, TapAPIHisMatchQryRsp *info) +{ + Task task = Task(); + task.task_name = ONRSPQRYHISMATCH; + task.task_id = sessionID; + task.task_int = errorCode; + task.task_last = isLast; + if (info) + { + TapAPIHisMatchQryRsp *task_data = new TapAPIHisMatchQryRsp(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspQryHisPosition(unsigned int sessionID, int errorCode, char isLast, TapAPIHisPositionQryRsp *info) +{ + Task task = Task(); + task.task_name = ONRSPQRYHISPOSITION; + task.task_id = sessionID; + task.task_int = errorCode; + task.task_last = isLast; + if (info) + { + TapAPIHisPositionQryRsp *task_data = new TapAPIHisPositionQryRsp(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspQryHisDelivery(unsigned int sessionID, int errorCode, char isLast, TapAPIHisDeliveryQryRsp *info) +{ + Task task = Task(); + task.task_name = ONRSPQRYHISDELIVERY; + task.task_id = sessionID; + task.task_int = errorCode; + task.task_last = isLast; + if (info) + { + TapAPIHisDeliveryQryRsp *task_data = new TapAPIHisDeliveryQryRsp(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspQryAccountCashAdjust(unsigned int sessionID, int errorCode, char isLast, TapAPIAccountCashAdjustQryRsp *info) +{ + Task task = Task(); + task.task_name = ONRSPQRYACCOUNTCASHADJUST; + task.task_id = sessionID; + task.task_int = errorCode; + task.task_last = isLast; + if (info) + { + TapAPIAccountCashAdjustQryRsp *task_data = new TapAPIAccountCashAdjustQryRsp(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspQryBill(unsigned int sessionID, int errorCode, char isLast, TapAPIBillQryRsp *info) +{ + Task task = Task(); + task.task_name = ONRSPQRYBILL; + task.task_id = sessionID; + task.task_int = errorCode; + task.task_last = isLast; + if (info) + { + TapAPIBillQryRsp *task_data = new TapAPIBillQryRsp(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspQryAccountFeeRent(unsigned int sessionID, int errorCode, char isLast, TapAPIAccountFeeRentQryRsp *info) +{ + Task task = Task(); + task.task_name = ONRSPQRYACCOUNTFEERENT; + task.task_id = sessionID; + task.task_int = errorCode; + task.task_last = isLast; + if (info) + { + TapAPIAccountFeeRentQryRsp *task_data = new TapAPIAccountFeeRentQryRsp(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspQryAccountMarginRent(unsigned int sessionID, int errorCode, char isLast, TapAPIAccountMarginRentQryRsp *info) +{ + Task task = Task(); + task.task_name = ONRSPQRYACCOUNTMARGINRENT; + task.task_id = sessionID; + task.task_int = errorCode; + task.task_last = isLast; + if (info) + { + TapAPIAccountMarginRentQryRsp *task_data = new TapAPIAccountMarginRentQryRsp(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspHKMarketOrderInsert(unsigned int sessionID, int errorCode, TapAPIOrderMarketInsertRsp *info) +{ + Task task = Task(); + task.task_name = ONRSPHKMARKETORDERINSERT; + task.task_id = sessionID; + task.task_int = errorCode; + if (info) + { + TapAPIOrderMarketInsertRsp *task_data = new TapAPIOrderMarketInsertRsp(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspHKMarketOrderDelete(unsigned int sessionID, int errorCode, TapAPIOrderMarketDeleteRsp *info) +{ + Task task = Task(); + task.task_name = ONRSPHKMARKETORDERDELETE; + task.task_id = sessionID; + task.task_int = errorCode; + if (info) + { + TapAPIOrderMarketDeleteRsp *task_data = new TapAPIOrderMarketDeleteRsp(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnHKMarketQuoteNotice(TapAPIOrderQuoteMarketNotice *info) +{ + Task task = Task(); + task.task_name = ONHKMARKETQUOTENOTICE; + if (info) + { + TapAPIOrderQuoteMarketNotice *task_data = new TapAPIOrderQuoteMarketNotice(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspOrderLocalRemove(unsigned int sessionID, int errorCode, TapAPIOrderLocalRemoveRsp *info) +{ + Task task = Task(); + task.task_name = ONRSPORDERLOCALREMOVE; + task.task_id = sessionID; + task.task_int = errorCode; + if (info) + { + TapAPIOrderLocalRemoveRsp *task_data = new TapAPIOrderLocalRemoveRsp(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspOrderLocalInput(unsigned int sessionID, int errorCode, TapAPIOrderLocalInputRsp *info) +{ + Task task = Task(); + task.task_name = ONRSPORDERLOCALINPUT; + task.task_id = sessionID; + task.task_int = errorCode; + if (info) + { + TapAPIOrderLocalInputRsp *task_data = new TapAPIOrderLocalInputRsp(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspOrderLocalModify(unsigned int sessionID, int errorCode, TapAPIOrderLocalModifyRsp *info) +{ + Task task = Task(); + task.task_name = ONRSPORDERLOCALMODIFY; + task.task_id = sessionID; + task.task_int = errorCode; + if (info) + { + TapAPIOrderLocalModifyRsp *task_data = new TapAPIOrderLocalModifyRsp(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspOrderLocalTransfer(unsigned int sessionID, int errorCode, TapAPIOrderLocalTransferRsp *info) +{ + Task task = Task(); + task.task_name = ONRSPORDERLOCALTRANSFER; + task.task_id = sessionID; + task.task_int = errorCode; + if (info) + { + TapAPIOrderLocalTransferRsp *task_data = new TapAPIOrderLocalTransferRsp(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspFillLocalInput(unsigned int sessionID, int errorCode, TapAPIFillLocalInputRsp *info) +{ + Task task = Task(); + task.task_name = ONRSPFILLLOCALINPUT; + task.task_id = sessionID; + task.task_int = errorCode; + if (info) + { + TapAPIFillLocalInputRsp *task_data = new TapAPIFillLocalInputRsp(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + +void TdApi::OnRspFillLocalRemove(unsigned int sessionID, int errorCode, TapAPIFillLocalRemoveRsp *info) +{ + Task task = Task(); + task.task_name = ONRSPFILLLOCALREMOVE; + task.task_id = sessionID; + task.task_int = errorCode; + if (info) + { + TapAPIFillLocalRemoveRsp *task_data = new TapAPIFillLocalRemoveRsp(); + *task_data = *info; + task.task_data = task_data; + } + this->task_queue.push(task); +}; + diff --git a/vnpy/api/tap/vntap/include/pybind11/attr.h b/vnpy/api/tap/include/pybind11/attr.h similarity index 98% rename from vnpy/api/tap/vntap/include/pybind11/attr.h rename to vnpy/api/tap/include/pybind11/attr.h index 8732cfe103..dce875a6b9 100644 --- a/vnpy/api/tap/vntap/include/pybind11/attr.h +++ b/vnpy/api/tap/include/pybind11/attr.h @@ -214,14 +214,11 @@ struct type_record { /// How large is the underlying C++ type? size_t type_size = 0; - /// What is the alignment of the underlying C++ type? - size_t type_align = 0; - /// How large is the type's holder? size_t holder_size = 0; /// The global operator new can be overridden with a class-specific variant - void *(*operator_new)(size_t) = nullptr; + void *(*operator_new)(size_t) = ::operator new; /// Function pointer to class_<..>::init_instance void (*init_instance)(instance *, const void *) = nullptr; @@ -281,7 +278,7 @@ struct type_record { } }; -inline function_call::function_call(const function_record &f, handle p) : +inline function_call::function_call(function_record &f, handle p) : func(f), parent(p) { args.reserve(f.nargs); args_convert.reserve(f.nargs); diff --git a/vnpy/api/tap/vntap/include/pybind11/buffer_info.h b/vnpy/api/tap/include/pybind11/buffer_info.h similarity index 100% rename from vnpy/api/tap/vntap/include/pybind11/buffer_info.h rename to vnpy/api/tap/include/pybind11/buffer_info.h diff --git a/vnpy/api/tap/vntap/include/pybind11/cast.h b/vnpy/api/tap/include/pybind11/cast.h similarity index 92% rename from vnpy/api/tap/vntap/include/pybind11/cast.h rename to vnpy/api/tap/include/pybind11/cast.h index 80abb2b93a..2145450835 100644 --- a/vnpy/api/tap/vntap/include/pybind11/cast.h +++ b/vnpy/api/tap/include/pybind11/cast.h @@ -17,7 +17,6 @@ #include #include #include -#include #if defined(PYBIND11_CPP17) # if defined(__has_include) @@ -571,17 +570,7 @@ class type_caster_generic { // Lazy allocation for unallocated values: if (vptr == nullptr) { auto *type = v_h.type ? v_h.type : typeinfo; - if (type->operator_new) { - vptr = type->operator_new(type->type_size); - } else { - #if defined(PYBIND11_CPP17) - if (type->type_align > __STDCPP_DEFAULT_NEW_ALIGNMENT__) - vptr = ::operator new(type->type_size, - (std::align_val_t) type->type_align); - else - #endif - vptr = ::operator new(type->type_size); - } + vptr = type->operator_new(type->type_size); } value = vptr; } @@ -785,47 +774,11 @@ template struct is_copy_constructible, is_copy_constructible> {}; #endif -NAMESPACE_END(detail) - -// polymorphic_type_hook::get(src, tinfo) determines whether the object pointed -// to by `src` actually is an instance of some class derived from `itype`. -// If so, it sets `tinfo` to point to the std::type_info representing that derived -// type, and returns a pointer to the start of the most-derived object of that type -// (in which `src` is a subobject; this will be the same address as `src` in most -// single inheritance cases). If not, or if `src` is nullptr, it simply returns `src` -// and leaves `tinfo` at its default value of nullptr. -// -// The default polymorphic_type_hook just returns src. A specialization for polymorphic -// types determines the runtime type of the passed object and adjusts the this-pointer -// appropriately via dynamic_cast. This is what enables a C++ Animal* to appear -// to Python as a Dog (if Dog inherits from Animal, Animal is polymorphic, Dog is -// registered with pybind11, and this Animal is in fact a Dog). -// -// You may specialize polymorphic_type_hook yourself for types that want to appear -// polymorphic to Python but do not use C++ RTTI. (This is a not uncommon pattern -// in performance-sensitive applications, used most notably in LLVM.) -template -struct polymorphic_type_hook -{ - static const void *get(const itype *src, const std::type_info*&) { return src; } -}; -template -struct polymorphic_type_hook::value>> -{ - static const void *get(const itype *src, const std::type_info*& type) { - type = src ? &typeid(*src) : nullptr; - return dynamic_cast(src); - } -}; - -NAMESPACE_BEGIN(detail) - /// Generic type caster for objects stored on the heap template class type_caster_base : public type_caster_generic { using itype = intrinsic_t; - public: - static constexpr auto name = _(); + static PYBIND11_DESCR name() { return type_descr(_()); } type_caster_base() : type_caster_base(typeid(type)) { } explicit type_caster_base(const std::type_info &info) : type_caster_generic(info) { } @@ -840,28 +793,32 @@ template class type_caster_base : public type_caster_generic { return cast(&src, return_value_policy::move, parent); } - // Returns a (pointer, type_info) pair taking care of necessary type lookup for a - // polymorphic type (using RTTI by default, but can be overridden by specializing - // polymorphic_type_hook). If the instance isn't derived, returns the base version. + // Returns a (pointer, type_info) pair taking care of necessary RTTI type lookup for a + // polymorphic type. If the instance isn't derived, returns the non-RTTI base version. + template ::value, int> = 0> static std::pair src_and_type(const itype *src) { + const void *vsrc = src; auto &cast_type = typeid(itype); const std::type_info *instance_type = nullptr; - const void *vsrc = polymorphic_type_hook::get(src, instance_type); - if (instance_type && !same_type(cast_type, *instance_type)) { - // This is a base pointer to a derived type. If the derived type is registered - // with pybind11, we want to make the full derived object available. - // In the typical case where itype is polymorphic, we get the correct - // derived pointer (which may be != base pointer) by a dynamic_cast to - // most derived type. If itype is not polymorphic, we won't get here - // except via a user-provided specialization of polymorphic_type_hook, - // and the user has promised that no this-pointer adjustment is - // required in that case, so it's OK to use static_cast. - if (const auto *tpi = get_type_info(*instance_type)) - return {vsrc, tpi}; + if (vsrc) { + instance_type = &typeid(*src); + if (!same_type(cast_type, *instance_type)) { + // This is a base pointer to a derived type; if it is a pybind11-registered type, we + // can get the correct derived pointer (which may be != base pointer) by a + // dynamic_cast to most derived type: + if (auto *tpi = get_type_info(*instance_type)) + return {dynamic_cast(src), const_cast(tpi)}; + } } // Otherwise we have either a nullptr, an `itype` pointer, or an unknown derived pointer, so // don't do a cast - return type_caster_generic::src_and_type(src, cast_type, instance_type); + return type_caster_generic::src_and_type(vsrc, cast_type, instance_type); + } + + // Non-polymorphic type, so no dynamic casting; just call the generic version directly + template ::value, int> = 0> + static std::pair src_and_type(const itype *src) { + return type_caster_generic::src_and_type(src, typeid(itype)); } static handle cast(const itype *src, return_value_policy policy, handle parent) { @@ -878,7 +835,7 @@ template class type_caster_base : public type_caster_generic { nullptr, nullptr, holder); } - template using cast_op_type = detail::cast_op_type; + template using cast_op_type = cast_op_type; operator itype*() { return (type *) value; } operator itype&() { if (!value) throw reference_cast_error(); return *((itype *) value); } @@ -928,7 +885,7 @@ template class type_caster> { "std::reference_wrapper caster requires T to have a caster with an `T &` operator"); public: bool load(handle src, bool convert) { return subcaster.load(src, convert); } - static constexpr auto name = caster_t::name; + static PYBIND11_DESCR name() { return caster_t::name(); } static handle cast(const std::reference_wrapper &src, return_value_policy policy, handle parent) { // It is definitely wrong to take ownership of this pointer, so mask that rvp if (policy == return_value_policy::take_ownership || policy == return_value_policy::automatic) @@ -943,7 +900,7 @@ template class type_caster> { protected: \ type value; \ public: \ - static constexpr auto name = py_name; \ + static PYBIND11_DESCR name() { return type_descr(py_name); } \ template >::value, int> = 0> \ static handle cast(T_ *src, return_value_policy policy, handle parent) { \ if (!src) return none().release(); \ @@ -1020,34 +977,20 @@ struct type_caster::value && !is_std_char_t return true; } - template - static typename std::enable_if::value, handle>::type - cast(U src, return_value_policy /* policy */, handle /* parent */) { - return PyFloat_FromDouble((double) src); - } - - template - static typename std::enable_if::value && std::is_signed::value && (sizeof(U) <= sizeof(long)), handle>::type - cast(U src, return_value_policy /* policy */, handle /* parent */) { - return PYBIND11_LONG_FROM_SIGNED((long) src); - } - - template - static typename std::enable_if::value && std::is_unsigned::value && (sizeof(U) <= sizeof(unsigned long)), handle>::type - cast(U src, return_value_policy /* policy */, handle /* parent */) { - return PYBIND11_LONG_FROM_UNSIGNED((unsigned long) src); - } - - template - static typename std::enable_if::value && std::is_signed::value && (sizeof(U) > sizeof(long)), handle>::type - cast(U src, return_value_policy /* policy */, handle /* parent */) { - return PyLong_FromLongLong((long long) src); - } - - template - static typename std::enable_if::value && std::is_unsigned::value && (sizeof(U) > sizeof(unsigned long)), handle>::type - cast(U src, return_value_policy /* policy */, handle /* parent */) { - return PyLong_FromUnsignedLongLong((unsigned long long) src); + static handle cast(T src, return_value_policy /* policy */, handle /* parent */) { + if (std::is_floating_point::value) { + return PyFloat_FromDouble((double) src); + } else if (sizeof(T) <= sizeof(long)) { + if (std::is_signed::value) + return PyLong_FromLong((long) src); + else + return PyLong_FromUnsignedLong((unsigned long) src); + } else { + if (std::is_signed::value) + return PyLong_FromLongLong((long long) src); + else + return PyLong_FromUnsignedLongLong((unsigned long long) src); + } } PYBIND11_TYPE_CASTER(T, _::value>("int", "float")); @@ -1106,7 +1049,7 @@ template <> class type_caster : public type_caster { template using cast_op_type = void*&; operator void *&() { return value; } - static constexpr auto name = _("capsule"); + static PYBIND11_DESCR name() { return type_descr(_("capsule")); } private: void *value = nullptr; }; @@ -1349,7 +1292,7 @@ template struct type_caster using cast_op_type = pybind11::detail::cast_op_type<_T>; }; @@ -1374,7 +1317,9 @@ template class Tuple, typename... Ts> class tuple_caster return cast_impl(std::forward(src), policy, parent, indices{}); } - static constexpr auto name = _("Tuple[") + concat(make_caster::name...) + _("]"); + static PYBIND11_DESCR name() { + return type_descr(_("Tuple[") + detail::concat(make_caster::name()...) + _("]")); + } template using cast_op_type = type; @@ -1519,7 +1464,7 @@ struct move_only_holder_caster { auto *ptr = holder_helper::get(src); return type_caster_base::cast_holder(ptr, std::addressof(src)); } - static constexpr auto name = type_caster_base::name; + static PYBIND11_DESCR name() { return type_caster_base::name(); } }; template @@ -1550,10 +1495,10 @@ template struct is_holder_type : template struct is_holder_type> : std::true_type {}; -template struct handle_type_name { static constexpr auto name = _(); }; -template <> struct handle_type_name { static constexpr auto name = _(PYBIND11_BYTES_NAME); }; -template <> struct handle_type_name { static constexpr auto name = _("*args"); }; -template <> struct handle_type_name { static constexpr auto name = _("**kwargs"); }; +template struct handle_type_name { static PYBIND11_DESCR name() { return _(); } }; +template <> struct handle_type_name { static PYBIND11_DESCR name() { return _(PYBIND11_BYTES_NAME); } }; +template <> struct handle_type_name { static PYBIND11_DESCR name() { return _("*args"); } }; +template <> struct handle_type_name { static PYBIND11_DESCR name() { return _("**kwargs"); } }; template struct pyobject_caster { @@ -1571,7 +1516,7 @@ struct pyobject_caster { static handle cast(const handle &src, return_value_policy /* policy */, handle /* parent */) { return src.inc_ref(); } - PYBIND11_TYPE_CASTER(type, handle_type_name::name); + PYBIND11_TYPE_CASTER(type, handle_type_name::name()); }; template @@ -1611,8 +1556,7 @@ template using move_never = none_of, move_if_unrefer // everything else returns a reference/pointer to a local variable. template using cast_is_temporary_value_reference = bool_constant< (std::is_reference::value || std::is_pointer::value) && - !std::is_base_of>::value && - !std::is_same, void>::value + !std::is_base_of>::value >; // When a value returned from a C++ function is being cast back to Python, we almost always want to @@ -1625,9 +1569,8 @@ template struct return_value_policy_ov template struct return_value_policy_override>::value, void>> { static return_value_policy policy(return_value_policy p) { - return !std::is_lvalue_reference::value && - !std::is_pointer::value - ? return_value_policy::move : p; + return !std::is_lvalue_reference::value && !std::is_pointer::value + ? return_value_policy::move : p; } }; @@ -1855,7 +1798,7 @@ struct function_record; /// Internal data associated with a single function call struct function_call { - function_call(const function_record &f, handle p); // Implementation in attr.h + function_call(function_record &f, handle p); // Implementation in attr.h /// The function data: const function_record &func; @@ -1897,7 +1840,7 @@ class argument_loader { static constexpr bool has_kwargs = kwargs_pos < 0; static constexpr bool has_args = args_pos < 0; - static constexpr auto arg_names = concat(type_descr(make_caster::name)...); + static PYBIND11_DESCR arg_names() { return detail::concat(make_caster::name()...); } bool load_args(function_call &call) { return load_impl_sequence(call, indices{}); @@ -2116,13 +2059,9 @@ object object_api::call(Args &&...args) const { NAMESPACE_END(detail) -#define PYBIND11_MAKE_OPAQUE(...) \ +#define PYBIND11_MAKE_OPAQUE(Type) \ namespace pybind11 { namespace detail { \ - template<> class type_caster<__VA_ARGS__> : public type_caster_base<__VA_ARGS__> { }; \ + template<> class type_caster : public type_caster_base { }; \ }} -/// Lets you pass a type containing a `,` through a macro parameter without needing a separate -/// typedef, e.g.: `PYBIND11_OVERLOAD(PYBIND11_TYPE(ReturnType), PYBIND11_TYPE(Parent), f, arg)` -#define PYBIND11_TYPE(...) __VA_ARGS__ - NAMESPACE_END(PYBIND11_NAMESPACE) diff --git a/vnpy/api/tap/vntap/include/pybind11/chrono.h b/vnpy/api/tap/include/pybind11/chrono.h similarity index 100% rename from vnpy/api/tap/vntap/include/pybind11/chrono.h rename to vnpy/api/tap/include/pybind11/chrono.h diff --git a/vnpy/api/tap/vntap/include/pybind11/common.h b/vnpy/api/tap/include/pybind11/common.h similarity index 100% rename from vnpy/api/tap/vntap/include/pybind11/common.h rename to vnpy/api/tap/include/pybind11/common.h diff --git a/vnpy/api/tap/vntap/include/pybind11/complex.h b/vnpy/api/tap/include/pybind11/complex.h similarity index 98% rename from vnpy/api/tap/vntap/include/pybind11/complex.h rename to vnpy/api/tap/include/pybind11/complex.h index 3f89638571..5dac27cc4e 100644 --- a/vnpy/api/tap/vntap/include/pybind11/complex.h +++ b/vnpy/api/tap/include/pybind11/complex.h @@ -25,13 +25,9 @@ template struct format_descriptor, detail::enable_i static std::string format() { return std::string(value); } }; -#ifndef PYBIND11_CPP17 - template constexpr const char format_descriptor< std::complex, detail::enable_if_t::value>>::value[3]; -#endif - NAMESPACE_BEGIN(detail) template struct is_fmt_numeric, detail::enable_if_t::value>> { diff --git a/vnpy/api/tap/vntap/include/pybind11/detail/class.h b/vnpy/api/tap/include/pybind11/detail/class.h similarity index 99% rename from vnpy/api/tap/vntap/include/pybind11/detail/class.h rename to vnpy/api/tap/include/pybind11/detail/class.h index 7a5dd0130d..ff06370fa0 100644 --- a/vnpy/api/tap/vntap/include/pybind11/detail/class.h +++ b/vnpy/api/tap/include/pybind11/detail/class.h @@ -289,9 +289,13 @@ extern "C" inline int pybind11_object_init(PyObject *self, PyObject *, PyObject inline void add_patient(PyObject *nurse, PyObject *patient) { auto &internals = get_internals(); auto instance = reinterpret_cast(nurse); + auto ¤t_patients = internals.patients[nurse]; instance->has_patients = true; + for (auto &p : current_patients) + if (p == patient) + return; Py_INCREF(patient); - internals.patients[nurse].push_back(patient); + current_patients.push_back(patient); } inline void clear_patients(PyObject *self) { diff --git a/vnpy/api/tap/vntap/include/pybind11/detail/common.h b/vnpy/api/tap/include/pybind11/detail/common.h similarity index 93% rename from vnpy/api/tap/vntap/include/pybind11/detail/common.h rename to vnpy/api/tap/include/pybind11/detail/common.h index 5ff74856b1..892de0f8fd 100644 --- a/vnpy/api/tap/vntap/include/pybind11/detail/common.h +++ b/vnpy/api/tap/include/pybind11/detail/common.h @@ -93,8 +93,8 @@ #endif #define PYBIND11_VERSION_MAJOR 2 -#define PYBIND11_VERSION_MINOR 3 -#define PYBIND11_VERSION_PATCH dev0 +#define PYBIND11_VERSION_MINOR 2 +#define PYBIND11_VERSION_PATCH 4 /// Include Python header, disable linking to pythonX_d.lib on Windows in debug mode #if defined(_MSC_VER) @@ -159,8 +159,6 @@ #define PYBIND11_BYTES_SIZE PyBytes_Size #define PYBIND11_LONG_CHECK(o) PyLong_Check(o) #define PYBIND11_LONG_AS_LONGLONG(o) PyLong_AsLongLong(o) -#define PYBIND11_LONG_FROM_SIGNED(o) PyLong_FromSsize_t((ssize_t) o) -#define PYBIND11_LONG_FROM_UNSIGNED(o) PyLong_FromSize_t((size_t) o) #define PYBIND11_BYTES_NAME "bytes" #define PYBIND11_STRING_NAME "str" #define PYBIND11_SLICE_OBJECT PyObject @@ -183,8 +181,6 @@ #define PYBIND11_BYTES_SIZE PyString_Size #define PYBIND11_LONG_CHECK(o) (PyInt_Check(o) || PyLong_Check(o)) #define PYBIND11_LONG_AS_LONGLONG(o) (PyInt_Check(o) ? (long long) PyLong_AsLong(o) : PyLong_AsLongLong(o)) -#define PYBIND11_LONG_FROM_SIGNED(o) PyInt_FromSsize_t((ssize_t) o) // Returns long if needed. -#define PYBIND11_LONG_FROM_UNSIGNED(o) PyInt_FromSize_t((size_t) o) // Returns long if needed. #define PYBIND11_BYTES_NAME "str" #define PYBIND11_STRING_NAME "unicode" #define PYBIND11_SLICE_OBJECT PySliceObject @@ -212,31 +208,6 @@ extern "C" { #define PYBIND11_TOSTRING(x) PYBIND11_STRINGIFY(x) #define PYBIND11_CONCAT(first, second) first##second -#define PYBIND11_CHECK_PYTHON_VERSION \ - { \ - const char *compiled_ver = PYBIND11_TOSTRING(PY_MAJOR_VERSION) \ - "." PYBIND11_TOSTRING(PY_MINOR_VERSION); \ - const char *runtime_ver = Py_GetVersion(); \ - size_t len = std::strlen(compiled_ver); \ - if (std::strncmp(runtime_ver, compiled_ver, len) != 0 \ - || (runtime_ver[len] >= '0' && runtime_ver[len] <= '9')) { \ - PyErr_Format(PyExc_ImportError, \ - "Python version mismatch: module was compiled for Python %s, " \ - "but the interpreter version is incompatible: %s.", \ - compiled_ver, runtime_ver); \ - return nullptr; \ - } \ - } - -#define PYBIND11_CATCH_INIT_EXCEPTIONS \ - catch (pybind11::error_already_set &e) { \ - PyErr_SetString(PyExc_ImportError, e.what()); \ - return nullptr; \ - } catch (const std::exception &e) { \ - PyErr_SetString(PyExc_ImportError, e.what()); \ - return nullptr; \ - } \ - /** \rst ***Deprecated in favor of PYBIND11_MODULE*** @@ -256,10 +227,27 @@ extern "C" { PYBIND11_DEPRECATED("PYBIND11_PLUGIN is deprecated, use PYBIND11_MODULE") \ static PyObject *pybind11_init(); \ PYBIND11_PLUGIN_IMPL(name) { \ - PYBIND11_CHECK_PYTHON_VERSION \ + int major, minor; \ + if (sscanf(Py_GetVersion(), "%i.%i", &major, &minor) != 2) { \ + PyErr_SetString(PyExc_ImportError, "Can't parse Python version."); \ + return nullptr; \ + } else if (major != PY_MAJOR_VERSION || minor != PY_MINOR_VERSION) { \ + PyErr_Format(PyExc_ImportError, \ + "Python version mismatch: module was compiled for " \ + "version %i.%i, while the interpreter is running " \ + "version %i.%i.", PY_MAJOR_VERSION, PY_MINOR_VERSION, \ + major, minor); \ + return nullptr; \ + } \ try { \ return pybind11_init(); \ - } PYBIND11_CATCH_INIT_EXCEPTIONS \ + } catch (pybind11::error_already_set &e) { \ + PyErr_SetString(PyExc_ImportError, e.what()); \ + return nullptr; \ + } catch (const std::exception &e) { \ + PyErr_SetString(PyExc_ImportError, e.what()); \ + return nullptr; \ + } \ } \ PyObject *pybind11_init() @@ -283,12 +271,29 @@ extern "C" { #define PYBIND11_MODULE(name, variable) \ static void PYBIND11_CONCAT(pybind11_init_, name)(pybind11::module &); \ PYBIND11_PLUGIN_IMPL(name) { \ - PYBIND11_CHECK_PYTHON_VERSION \ + int major, minor; \ + if (sscanf(Py_GetVersion(), "%i.%i", &major, &minor) != 2) { \ + PyErr_SetString(PyExc_ImportError, "Can't parse Python version."); \ + return nullptr; \ + } else if (major != PY_MAJOR_VERSION || minor != PY_MINOR_VERSION) { \ + PyErr_Format(PyExc_ImportError, \ + "Python version mismatch: module was compiled for " \ + "version %i.%i, while the interpreter is running " \ + "version %i.%i.", PY_MAJOR_VERSION, PY_MINOR_VERSION, \ + major, minor); \ + return nullptr; \ + } \ auto m = pybind11::module(PYBIND11_TOSTRING(name)); \ try { \ PYBIND11_CONCAT(pybind11_init_, name)(m); \ return m.ptr(); \ - } PYBIND11_CATCH_INIT_EXCEPTIONS \ + } catch (pybind11::error_already_set &e) { \ + PyErr_SetString(PyExc_ImportError, e.what()); \ + return nullptr; \ + } catch (const std::exception &e) { \ + PyErr_SetString(PyExc_ImportError, e.what()); \ + return nullptr; \ + } \ } \ void PYBIND11_CONCAT(pybind11_init_, name)(pybind11::module &variable) @@ -386,7 +391,7 @@ struct instance { void *simple_value_holder[1 + instance_simple_holder_in_ptrs()]; nonsimple_values_and_holders nonsimple; }; - /// Weak references + /// Weak references (needed for keep alive): PyObject *weakrefs; /// If true, the pointer is owned which means we're free to manage it with a holder. bool owned : 1; @@ -403,10 +408,10 @@ struct instance { * (which is typically the size of two pointers), or when multiple inheritance is used on the * python side. Non-simple layout allocates the required amount of memory to have multiple * bound C++ classes as parents. Under this layout, `nonsimple.values_and_holders` is set to a - * pointer to allocated space of the required space to hold a sequence of value pointers and + * pointer to allocated space of the required space to hold a a sequence of value pointers and * holders followed `status`, a set of bit flags (1 byte each), i.e. * [val1*][holder1][val2*][holder2]...[bb...] where each [block] is rounded up to a multiple of - * `sizeof(void *)`. `nonsimple.status` is, for convenience, a pointer to the + * `sizeof(void *)`. `nonsimple.holder_constructed` is, for convenience, a pointer to the * beginning of the [bb...] block (but not independently allocated). * * Status bits indicate whether the associated holder is constructed (& @@ -579,11 +584,6 @@ template using deferred_t = typename deferred_type< template using is_strict_base_of = bool_constant< std::is_base_of::value && !std::is_same::value>; -/// Like is_base_of, but also requires that the base type is accessible (i.e. that a Derived pointer -/// can be converted to a Base pointer) -template using is_accessible_base_of = bool_constant< - std::is_base_of::value && std::is_convertible::value>; - template class Base> struct is_template_base_of_impl { template static std::true_type check(Base *); @@ -702,13 +702,9 @@ template struct format_descriptor constexpr const char format_descriptor< T, detail::enable_if_t::value>>::value[2]; -#endif - /// RAII wrapper that temporarily clears any Python error state struct error_scope { PyObject *type, *value, *trace; diff --git a/vnpy/api/tap/include/pybind11/detail/descr.h b/vnpy/api/tap/include/pybind11/detail/descr.h new file mode 100644 index 0000000000..e3bf2ba978 --- /dev/null +++ b/vnpy/api/tap/include/pybind11/detail/descr.h @@ -0,0 +1,185 @@ +/* + pybind11/detail/descr.h: Helper type for concatenating type signatures + either at runtime (C++11) or compile time (C++14) + + Copyright (c) 2016 Wenzel Jakob + + All rights reserved. Use of this source code is governed by a + BSD-style license that can be found in the LICENSE file. +*/ + +#pragma once + +#include "common.h" + +NAMESPACE_BEGIN(PYBIND11_NAMESPACE) +NAMESPACE_BEGIN(detail) + +/* Concatenate type signatures at compile time using C++14 */ +#if defined(PYBIND11_CPP14) && !defined(_MSC_VER) +#define PYBIND11_CONSTEXPR_DESCR + +template class descr { + template friend class descr; +public: + constexpr descr(char const (&text) [Size1+1], const std::type_info * const (&types)[Size2+1]) + : descr(text, types, + make_index_sequence(), + make_index_sequence()) { } + + constexpr const char *text() const { return m_text; } + constexpr const std::type_info * const * types() const { return m_types; } + + template + constexpr descr operator+(const descr &other) const { + return concat(other, + make_index_sequence(), + make_index_sequence(), + make_index_sequence(), + make_index_sequence()); + } + +protected: + template + constexpr descr( + char const (&text) [Size1+1], + const std::type_info * const (&types) [Size2+1], + index_sequence, index_sequence) + : m_text{text[Indices1]..., '\0'}, + m_types{types[Indices2]..., nullptr } {} + + template + constexpr descr + concat(const descr &other, + index_sequence, index_sequence, + index_sequence, index_sequence) const { + return descr( + { m_text[Indices1]..., other.m_text[OtherIndices1]..., '\0' }, + { m_types[Indices2]..., other.m_types[OtherIndices2]..., nullptr } + ); + } + +protected: + char m_text[Size1 + 1]; + const std::type_info * m_types[Size2 + 1]; +}; + +template constexpr descr _(char const(&text)[Size]) { + return descr(text, { nullptr }); +} + +template struct int_to_str : int_to_str { }; +template struct int_to_str<0, Digits...> { + static constexpr auto digits = descr({ ('0' + Digits)..., '\0' }, { nullptr }); +}; + +// Ternary description (like std::conditional) +template +constexpr enable_if_t> _(char const(&text1)[Size1], char const(&)[Size2]) { + return _(text1); +} +template +constexpr enable_if_t> _(char const(&)[Size1], char const(&text2)[Size2]) { + return _(text2); +} +template +constexpr enable_if_t> _(descr d, descr) { return d; } +template +constexpr enable_if_t> _(descr, descr d) { return d; } + +template auto constexpr _() -> decltype(int_to_str::digits) { + return int_to_str::digits; +} + +template constexpr descr<1, 1> _() { + return descr<1, 1>({ '%', '\0' }, { &typeid(Type), nullptr }); +} + +inline constexpr descr<0, 0> concat() { return _(""); } +template auto constexpr concat(descr descr) { return descr; } +template auto constexpr concat(descr descr, Args&&... args) { return descr + _(", ") + concat(args...); } +template auto constexpr type_descr(descr descr) { return _("{") + descr + _("}"); } + +#define PYBIND11_DESCR constexpr auto + +#else /* Simpler C++11 implementation based on run-time memory allocation and copying */ + +class descr { +public: + PYBIND11_NOINLINE descr(const char *text, const std::type_info * const * types) { + size_t nChars = len(text), nTypes = len(types); + m_text = new char[nChars]; + m_types = new const std::type_info *[nTypes]; + memcpy(m_text, text, nChars * sizeof(char)); + memcpy(m_types, types, nTypes * sizeof(const std::type_info *)); + } + + PYBIND11_NOINLINE descr operator+(descr &&d2) && { + descr r; + + size_t nChars1 = len(m_text), nTypes1 = len(m_types); + size_t nChars2 = len(d2.m_text), nTypes2 = len(d2.m_types); + + r.m_text = new char[nChars1 + nChars2 - 1]; + r.m_types = new const std::type_info *[nTypes1 + nTypes2 - 1]; + memcpy(r.m_text, m_text, (nChars1-1) * sizeof(char)); + memcpy(r.m_text + nChars1 - 1, d2.m_text, nChars2 * sizeof(char)); + memcpy(r.m_types, m_types, (nTypes1-1) * sizeof(std::type_info *)); + memcpy(r.m_types + nTypes1 - 1, d2.m_types, nTypes2 * sizeof(std::type_info *)); + + delete[] m_text; delete[] m_types; + delete[] d2.m_text; delete[] d2.m_types; + + return r; + } + + char *text() { return m_text; } + const std::type_info * * types() { return m_types; } + +protected: + PYBIND11_NOINLINE descr() { } + + template static size_t len(const T *ptr) { // return length including null termination + const T *it = ptr; + while (*it++ != (T) 0) + ; + return static_cast(it - ptr); + } + + const std::type_info **m_types = nullptr; + char *m_text = nullptr; +}; + +/* The 'PYBIND11_NOINLINE inline' combinations below are intentional to get the desired linkage while producing as little object code as possible */ + +PYBIND11_NOINLINE inline descr _(const char *text) { + const std::type_info *types[1] = { nullptr }; + return descr(text, types); +} + +template PYBIND11_NOINLINE enable_if_t _(const char *text1, const char *) { return _(text1); } +template PYBIND11_NOINLINE enable_if_t _(char const *, const char *text2) { return _(text2); } +template PYBIND11_NOINLINE enable_if_t _(descr d, descr) { return d; } +template PYBIND11_NOINLINE enable_if_t _(descr, descr d) { return d; } + +template PYBIND11_NOINLINE descr _() { + const std::type_info *types[2] = { &typeid(Type), nullptr }; + return descr("%", types); +} + +template PYBIND11_NOINLINE descr _() { + const std::type_info *types[1] = { nullptr }; + return descr(std::to_string(Size).c_str(), types); +} + +PYBIND11_NOINLINE inline descr concat() { return _(""); } +PYBIND11_NOINLINE inline descr concat(descr &&d) { return d; } +template PYBIND11_NOINLINE descr concat(descr &&d, Args&&... args) { return std::move(d) + _(", ") + concat(std::forward(args)...); } +PYBIND11_NOINLINE inline descr type_descr(descr&& d) { return _("{") + std::move(d) + _("}"); } + +#define PYBIND11_DESCR ::pybind11::detail::descr +#endif + +NAMESPACE_END(detail) +NAMESPACE_END(PYBIND11_NAMESPACE) diff --git a/vnpy/api/tap/vntap/include/pybind11/detail/init.h b/vnpy/api/tap/include/pybind11/detail/init.h similarity index 99% rename from vnpy/api/tap/vntap/include/pybind11/detail/init.h rename to vnpy/api/tap/include/pybind11/detail/init.h index acfe00bdb7..82f7407606 100644 --- a/vnpy/api/tap/vntap/include/pybind11/detail/init.h +++ b/vnpy/api/tap/include/pybind11/detail/init.h @@ -24,7 +24,7 @@ class type_caster { template using cast_op_type = value_and_holder &; operator value_and_holder &() { return *value; } - static constexpr auto name = _(); + static PYBIND11_DESCR name() { return type_descr(_()); } private: value_and_holder *value = nullptr; diff --git a/vnpy/api/tap/vntap/include/pybind11/detail/internals.h b/vnpy/api/tap/include/pybind11/detail/internals.h similarity index 98% rename from vnpy/api/tap/vntap/include/pybind11/detail/internals.h rename to vnpy/api/tap/include/pybind11/detail/internals.h index 6d7dc5cfe9..78d4afed01 100644 --- a/vnpy/api/tap/vntap/include/pybind11/detail/internals.h +++ b/vnpy/api/tap/include/pybind11/detail/internals.h @@ -116,7 +116,7 @@ struct internals { struct type_info { PyTypeObject *type; const std::type_info *cpptype; - size_t type_size, type_align, holder_size_in_ptrs; + size_t type_size, holder_size_in_ptrs; void *(*operator_new)(size_t); void (*init_instance)(instance *, const void *); void (*dealloc)(value_and_holder &v_h); @@ -138,13 +138,7 @@ struct type_info { }; /// Tracks the `internals` and `type_info` ABI version independent of the main library version -#define PYBIND11_INTERNALS_VERSION 3 - -#if defined(_DEBUG) -# define PYBIND11_BUILD_TYPE "_debug" -#else -# define PYBIND11_BUILD_TYPE "" -#endif +#define PYBIND11_INTERNALS_VERSION 2 #if defined(WITH_THREAD) # define PYBIND11_INTERNALS_KIND "" @@ -153,10 +147,10 @@ struct type_info { #endif #define PYBIND11_INTERNALS_ID "__pybind11_internals_v" \ - PYBIND11_TOSTRING(PYBIND11_INTERNALS_VERSION) PYBIND11_INTERNALS_KIND PYBIND11_BUILD_TYPE "__" + PYBIND11_TOSTRING(PYBIND11_INTERNALS_VERSION) PYBIND11_INTERNALS_KIND "__" #define PYBIND11_MODULE_LOCAL_ID "__pybind11_module_local_v" \ - PYBIND11_TOSTRING(PYBIND11_INTERNALS_VERSION) PYBIND11_INTERNALS_KIND PYBIND11_BUILD_TYPE "__" + PYBIND11_TOSTRING(PYBIND11_INTERNALS_VERSION) PYBIND11_INTERNALS_KIND "__" /// Each module locally stores a pointer to the `internals` data. The data /// itself is shared among modules with the same `PYBIND11_INTERNALS_ID`. diff --git a/vnpy/api/tap/vntap/include/pybind11/detail/typeid.h b/vnpy/api/tap/include/pybind11/detail/typeid.h similarity index 100% rename from vnpy/api/tap/vntap/include/pybind11/detail/typeid.h rename to vnpy/api/tap/include/pybind11/detail/typeid.h diff --git a/vnpy/api/tap/vntap/include/pybind11/eigen.h b/vnpy/api/tap/include/pybind11/eigen.h similarity index 93% rename from vnpy/api/tap/vntap/include/pybind11/eigen.h rename to vnpy/api/tap/include/pybind11/eigen.h index d963d9650b..0899ec73f7 100644 --- a/vnpy/api/tap/vntap/include/pybind11/eigen.h +++ b/vnpy/api/tap/include/pybind11/eigen.h @@ -17,11 +17,6 @@ # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wconversion" # pragma GCC diagnostic ignored "-Wdeprecated-declarations" -# ifdef __clang__ -// Eigen generates a bunch of implicit-copy-constructor-is-deprecated warnings with -Wdeprecated -// under Clang, so disable that warning here: -# pragma GCC diagnostic ignored "-Wdeprecated" -# endif # if __GNUC__ >= 7 # pragma GCC diagnostic ignored "-Wint-in-bool-context" # endif @@ -186,26 +181,28 @@ template struct EigenProps { } } - static constexpr bool show_writeable = is_eigen_dense_map::value && is_eigen_mutable_map::value; - static constexpr bool show_order = is_eigen_dense_map::value; - static constexpr bool show_c_contiguous = show_order && requires_row_major; - static constexpr bool show_f_contiguous = !show_c_contiguous && show_order && requires_col_major; - - static constexpr auto descriptor = - _("numpy.ndarray[") + npy_format_descriptor::name + - _("[") + _(_<(size_t) rows>(), _("m")) + - _(", ") + _(_<(size_t) cols>(), _("n")) + - _("]") + - // For a reference type (e.g. Ref) we have other constraints that might need to be - // satisfied: writeable=True (for a mutable reference), and, depending on the map's stride - // options, possibly f_contiguous or c_contiguous. We include them in the descriptor output - // to provide some hint as to why a TypeError is occurring (otherwise it can be confusing to - // see that a function accepts a 'numpy.ndarray[float64[3,2]]' and an error message that you - // *gave* a numpy.ndarray of the right type and dimensions. - _(", flags.writeable", "") + - _(", flags.c_contiguous", "") + - _(", flags.f_contiguous", "") + - _("]"); + static PYBIND11_DESCR descriptor() { + constexpr bool show_writeable = is_eigen_dense_map::value && is_eigen_mutable_map::value; + constexpr bool show_order = is_eigen_dense_map::value; + constexpr bool show_c_contiguous = show_order && requires_row_major; + constexpr bool show_f_contiguous = !show_c_contiguous && show_order && requires_col_major; + + return type_descr(_("numpy.ndarray[") + npy_format_descriptor::name() + + _("[") + _(_<(size_t) rows>(), _("m")) + + _(", ") + _(_<(size_t) cols>(), _("n")) + + _("]") + + // For a reference type (e.g. Ref) we have other constraints that might need to be + // satisfied: writeable=True (for a mutable reference), and, depending on the map's stride + // options, possibly f_contiguous or c_contiguous. We include them in the descriptor output + // to provide some hint as to why a TypeError is occurring (otherwise it can be confusing to + // see that a function accepts a 'numpy.ndarray[float64[3,2]]' and an error message that you + // *gave* a numpy.ndarray of the right type and dimensions. + _(", flags.writeable", "") + + _(", flags.c_contiguous", "") + + _(", flags.f_contiguous", "") + + _("]") + ); + } }; // Casts an Eigen type to numpy array. If given a base, the numpy array references the src data, @@ -342,7 +339,7 @@ struct type_caster::value>> { return cast_impl(src, policy, parent); } - static constexpr auto name = props::descriptor; + static PYBIND11_DESCR name() { return props::descriptor(); } operator Type*() { return &value; } operator Type&() { return value; } @@ -382,7 +379,7 @@ template struct eigen_map_caster { } } - static constexpr auto name = props::descriptor; + static PYBIND11_DESCR name() { return props::descriptor(); } // Explicitly delete these: support python -> C++ conversion on these (i.e. these can be return // types but not bound arguments). We still provide them (with an explicitly delete) so that @@ -527,7 +524,7 @@ struct type_caster::value>> { } static handle cast(const Type *src, return_value_policy policy, handle parent) { return cast(*src, policy, parent); } - static constexpr auto name = props::descriptor; + static PYBIND11_DESCR name() { return props::descriptor(); } // Explicitly delete these: support python -> C++ conversion on these (i.e. these can be return // types but not bound arguments). We still provide them (with an explicitly delete) so that @@ -594,7 +591,7 @@ struct type_caster::value>> { } PYBIND11_TYPE_CASTER(Type, _<(Type::IsRowMajor) != 0>("scipy.sparse.csr_matrix[", "scipy.sparse.csc_matrix[") - + npy_format_descriptor::name + _("]")); + + npy_format_descriptor::name() + _("]")); }; NAMESPACE_END(detail) diff --git a/vnpy/api/tap/vntap/include/pybind11/embed.h b/vnpy/api/tap/include/pybind11/embed.h similarity index 94% rename from vnpy/api/tap/vntap/include/pybind11/embed.h rename to vnpy/api/tap/include/pybind11/embed.h index 72655885eb..9abc61c345 100644 --- a/vnpy/api/tap/vntap/include/pybind11/embed.h +++ b/vnpy/api/tap/include/pybind11/embed.h @@ -90,14 +90,8 @@ NAMESPACE_END(detail) Initialize the Python interpreter. No other pybind11 or CPython API functions can be called before this is done; with the exception of `PYBIND11_EMBEDDED_MODULE`. The optional parameter can be used to skip the registration of signal handlers (see the - `Python documentation`_ for details). Calling this function again after the interpreter + Python documentation for details). Calling this function again after the interpreter has already been initialized is a fatal error. - - If initializing the Python interpreter fails, then the program is terminated. (This - is controlled by the CPython runtime and is an exception to pybind11's normal behavior - of throwing exceptions on errors.) - - .. _Python documentation: https://docs.python.org/3/c-api/init.html#c.Py_InitializeEx \endrst */ inline void initialize_interpreter(bool init_signal_handlers = true) { if (Py_IsInitialized()) diff --git a/vnpy/api/tap/vntap/include/pybind11/eval.h b/vnpy/api/tap/include/pybind11/eval.h similarity index 100% rename from vnpy/api/tap/vntap/include/pybind11/eval.h rename to vnpy/api/tap/include/pybind11/eval.h diff --git a/vnpy/api/tap/vntap/include/pybind11/functional.h b/vnpy/api/tap/include/pybind11/functional.h similarity index 93% rename from vnpy/api/tap/vntap/include/pybind11/functional.h rename to vnpy/api/tap/include/pybind11/functional.h index 9cdf21f7ad..eda14ba583 100644 --- a/vnpy/api/tap/vntap/include/pybind11/functional.h +++ b/vnpy/api/tap/include/pybind11/functional.h @@ -75,8 +75,10 @@ struct type_caster> { return cpp_function(std::forward(f_), policy).release(); } - PYBIND11_TYPE_CASTER(type, _("Callable[[") + concat(make_caster::name...) + _("], ") - + make_caster::name + _("]")); + PYBIND11_TYPE_CASTER(type, _("Callable[[") + + argument_loader::arg_names() + _("], ") + + make_caster::name() + + _("]")); }; NAMESPACE_END(detail) diff --git a/vnpy/api/tap/vntap/include/pybind11/iostream.h b/vnpy/api/tap/include/pybind11/iostream.h similarity index 98% rename from vnpy/api/tap/vntap/include/pybind11/iostream.h rename to vnpy/api/tap/include/pybind11/iostream.h index 182e8eefd8..3caf556392 100644 --- a/vnpy/api/tap/vntap/include/pybind11/iostream.h +++ b/vnpy/api/tap/include/pybind11/iostream.h @@ -194,7 +194,7 @@ inline class_ add_ostream_redirect(module m, std::strin return class_(m, name.c_str(), module_local()) .def(init(), arg("stdout")=true, arg("stderr")=true) .def("__enter__", &detail::OstreamRedirect::enter) - .def("__exit__", [](detail::OstreamRedirect &self_, args) { self_.exit(); }); + .def("__exit__", [](detail::OstreamRedirect &self, args) { self.exit(); }); } NAMESPACE_END(PYBIND11_NAMESPACE) diff --git a/vnpy/api/tap/vntap/include/pybind11/numpy.h b/vnpy/api/tap/include/pybind11/numpy.h similarity index 95% rename from vnpy/api/tap/vntap/include/pybind11/numpy.h rename to vnpy/api/tap/include/pybind11/numpy.h index 37471d8be9..9df4934991 100644 --- a/vnpy/api/tap/vntap/include/pybind11/numpy.h +++ b/vnpy/api/tap/include/pybind11/numpy.h @@ -18,9 +18,9 @@ #include #include #include +#include #include #include -#include #include #if defined(_MSC_VER) @@ -250,7 +250,7 @@ template struct array_info_scalar { typedef T type; static constexpr bool is_array = false; static constexpr bool is_empty = false; - static constexpr auto extents = _(""); + static PYBIND11_DESCR extents() { return _(""); } static void append_extents(list& /* shape */) { } }; // Computes underlying type and a comma-separated list of extents for array @@ -269,9 +269,15 @@ template struct array_info> { array_info::append_extents(shape); } - static constexpr auto extents = _::is_array>( - concat(_(), array_info::extents), _() - ); + template::is_array, int> = 0> + static PYBIND11_DESCR extents() { + return _(); + } + + template::is_array, int> = 0> + static PYBIND11_DESCR extents() { + return concat(_(), array_info::extents()); + } }; // For numpy we have special handling for arrays of characters, so we don't include // the size in the array extents. @@ -440,7 +446,7 @@ class dtype : public object { /// This is essentially the same as calling numpy.dtype(args) in Python. static dtype from_args(object args) { PyObject *ptr = nullptr; - if (!detail::npy_api::get().PyArray_DescrConverter_(args.ptr(), &ptr) || !ptr) + if (!detail::npy_api::get().PyArray_DescrConverter_(args.release().ptr(), &ptr) || !ptr) throw error_already_set(); return reinterpret_steal(ptr); } @@ -942,8 +948,8 @@ template struct format_descriptor::is_array>> { static std::string format() { using namespace detail; - static constexpr auto extents = _("(") + array_info::extents + _(")"); - return extents.text + format_descriptor>::format(); + PYBIND11_DESCR extents = _("(") + array_info::extents() + _(")"); + return extents.text() + format_descriptor>::format(); } }; @@ -962,7 +968,7 @@ struct pyobject_caster> { static handle cast(const handle &src, return_value_policy /* policy */, handle /* parent */) { return src.inc_ref(); } - PYBIND11_TYPE_CASTER(type, handle_type_name::name); + PYBIND11_TYPE_CASTER(type, handle_type_name::name()); }; template @@ -972,34 +978,7 @@ struct compare_buffer_info::valu } }; -template -struct npy_format_descriptor_name; - -template -struct npy_format_descriptor_name::value>> { - static constexpr auto name = _::value>( - _("bool"), _::value>("int", "uint") + _() - ); -}; - -template -struct npy_format_descriptor_name::value>> { - static constexpr auto name = _::value || std::is_same::value>( - _("float") + _(), _("longdouble") - ); -}; - -template -struct npy_format_descriptor_name::value>> { - static constexpr auto name = _::value - || std::is_same::value>( - _("complex") + _(), _("longcomplex") - ); -}; - -template -struct npy_format_descriptor::value>> - : npy_format_descriptor_name { +template struct npy_format_descriptor::value>> { private: // NB: the order here must match the one in common.h constexpr static const int values[15] = { @@ -1018,10 +997,25 @@ struct npy_format_descriptor(ptr); pybind11_fail("Unsupported buffer format!"); } + template ::value, int> = 0> + static PYBIND11_DESCR name() { + return _::value>(_("bool"), + _::value>("int", "uint") + _()); + } + template ::value, int> = 0> + static PYBIND11_DESCR name() { + return _::value || std::is_same::value>( + _("float") + _(), _("longdouble")); + } + template ::value, int> = 0> + static PYBIND11_DESCR name() { + return _::value || std::is_same::value>( + _("complex") + _(), _("longcomplex")); + } }; #define PYBIND11_DECL_CHAR_FMT \ - static constexpr auto name = _("S") + _(); \ + static PYBIND11_DESCR name() { return _("S") + _(); } \ static pybind11::dtype dtype() { return pybind11::dtype(std::string("S") + std::to_string(N)); } template struct npy_format_descriptor { PYBIND11_DECL_CHAR_FMT }; template struct npy_format_descriptor> { PYBIND11_DECL_CHAR_FMT }; @@ -1033,7 +1027,7 @@ template struct npy_format_descriptor:: public: static_assert(!array_info::is_empty, "Zero-sized arrays are not supported"); - static constexpr auto name = _("(") + array_info::extents + _(")") + base_descr::name; + static PYBIND11_DESCR name() { return _("(") + array_info::extents() + _(")") + base_descr::name(); } static pybind11::dtype dtype() { list shape; array_info::append_extents(shape); @@ -1045,7 +1039,7 @@ template struct npy_format_descriptor private: using base_descr = npy_format_descriptor::type>; public: - static constexpr auto name = base_descr::name; + static PYBIND11_DESCR name() { return base_descr::name(); } static pybind11::dtype dtype() { return base_descr::dtype(); } }; @@ -1058,7 +1052,7 @@ struct field_descriptor { }; inline PYBIND11_NOINLINE void register_structured_dtype( - any_container fields, + const std::initializer_list& fields, const std::type_info& tinfo, ssize_t itemsize, bool (*direct_converter)(PyObject *, void *&)) { @@ -1067,7 +1061,7 @@ inline PYBIND11_NOINLINE void register_structured_dtype( pybind11_fail("NumPy: dtype is already registered"); list names, formats, offsets; - for (auto field : *fields) { + for (auto field : fields) { if (!field.descr) pybind11_fail(std::string("NumPy: unsupported field dtype: `") + field.name + "` @ " + tinfo.name()); @@ -1084,7 +1078,7 @@ inline PYBIND11_NOINLINE void register_structured_dtype( // - https://github.com/numpy/numpy/pull/7798 // Because of this, we won't use numpy's logic to generate buffer format // strings and will just do it ourselves. - std::vector ordered_fields(std::move(fields)); + std::vector ordered_fields(fields); std::sort(ordered_fields.begin(), ordered_fields.end(), [](const field_descriptor &a, const field_descriptor &b) { return a.offset < b.offset; }); ssize_t offset = 0; @@ -1120,7 +1114,7 @@ inline PYBIND11_NOINLINE void register_structured_dtype( template struct npy_format_descriptor { static_assert(is_pod_struct::value, "Attempt to use a non-POD or unimplemented POD type as a numpy dtype"); - static constexpr auto name = make_caster::name; + static PYBIND11_DESCR name() { return make_caster::name(); } static pybind11::dtype dtype() { return reinterpret_borrow(dtype_ptr()); @@ -1131,8 +1125,8 @@ template struct npy_format_descriptor { return format_str; } - static void register_dtype(any_container fields) { - register_structured_dtype(std::move(fields), typeid(typename std::remove_cv::type), + static void register_dtype(const std::initializer_list& fields) { + register_structured_dtype(fields, typeid(typename std::remove_cv::type), sizeof(T), &direct_converter); } @@ -1205,8 +1199,7 @@ template struct npy_format_descriptor { #define PYBIND11_NUMPY_DTYPE(Type, ...) \ ::pybind11::detail::npy_format_descriptor::register_dtype \ - (::std::vector<::pybind11::detail::field_descriptor> \ - {PYBIND11_MAP_LIST (PYBIND11_FIELD_DESCRIPTOR, Type, __VA_ARGS__)}) + ({PYBIND11_MAP_LIST (PYBIND11_FIELD_DESCRIPTOR, Type, __VA_ARGS__)}) #ifdef _MSC_VER #define PYBIND11_MAP2_LIST_NEXT1(test, next) \ @@ -1227,8 +1220,7 @@ template struct npy_format_descriptor { #define PYBIND11_NUMPY_DTYPE_EX(Type, ...) \ ::pybind11::detail::npy_format_descriptor::register_dtype \ - (::std::vector<::pybind11::detail::field_descriptor> \ - {PYBIND11_MAP2_LIST (PYBIND11_FIELD_DESCRIPTOR_EX, Type, __VA_ARGS__)}) + ({PYBIND11_MAP2_LIST (PYBIND11_FIELD_DESCRIPTOR_EX, Type, __VA_ARGS__)}) #endif // __CLION_IDE__ @@ -1466,10 +1458,7 @@ struct vectorize_helper { private: remove_reference_t f; - // Internal compiler error in MSVC 19.16.27025.1 (Visual Studio 2017 15.9.4), when compiling with "/permissive-" flag - // when arg_call_types is manually inlined. - using arg_call_types = std::tuple::call_type...>; - template using param_n_t = typename std::tuple_element::type; + template using param_n_t = typename pack_element::call_type...>::type; // Runs a vectorized function given arguments tuple and three index sequences: // - Index is the full set of 0 ... (N-1) argument indices; @@ -1570,7 +1559,9 @@ vectorize_extractor(const Func &f, Return (*) (Args ...)) { } template struct handle_type_name> { - static constexpr auto name = _("numpy.ndarray[") + npy_format_descriptor::name + _("]"); + static PYBIND11_DESCR name() { + return _("numpy.ndarray[") + npy_format_descriptor::name() + _("]"); + } }; NAMESPACE_END(detail) diff --git a/vnpy/api/tap/vntap/include/pybind11/operators.h b/vnpy/api/tap/include/pybind11/operators.h similarity index 100% rename from vnpy/api/tap/vntap/include/pybind11/operators.h rename to vnpy/api/tap/include/pybind11/operators.h diff --git a/vnpy/api/tap/vntap/include/pybind11/options.h b/vnpy/api/tap/include/pybind11/options.h similarity index 100% rename from vnpy/api/tap/vntap/include/pybind11/options.h rename to vnpy/api/tap/include/pybind11/options.h diff --git a/vnpy/api/tap/vntap/include/pybind11/pybind11.h b/vnpy/api/tap/include/pybind11/pybind11.h similarity index 85% rename from vnpy/api/tap/vntap/include/pybind11/pybind11.h rename to vnpy/api/tap/include/pybind11/pybind11.h index 451140e05f..9094fc4244 100644 --- a/vnpy/api/tap/vntap/include/pybind11/pybind11.h +++ b/vnpy/api/tap/include/pybind11/pybind11.h @@ -10,17 +10,7 @@ #pragma once -#if defined(__INTEL_COMPILER) -# pragma warning push -# pragma warning disable 68 // integer conversion resulted in a change of sign -# pragma warning disable 186 // pointless comparison of unsigned integer with zero -# pragma warning disable 878 // incompatible exception specifications -# pragma warning disable 1334 // the "template" keyword used for syntactic disambiguation may only be used within a template -# pragma warning disable 1682 // implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem) -# pragma warning disable 1786 // function "strdup" was declared deprecated -# pragma warning disable 1875 // offsetof applied to non-POD (Plain Old Data) types is nonstandard -# pragma warning disable 2196 // warning #2196: routine is both "inline" and "noinline" -#elif defined(_MSC_VER) +#if defined(_MSC_VER) # pragma warning(push) # pragma warning(disable: 4100) // warning C4100: Unreferenced formal parameter # pragma warning(disable: 4127) // warning C4127: Conditional expression is constant @@ -29,6 +19,15 @@ # pragma warning(disable: 4996) // warning C4996: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name # pragma warning(disable: 4702) // warning C4702: unreachable code # pragma warning(disable: 4522) // warning C4522: multiple assignment operators specified +#elif defined(__INTEL_COMPILER) +# pragma warning(push) +# pragma warning(disable: 68) // integer conversion resulted in a change of sign +# pragma warning(disable: 186) // pointless comparison of unsigned integer with zero +# pragma warning(disable: 878) // incompatible exception specifications +# pragma warning(disable: 1334) // the "template" keyword used for syntactic disambiguation may only be used within a template +# pragma warning(disable: 1682) // implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem) +# pragma warning(disable: 1875) // offsetof applied to non-POD (Plain Old Data) types is nonstandard +# pragma warning(disable: 2196) // warning #2196: routine is both "inline" and "noinline" #elif defined(__GNUG__) && !defined(__clang__) # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wunused-but-set-parameter" @@ -52,7 +51,6 @@ NAMESPACE_BEGIN(PYBIND11_NAMESPACE) class cpp_function : public function { public: cpp_function() { } - cpp_function(std::nullptr_t) { } /// Construct a cpp_function from a vanilla function pointer template @@ -95,6 +93,7 @@ class cpp_function : public function { template void initialize(Func &&f, Return (*)(Args...), const Extra&... extra) { using namespace detail; + struct capture { remove_reference_t f; }; /* Store the function including any extra state it might have (e.g. a lambda capture object) */ @@ -165,11 +164,10 @@ class cpp_function : public function { process_attributes::init(extra..., rec); /* Generate a readable signature describing the function's arguments and return value types */ - static constexpr auto signature = _("(") + cast_in::arg_names + _(") -> ") + cast_out::name; - PYBIND11_DESCR_CONSTEXPR auto types = decltype(signature)::types(); + PYBIND11_DESCR signature = _("(") + cast_in::arg_names() + _(") -> ") + cast_out::name(); /* Register the function with Python from generic (non-templated) code */ - initialize_generic(rec, signature.text, types.data(), sizeof...(Args)); + initialize_generic(rec, signature.text(), signature.types(), sizeof...(Args)); if (cast_in::has_args) rec->has_args = true; if (cast_in::has_kwargs) rec->has_kwargs = true; @@ -219,30 +217,34 @@ class cpp_function : public function { /* Generate a proper function signature */ std::string signature; - size_t type_index = 0, arg_index = 0; - for (auto *pc = text; *pc != '\0'; ++pc) { - const auto c = *pc; + size_t type_depth = 0, char_index = 0, type_index = 0, arg_index = 0; + while (true) { + char c = text[char_index++]; + if (c == '\0') + break; if (c == '{') { - // Write arg name for everything except *args and **kwargs. - if (*(pc + 1) == '*') - continue; - - if (arg_index < rec->args.size() && rec->args[arg_index].name) { - signature += rec->args[arg_index].name; - } else if (arg_index == 0 && rec->is_method) { - signature += "self"; - } else { - signature += "arg" + std::to_string(arg_index - (rec->is_method ? 1 : 0)); + // Write arg name for everything except *args, **kwargs and return type. + if (type_depth == 0 && text[char_index] != '*' && arg_index < args) { + if (!rec->args.empty() && rec->args[arg_index].name) { + signature += rec->args[arg_index].name; + } else if (arg_index == 0 && rec->is_method) { + signature += "self"; + } else { + signature += "arg" + std::to_string(arg_index - (rec->is_method ? 1 : 0)); + } + signature += ": "; } - signature += ": "; + ++type_depth; } else if (c == '}') { - // Write default value if available. - if (arg_index < rec->args.size() && rec->args[arg_index].descr) { - signature += " = "; - signature += rec->args[arg_index].descr; + --type_depth; + if (type_depth == 0) { + if (arg_index < rec->args.size() && rec->args[arg_index].descr) { + signature += "="; + signature += rec->args[arg_index].descr; + } + arg_index++; } - arg_index++; } else if (c == '%') { const std::type_info *t = types[type_index++]; if (!t) @@ -267,9 +269,14 @@ class cpp_function : public function { signature += c; } } - if (arg_index != args || types[type_index] != nullptr) + if (type_depth != 0 || types[type_index] != nullptr) pybind11_fail("Internal error while parsing type signature (2)"); + #if !defined(PYBIND11_CONSTEXPR_DESCR) + delete[] types; + delete[] text; + #endif + #if PY_MAJOR_VERSION < 3 if (strcmp(rec->name, "__next__") == 0) { std::free(rec->name); @@ -421,8 +428,8 @@ class cpp_function : public function { using namespace detail; /* Iterator over the list of potentially admissible overloads */ - const function_record *overloads = (function_record *) PyCapsule_GetPointer(self, nullptr), - *it = overloads; + function_record *overloads = (function_record *) PyCapsule_GetPointer(self, nullptr), + *it = overloads; /* Need to know how many arguments + keyword arguments there are to pick the right overload */ const size_t n_args_in = (size_t) PyTuple_GET_SIZE(args_in); @@ -478,7 +485,7 @@ class cpp_function : public function { result other than PYBIND11_TRY_NEXT_OVERLOAD. */ - const function_record &func = *it; + function_record &func = *it; size_t pos_args = func.nargs; // Number of positional arguments that we need if (func.has_args) --pos_args; // (but don't count py::args if (func.has_kwargs) --pos_args; // or py::kwargs) @@ -510,7 +517,7 @@ class cpp_function : public function { // 1. Copy any position arguments given. bool bad_arg = false; for (; args_copied < args_to_copy; ++args_copied) { - const argument_record *arg_rec = args_copied < func.args.size() ? &func.args[args_copied] : nullptr; + argument_record *arg_rec = args_copied < func.args.size() ? &func.args[args_copied] : nullptr; if (kwargs_in && arg_rec && arg_rec->name && PyDict_GetItemString(kwargs_in, arg_rec->name)) { bad_arg = true; break; @@ -651,13 +658,8 @@ class cpp_function : public function { result = PYBIND11_TRY_NEXT_OVERLOAD; } - if (result.ptr() != PYBIND11_TRY_NEXT_OVERLOAD) { - // The error reporting logic below expects 'it' to be valid, as it would be - // if we'd encountered this failure in the first-pass loop. - if (!result) - it = &call.func; + if (result.ptr() != PYBIND11_TRY_NEXT_OVERLOAD) break; - } } } } catch (error_already_set &e) { @@ -709,7 +711,7 @@ class cpp_function : public function { " arguments. The following argument types are supported:\n"; int ctr = 0; - for (const function_record *it2 = overloads; it2 != nullptr; it2 = it2->next) { + for (function_record *it2 = overloads; it2 != nullptr; it2 = it2->next) { msg += " "+ std::to_string(++ctr) + ". "; bool wrote_sig = false; @@ -897,7 +899,6 @@ class generic_type : public object { tinfo->type = (PyTypeObject *) m_ptr; tinfo->cpptype = rec.type; tinfo->type_size = rec.type_size; - tinfo->type_align = rec.type_align; tinfo->operator_new = rec.operator_new; tinfo->holder_size_in_ptrs = size_in_ptrs(rec.holder_size); tinfo->init_instance = rec.init_instance; @@ -960,18 +961,18 @@ class generic_type : public object { tinfo->get_buffer_data = get_buffer_data; } - // rec_func must be set for either fget or fset. void def_property_static_impl(const char *name, handle fget, handle fset, - detail::function_record *rec_func) { - const auto is_static = rec_func && !(rec_func->is_method && rec_func->scope); - const auto has_doc = rec_func && rec_func->doc && pybind11::options::show_user_defined_docstrings(); + detail::function_record *rec_fget) { + const auto is_static = !(rec_fget->is_method && rec_fget->scope); + const auto has_doc = rec_fget->doc && pybind11::options::show_user_defined_docstrings(); + auto property = handle((PyObject *) (is_static ? get_internals().static_property_type : &PyProperty_Type)); attr(name) = property(fget.ptr() ? fget : none(), fset.ptr() ? fset : none(), /*deleter*/none(), - pybind11::str(has_doc ? rec_func->doc : "")); + pybind11::str(has_doc ? rec_fget->doc : "")); } }; @@ -989,21 +990,11 @@ template struct has_operator_delete_size::value, int> = 0> -void call_operator_delete(T *p, size_t, size_t) { T::operator delete(p); } +void call_operator_delete(T *p, size_t) { T::operator delete(p); } template ::value && has_operator_delete_size::value, int> = 0> -void call_operator_delete(T *p, size_t s, size_t) { T::operator delete(p, s); } +void call_operator_delete(T *p, size_t s) { T::operator delete(p, s); } -inline void call_operator_delete(void *p, size_t s, size_t a) { - (void)s; (void)a; -#if defined(PYBIND11_CPP17) - if (a > __STDCPP_DEFAULT_NEW_ALIGNMENT__) - ::operator delete(p, s, std::align_val_t(a)); - else - ::operator delete(p, s); -#else - ::operator delete(p); -#endif -} +inline void call_operator_delete(void *p, size_t) { ::operator delete(p); } NAMESPACE_END(detail) @@ -1013,18 +1004,10 @@ template auto method_adaptor(F &&f) -> decltype(std::forward(f)) { return std::forward(f); } template -auto method_adaptor(Return (Class::*pmf)(Args...)) -> Return (Derived::*)(Args...) { - static_assert(detail::is_accessible_base_of::value, - "Cannot bind an inaccessible base class method; use a lambda definition instead"); - return static_cast(pmf); -} +auto method_adaptor(Return (Class::*pmf)(Args...)) -> Return (Derived::*)(Args...) { return pmf; } template -auto method_adaptor(Return (Class::*pmf)(Args...) const) -> Return (Derived::*)(Args...) const { - static_assert(detail::is_accessible_base_of::value, - "Cannot bind an inaccessible base class method; use a lambda definition instead"); - return static_cast(pmf); -} +auto method_adaptor(Return (Class::*pmf)(Args...) const) -> Return (Derived::*)(Args...) const { return pmf; } template class class_ : public detail::generic_type { @@ -1066,11 +1049,10 @@ class class_ : public detail::generic_type { record.name = name; record.type = &typeid(type); record.type_size = sizeof(conditional_t); - record.type_align = alignof(conditional_t&); record.holder_size = sizeof(holder_type); record.init_instance = init_instance; record.dealloc = dealloc; - record.default_holder = detail::is_instantiation::value; + record.default_holder = std::is_same>::value; set_operator_new(&record); @@ -1216,7 +1198,7 @@ class class_ : public detail::generic_type { /// Uses cpp_function's return_value_policy by default template class_ &def_property_readonly(const char *name, const cpp_function &fget, const Extra& ...extra) { - return def_property(name, fget, nullptr, extra...); + return def_property(name, fget, cpp_function(), extra...); } /// Uses return_value_policy::reference by default @@ -1228,7 +1210,7 @@ class class_ : public detail::generic_type { /// Uses cpp_function's return_value_policy by default template class_ &def_property_readonly_static(const char *name, const cpp_function &fget, const Extra& ...extra) { - return def_property_static(name, fget, nullptr, extra...); + return def_property_static(name, fget, cpp_function(), extra...); } /// Uses return_value_policy::reference_internal by default @@ -1258,25 +1240,21 @@ class class_ : public detail::generic_type { template class_ &def_property_static(const char *name, const cpp_function &fget, const cpp_function &fset, const Extra& ...extra) { auto rec_fget = get_function_record(fget), rec_fset = get_function_record(fset); - auto *rec_active = rec_fget; - if (rec_fget) { - char *doc_prev = rec_fget->doc; /* 'extra' field may include a property-specific documentation string */ - detail::process_attributes::init(extra..., rec_fget); - if (rec_fget->doc && rec_fget->doc != doc_prev) { - free(doc_prev); - rec_fget->doc = strdup(rec_fget->doc); - } + char *doc_prev = rec_fget->doc; /* 'extra' field may include a property-specific documentation string */ + detail::process_attributes::init(extra..., rec_fget); + if (rec_fget->doc && rec_fget->doc != doc_prev) { + free(doc_prev); + rec_fget->doc = strdup(rec_fget->doc); } if (rec_fset) { - char *doc_prev = rec_fset->doc; + doc_prev = rec_fset->doc; detail::process_attributes::init(extra..., rec_fset); if (rec_fset->doc && rec_fset->doc != doc_prev) { free(doc_prev); rec_fset->doc = strdup(rec_fset->doc); } - if (! rec_active) rec_active = rec_fset; } - def_property_static_impl(name, fget, fset, rec_active); + def_property_static_impl(name, fget, fset, rec_fget); return *this; } @@ -1342,10 +1320,7 @@ class class_ : public detail::generic_type { v_h.set_holder_constructed(false); } else { - detail::call_operator_delete(v_h.value_ptr(), - v_h.type->type_size, - v_h.type->type_align - ); + detail::call_operator_delete(v_h.value_ptr(), v_h.type->type_size); } v_h.value_ptr() = nullptr; } @@ -1381,190 +1356,93 @@ detail::initimpl::pickle_factory pickle(GetState &&g, SetSta return {std::forward(g), std::forward(s)}; } -NAMESPACE_BEGIN(detail) -struct enum_base { - enum_base(handle base, handle parent) : m_base(base), m_parent(parent) { } - - PYBIND11_NOINLINE void init(bool is_arithmetic, bool is_convertible) { - m_base.attr("__entries") = dict(); - auto property = handle((PyObject *) &PyProperty_Type); - auto static_property = handle((PyObject *) get_internals().static_property_type); - - m_base.attr("__repr__") = cpp_function( - [](handle arg) -> str { - handle type = arg.get_type(); - object type_name = type.attr("__name__"); - dict entries = type.attr("__entries"); - for (const auto &kv : entries) { - object other = kv.second[int_(0)]; - if (other.equal(arg)) - return pybind11::str("{}.{}").format(type_name, kv.first); - } - return pybind11::str("{}.???").format(type_name); - }, is_method(m_base) - ); - - m_base.attr("name") = property(cpp_function( - [](handle arg) -> str { - dict entries = arg.get_type().attr("__entries"); - for (const auto &kv : entries) { - if (handle(kv.second[int_(0)]).equal(arg)) - return pybind11::str(kv.first); - } - return "???"; - }, is_method(m_base) - )); - - m_base.attr("__doc__") = static_property(cpp_function( - [](handle arg) -> std::string { - std::string docstring; - dict entries = arg.attr("__entries"); - if (((PyTypeObject *) arg.ptr())->tp_doc) - docstring += std::string(((PyTypeObject *) arg.ptr())->tp_doc) + "\n\n"; - docstring += "Members:"; - for (const auto &kv : entries) { - auto key = std::string(pybind11::str(kv.first)); - auto comment = kv.second[int_(1)]; - docstring += "\n\n " + key; - if (!comment.is_none()) - docstring += " : " + (std::string) pybind11::str(comment); - } - return docstring; - } - ), none(), none(), ""); - - m_base.attr("__members__") = static_property(cpp_function( - [](handle arg) -> dict { - dict entries = arg.attr("__entries"), m; - for (const auto &kv : entries) - m[kv.first] = kv.second[int_(0)]; - return m; - }), none(), none(), "" - ); - - #define PYBIND11_ENUM_OP_STRICT(op, expr, strict_behavior) \ - m_base.attr(op) = cpp_function( \ - [](object a, object b) { \ - if (!a.get_type().is(b.get_type())) \ - strict_behavior; \ - return expr; \ - }, \ - is_method(m_base)) - - #define PYBIND11_ENUM_OP_CONV(op, expr) \ - m_base.attr(op) = cpp_function( \ - [](object a_, object b_) { \ - int_ a(a_), b(b_); \ - return expr; \ - }, \ - is_method(m_base)) - - if (is_convertible) { - PYBIND11_ENUM_OP_CONV("__eq__", !b.is_none() && a.equal(b)); - PYBIND11_ENUM_OP_CONV("__ne__", b.is_none() || !a.equal(b)); - - if (is_arithmetic) { - PYBIND11_ENUM_OP_CONV("__lt__", a < b); - PYBIND11_ENUM_OP_CONV("__gt__", a > b); - PYBIND11_ENUM_OP_CONV("__le__", a <= b); - PYBIND11_ENUM_OP_CONV("__ge__", a >= b); - PYBIND11_ENUM_OP_CONV("__and__", a & b); - PYBIND11_ENUM_OP_CONV("__rand__", a & b); - PYBIND11_ENUM_OP_CONV("__or__", a | b); - PYBIND11_ENUM_OP_CONV("__ror__", a | b); - PYBIND11_ENUM_OP_CONV("__xor__", a ^ b); - PYBIND11_ENUM_OP_CONV("__rxor__", a ^ b); - } - } else { - PYBIND11_ENUM_OP_STRICT("__eq__", int_(a).equal(int_(b)), return false); - PYBIND11_ENUM_OP_STRICT("__ne__", !int_(a).equal(int_(b)), return true); - - if (is_arithmetic) { - #define PYBIND11_THROW throw type_error("Expected an enumeration of matching type!"); - PYBIND11_ENUM_OP_STRICT("__lt__", int_(a) < int_(b), PYBIND11_THROW); - PYBIND11_ENUM_OP_STRICT("__gt__", int_(a) > int_(b), PYBIND11_THROW); - PYBIND11_ENUM_OP_STRICT("__le__", int_(a) <= int_(b), PYBIND11_THROW); - PYBIND11_ENUM_OP_STRICT("__ge__", int_(a) >= int_(b), PYBIND11_THROW); - #undef PYBIND11_THROW - } - } - - #undef PYBIND11_ENUM_OP_CONV - #undef PYBIND11_ENUM_OP_STRICT - - object getstate = cpp_function( - [](object arg) { return int_(arg); }, is_method(m_base)); - - m_base.attr("__getstate__") = getstate; - m_base.attr("__hash__") = getstate; - } - - PYBIND11_NOINLINE void value(char const* name_, object value, const char *doc = nullptr) { - dict entries = m_base.attr("__entries"); - str name(name_); - if (entries.contains(name)) { - std::string type_name = (std::string) str(m_base.attr("__name__")); - throw value_error(type_name + ": element \"" + std::string(name_) + "\" already exists!"); - } - - entries[name] = std::make_pair(value, doc); - m_base.attr(name) = value; - } - - PYBIND11_NOINLINE void export_values() { - dict entries = m_base.attr("__entries"); - for (const auto &kv : entries) - m_parent.attr(kv.first) = kv.second[int_(0)]; - } - - handle m_base; - handle m_parent; -}; - -NAMESPACE_END(detail) - /// Binds C++ enumerations and enumeration classes to Python template class enum_ : public class_ { public: - using Base = class_; - using Base::def; - using Base::attr; - using Base::def_property_readonly; - using Base::def_property_readonly_static; + using class_::def; + using class_::def_property_readonly_static; using Scalar = typename std::underlying_type::type; template enum_(const handle &scope, const char *name, const Extra&... extra) - : class_(scope, name, extra...), m_base(*this, scope) { + : class_(scope, name, extra...), m_entries(), m_parent(scope) { + constexpr bool is_arithmetic = detail::any_of...>::value; - constexpr bool is_convertible = std::is_convertible::value; - m_base.init(is_arithmetic, is_convertible); + auto m_entries_ptr = m_entries.inc_ref().ptr(); + def("__repr__", [name, m_entries_ptr](Type value) -> pybind11::str { + for (const auto &kv : reinterpret_borrow(m_entries_ptr)) { + if (pybind11::cast(kv.second) == value) + return pybind11::str("{}.{}").format(name, kv.first); + } + return pybind11::str("{}.???").format(name); + }); + def_property_readonly_static("__members__", [m_entries_ptr](object /* self */) { + dict m; + for (const auto &kv : reinterpret_borrow(m_entries_ptr)) + m[kv.first] = kv.second; + return m; + }, return_value_policy::copy); def(init([](Scalar i) { return static_cast(i); })); def("__int__", [](Type value) { return (Scalar) value; }); #if PY_MAJOR_VERSION < 3 def("__long__", [](Type value) { return (Scalar) value; }); #endif - cpp_function setstate( - [](Type &value, Scalar arg) { value = static_cast(arg); }, - is_method(*this)); - attr("__setstate__") = setstate; + def("__eq__", [](const Type &value, Type *value2) { return value2 && value == *value2; }); + def("__ne__", [](const Type &value, Type *value2) { return !value2 || value != *value2; }); + if (is_arithmetic) { + def("__lt__", [](const Type &value, Type *value2) { return value2 && value < *value2; }); + def("__gt__", [](const Type &value, Type *value2) { return value2 && value > *value2; }); + def("__le__", [](const Type &value, Type *value2) { return value2 && value <= *value2; }); + def("__ge__", [](const Type &value, Type *value2) { return value2 && value >= *value2; }); + } + if (std::is_convertible::value) { + // Don't provide comparison with the underlying type if the enum isn't convertible, + // i.e. if Type is a scoped enum, mirroring the C++ behaviour. (NB: we explicitly + // convert Type to Scalar below anyway because this needs to compile). + def("__eq__", [](const Type &value, Scalar value2) { return (Scalar) value == value2; }); + def("__ne__", [](const Type &value, Scalar value2) { return (Scalar) value != value2; }); + if (is_arithmetic) { + def("__lt__", [](const Type &value, Scalar value2) { return (Scalar) value < value2; }); + def("__gt__", [](const Type &value, Scalar value2) { return (Scalar) value > value2; }); + def("__le__", [](const Type &value, Scalar value2) { return (Scalar) value <= value2; }); + def("__ge__", [](const Type &value, Scalar value2) { return (Scalar) value >= value2; }); + def("__invert__", [](const Type &value) { return ~((Scalar) value); }); + def("__and__", [](const Type &value, Scalar value2) { return (Scalar) value & value2; }); + def("__or__", [](const Type &value, Scalar value2) { return (Scalar) value | value2; }); + def("__xor__", [](const Type &value, Scalar value2) { return (Scalar) value ^ value2; }); + def("__rand__", [](const Type &value, Scalar value2) { return (Scalar) value & value2; }); + def("__ror__", [](const Type &value, Scalar value2) { return (Scalar) value | value2; }); + def("__rxor__", [](const Type &value, Scalar value2) { return (Scalar) value ^ value2; }); + def("__and__", [](const Type &value, const Type &value2) { return (Scalar) value & (Scalar) value2; }); + def("__or__", [](const Type &value, const Type &value2) { return (Scalar) value | (Scalar) value2; }); + def("__xor__", [](const Type &value, const Type &value2) { return (Scalar) value ^ (Scalar) value2; }); + } + } + def("__hash__", [](const Type &value) { return (Scalar) value; }); + // Pickling and unpickling -- needed for use with the 'multiprocessing' module + def(pickle([](const Type &value) { return pybind11::make_tuple((Scalar) value); }, + [](tuple t) { return static_cast(t[0].cast()); })); } /// Export enumeration entries into the parent scope enum_& export_values() { - m_base.export_values(); + for (const auto &kv : m_entries) + m_parent.attr(kv.first) = kv.second; return *this; } /// Add an enumeration entry - enum_& value(char const* name, Type value, const char *doc = nullptr) { - m_base.value(name, pybind11::cast(value, return_value_policy::copy), doc); + enum_& value(char const* name, Type value) { + auto v = pybind11::cast(value, return_value_policy::copy); + this->attr(name) = v; + m_entries[pybind11::str(name)] = v; return *this; } private: - detail::enum_base m_base; + dict m_entries; + handle m_parent; }; NAMESPACE_BEGIN(detail) @@ -1871,15 +1749,6 @@ class gil_scoped_acquire { auto const &internals = detail::get_internals(); tstate = (PyThreadState *) PYBIND11_TLS_GET_VALUE(internals.tstate); - if (!tstate) { - /* Check if the GIL was acquired using the PyGILState_* API instead (e.g. if - calling from a Python thread). Since we use a different key, this ensures - we don't create a new thread state and deadlock in PyEval_AcquireThread - below. Note we don't save this state with internals.tstate, since we don't - create it we would fail to clear it (its reference count should be > 0). */ - tstate = PyGILState_GetThisThreadState(); - } - if (!tstate) { tstate = PyThreadState_New(internals.istate); #if !defined(NDEBUG) @@ -2072,23 +1941,25 @@ template function get_overload(const T *this_ptr, const char *name) { } #define PYBIND11_OVERLOAD_NAME(ret_type, cname, name, fn, ...) \ - PYBIND11_OVERLOAD_INT(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), name, __VA_ARGS__) \ + PYBIND11_OVERLOAD_INT(ret_type, cname, name, __VA_ARGS__) \ return cname::fn(__VA_ARGS__) #define PYBIND11_OVERLOAD_PURE_NAME(ret_type, cname, name, fn, ...) \ - PYBIND11_OVERLOAD_INT(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), name, __VA_ARGS__) \ - pybind11::pybind11_fail("Tried to call pure virtual function \"" PYBIND11_STRINGIFY(cname) "::" name "\""); + PYBIND11_OVERLOAD_INT(ret_type, cname, name, __VA_ARGS__) \ + pybind11::pybind11_fail("Tried to call pure virtual function \"" #cname "::" name "\""); #define PYBIND11_OVERLOAD(ret_type, cname, fn, ...) \ - PYBIND11_OVERLOAD_NAME(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), #fn, fn, __VA_ARGS__) + PYBIND11_OVERLOAD_NAME(ret_type, cname, #fn, fn, __VA_ARGS__) #define PYBIND11_OVERLOAD_PURE(ret_type, cname, fn, ...) \ - PYBIND11_OVERLOAD_PURE_NAME(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), #fn, fn, __VA_ARGS__) + PYBIND11_OVERLOAD_PURE_NAME(ret_type, cname, #fn, fn, __VA_ARGS__) NAMESPACE_END(PYBIND11_NAMESPACE) -#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) +#if defined(_MSC_VER) # pragma warning(pop) +#elif defined(__INTEL_COMPILER) +/* Leave ignored warnings on */ #elif defined(__GNUG__) && !defined(__clang__) # pragma GCC diagnostic pop #endif diff --git a/vnpy/api/tap/vntap/include/pybind11/pytypes.h b/vnpy/api/tap/include/pybind11/pytypes.h similarity index 90% rename from vnpy/api/tap/vntap/include/pybind11/pytypes.h rename to vnpy/api/tap/include/pybind11/pytypes.h index fa5ed7cbd4..d7fa17775c 100644 --- a/vnpy/api/tap/vntap/include/pybind11/pytypes.h +++ b/vnpy/api/tap/include/pybind11/pytypes.h @@ -114,35 +114,6 @@ class object_api : public pyobject_tag { bool is(object_api const& other) const { return derived().ptr() == other.derived().ptr(); } /// Equivalent to ``obj is None`` in Python. bool is_none() const { return derived().ptr() == Py_None; } - /// Equivalent to obj == other in Python - bool equal(object_api const &other) const { return rich_compare(other, Py_EQ); } - bool not_equal(object_api const &other) const { return rich_compare(other, Py_NE); } - bool operator<(object_api const &other) const { return rich_compare(other, Py_LT); } - bool operator<=(object_api const &other) const { return rich_compare(other, Py_LE); } - bool operator>(object_api const &other) const { return rich_compare(other, Py_GT); } - bool operator>=(object_api const &other) const { return rich_compare(other, Py_GE); } - - object operator-() const; - object operator~() const; - object operator+(object_api const &other) const; - object operator+=(object_api const &other) const; - object operator-(object_api const &other) const; - object operator-=(object_api const &other) const; - object operator*(object_api const &other) const; - object operator*=(object_api const &other) const; - object operator/(object_api const &other) const; - object operator/=(object_api const &other) const; - object operator|(object_api const &other) const; - object operator|=(object_api const &other) const; - object operator&(object_api const &other) const; - object operator&=(object_api const &other) const; - object operator^(object_api const &other) const; - object operator^=(object_api const &other) const; - object operator<<(object_api const &other) const; - object operator<<=(object_api const &other) const; - object operator>>(object_api const &other) const; - object operator>>=(object_api const &other) const; - PYBIND11_DEPRECATED("Use py::str(obj) instead") pybind11::str str() const; @@ -153,9 +124,6 @@ class object_api : public pyobject_tag { int ref_count() const { return static_cast(Py_REFCNT(derived().ptr())); } /// Return a handle to the Python type object underlying the instance handle get_type() const; - -private: - bool rich_compare(object_api const &other, int value) const; }; NAMESPACE_END(detail) @@ -327,9 +295,6 @@ class error_already_set : public std::runtime_error { PyErr_Fetch(&type.ptr(), &value.ptr(), &trace.ptr()); } - error_already_set(const error_already_set &) = default; - error_already_set(error_already_set &&) = default; - inline ~error_already_set(); /// Give the currently-held error back to Python, if any. If there is currently a Python error @@ -725,9 +690,6 @@ inline bool PyIterable_Check(PyObject *obj) { } inline bool PyNone_Check(PyObject *o) { return o == Py_None; } -#if PY_MAJOR_VERSION >= 3 -inline bool PyEllipsis_Check(PyObject *o) { return o == Py_Ellipsis; } -#endif inline bool PyUnicode_Check_Permissive(PyObject *o) { return PyUnicode_Check(o) || PYBIND11_BYTES_CHECK(o); } @@ -1002,14 +964,6 @@ class none : public object { none() : object(Py_None, borrowed_t{}) { } }; -#if PY_MAJOR_VERSION >= 3 -class ellipsis : public object { -public: - PYBIND11_OBJECT(ellipsis, object, detail::PyEllipsis_Check) - ellipsis() : object(Py_Ellipsis, borrowed_t{}) { } -}; -#endif - class bool_ : public object { public: PYBIND11_OBJECT_CVT(bool_, object, PyBool_Check, raw_bool) @@ -1183,7 +1137,6 @@ class tuple : public object { } size_t size() const { return (size_t) PyTuple_Size(m_ptr); } detail::tuple_accessor operator[](size_t index) const { return {*this, index}; } - detail::item_accessor operator[](handle h) const { return object::operator[](h); } detail::tuple_iterator begin() const { return {*this, 0}; } detail::tuple_iterator end() const { return {*this, PyTuple_GET_SIZE(m_ptr)}; } }; @@ -1221,7 +1174,6 @@ class sequence : public object { PYBIND11_OBJECT_DEFAULT(sequence, object, PySequence_Check) size_t size() const { return (size_t) PySequence_Size(m_ptr); } detail::sequence_accessor operator[](size_t index) const { return {*this, index}; } - detail::item_accessor operator[](handle h) const { return object::operator[](h); } detail::sequence_iterator begin() const { return {*this, 0}; } detail::sequence_iterator end() const { return {*this, PySequence_Size(m_ptr)}; } }; @@ -1234,7 +1186,6 @@ class list : public object { } size_t size() const { return (size_t) PyList_Size(m_ptr); } detail::list_accessor operator[](size_t index) const { return {*this, index}; } - detail::item_accessor operator[](handle h) const { return object::operator[](h); } detail::list_iterator begin() const { return {*this, 0}; } detail::list_iterator end() const { return {*this, PyList_GET_SIZE(m_ptr)}; } template void append(T &&val) const { @@ -1377,55 +1328,5 @@ str_attr_accessor object_api::doc() const { return attr("__doc__"); } template handle object_api::get_type() const { return (PyObject *) Py_TYPE(derived().ptr()); } -template -bool object_api::rich_compare(object_api const &other, int value) const { - int rv = PyObject_RichCompareBool(derived().ptr(), other.derived().ptr(), value); - if (rv == -1) - throw error_already_set(); - return rv == 1; -} - -#define PYBIND11_MATH_OPERATOR_UNARY(op, fn) \ - template object object_api::op() const { \ - object result = reinterpret_steal(fn(derived().ptr())); \ - if (!result.ptr()) \ - throw error_already_set(); \ - return result; \ - } - -#define PYBIND11_MATH_OPERATOR_BINARY(op, fn) \ - template \ - object object_api::op(object_api const &other) const { \ - object result = reinterpret_steal( \ - fn(derived().ptr(), other.derived().ptr())); \ - if (!result.ptr()) \ - throw error_already_set(); \ - return result; \ - } - -PYBIND11_MATH_OPERATOR_UNARY (operator~, PyNumber_Invert) -PYBIND11_MATH_OPERATOR_UNARY (operator-, PyNumber_Negative) -PYBIND11_MATH_OPERATOR_BINARY(operator+, PyNumber_Add) -PYBIND11_MATH_OPERATOR_BINARY(operator+=, PyNumber_InPlaceAdd) -PYBIND11_MATH_OPERATOR_BINARY(operator-, PyNumber_Subtract) -PYBIND11_MATH_OPERATOR_BINARY(operator-=, PyNumber_InPlaceSubtract) -PYBIND11_MATH_OPERATOR_BINARY(operator*, PyNumber_Multiply) -PYBIND11_MATH_OPERATOR_BINARY(operator*=, PyNumber_InPlaceMultiply) -PYBIND11_MATH_OPERATOR_BINARY(operator/, PyNumber_TrueDivide) -PYBIND11_MATH_OPERATOR_BINARY(operator/=, PyNumber_InPlaceTrueDivide) -PYBIND11_MATH_OPERATOR_BINARY(operator|, PyNumber_Or) -PYBIND11_MATH_OPERATOR_BINARY(operator|=, PyNumber_InPlaceOr) -PYBIND11_MATH_OPERATOR_BINARY(operator&, PyNumber_And) -PYBIND11_MATH_OPERATOR_BINARY(operator&=, PyNumber_InPlaceAnd) -PYBIND11_MATH_OPERATOR_BINARY(operator^, PyNumber_Xor) -PYBIND11_MATH_OPERATOR_BINARY(operator^=, PyNumber_InPlaceXor) -PYBIND11_MATH_OPERATOR_BINARY(operator<<, PyNumber_Lshift) -PYBIND11_MATH_OPERATOR_BINARY(operator<<=, PyNumber_InPlaceLshift) -PYBIND11_MATH_OPERATOR_BINARY(operator>>, PyNumber_Rshift) -PYBIND11_MATH_OPERATOR_BINARY(operator>>=, PyNumber_InPlaceRshift) - -#undef PYBIND11_MATH_OPERATOR_UNARY -#undef PYBIND11_MATH_OPERATOR_BINARY - NAMESPACE_END(detail) NAMESPACE_END(PYBIND11_NAMESPACE) diff --git a/vnpy/api/tap/vntap/include/pybind11/stl.h b/vnpy/api/tap/include/pybind11/stl.h similarity index 91% rename from vnpy/api/tap/vntap/include/pybind11/stl.h rename to vnpy/api/tap/include/pybind11/stl.h index 32f8d294ac..1a4bbf0db1 100644 --- a/vnpy/api/tap/vntap/include/pybind11/stl.h +++ b/vnpy/api/tap/include/pybind11/stl.h @@ -16,7 +16,6 @@ #include #include #include -#include #include #if defined(_MSC_VER) @@ -84,8 +83,7 @@ template struct set_caster { template static handle cast(T &&src, return_value_policy policy, handle parent) { - if (!std::is_lvalue_reference::value) - policy = return_value_policy_override::policy(policy); + policy = return_value_policy_override::policy(policy); pybind11::set s; for (auto &&value : src) { auto value_ = reinterpret_steal(key_conv::cast(forward_like(value), policy, parent)); @@ -95,7 +93,7 @@ template struct set_caster { return s.release(); } - PYBIND11_TYPE_CASTER(type, _("Set[") + key_conv::name + _("]")); + PYBIND11_TYPE_CASTER(type, _("Set[") + key_conv::name() + _("]")); }; template struct map_caster { @@ -121,12 +119,8 @@ template struct map_caster { template static handle cast(T &&src, return_value_policy policy, handle parent) { dict d; - return_value_policy policy_key = policy; - return_value_policy policy_value = policy; - if (!std::is_lvalue_reference::value) { - policy_key = return_value_policy_override::policy(policy_key); - policy_value = return_value_policy_override::policy(policy_value); - } + return_value_policy policy_key = return_value_policy_override::policy(policy); + return_value_policy policy_value = return_value_policy_override::policy(policy); for (auto &&kv : src) { auto key = reinterpret_steal(key_conv::cast(forward_like(kv.first), policy_key, parent)); auto value = reinterpret_steal(value_conv::cast(forward_like(kv.second), policy_value, parent)); @@ -137,14 +131,14 @@ template struct map_caster { return d.release(); } - PYBIND11_TYPE_CASTER(Type, _("Dict[") + key_conv::name + _(", ") + value_conv::name + _("]")); + PYBIND11_TYPE_CASTER(Type, _("Dict[") + key_conv::name() + _(", ") + value_conv::name() + _("]")); }; template struct list_caster { using value_conv = make_caster; bool load(handle src, bool convert) { - if (!isinstance(src) || isinstance(src)) + if (!isinstance(src)) return false; auto s = reinterpret_borrow(src); value.clear(); @@ -167,8 +161,7 @@ template struct list_caster { public: template static handle cast(T &&src, return_value_policy policy, handle parent) { - if (!std::is_lvalue_reference::value) - policy = return_value_policy_override::policy(policy); + policy = return_value_policy_override::policy(policy); list l(src.size()); size_t index = 0; for (auto &&value : src) { @@ -180,15 +173,12 @@ template struct list_caster { return l.release(); } - PYBIND11_TYPE_CASTER(Type, _("List[") + value_conv::name + _("]")); + PYBIND11_TYPE_CASTER(Type, _("List[") + value_conv::name() + _("]")); }; template struct type_caster> : list_caster, Type> { }; -template struct type_caster> - : list_caster, Type> { }; - template struct type_caster> : list_caster, Type> { }; @@ -209,9 +199,9 @@ template s public: bool load(handle src, bool convert) { - if (!isinstance(src)) + if (!isinstance(src)) return false; - auto l = reinterpret_borrow(src); + auto l = reinterpret_borrow(src); if (!require_size(l.size())) return false; size_t ctr = 0; @@ -237,7 +227,7 @@ template s return l.release(); } - PYBIND11_TYPE_CASTER(ArrayType, _("List[") + value_conv::name + _(_(""), _("[") + _() + _("]")) + _("]")); + PYBIND11_TYPE_CASTER(ArrayType, _("List[") + value_conv::name() + _(_(""), _("[") + _() + _("]")) + _("]")); }; template struct type_caster> @@ -284,7 +274,7 @@ template struct optional_caster { return true; } - PYBIND11_TYPE_CASTER(T, _("Optional[") + value_conv::name + _("]")); + PYBIND11_TYPE_CASTER(T, _("Optional[") + value_conv::name() + _("]")); }; #if PYBIND11_HAS_OPTIONAL @@ -364,7 +354,7 @@ struct variant_caster> { } using Type = V; - PYBIND11_TYPE_CASTER(Type, _("Union[") + detail::concat(make_caster::name...) + _("]")); + PYBIND11_TYPE_CASTER(Type, _("Union[") + detail::concat(make_caster::name()...) + _("]")); }; #if PYBIND11_HAS_VARIANT diff --git a/vnpy/api/tap/vntap/include/pybind11/stl_bind.h b/vnpy/api/tap/include/pybind11/stl_bind.h similarity index 100% rename from vnpy/api/tap/vntap/include/pybind11/stl_bind.h rename to vnpy/api/tap/include/pybind11/stl_bind.h diff --git a/vnpy/api/tap/vntap/include/TapAPICommDef.h b/vnpy/api/tap/include/tap/TapAPICommDef.h similarity index 100% rename from vnpy/api/tap/vntap/include/TapAPICommDef.h rename to vnpy/api/tap/include/tap/TapAPICommDef.h diff --git a/vnpy/api/tap/vntap/include/TapAPIError.h b/vnpy/api/tap/include/tap/TapAPIError.h similarity index 100% rename from vnpy/api/tap/vntap/include/TapAPIError.h rename to vnpy/api/tap/include/tap/TapAPIError.h diff --git a/vnpy/api/tap/vntap/include/TapQuoteAPI.h b/vnpy/api/tap/include/tap/TapQuoteAPI.h similarity index 100% rename from vnpy/api/tap/vntap/include/TapQuoteAPI.h rename to vnpy/api/tap/include/tap/TapQuoteAPI.h diff --git a/vnpy/api/tap/vntap/include/TapQuoteAPIDataType.h b/vnpy/api/tap/include/tap/TapQuoteAPIDataType.h similarity index 100% rename from vnpy/api/tap/vntap/include/TapQuoteAPIDataType.h rename to vnpy/api/tap/include/tap/TapQuoteAPIDataType.h diff --git a/vnpy/api/tap/vntap/include/iTapAPICommDef.h b/vnpy/api/tap/include/tap/iTapAPICommDef.h similarity index 100% rename from vnpy/api/tap/vntap/include/iTapAPICommDef.h rename to vnpy/api/tap/include/tap/iTapAPICommDef.h diff --git a/vnpy/api/tap/vntap/include/iTapAPIError.h b/vnpy/api/tap/include/tap/iTapAPIError.h similarity index 100% rename from vnpy/api/tap/vntap/include/iTapAPIError.h rename to vnpy/api/tap/include/tap/iTapAPIError.h diff --git a/vnpy/api/tap/vntap/include/iTapTradeAPI.h b/vnpy/api/tap/include/tap/iTapTradeAPI.h similarity index 100% rename from vnpy/api/tap/vntap/include/iTapTradeAPI.h rename to vnpy/api/tap/include/tap/iTapTradeAPI.h diff --git a/vnpy/api/tap/vntap/include/iTapTradeAPIDataType.h b/vnpy/api/tap/include/tap/iTapTradeAPIDataType.h similarity index 100% rename from vnpy/api/tap/vntap/include/iTapTradeAPIDataType.h rename to vnpy/api/tap/include/tap/iTapTradeAPIDataType.h diff --git a/vnpy/api/tap/vntap/libs/TapQuoteAPI.lib b/vnpy/api/tap/libs/TapQuoteAPI.lib similarity index 100% rename from vnpy/api/tap/vntap/libs/TapQuoteAPI.lib rename to vnpy/api/tap/libs/TapQuoteAPI.lib diff --git a/vnpy/api/tap/vntap/libs/iTapTradeAPI_64.lib b/vnpy/api/tap/libs/iTapTradeAPI_64.lib similarity index 100% rename from vnpy/api/tap/vntap/libs/iTapTradeAPI_64.lib rename to vnpy/api/tap/libs/iTapTradeAPI_64.lib diff --git a/vnpy/api/tap/tap_constant.py b/vnpy/api/tap/tap_constant.py new file mode 100644 index 0000000000..365196d62d --- /dev/null +++ b/vnpy/api/tap/tap_constant.py @@ -0,0 +1,631 @@ +APIYNFLAG_YES = "Y" +APIYNFLAG_NO = "N" +APILOGLEVEL_NONE = "N" +APILOGLEVEL_ERROR = "E" +APILOGLEVEL_WARNING = "W" +APILOGLEVEL_DEBUG = "D" +TAPI_COMMODITY_TYPE_NONE = "N" +TAPI_COMMODITY_TYPE_SPOT = "P" +TAPI_COMMODITY_TYPE_FUTURES = "F" +TAPI_COMMODITY_TYPE_OPTION = "O" +TAPI_COMMODITY_TYPE_SPREAD_MONTH = "S" +TAPI_COMMODITY_TYPE_SPREAD_COMMODITY = "M" +TAPI_COMMODITY_TYPE_BUL = "U" +TAPI_COMMODITY_TYPE_BER = "E" +TAPI_COMMODITY_TYPE_STD = "D" +TAPI_COMMODITY_TYPE_STG = "G" +TAPI_COMMODITY_TYPE_PRT = "R" +TAPI_COMMODITY_TYPE_BLT = "L" +TAPI_COMMODITY_TYPE_BRT = "Q" +TAPI_COMMODITY_TYPE_DIRECTFOREX = "X" +TAPI_COMMODITY_TYPE_INDIRECTFOREX = "I" +TAPI_COMMODITY_TYPE_CROSSFOREX = "C" +TAPI_COMMODITY_TYPE_INDEX = "Z" +TAPI_COMMODITY_TYPE_STOCK = "T" +TAPI_COMMODITY_TYPE_SPOT_TRADINGDEFER = "Y" +TAPI_COMMODITY_TYPE_FUTURE_LOCK = "J" +TAPI_COMMODITY_TYPE_EFP = "A" +TAPI_CALLPUT_FLAG_CALL = "C" +TAPI_CALLPUT_FLAG_PUT = "P" +TAPI_CALLPUT_FLAG_NONE = "N" +APIYNFLAG_YES = "Y" +APIYNFLAG_NO = "N" +APIPASSWORD_TRADE = "T" +APIPASSWORD_PHONE = "P" +APILOGLEVEL_NONE = "N" +APILOGLEVEL_ERROR = "E" +APILOGLEVEL_WARNING = "W" +APILOGLEVEL_DEBUG = "D" +TAPI_OPTION_TYPE_AMERICAN = "A" +TAPI_OPTION_TYPE_AMERICAN2 = "B" +TAPI_OPTION_TYPE_EUROPEAN = "E" +TAPI_OPTION_TYPE_EUROPEAN2 = "F" +TAPI_COMMODITY_TYPE_NONE = "N" +TAPI_COMMODITY_TYPE_SPOT = "P" +TAPI_COMMODITY_TYPE_FUTURES = "F" +TAPI_COMMODITY_TYPE_OPTION = "O" +TAPI_COMMODITY_TYPE_SPREAD_MONTH = "S" +TAPI_COMMODITY_TYPE_SPREAD_COMMODITY = "M" +TAPI_COMMODITY_TYPE_BUL = "U" +TAPI_COMMODITY_TYPE_BER = "E" +TAPI_COMMODITY_TYPE_STD = "D" +TAPI_COMMODITY_TYPE_STG = "G" +TAPI_COMMODITY_TYPE_PRT = "R" +TAPI_COMMODITY_TYPE_DIRECTFOREX = "X" +TAPI_COMMODITY_TYPE_INDIRECTFOREX = "I" +TAPI_COMMODITY_TYPE_CROSSFOREX = "C" +TAPI_COMMODITY_TYPE_INDEX = "Z" +TAPI_COMMODITY_TYPE_STOCK = "T" +TAPI_CALLPUT_FLAG_CALL = "C" +TAPI_CALLPUT_FLAG_PUT = "P" +TAPI_CALLPUT_FLAG_NONE = "N" +TAPIERROR_SUCCEED = 0 +TAPIERROR_ConnectFail = -1 +TAPIERROR_LinkAuthFail = -2 +TAPIERROR_HostUnavailable = -3 +TAPIERROR_SendDataError = -4 +TAPIERROR_TestIDError = -5 +TAPIERROR_NotReadyTestNetwork = -6 +TAPIERROR_CurTestNotOver = -7 +TAPIERROR_NOFrontAvailable = -8 +TAPIERROR_DataPathAvaiable = -9 +TAPIERROR_RepeatLogin = -10 +TAPIERROR_InnerError = -11 +TAPIERROR_LastReqNotFinish = -12 +TAPIERROR_InputValueError = -13 +TAPIERROR_AuthCode_Invalid = -14 +TAPIERROR_AuthCode_Expired = -15 +TAPIERROR_AuthCode_TypeNotMatch = -16 +TAPIERROR_API_NotReady = -17 +TAPIERROR_UDP_LISTEN_FAILED = -18 +TAPIERROR_UDP_LISTENING = -19 +TAPIERROR_NotImplemented = -20 +TAPIERROR_CallOneTimeOnly = -21 +TAPIERROR_Frequently = -22 +TAPIERROR_INPUTERROR_NULL = -10000 +TAPIERROR_INPUTERROR_TAPIYNFLAG = -10001 +TAPIERROR_INPUTERROR_TAPILOGLEVEL = -10002 +TAPIERROR_INPUTERROR_TAPICommodityType = -10003 +TAPIERROR_INPUTERROR_TAPICallOrPutFlagType = -10004 +TAPIERROR_INPUTERROR_TAPIAccountType = -12001 +TAPIERROR_INPUTERROR_TAPIAccountState = -12003 +TAPIERROR_INPUTERROR_TAPIAccountFamilyType = -12004 +TAPIERROR_INPUTERROR_TAPIOrderTypeType = -12005 +TAPIERROR_INPUTERROR_TAPIOrderSourceType = -12006 +TAPIERROR_INPUTERROR_TAPITimeInForceType = -12007 +TAPIERROR_INPUTERROR_TAPISideType = -12008 +TAPIERROR_INPUTERROR_TAPIPositionEffectType = -12009 +TAPIERROR_INPUTERROR_TAPIHedgeFlagType = -12010 +TAPIERROR_INPUTERROR_TAPIOrderStateType = -12011 +TAPIERROR_INPUTERROR_TAPICalculateModeType = -12012 +TAPIERROR_INPUTERROR_TAPIMatchSourceType = -12013 +TAPIERROR_INPUTERROR_TAPIOpenCloseModeType = -12014 +TAPIERROR_INPUTERROR_TAPIFutureAlgType = -12015 +TAPIERROR_INPUTERROR_TAPIOptionAlgType = -12016 +TAPIERROR_INPUTERROR_TAPIBankAccountLWFlagType = -12017 +TAPIERROR_INPUTERROR_TAPIMarginCalculateModeType = -12021 +TAPIERROR_INPUTERROR_TAPIOptionMarginCalculateModeType = -12022 +TAPIERROR_INPUTERROR_TAPICmbDirectType = -12023 +TAPIERROR_INPUTERROR_TAPIDeliveryModeType = -12024 +TAPIERROR_INPUTERROR_TAPIContractTypeType = -12025 +TAPIERROR_INPUTERROR_TAPITacticsTypeType = -12035 +TAPIERROR_INPUTERROR_TAPIORDERACT = -12036 +TAPIERROR_INPUTERROR_TAPITriggerConditionType = -12041 +TAPIERROR_INPUTERROR_TAPITriggerPriceTypeType = -12042 +TAPIERROR_INPUTERROR_TAPITradingStateType = -12043 +TAPIERROR_INPUTERROR_TAPIMarketLevelType = -12044 +TAPIERROR_INPUTERROR_TAPIOrderQryTypeType = -12045 +TAPIERROR_DISCONNECT_CLOSE_INIT = 1 +TAPIERROR_DISCONNECT_CLOSE_PASS = 2 +TAPIERROR_DISCONNECT_READ_ERROR = 3 +TAPIERROR_DISCONNECT_WRITE_ERROR = 4 +TAPIERROR_DISCONNECT_BUF_FULL = 5 +TAPIERROR_DISCONNECT_IOCP_ERROR = 6 +TAPIERROR_DISCONNECT_PARSE_ERROR = 7 +TAPIERROR_DISCONNECT_CONNECT_TIMEOUT = 8 +TAPIERROR_DISCONNECT_INIT_ERROR = 9 +TAPIERROR_DISCONNECT_HAS_CONNECTED = 10 +TAPIERROR_DISCONNECT_HAS_EXIT = 11 +TAPIERROR_DISCONNECT_TRY_LATER = 12 +TAPIERROR_DISCONNECT_HEARTBEAT_FAILED = 13 +TAPIERROR_LOGIN = 10001 +TAPIERROR_LOGIN_USER = 10002 +TAPIERROR_LOGIN_DDA = 10003 +TAPIERROR_LOGIN_LICENSE = 10004 +TAPIERROR_LOGIN_MODULE = 10005 +TAPIERROR_LOGIN_FORCE = 10006 +TAPIERROR_LOGIN_STATE = 10007 +TAPIERROR_LOGIN_PASS = 10008 +TAPIERROR_LOGIN_RIGHT = 10009 +TAPIERROR_LOGIN_COUNT = 10010 +TAPIERROR_LOGIN_NOTIN_SERVERFLAGUSRES = 10011 +TAPIERROR_LOGIN_USER_EXPIRED = 10012 +TAPIERROR_LOGIN_NO_ACCOUNT = 10013 +TAPIERROR_LOGIN_NO_JGT = 10014 +TAPIERROR_LOGIN_ERROR_TIMES = 10015 +TAPIERROR_LOGIN_ERROR_AUTHTYPE = 10016 +TAPIERROR_LOGIN_ERROR_AUTHEXPIRED = 10017 +TAPIERROR_LOGIN_ERROR_PASSWDEXPIRED = 10018 +TAPIERROR_USERINFO_QRY = 10101 +TAPIERROR_USERALLRIGHT_QRY = 11001 +TAPIERROR_USERALLACCOUNT_QRY = 11501 +TAPIERROR_USERPASSWORD_MOD = 11701 +TAPIERROR_USERPASSWORD_MOD_SOURCE = 11702 +TAPIERROR_USERPASSWORD_MOD_SAME = 11703 +TAPIERROR_USERPASSWORD_MOD_COMPLEXITY = 11704 +TAPIERROR_ACCOUNTINFO_QRY = 20201 +TAPIERROR_TRADENO_QRY = 20701 +TAPIERROR_CONTRACTINFO_QRY = 22801 +TAPIERROR_SPECIALOPTIONFUTURE_QRY = 22901 +TAPIERROR_COMMODITYORDERTYPE_QRY = 25501 +TAPIERROR_ORDERTIMEINFORCE_QRY = 25601 +TAPIERROR_USER_ORDER_FREQUENCE_QRY = 28901 +TAPIERROR_ORDERINSERT_ACCOUNT = 60001 +TAPIERROR_ORDERINSERT_ACCOUNT_STATE = 60002 +TAPIERROR_ORDERINSERT_SIDE_TRADE = 60003 +TAPIERROR_ORDERINSERT_OPTIONS_TRADE = 60004 +TAPIERROR_ORDERINSERT_COMMODITY_TRADE = 60005 +TAPIERROR_ORDERINSERT_OPEN_RIGHT = 60006 +TAPIERROR_ORDERINSERT_RISK_CHECK = 60007 +TAPIERROR_ORDERINSERT_CONTRACT = 60011 +TAPIERROR_ORDERINSERT_TRADEROUTE = 60021 +TAPIERROR_ORDERINSERT_POSITIONMAX = 60022 +TAPIERROR_ORDER_NOTRADE = 60023 +TAPIERROR_ORDER_CLOSE = 60024 +TAPIERROR_ORDERINSERT_NOTENOUGHFUND = 60031 +TAPIERROR_ORDERINSERT_ORDERTYPE = 60032 +TAPIERROR_ORDERINSERT_TIMEINFORCE = 60033 +TAPIERROR_ORDERINSERT_NO_TACTICS = 60034 +TAPIERROR_ORDERINSERT_POSITION_CANNOT_CLOSE = 60035 +TAPIERROR_ORDERINSERT_AUTOCHECK_FAIL = 60036 +TAPIERROR_ORDERINSERT_LME_NOTREADY = 60037 +TAPIERROR_ORDERINSERT_CLOSEMODE = 60038 +TAPIERROR_ORDERINSERT_PARENTNOTENOUGHFUND = 60039 +TAPIERROR_SWAP_CONTRACT = 60040 +TAPIERROR_USERNO_NOTHAS_ACCOUNT = 60051 +TAPIERROR_UPPERCHANNEL_BROKEN = 60052 +TAPIERROR_UPPERCHANNEL_NOT_EXIST = 60053 +TAPIERROR_ORDERDELETE_NOT_SYSNO = 60061 +TAPIERROR_ORDERDELETE_NOT_STATE = 60062 +TAPIERROR_ORDERACTIVE_NOT_STATE = 60063 +TAPIERROR_ORDERCHECK_NOT_STATE = 60071 +TAPIERROR_ORDERCHECK_FAIL = 60072 +TAPIERROR_ORDERMODIFY_NOT_STATE = 60081 +TAPIERROR_ORDERMODIFY_BACK_INPUT = 60082 +TAPIERROR_ORDERINSERT_FEE = 60091 +TAPIERROR_ORDERINSERT_MARGIN = 60092 +TAPIERROR_ORDER_NO_PERMIT = 60100 +TAPIERROR_RSPQUOTE_NO_PERMIT = 60101 +TAPIERROR_RSPQUOTE_CHILD_NO_PERMIT = 60102 +TAPIERROR_TRADENO_NOT_FIND = 60103 +TAPIERROR_ORDER_NO_CLOSE = 60104 +TAPIERROR_QRY_QUOTE_NO_PERMIT = 60105 +TAPIERROR_EXPIREDATE_NO_PERMIT = 60106 +TAPIERROR_CMB_NO_PERMIT = 60107 +TAPIERROR_ORDERSERVER_NO_PERMIT = 60108 +TAPIERROR_POSITION_CANNOT_EXEC_OR_ABANDON = 60109 +TAPIERROR_ORDERCHECK_NO_PERMIT = 60110 +TAPIERROR_ORDERMAXOPENVOL_NO_PERMIT = 60111 +TAPIERROR_ORDER_QTY_NO_PERMIT = 60115 +TAPIERROR_ORDER_APPLY_NO_PERMIT = 60117 +TAPIERROR_ORDER_FREQ_OVERRUN = 60118 +TAPIERROR_COMB_NO_SIDEORHEDGE = 60119 +TAPIERROR_ORDER_FREQUENCY = 61001 +TAPIERROR_ORDER_QUERYING = 61002 +TAPIERROR_SUBSCRIBEQUOTE_MAX = 72001 +TAPIERROR_SUBSCRIBEQUOTE_EXCHANGE_MAX = 72002 +TAPIERROR_SUBSCRIBEQUOTE_NO_RIGHT = 72101 +TAPIERROR_SUBSCRIBEQUOTE_NO_EXCHANGE_RIGHT = 72102 +TAPIERROR_SUBSCRIBEQUOTE_COMMODITY_NOT_EXIST = 72103 +TAPIERROR_SUBSCRIBEQUOTE_CONTRACT_MAY_NOT_EXIST = 72104 +TAPIERROR_QUOTEFRONT_UNKNOWN_PROTOCOL = 83001 +TAPIERROR_LOGIN = 10001 +TAPIERROR_LOGIN_USER = 10002 +TAPIERROR_LOGIN_DDA = 10003 +TAPIERROR_LOGIN_LICENSE = 10004 +TAPIERROR_LOGIN_MODULE = 10005 +TAPIERROR_LOGIN_FORCE = 10006 +TAPIERROR_LOGIN_STATE = 10007 +TAPIERROR_LOGIN_PASS = 10008 +TAPIERROR_LOGIN_RIGHT = 10009 +TAPIERROR_LOGIN_COUNT = 10010 +TAPIERROR_LOGIN_NOTIN_SERVERFLAGUSRES = 10011 +TAPIERROR_LOGIN_FREEZE = 10012 +TAPIERROR_LOGIN_TOFREEZE = 10013 +TAPIERROR_LOGIN_ACCOUNTSTATE = 10014 +TAPIERROR_LOGIN_SECCERTIFI = 10015 +TAPIERROR_LOGIN_NOSECONDSET = 10016 +TAPIERROR_LOGIN_NOTURSTHOST = 10017 +TAPITAPIERROR_SECONDCERTIFICATION_FAIL = 14001 +TAPITAPIERROR_SECONDCERTIFICATION_TIMEOVER = 14002 +TAPIERROR_CONN_DATABASE = 11000 +TAPIERROR_OPER_DATABASE = 11001 +TAPIERROR_NEED_ONETOONE = 11002 +TAPIERROR_EXIST_RELATEINFO = 11003 +TAPIERROR_EXIST_RELATEINFOOFGROUP = 11004 +TAPIERROR_USERPASSWORD_MOD_SOURCE = 12001 +TAPIERROR_USERPASSWORD_MOD_SAME = 12002 +TAPIERROR_USERPASSWORD_MOD_COMPLEXITY = 12003 +TAPIERROR_CURRENCY_ONLY_ONEBASE = 13001 +TAPIERROR_CURRENCY_ONLY_USDHKD = 13002 +TAPIERROR_ORDERINSERT_ACCOUNT = 60001 +TAPIERROR_ORDERINSERT_ACCOUNT_STATE = 60002 +TAPIERROR_ORDERINSERT_TRADECENT_ERROR = 60003 +TAPIERROR_ORDERINSERT_CONTRACT = 60011 +TAPIERROR_ORDERINSERT_LME_NOTREADY = 60012 +TAPIERROR_ORDERINSERT_ERROR_ORDER_TYPE = 60013 +TAPIERROR_ORDERINSERT_READY_TYPE_ERROR = 60014 +TAPIERROR_ORDERINSERT_ORDER_TYPE_ERROR = 60015 +TAPIERROR_ORDER_NOTRADE_ACCOUNT = 60021 +TAPIERROR_ORDER_NOTRADE_COM_GROUP = 60022 +TAPIERROR_ORDER_NOTRADE_ACC_CONTRACT = 60023 +TAPIERROR_ORDER_NOTRADE_SYSTEM = 60024 +TAPIERROR_ORDER_CLOSE_ACCOUNT = 60025 +TAPIERROR_ORDER_CLOSE_ACC_CONTRACT = 60026 +TAPIERROR_ORDER_CLOSE_SYSTEM = 60027 +TAPIERROR_ORDER_CLOSE_DAYS = 60028 +TAPIERROR_ORDER_NOTRADE_RISK = 60029 +TAPIERROR_ORDER_CLOSE_RISK = 60030 +TAPIERROR_ORDERINSERT_POSITIONMAX = 60031 +TAPIERROR_ORDERINSERT_ONCEMAX = 60032 +TAPIERROR_ORDERINSERT_TRADEROUTE = 60033 +TAPIERROR_ORDER_IN_MOD_PRICE_ERROR = 60034 +TAPIERROR_ORDER_IN_GIVEUP_POS_MAX = 60035 +TAPIERROR_UPPERCHANNEL_NOT_LOGIN = 60041 +TAPIERROR_UPPERCHANNEL_NOT_FOUND = 60042 +TAPIERROR_ORDERINSERT_NOTENOUGHFUND = 60051 +TAPIERROR_ORDERINSERT_FEE = 60052 +TAPIERROR_ORDERINSERT_MARGIN = 60053 +TAPIERROR_ORDERINSERT_BASENOFUND = 60054 +TAPIERROR_ORDERINSERT_MARGINAMOUNT = 60055 +TAPIERROR_ORDERINSERT_OPENRATIO = 60056 +TAPIERROR_ORDERINSERT_GROUP_OPENRATIO = 60057 +TAPIERROR_ORDERINSERT_RISKARRAY = 60058 +TAPIERROR_ORDERDELETE_NOT_SYSNO = 60061 +TAPIERROR_ORDERDELETE_NOT_STATE = 60062 +TAPIERROR_ORDERDELETE_NO_INPUT = 60063 +TAPIERROR_ORDERMODIFY_NOT_STATE = 60071 +TAPIERROR_ORDERMODIFY_BACK_INPUT = 60072 +TAPIERROR_ORDERMODIFY_RISK_ORDER = 60073 +TAPIERROR_ORDERMODIFY_ERROR_QTY = 60074 +TAPIERROR_ORDERMODIFY_ERROR_READY = 60075 +TAPIERROR_ORDERINPUT_CANNOTMOVE = 60081 +TAPIERROR_ORDERINPUT_REPEAT = 60091 +TAPIERROR_CONTRACT_QUOTE = 60101 +TAPIERROR_UPPER_ONCEMAX = 60111 +TAPIERROR_UPPER_POSITIONMAX = 60112 +TAPIERROR_ORDERINSERT_CLOSEMODE = 60121 +TAPIERROR_CLOSE_ORDER = 60122 +TAPIERROR_CLOSE_MATCH = 60123 +TAPIERROR_MOD_DEL_NO_ORDER = 60131 +TAPIERROR_MOD_DEL_GATEWAY_DISCON = 60132 +TAPIERROR_MATCHINPUT_REPEAT = 60141 +TAPIERROR_MATCHINPUT_NO_ORDER = 60142 +TAPIERROR_MATCHINPUT_NO_CONTRACT = 60143 +TAPIERROR_MATCHINPUT_PARM_ERROR = 60144 +TAPIERROR_MATCHINPUT_OSTATE_ERROR = 60145 +TAPIERROR_MATCHREMOVE_NO_MATCH = 60151 +TAPIERROR_MATCHREMOVE_STATE_ERROR = 60152 +TAPIERROR_ORDERINPUT_STATE_ERROR = 60161 +TAPIERROR_ORDERINPUT_MOD_ERROR = 60162 +TAPIERROR_ORDERREMOVE_ERROR = 60163 +TAPIERROR_ORDERINPUT_MOD_STATE_ERROR = 60164 +TAPIERROR_ORDEREXCHANGE_STATE_ERROR = 60165 +TAPIERROR_ORDERREMOVE_NOT_ERROR = 60166 +TAPIERROR_ORDERMARKET_DELETE_NOTFOUND = 60171 +TAPIERROR_ORDERMARKET_DEL_ACCOUNT_NE = 60172 +TAPIERROR_ORDERMARKET_DEL_COMMODITY_NE = 60173 +TAPIERROR_ORDERMARKET_DEL_CONTRACT_NE = 60174 +TAPIERROR_ORDERMARKET_DEL_SIDE_EQ = 60175 +TAPIERROR_ORDERMARKET_DEL_SIDE_ERROR = 60176 +TAPIERROR_ORDERMARKET_OTHER_SIDE_ERROR = 60177 +TAPIERROR_ORDERACTIVATE_NOTFOUND_ERROR = 60181 +TAPIERROR_ORDERACTIVATE_STATE_ERROR = 60182 +TAPIERROR_GW_NOT_READY = 80001 +TAPIERROR_GW_INVALID_COMMODITY = 80002 +TAPIERROR_GW_INVALID_CONTRACT = 80003 +TAPIERROR_GW_INVALID_FIELD = 80004 +TAPIERROR_GW_INVALID_PRICE = 80005 +TAPIERROR_GW_INVALID_VOLUME = 80006 +TAPIERROR_GW_INVALID_TYPE = 80007 +TAPIERROR_GW_INVALID_MODE = 80008 +TAPIERROR_GW_ORDER_NOT_EXIST = 80009 +TAPIERROR_GW_SEND_FAIL = 80010 +TAPIERROR_GW_REJ_BYUPPER = 80011 +TAPIERROR_TRADEFRONT_MODULETYPEERR = 90001 +TAPIERROR_TRADEFRONT_TOOMANYDATA = 90002 +TAPIERROR_TRADEFRONT_NODATA = 90003 +TAPIERROT_TRADEFRONT_NOUSER = 90004 +TAPIERROR_TRADEFRONT_DISCONNECT_TRADE = 90011 +TAPIERROR_TRADEFRONT_DISCONNECT_MANAGE = 90012 +TAPIERROR_TRADEFRONT_ACCOUNT = 90021 +TAPIERROR_TRADEFRONT_ORDER = 90022 +TAPIERROR_TRADEFRONT_FREQUENCY = 90023 +TAPIERROR_TRADEFRONT_RUFUSE = 90024 +TAPIERROR_TRADEFRONT_SELFMATCH = 90025 +TAPIERROR_SUCCEED = 0 +TAPIERROR_ConnectFail = -1 +TAPIERROR_LinkAuthFail = -2 +TAPIERROR_HostUnavailable = -3 +TAPIERROR_SendDataError = -4 +TAPIERROR_TestIDError = -5 +TAPIERROR_NotReadyTestNetwork = -6 +TAPIERROR_CurTestNotOver = -7 +TAPIERROR_NOFrontAvailable = -8 +TAPIERROR_DataPathAvaiable = -9 +TAPIERROR_RepeatLogin = -10 +TAPIERROR_InnerError = -11 +TAPIERROR_LastReqNotFinish = -12 +TAPIERROR_InputValueError = -13 +TAPIERROR_AuthCode_Invalid = -14 +TAPIERROR_AuthCode_Expired = -15 +TAPIERROR_AuthCode_TypeNotMatch = -16 +TAPIERROR_API_NotReady = -17 +TAPIERROR_UDP_LISTEN_FAILED = -18 +TAPIERROR_UDP_LISTENING = -19 +TAPIERROR_NotImplemented = -20 +TAPIERROR_CallOneTimeOnly = -21 +TAPIERROR_ORDER_FREQUENCY = -22 +TAPIERROR_RENTQRY_TOOFAST = -23 +TAPIERROR_CALL_NOCONDITION = -24 +TAPIERROR_ORDER_NOTFOUND = -25 +TAPIERROR_LOGPATH_EMPTY = -26 +TAPIERROR_LOGPATH_FAILOPEN = -27 +TAPIERROR_RIGHT_TRADER = -28 +TAPIERROR_RIGHT_ORDERINPUT = -29 +TAPIERROR_RIGHT_LOCALOPERATION = -30 +TAPIERROR_RIGHT_ORDERTRANSFER = -31 +TAPIERROR_FILLINPUT_SYSTEMNO = -32 +TAPIERROR_FILLREMOVE_MATCHNO = -33 +TAPIERROR_FILLREQMOVE_NOFUND = -34 +TAPIERROR_LOCALMODIFY_ACCOUNT = -35 +TAPIERROR_LOCALTRANSFER_ACCOUNT = -36 +TAPIERROR_INPUTERROR_PHONE = -37 +TAPIERROR_ERROR_CONTACT = -38 +TAPIERROR_ERROR_REJESTVERTIFICATE = -39 +TAPIERROR_RIGHT_SETPASSWORD = -40 +TAPIERROR_RISK_OPERERROR = -41 +TAPIERROR_ORDER_MODACCOUNT = -42 +TAPIERROR_INPUTERROR_NULL = -10000 +TAPIERROR_INPUTERROR_TAPIYNFLAG = -10001 +TAPIERROR_INPUTERROR_TAPILOGLEVEL = -10002 +TAPIERROR_INPUTERROR_TAPICommodityType = -10003 +TAPIERROR_INPUTERROR_TAPICallOrPutFlagType = -10004 +TAPIERROR_INPUTERROR_TAPIBucketDateFlag = -11001 +TAPIERROR_INPUTERROR_TAPIHisQuoteType = -11002 +TAPIERROR_INPUTERROR_TAPIAccountType = -12001 +TAPIERROR_INPUTERROR_TAPIUserTypeType = -12002 +TAPIERROR_INPUTERROR_TAPIAccountState = -12003 +TAPIERROR_INPUTERROR_TAPIAccountFamilyType = -12004 +TAPIERROR_INPUTERROR_TAPIOrderTypeType = -12005 +TAPIERROR_INPUTERROR_TAPIOrderSourceType = -12006 +TAPIERROR_INPUTERROR_TAPITimeInForceType = -12007 +TAPIERROR_INPUTERROR_TAPISideType = -12008 +TAPIERROR_INPUTERROR_TAPIPositionEffectType = -12009 +TAPIERROR_INPUTERROR_TAPIHedgeFlagType = -12010 +TAPIERROR_INPUTERROR_TAPIOrderStateType = -12011 +TAPIERROR_INPUTERROR_TAPICalculateModeType = -12012 +TAPIERROR_INPUTERROR_TAPIMatchSourceType = -12013 +TAPIERROR_INPUTERROR_TAPIOpenCloseModeType = -12014 +TAPIERROR_INPUTERROR_TAPIFutureAlgType = -12015 +TAPIERROR_INPUTERROR_TAPIOptionAlgType = -12016 +TAPIERROR_INPUTERROR_TAPIBankAccountLWFlagType = -12017 +TAPIERROR_INPUTERROR_TAPIBankAccountStateType = -12018 +TAPIERROR_INPUTERROR_TAPIBankAccountSwapStateType = -12019 +TAPIERROR_INPUTERROR_TAPIBankAccountTransferStateType = -12020 +TAPIERROR_INPUTERROR_TAPIMarginCalculateModeType = -12021 +TAPIERROR_INPUTERROR_TAPIOptionMarginCalculateModeType = -12022 +TAPIERROR_INPUTERROR_TAPICmbDirectType = -12023 +TAPIERROR_INPUTERROR_TAPIDeliveryModeType = -12024 +TAPIERROR_INPUTERROR_TAPIContractTypeType = -12025 +TAPIERROR_INPUTERROR_TAPIPartyTypeType = -12026 +TAPIERROR_INPUTERROR_TAPIPartyCertificateTypeType = -12027 +TAPIERROR_INPUTERROR_TAPIMsgReceiverType = -12028 +TAPIERROR_INPUTERROR_TAPIMsgTypeType = -12029 +TAPIERROR_INPUTERROR_TAPIMsgLevelType = -12030 +TAPIERROR_INPUTERROR_TAPITransferDirectType = -12031 +TAPIERROR_INPUTERROR_TAPITransferStateType = -12032 +TAPIERROR_INPUTERROR_TAPITransferTypeType = -12033 +TAPIERROR_INPUTERROR_TAPITransferDeviceIDType = -12034 +TAPIERROR_INPUTERROR_TAPITacticsTypeType = -12035 +TAPIERROR_INPUTERROR_TAPIORDERACT = -12036 +TAPIERROR_INPUTERROR_TAPIBillTypeType = -12037 +TAPIERROR_INPUTERROR_TAPIBillFileTypeType = -12038 +TAPIERROR_INPUTERROR_TAPIOFFFlagType = -12039 +TAPIERROR_INPUTERROR_TAPICashAdjustTypeType = -12040 +TAPIERROR_INPUTERROR_TAPITriggerConditionType = -12041 +TAPIERROR_INPUTERROR_TAPITriggerPriceTypeType = -12042 +TAPIERROR_INPUTERROR_TAPITradingStateType = -12043 +TAPIERROR_INPUTERROR_TAPIMarketLevelType = -12044 +TAPIERROR_INPUTERROR_TAPIOrderQryTypeType = -12045 +TAPIERROR_INPUTERROR_TAPIClientID = -12046 +TAPIERROR_INPUTERROR_QryHisQuoteParam = -13001 +TAPIERROR_INPUTERROR_TAPIIncludeNAN = -13002 +TAPIERROR_INPUTERROR_TAPIPasswordType = -12048 +TAPIERROR_DISCONNECT_CLOSE_INIT = 1 +TAPIERROR_DISCONNECT_CLOSE_PASS = 2 +TAPIERROR_DISCONNECT_READ_ERROR = 3 +TAPIERROR_DISCONNECT_WRITE_ERROR = 4 +TAPIERROR_DISCONNECT_BUF_FULL = 5 +TAPIERROR_DISCONNECT_IOCP_ERROR = 6 +TAPIERROR_DISCONNECT_PARSE_ERROR = 7 +TAPIERROR_DISCONNECT_CONNECT_TIMEOUT = 8 +TAPIERROR_DISCONNECT_INIT_ERROR = 9 +TAPIERROR_DISCONNECT_HAS_CONNECTED = 10 +TAPIERROR_DISCONNECT_HAS_EXIT = 11 +TAPIERROR_DISCONNECT_TRY_LATER = 12 +TAPI_ACCOUNT_TYPE_PERSON = "P" +TAPI_ACCOUNT_TYPE_ORGANIZATION = "O" +TAPI_ACCOUNT_TYPE_AGENT = "A" +TAPI_ACCOUNT_TYPE_MARGIN = "M" +TAPI_ACCOUNT_TYPE_HOUSE = "H" +TAPI_ACCOUNT_TYPE_STOCK = "S" +TAPI_RIGHT_ORDER_DEL = 30001 +TAPI_RIGHT_ORDER_CHECK = 30002 +TAPI_RIGHT_ONLY_QRY = 31000 +TAPI_RIGHT_ONLY_OPEN = 31001 +TAPI_USERTYPE_CLIENT = 10000 +TAPI_USERTYPE_BROKER = 20000 +TAPI_USERTYPE_TRADER = 30000 +TAPI_USERTYPE_RISK = 40000 +TAPI_USERTYPE_MANAGER = 50000 +TAPI_USERTYPE_QUOTE = 60000 +TAPI_ACCOUNT_STATE_NORMAL = "N" +TAPI_ACCOUNT_STATE_CANCEL = "C" +TAPI_ACCOUNT_STATE_SLEEP = "S" +TAPI_ACCOUNT_TRADING_RIGHT_NORMAL = "0" +TAPI_ACCOUNT_TRADING_RIGHT_NOTRADE = "1" +TAPI_ACCOUNT_TRADING_RIGHT_CLOSE = "2" +TAPI_ORDER_TYPE_MARKET = "1" +TAPI_ORDER_TYPE_LIMIT = "2" +TAPI_ORDER_TYPE_STOP_MARKET = "3" +TAPI_ORDER_TYPE_STOP_LIMIT = "4" +TAPI_ORDER_TYPE_OPT_EXEC = "5" +TAPI_ORDER_TYPE_OPT_ABANDON = "6" +TAPI_ORDER_TYPE_REQQUOT = "7" +TAPI_ORDER_TYPE_RSPQUOT = "8" +TAPI_ORDER_TYPE_ICEBERG = "9" +TAPI_ORDER_TYPE_GHOST = "A" +TAPI_ORDER_TYPE_HKEX_AUCTION = "B" +TAPI_ORDER_TYPE_SWAP = "C" +TAPI_ORDER_SOURCE_SELF_ETRADER = "1" +TAPI_ORDER_SOURCE_PROXY_ETRADER = "2" +TAPI_ORDER_SOURCE_JTRADER = "3" +TAPI_ORDER_SOURCE_MANUAL = "4" +TAPI_ORDER_SOURCE_CARRY = "5" +TAPI_ORDER_SOURCE_PROGRAM = "6" +TAPI_ORDER_SOURCE_DELIVERY = "7" +TAPI_ORDER_SOURCE_ABANDON = "8" +TAPI_ORDER_SOURCE_CHANNEL = "9" +TAPI_ORDER_TIMEINFORCE_GFD = "0" +TAPI_ORDER_TIMEINFORCE_GTC = "1" +TAPI_ORDER_TIMEINFORCE_GTD = "2" +TAPI_ORDER_TIMEINFORCE_FAK = "3" +TAPI_ORDER_TIMEINFORCE_FOK = "4" +TAPI_SIDE_NONE = "N" +TAPI_SIDE_BUY = "B" +TAPI_SIDE_SELL = "S" +TAPI_PositionEffect_NONE = "N" +TAPI_PositionEffect_OPEN = "O" +TAPI_PositionEffect_COVER = "C" +TAPI_PositionEffect_COVER_TODAY = "T" +TAPI_HEDGEFLAG_NONE = "N" +TAPI_HEDGEFLAG_T = "T" +TAPI_HEDGEFLAG_B = "B" +TAPI_HEDGEFLAG_L = "L" +TAPI_ORDER_STATE_SUBMIT = "0" +TAPI_ORDER_STATE_ACCEPT = "1" +TAPI_ORDER_STATE_TRIGGERING = "2" +TAPI_ORDER_STATE_EXCTRIGGERING = "3" +TAPI_ORDER_STATE_QUEUED = "4" +TAPI_ORDER_STATE_PARTFINISHED = "5" +TAPI_ORDER_STATE_FINISHED = "6" +TAPI_ORDER_STATE_CANCELING = "7" +TAPI_ORDER_STATE_MODIFYING = "8" +TAPI_ORDER_STATE_CANCELED = "9" +TAPI_ORDER_STATE_LEFTDELETED = "A" +TAPI_ORDER_STATE_FAIL = "B" +TAPI_ORDER_STATE_DELETED = "C" +TAPI_ORDER_STATE_SUPPENDED = "D" +TAPI_ORDER_STATE_DELETEDFOREXPIRE = "E" +TAPI_ORDER_STATE_EFFECT = "F" +TAPI_ORDER_STATE_APPLY = "G" +TAPI_CALULATE_MODE_COMBINE = "0" +TAPI_CALCULATE_MODE_PERCENTAGE = "1" +TAPI_CALCULATE_MODE_QUOTA = "2" +TAPI_CALCULATE_MODE_CHAPERCENTAGE = "3" +TAPI_CALCULATE_MODE_CHAQUOTA = "4" +TAPI_CALCULATE_MODE_DISCOUNT = "5" +TAPI_MATCH_SOURCE_ALL = "0" +TAPI_MATCH_SOURCE_SELF_ETRADER = "1" +TAPI_MATCH_SOURCE_PROXY_ETRADER = "2" +TAPI_MATCH_SOURCE_JTRADER = "3" +TAPI_MATCH_SOURCE_MANUAL = "4" +TAPI_MATCH_SOURCE_CARRY = "5" +TAPI_MATCH_SOURCE_PROGRAM = "6" +TAPI_MATCH_SOURCE_DELIVERY = "7" +TAPI_MATCH_SOURCE_ABANDON = "8" +TAPI_MATCH_SOURCE_CHANNEL = "9" +TAPI_MATCH_SOURCE_ESUNNY_API = "A" +TAPI_CLOSE_MODE_NONE = "N" +TAPI_CLOSE_MODE_UNFINISHED = "U" +TAPI_CLOSE_MODE_OPENCOVER = "C" +TAPI_CLOSE_MODE_CLOSETODAY = "T" +TAPI_FUTURES_ALG_ZHUBI = "1" +TAPI_FUTURES_ALG_DINGSHI = "2" +TAPI_OPTION_ALG_FUTURES = "1" +TAPI_OPTION_ALG_OPTION = "2" +SENDTYPE_SMS = "S" +SENDTYPE_MAIL = "M" +TAPI_LWFlag_L = "L" +TAPI_LWFlag_W = "W" +TAPI_CASHINOUT_MODE_FEEADJUST = "0" +TAPI_CASHINOUT_MODE_YKADJUST = "1" +TAPI_CASHINOUT_MODE_PLEDGE = "2" +TAPI_CASHINOUT_MODE_INTERESTREVENUE = "3" +TAPI_CASHINOUT_MODE_COLLECTIONCOST = "4" +TAPI_CASHINOUT_MODE_OTHER = "5" +TAPI_CASHINOUT_MODE_COMPANY = "6" +TAPI_DEPOSITCALCULATE_MODE_FEN = "1" +TAPI_DEPOSITCALCULATE_MODE_SUO = "2" +TAPI_CMB_DIRECT_FIRST = "1" +TAPI_CMB_DIRECT_SECOND = "2" +TAPI_DELIVERY_MODE_GOODS = "G" +TAPI_DELIVERY_MODE_CASH = "C" +TAPI_DELIVERY_MODE_EXECUTE = "E" +TAPI_DELIVERY_MODE_ABANDON = "A" +TAPI_DELIVERY_MODE_HKF = "H" +TAPI_CONTRACT_TYPE_TRADEQUOTE = "1" +TAPI_CONTRACT_TYPE_QUOTE = "2" +TAPI_TACTICS_TYPE_NONE = "N" +TAPI_TACTICS_TYPE_READY = "M" +TAPI_TACTICS_TYPE_ATUO = "A" +TAPI_TACTICS_TYPE_CONDITION = "C" +APIORDER_INSERT = "1" +APIORDER_MODIFY = "2" +APIORDER_DELETE = "3" +APIORDER_SUSPEND = "4" +APIORDER_ACTIVATE = "5" +APIORDER_SYSTEM_DELETE = "6" +TAPI_TRIGGER_CONDITION_NONE = "N" +TAPI_TRIGGER_CONDITION_GREAT = "G" +TAPI_TRIGGER_CONDITION_LITTLE = "L" +TAPI_TRIGGER_PRICE_NONE = "N" +TAPI_TRIGGER_PRICE_BUY = "B" +TAPI_TRIGGER_PRICE_SELL = "S" +TAPI_TRIGGER_PRICE_LAST = "L" +TAPI_TRADE_STATE_BID = "1" +TAPI_TRADE_STATE_MATCH = "2" +TAPI_TRADE_STATE_CONTINUOUS = "3" +TAPI_TRADE_STATE_PAUSED = "4" +TAPI_TRADE_STATE_CLOSE = "5" +TAPI_TRADE_STATE_DEALLAST = "6" +TAPI_TRADE_STATE_GWDISCONNECT = "0" +TAPI_TRADE_STATE_UNKNOWN = "N" +TAPI_TRADE_STATE_INITIALIZE = "I" +TAPI_TRADE_STATE_READY = "R" +TAPI_NOTICE_IGNORE_NONE = 0x00000000 +TAPI_NOTICE_IGNORE_ALL = 0xFFFFFFFF +TAPI_NOTICE_IGNORE_FUND = 0x00000001 +TAPI_NOTICE_IGNORE_ORDER = 0x00000002 +TAPI_NOTICE_IGNORE_FILL = 0x00000004 +TAPI_NOTICE_IGNORE_POSITION = 0x00000008 +TAPI_NOTICE_IGNORE_CLOSE = 0x00000010 +TAPI_NOTICE_IGNORE_POSITIONPROFIT = 0x00000020 +TAPI_ORDER_QRY_TYPE_ALL = "A" +TAPI_ORDER_QRY_TYPE_UNENDED = "U" +TAPI_MSG_RECEIVER_ACCOUNTNO = "1" +TAPI_MSG_RECEIVER_ACCOUNTGROUPNO = "2" +TAPI_MSG_RECEIVER_ATTRIBUTE = "3" +TAPI_MSG_RECEIVER_USERNO = "4" +TAPI_MSG_LEVEL_NORMAL = "1" +TAPI_MSG_LEVEL_IMPORTANT = "2" +TAPI_MSG_LEVEL_IMERGENCY = "3" +TAPI_Msg_TYPE_MANAGER = "1" +TAPI_Msg_TYPE_RISKCONTROL = "2" +TAPI_BILL_DATE = "D" +TAPI_BILL_MONTH = "M" +TAPI_BILL_FILE_TXT = "T" +TAPI_BILL_FILE_PDF = "F" +SettleFlag_AutoSettle = "0" +SettleFlagh_Manual = "2" diff --git a/vnpy/api/tap/vntap.pyd b/vnpy/api/tap/vntap.pyd deleted file mode 100644 index ce2c9f272b..0000000000 Binary files a/vnpy/api/tap/vntap.pyd and /dev/null differ diff --git a/vnpy/api/tap/vntap.pyi b/vnpy/api/tap/vntap.pyi deleted file mode 100644 index 9735336315..0000000000 --- a/vnpy/api/tap/vntap.pyi +++ /dev/null @@ -1,462 +0,0 @@ -# noinspection PyUnresolvedReferences -import typing -if typing.TYPE_CHECKING: - from typing import * - # noinspection PyUnresolvedReferences - from enum import Enum - from .vntap import * - - -def set_async_callback_exception_handler(handler: Callable[[AsyncDispatchException], None]): - """ - set a customize exception handler for async callback in this module(pyd) - \a handler should return True if it handles that exception, - - :note: If the return value of \a handler is not True, exception will be re-thrown. - """ - ... - - -class AsyncDispatchException: - what: str - instance: object - function_name: str - - -from . import vntap_ITapTrade as ITapTrade -class TapAPIApplicationInfo(): - - - AuthCode: str - KeyOperationLogPath: str - - -class TapAPICommodity(): - - - ExchangeNo: str - CommodityType: str - CommodityNo: str - - -class TapAPIContract(): - - - Commodity: TapAPICommodity - ContractNo1: str - StrikePrice1: str - CallOrPutFlag1: str - ContractNo2: str - StrikePrice2: str - CallOrPutFlag2: str - - -class TapAPIExchangeInfo(): - - - ExchangeNo: str - ExchangeName: str - - -class TapAPIChangePasswordReq(): - - - OldPassword: str - NewPassword: str - - -class TapAPIQuoteLoginAuth(): - - - UserNo: str - ISModifyPassword: str - Password: str - NewPassword: str - QuoteTempPassword: str - ISDDA: str - DDASerialNo: str - - -class TapAPIQuotLoginRspInfo(): - - - UserNo: str - UserType: int - UserName: str - QuoteTempPassword: str - ReservedInfo: str - LastLoginIP: str - LastLoginProt: int - LastLoginTime: str - LastLogoutTime: str - TradeDate: str - LastSettleTime: str - StartTime: str - InitTime: str - - -class TapAPIQuoteCommodityInfo(): - - - Commodity: TapAPICommodity - CommodityName: str - CommodityEngName: str - ContractSize: float - CommodityTickSize: float - CommodityDenominator: int - CmbDirect: str - CommodityContractLen: int - IsDST: str - RelateCommodity1: TapAPICommodity - RelateCommodity2: TapAPICommodity - - -class TapAPIQuoteContractInfo(): - - - Contract: TapAPIContract - ContractType: str - QuoteUnderlyingContract: str - ContractName: str - ContractExpDate: str - LastTradeDate: str - FirstNoticeDate: str - - -class TapAPIQuoteWhole(): - - - Contract: TapAPIContract - CurrencyNo: str - TradingState: str - DateTimeStamp: str - QPreClosingPrice: float - QPreSettlePrice: float - QPrePositionQty: int - QOpeningPrice: float - QLastPrice: float - QHighPrice: float - QLowPrice: float - QHisHighPrice: float - QHisLowPrice: float - QLimitUpPrice: float - QLimitDownPrice: float - QTotalQty: int - QTotalTurnover: float - QPositionQty: int - QAveragePrice: float - QClosingPrice: float - QSettlePrice: float - QLastQty: int - QBidPrice: List[float] - QBidQty: List[int] - QAskPrice: List[float] - QAskQty: List[int] - QImpliedBidPrice: float - QImpliedBidQty: int - QImpliedAskPrice: float - QImpliedAskQty: int - QPreDelta: float - QCurrDelta: float - QInsideQty: int - QOutsideQty: int - QTurnoverRate: float - Q5DAvgQty: int - QPERatio: float - QTotalValue: float - QNegotiableValue: float - QPositionTrend: int - QChangeSpeed: float - QChangeRate: float - QChangeValue: float - QSwing: float - QTotalBidQty: int - QTotalAskQty: int - UnderlyContract: TapAPIContract - - -class ITapQuoteAPINotify(): - - - - - def OnRspLogin(self, errorCode: int, info: TapAPIQuotLoginRspInfo)->None: - ... - def OnAPIReady(self, )->None: - ... - def OnDisconnect(self, reasonCode: int)->None: - ... - def OnRspQryCommodity(self, sessionID: int, errorCode: int, isLast: str, info: TapAPIQuoteCommodityInfo)->None: - ... - def OnRspQryContract(self, sessionID: int, errorCode: int, isLast: str, info: TapAPIQuoteContractInfo)->None: - ... - def OnRspSubscribeQuote(self, sessionID: int, errorCode: int, isLast: str, info: TapAPIQuoteWhole)->None: - ... - def OnRspUnSubscribeQuote(self, sessionID: int, errorCode: int, isLast: str, info: TapAPIContract)->None: - ... - def OnRtnQuote(self, info: TapAPIQuoteWhole)->None: - ... -class ITapQuoteAPI(): - - - - - def SetAPINotify(self, apiNotify: ITapQuoteAPINotify)->int: - ... - def SetHostAddress(self, IP: str, port: int)->int: - ... - def Login(self, loginAuth: TapAPIQuoteLoginAuth)->int: - ... - def Disconnect(self, )->int: - ... - def QryCommodity(self, )->Tuple[int,int]: - return "retv","sessionID" - def QryContract(self, qryReq: TapAPICommodity)->Tuple[int,int]: - return "retv","sessionID" - def SubscribeQuote(self, contract: TapAPIContract)->Tuple[int,int]: - return "retv","sessionID" - def UnSubscribeQuote(self, contract: TapAPIContract)->Tuple[int,int]: - return "retv","sessionID" -TAPISTR_10 = str -TAPISTR_20 = str -TAPISTR_30 = str -TAPISTR_40 = str -TAPISTR_50 = str -TAPISTR_70 = str -TAPISTR_100 = str -TAPISTR_300 = str -TAPISTR_500 = str -TAPISTR_2000 = str -TAPIAUTHCODE = str -TAPICHAR = str -TAPIINT32 = int -TAPIUINT32 = int -TAPIINT64 = int -TAPIUINT64 = int -TAPIUINT16 = int -TAPIUINT8 = int -TAPIREAL64 = float -TAPIYNFLAG = str -TAPIDTSTAMP = str -TAPIDATETIME = str -TAPIDATE = str -TAPITIME = str -TAPILOGLEVEL = str -TAPICommodityType = str -TAPICallOrPutFlagType = str -TAPIQPRICE = float -TAPIQVOLUME = int -TAPIQDIFF = int -APIYNFLAG_YES: str -APIYNFLAG_NO: str -APILOGLEVEL_NONE: str -APILOGLEVEL_ERROR: str -APILOGLEVEL_WARNING: str -APILOGLEVEL_DEBUG: str -TAPI_COMMODITY_TYPE_NONE: str -TAPI_COMMODITY_TYPE_SPOT: str -TAPI_COMMODITY_TYPE_FUTURES: str -TAPI_COMMODITY_TYPE_OPTION: str -TAPI_COMMODITY_TYPE_SPREAD_MONTH: str -TAPI_COMMODITY_TYPE_SPREAD_COMMODITY: str -TAPI_COMMODITY_TYPE_BUL: str -TAPI_COMMODITY_TYPE_BER: str -TAPI_COMMODITY_TYPE_STD: str -TAPI_COMMODITY_TYPE_STG: str -TAPI_COMMODITY_TYPE_PRT: str -TAPI_COMMODITY_TYPE_BLT: str -TAPI_COMMODITY_TYPE_BRT: str -TAPI_COMMODITY_TYPE_DIRECTFOREX: str -TAPI_COMMODITY_TYPE_INDIRECTFOREX: str -TAPI_COMMODITY_TYPE_CROSSFOREX: str -TAPI_COMMODITY_TYPE_INDEX: str -TAPI_COMMODITY_TYPE_STOCK: str -TAPI_COMMODITY_TYPE_SPOT_TRADINGDEFER: str -TAPI_COMMODITY_TYPE_FUTURE_LOCK: str -TAPI_COMMODITY_TYPE_EFP: str -TAPI_CALLPUT_FLAG_CALL: str -TAPI_CALLPUT_FLAG_PUT: str -TAPI_CALLPUT_FLAG_NONE: str -TAPIERROR_SUCCEED: int -TAPIERROR_ConnectFail: int -TAPIERROR_LinkAuthFail: int -TAPIERROR_HostUnavailable: int -TAPIERROR_SendDataError: int -TAPIERROR_TestIDError: int -TAPIERROR_NotReadyTestNetwork: int -TAPIERROR_CurTestNotOver: int -TAPIERROR_NOFrontAvailable: int -TAPIERROR_DataPathAvaiable: int -TAPIERROR_RepeatLogin: int -TAPIERROR_InnerError: int -TAPIERROR_LastReqNotFinish: int -TAPIERROR_InputValueError: int -TAPIERROR_AuthCode_Invalid: int -TAPIERROR_AuthCode_Expired: int -TAPIERROR_AuthCode_TypeNotMatch: int -TAPIERROR_API_NotReady: int -TAPIERROR_UDP_LISTEN_FAILED: int -TAPIERROR_UDP_LISTENING: int -TAPIERROR_NotImplemented: int -TAPIERROR_CallOneTimeOnly: int -TAPIERROR_Frequently: int -TAPIERROR_INPUTERROR_NULL: int -TAPIERROR_INPUTERROR_TAPIYNFLAG: int -TAPIERROR_INPUTERROR_TAPILOGLEVEL: int -TAPIERROR_INPUTERROR_TAPICommodityType: int -TAPIERROR_INPUTERROR_TAPICallOrPutFlagType: int -TAPIERROR_INPUTERROR_TAPIAccountType: int -TAPIERROR_INPUTERROR_TAPIAccountState: int -TAPIERROR_INPUTERROR_TAPIAccountFamilyType: int -TAPIERROR_INPUTERROR_TAPIOrderTypeType: int -TAPIERROR_INPUTERROR_TAPIOrderSourceType: int -TAPIERROR_INPUTERROR_TAPITimeInForceType: int -TAPIERROR_INPUTERROR_TAPISideType: int -TAPIERROR_INPUTERROR_TAPIPositionEffectType: int -TAPIERROR_INPUTERROR_TAPIHedgeFlagType: int -TAPIERROR_INPUTERROR_TAPIOrderStateType: int -TAPIERROR_INPUTERROR_TAPICalculateModeType: int -TAPIERROR_INPUTERROR_TAPIMatchSourceType: int -TAPIERROR_INPUTERROR_TAPIOpenCloseModeType: int -TAPIERROR_INPUTERROR_TAPIFutureAlgType: int -TAPIERROR_INPUTERROR_TAPIOptionAlgType: int -TAPIERROR_INPUTERROR_TAPIBankAccountLWFlagType: int -TAPIERROR_INPUTERROR_TAPIMarginCalculateModeType: int -TAPIERROR_INPUTERROR_TAPIOptionMarginCalculateModeType: int -TAPIERROR_INPUTERROR_TAPICmbDirectType: int -TAPIERROR_INPUTERROR_TAPIDeliveryModeType: int -TAPIERROR_INPUTERROR_TAPIContractTypeType: int -TAPIERROR_INPUTERROR_TAPITacticsTypeType: int -TAPIERROR_INPUTERROR_TAPIORDERACT: int -TAPIERROR_INPUTERROR_TAPITriggerConditionType: int -TAPIERROR_INPUTERROR_TAPITriggerPriceTypeType: int -TAPIERROR_INPUTERROR_TAPITradingStateType: int -TAPIERROR_INPUTERROR_TAPIMarketLevelType: int -TAPIERROR_INPUTERROR_TAPIOrderQryTypeType: int -TAPIERROR_DISCONNECT_CLOSE_INIT: int -TAPIERROR_DISCONNECT_CLOSE_PASS: int -TAPIERROR_DISCONNECT_READ_ERROR: int -TAPIERROR_DISCONNECT_WRITE_ERROR: int -TAPIERROR_DISCONNECT_BUF_FULL: int -TAPIERROR_DISCONNECT_IOCP_ERROR: int -TAPIERROR_DISCONNECT_PARSE_ERROR: int -TAPIERROR_DISCONNECT_CONNECT_TIMEOUT: int -TAPIERROR_DISCONNECT_INIT_ERROR: int -TAPIERROR_DISCONNECT_HAS_CONNECTED: int -TAPIERROR_DISCONNECT_HAS_EXIT: int -TAPIERROR_DISCONNECT_TRY_LATER: int -TAPIERROR_DISCONNECT_HEARTBEAT_FAILED: int -TAPIERROR_LOGIN: int -TAPIERROR_LOGIN_USER: int -TAPIERROR_LOGIN_DDA: int -TAPIERROR_LOGIN_LICENSE: int -TAPIERROR_LOGIN_MODULE: int -TAPIERROR_LOGIN_FORCE: int -TAPIERROR_LOGIN_STATE: int -TAPIERROR_LOGIN_PASS: int -TAPIERROR_LOGIN_RIGHT: int -TAPIERROR_LOGIN_COUNT: int -TAPIERROR_LOGIN_NOTIN_SERVERFLAGUSRES: int -TAPIERROR_LOGIN_USER_EXPIRED: int -TAPIERROR_LOGIN_NO_ACCOUNT: int -TAPIERROR_LOGIN_NO_JGT: int -TAPIERROR_LOGIN_ERROR_TIMES: int -TAPIERROR_LOGIN_ERROR_AUTHTYPE: int -TAPIERROR_LOGIN_ERROR_AUTHEXPIRED: int -TAPIERROR_LOGIN_ERROR_PASSWDEXPIRED: int -TAPIERROR_USERINFO_QRY: int -TAPIERROR_USERALLRIGHT_QRY: int -TAPIERROR_USERALLACCOUNT_QRY: int -TAPIERROR_USERPASSWORD_MOD: int -TAPIERROR_USERPASSWORD_MOD_SOURCE: int -TAPIERROR_USERPASSWORD_MOD_SAME: int -TAPIERROR_USERPASSWORD_MOD_COMPLEXITY: int -TAPIERROR_ACCOUNTINFO_QRY: int -TAPIERROR_TRADENO_QRY: int -TAPIERROR_CONTRACTINFO_QRY: int -TAPIERROR_SPECIALOPTIONFUTURE_QRY: int -TAPIERROR_COMMODITYORDERTYPE_QRY: int -TAPIERROR_ORDERTIMEINFORCE_QRY: int -TAPIERROR_USER_ORDER_FREQUENCE_QRY: int -TAPIERROR_ORDERINSERT_ACCOUNT: int -TAPIERROR_ORDERINSERT_ACCOUNT_STATE: int -TAPIERROR_ORDERINSERT_SIDE_TRADE: int -TAPIERROR_ORDERINSERT_OPTIONS_TRADE: int -TAPIERROR_ORDERINSERT_COMMODITY_TRADE: int -TAPIERROR_ORDERINSERT_OPEN_RIGHT: int -TAPIERROR_ORDERINSERT_RISK_CHECK: int -TAPIERROR_ORDERINSERT_CONTRACT: int -TAPIERROR_ORDERINSERT_TRADEROUTE: int -TAPIERROR_ORDERINSERT_POSITIONMAX: int -TAPIERROR_ORDER_NOTRADE: int -TAPIERROR_ORDER_CLOSE: int -TAPIERROR_ORDERINSERT_NOTENOUGHFUND: int -TAPIERROR_ORDERINSERT_ORDERTYPE: int -TAPIERROR_ORDERINSERT_TIMEINFORCE: int -TAPIERROR_ORDERINSERT_NO_TACTICS: int -TAPIERROR_ORDERINSERT_POSITION_CANNOT_CLOSE: int -TAPIERROR_ORDERINSERT_AUTOCHECK_FAIL: int -TAPIERROR_ORDERINSERT_LME_NOTREADY: int -TAPIERROR_ORDERINSERT_CLOSEMODE: int -TAPIERROR_ORDERINSERT_PARENTNOTENOUGHFUND: int -TAPIERROR_SWAP_CONTRACT: int -TAPIERROR_USERNO_NOTHAS_ACCOUNT: int -TAPIERROR_UPPERCHANNEL_BROKEN: int -TAPIERROR_UPPERCHANNEL_NOT_EXIST: int -TAPIERROR_ORDERDELETE_NOT_SYSNO: int -TAPIERROR_ORDERDELETE_NOT_STATE: int -TAPIERROR_ORDERACTIVE_NOT_STATE: int -TAPIERROR_ORDERCHECK_NOT_STATE: int -TAPIERROR_ORDERCHECK_FAIL: int -TAPIERROR_ORDERMODIFY_NOT_STATE: int -TAPIERROR_ORDERMODIFY_BACK_INPUT: int -TAPIERROR_ORDERINSERT_FEE: int -TAPIERROR_ORDERINSERT_MARGIN: int -TAPIERROR_ORDER_NO_PERMIT: int -TAPIERROR_RSPQUOTE_NO_PERMIT: int -TAPIERROR_RSPQUOTE_CHILD_NO_PERMIT: int -TAPIERROR_TRADENO_NOT_FIND: int -TAPIERROR_ORDER_NO_CLOSE: int -TAPIERROR_QRY_QUOTE_NO_PERMIT: int -TAPIERROR_EXPIREDATE_NO_PERMIT: int -TAPIERROR_CMB_NO_PERMIT: int -TAPIERROR_ORDERSERVER_NO_PERMIT: int -TAPIERROR_POSITION_CANNOT_EXEC_OR_ABANDON: int -TAPIERROR_ORDERCHECK_NO_PERMIT: int -TAPIERROR_ORDERMAXOPENVOL_NO_PERMIT: int -TAPIERROR_ORDER_QTY_NO_PERMIT: int -TAPIERROR_ORDER_APPLY_NO_PERMIT: int -TAPIERROR_ORDER_FREQ_OVERRUN: int -TAPIERROR_COMB_NO_SIDEORHEDGE: int -TAPIERROR_ORDER_FREQUENCY: int -TAPIERROR_ORDER_QUERYING: int -TAPIERROR_SUBSCRIBEQUOTE_MAX: int -TAPIERROR_SUBSCRIBEQUOTE_EXCHANGE_MAX: int -TAPIERROR_SUBSCRIBEQUOTE_NO_RIGHT: int -TAPIERROR_SUBSCRIBEQUOTE_NO_EXCHANGE_RIGHT: int -TAPIERROR_SUBSCRIBEQUOTE_COMMODITY_NOT_EXIST: int -TAPIERROR_SUBSCRIBEQUOTE_CONTRACT_MAY_NOT_EXIST: int -TAPIERROR_QUOTEFRONT_UNKNOWN_PROTOCOL: int -def CreateITapTradeAPI(appInfo: ITapTrade.TapAPIApplicationInfo)->Tuple[ITapTrade.ITapTradeAPI,int]: - return "retv","iResult" -def FreeITapTradeAPI(apiObj: ITapTrade.ITapTradeAPI)->None: - ... -def GetITapTradeAPIVersion()->str: - ... -def SetITapTradeAPIDataPath(path: str)->int: - ... -def SetITapTradeAPILogLevel(level: str)->int: - ... -def GetITapErrorDescribe(errorCode: int)->str: - ... -def CreateTapQuoteAPI(appInfo: TapAPIApplicationInfo)->Tuple[ITapQuoteAPI,int]: - return "retv","iResult" -def FreeTapQuoteAPI(apiObj: ITapQuoteAPI)->None: - ... -def GetTapQuoteAPIVersion()->str: - ... -def SetTapQuoteAPIDataPath(path: str)->int: - ... -def SetTapQuoteAPILogLevel(level: str)->int: - ... - diff --git a/vnpy/api/tap/vntap.sln b/vnpy/api/tap/vntap.sln deleted file mode 100644 index 71f1b468d2..0000000000 --- a/vnpy/api/tap/vntap.sln +++ /dev/null @@ -1,31 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.28922.388 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vntap", "vntap\vntap.vcxproj", "{B4DDEDDF-B142-47CE-8D11-DF57370BF4EF}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B4DDEDDF-B142-47CE-8D11-DF57370BF4EF}.Debug|x64.ActiveCfg = Debug|x64 - {B4DDEDDF-B142-47CE-8D11-DF57370BF4EF}.Debug|x64.Build.0 = Debug|x64 - {B4DDEDDF-B142-47CE-8D11-DF57370BF4EF}.Debug|x86.ActiveCfg = Debug|Win32 - {B4DDEDDF-B142-47CE-8D11-DF57370BF4EF}.Debug|x86.Build.0 = Debug|Win32 - {B4DDEDDF-B142-47CE-8D11-DF57370BF4EF}.Release|x64.ActiveCfg = Release|x64 - {B4DDEDDF-B142-47CE-8D11-DF57370BF4EF}.Release|x64.Build.0 = Release|x64 - {B4DDEDDF-B142-47CE-8D11-DF57370BF4EF}.Release|x86.ActiveCfg = Release|Win32 - {B4DDEDDF-B142-47CE-8D11-DF57370BF4EF}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {D43B71D7-1009-401C-9B68-1E6AD8750AAC} - EndGlobalSection -EndGlobal diff --git a/vnpy/api/tap/vntap/custom/custom_wrappers.hpp b/vnpy/api/tap/vntap/custom/custom_wrappers.hpp deleted file mode 100644 index 7048482448..0000000000 --- a/vnpy/api/tap/vntap/custom/custom_wrappers.hpp +++ /dev/null @@ -1,174 +0,0 @@ -#pragma once - -#include - -#include "iTapTradeAPI.h" - -namespace c2py -{ - // // TapAPIOrderInfoNotice - // struct FixedTapAPIOrderInfoNotice : ITapTrade::TapAPIOrderInfoNotice - // { - // ITapTrade::TapAPIOrderInfo order_info; - // - // // copy from original structure - // FixedTapAPIOrderInfoNotice(const ITapTrade::TapAPIOrderInfoNotice* info) - // : TapAPIOrderInfoNotice(*info), order_info(info->OrderInfo != nullptr ? *info->OrderInfo : ITapTrade::TapAPIOrderInfo{}) - // { - // // fix pointer if there is one - // this->OrderInfo = info->OrderInfo != nullptr ? &this->order_info : nullptr; - // } - // - // // copy constructor - // FixedTapAPIOrderInfoNotice(const FixedTapAPIOrderInfoNotice& fixed) - // : TapAPIOrderInfoNotice(fixed), order_info(fixed.order_info) - // { - // // fix pointer if there is one - // this->OrderInfo = this->OrderInfo != nullptr ? &this->order_info : nullptr; - // } - // }; - // // TapAPIPositionProfit - // 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 - // { - // inline FixedTapAPIOrderInfoNotice operator ()(FixedTapAPIOrderInfoNotice& val) - // { - // return val; - // } - // }; - // - // inline auto save(const ITapTrade::TapAPIPositionProfitNotice* info) - // { // match char [] - // return FixedTapAPIPositionProfitNotice(info); - // } - // - // template <> - // struct loader - // { - // inline FixedTapAPIPositionProfitNotice operator ()(FixedTapAPIPositionProfitNotice& val) - // { - // return val; - // } - // }; - // } - - template<> - struct callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspOrderAction> - { - inline static void call(ITapTrade::ITapTradeAPINotify* instance, const char* py_func_name, ITapTrade::TAPIUINT32 sessionID, ITapTrade::TAPIINT32 errorCode, const ITapTrade::TapAPIOrderActionRsp* 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) - } - 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<> - struct callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRtnPositionProfit> - { - inline static void call(ITapTrade::ITapTradeAPINotify* instance, const char* py_func_name, const ITapTrade::TapAPIPositionProfitNotice* info) - { - - ITapTrade::TapAPIPositionProfit profit; - if (info->Data != nullptr) - { - profit = *info->Data; - } - ITapTrade::TapAPIPositionProfitNotice copied_info = *info; - auto task = [=]() mutable - { - if (copied_info.Data != nullptr) - { - copied_info.Data = &profit; // ensure pointer is pointer to the correct address(address changes after constructed lambda) - } - try - { - return default_callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRtnPositionProfit>::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)); - } - }; -} diff --git a/vnpy/api/tap/vntap/generated_files/config.h b/vnpy/api/tap/vntap/generated_files/config.h deleted file mode 100644 index ce5fd44a83..0000000000 --- a/vnpy/api/tap/vntap/generated_files/config.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -#define AUTOCXXPY_ENCODING_CUSTOM -#define AUTOCXXPY_ENCODING_CUSTOM_WINDOWS ".936" -#define AUTOCXXPY_ENCODING_CUSTOM_LINUX "zh_CN.GB18030" - - - - diff --git a/vnpy/api/tap/vntap/generated_files/generated_functions.h b/vnpy/api/tap/vntap/generated_files/generated_functions.h deleted file mode 100644 index 08841b2ee9..0000000000 --- a/vnpy/api/tap/vntap/generated_files/generated_functions.h +++ /dev/null @@ -1,113 +0,0 @@ -#pragma once -#include "config.h" - -#include -#include - -#include "iTapTradeAPI.h" -#include "TapQuoteAPI.h" -#include "TapAPIError.h" -#include "iTapAPIError.h" -#include "custom/custom_wrappers.hpp" - - -void generate_vntap(pybind11::module & parent); -void generate_sub_namespace_ITapTrade(pybind11::module & parent); -void generate_ITapTrade_sub_namespace(pybind11::module & parent); -void generate_class_ITapTrade_TapAPIApplicationInfo(pybind11::object & parent); -void generate_class_ITapTrade_TapAPICommodity(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIContract(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIExchangeInfo(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIChangePasswordReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIAuthPasswordReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPITradeLoginAuth(pybind11::object & parent); -void generate_class_ITapTrade_TapAPITradeLoginRspInfo(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIRequestVertificateCodeRsp(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIAccQryReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIAccountInfo(pybind11::object & parent); -void generate_class_ITapTrade_TapAPINewOrder(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIOrderInfo(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIOrderInfoNotice(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIOrderActionRsp(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIAmendOrder(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIOrderCancelReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIOrderQryReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIOrderProcessQryReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIFillQryReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIFillInfo(pybind11::object & parent); -void generate_class_ITapTrade_TapAPICloseQryReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPICloseInfo(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIPositionQryReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIPositionInfo(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIPositionProfit(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIPositionProfitNotice(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIPositionSummary(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIFundReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIFundData(pybind11::object & parent); -void generate_class_ITapTrade_TapAPICommodityInfo(pybind11::object & parent); -void generate_class_ITapTrade_TapAPITradeContractInfo(pybind11::object & parent); -void generate_class_ITapTrade_TapAPICurrencyInfo(pybind11::object & parent); -void generate_class_ITapTrade_TapAPITradeMessageReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPITradeMessage(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIBillQryReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIBillQryRsp(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIHisOrderQryReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIHisOrderQryRsp(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIHisMatchQryReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIHisMatchQryRsp(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIHisOrderProcessQryReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIHisPositionQryReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIHisPositionQryRsp(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIHisDeliveryQryReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIHisDeliveryQryRsp(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIAccountCashAdjustQryReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIAccountCashAdjustQryRsp(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIAccountFeeRentQryReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIAccountFeeRentQryRsp(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIAccountMarginRentQryReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIAccountMarginRentQryRsp(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIOrderQuoteMarketNotice(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIOrderMarketInsertReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIOrderMarketInsertRsp(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIOrderMarketDeleteReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIOrderLocalRemoveReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIOrderLocalRemoveRsp(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIOrderLocalInputReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIOrderLocalModifyReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIOrderLocalTransferReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIFillLocalInputReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPIFillLocalRemoveReq(pybind11::object & parent); -void generate_class_ITapTrade_TapAPITradingCalendarQryRsp(pybind11::object & parent); -void generate_class_ITapTrade_ITapTradeAPINotify(pybind11::object & parent); -void generate_class_ITapTrade_ITapTradeAPI(pybind11::object & parent); -void generate_ITapTrade_classes(pybind11::module & parent); -void generate_ITapTrade_enums(pybind11::module & parent); -void generate_ITapTrade_functions_0(pybind11::module & parent); -void generate_ITapTrade_functions(pybind11::module & parent); -void generate_ITapTrade_variables(pybind11::module & parent); -void generate_ITapTrade_typedefs(pybind11::module & parent); -void generate_caster_ITapTrade(pybind11::object & parent); -void generate_ITapTrade_caster(pybind11::module & parent); -void generate_vntap_sub_namespace(pybind11::module & parent); -void generate_class_TapAPIApplicationInfo(pybind11::object & parent); -void generate_class_TapAPICommodity(pybind11::object & parent); -void generate_class_TapAPIContract(pybind11::object & parent); -void generate_class_TapAPIExchangeInfo(pybind11::object & parent); -void generate_class_TapAPIChangePasswordReq(pybind11::object & parent); -void generate_class_TapAPIQuoteLoginAuth(pybind11::object & parent); -void generate_class_TapAPIQuotLoginRspInfo(pybind11::object & parent); -void generate_class_TapAPIQuoteCommodityInfo(pybind11::object & parent); -void generate_class_TapAPIQuoteContractInfo(pybind11::object & parent); -void generate_class_TapAPIQuoteWhole(pybind11::object & parent); -void generate_class_ITapQuoteAPINotify(pybind11::object & parent); -void generate_class_ITapQuoteAPI(pybind11::object & parent); -void generate_vntap_classes(pybind11::module & parent); -void generate_vntap_enums(pybind11::module & parent); -void generate_vntap_functions_0(pybind11::module & parent); -void generate_vntap_functions(pybind11::module & parent); -void generate_vntap_variables(pybind11::module & parent); -void generate_vntap_typedefs(pybind11::module & parent); -void generate_caster_(pybind11::object & parent); -void generate_vntap_caster(pybind11::module & parent); - - diff --git a/vnpy/api/tap/vntap/generated_files/generated_functions_0.cpp b/vnpy/api/tap/vntap/generated_files/generated_functions_0.cpp deleted file mode 100644 index 78e49e7947..0000000000 --- a/vnpy/api/tap/vntap/generated_files/generated_functions_0.cpp +++ /dev/null @@ -1,519 +0,0 @@ -#include "config.h" - -#include -#include -#include -#include -#include -#include - -#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_vntap(pybind11::module & parent) -{ - generate_vntap_sub_namespace(parent); - generate_vntap_classes(parent); - generate_vntap_enums(parent); - generate_vntap_functions(parent); - generate_vntap_variables(parent); - generate_vntap_typedefs(parent); - generate_vntap_caster(parent); -} -void generate_sub_namespace_ITapTrade(pybind11::module & parent) -{ - generate_ITapTrade_sub_namespace(parent); - generate_ITapTrade_classes(parent); - generate_ITapTrade_enums(parent); - generate_ITapTrade_functions(parent); - generate_ITapTrade_variables(parent); - generate_ITapTrade_typedefs(parent); - generate_ITapTrade_caster(parent); -} -void generate_ITapTrade_sub_namespace(pybind11::module & parent) -{ - -} -void generate_class_ITapTrade_TapAPIApplicationInfo(pybind11::object & parent) -{ - // ITapTrade::TapAPIApplicationInfo - pybind11::class_ c(parent, "TapAPIApplicationInfo"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIApplicationInfo::AuthCode - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIApplicationInfo, "AuthCode", AuthCode); - // ITapTrade::TapAPIApplicationInfo::KeyOperationLogPath - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIApplicationInfo, "KeyOperationLogPath", KeyOperationLogPath); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIApplicationInfo, c); - module_vntap::objects.emplace("ITapTrade::TapAPIApplicationInfo", c); -} -void generate_class_ITapTrade_TapAPICommodity(pybind11::object & parent) -{ - // ITapTrade::TapAPICommodity - pybind11::class_ c(parent, "TapAPICommodity"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPICommodity::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodity, "ExchangeNo", ExchangeNo); - // ITapTrade::TapAPICommodity::CommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodity, "CommodityType", CommodityType); - // ITapTrade::TapAPICommodity::CommodityNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodity, "CommodityNo", CommodityNo); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPICommodity, c); - module_vntap::objects.emplace("ITapTrade::TapAPICommodity", c); -} -void generate_class_ITapTrade_TapAPIContract(pybind11::object & parent) -{ - // ITapTrade::TapAPIContract - pybind11::class_ c(parent, "TapAPIContract"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIContract::Commodity - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIContract, "Commodity", Commodity); - // ITapTrade::TapAPIContract::ContractNo1 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIContract, "ContractNo1", ContractNo1); - // ITapTrade::TapAPIContract::StrikePrice1 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIContract, "StrikePrice1", StrikePrice1); - // ITapTrade::TapAPIContract::CallOrPutFlag1 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIContract, "CallOrPutFlag1", CallOrPutFlag1); - // ITapTrade::TapAPIContract::ContractNo2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIContract, "ContractNo2", ContractNo2); - // ITapTrade::TapAPIContract::StrikePrice2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIContract, "StrikePrice2", StrikePrice2); - // ITapTrade::TapAPIContract::CallOrPutFlag2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIContract, "CallOrPutFlag2", CallOrPutFlag2); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIContract, c); - module_vntap::objects.emplace("ITapTrade::TapAPIContract", c); -} -void generate_class_ITapTrade_TapAPIExchangeInfo(pybind11::object & parent) -{ - // ITapTrade::TapAPIExchangeInfo - pybind11::class_ c(parent, "TapAPIExchangeInfo"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIExchangeInfo::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIExchangeInfo, "ExchangeNo", ExchangeNo); - // ITapTrade::TapAPIExchangeInfo::ExchangeName - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIExchangeInfo, "ExchangeName", ExchangeName); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIExchangeInfo, c); - module_vntap::objects.emplace("ITapTrade::TapAPIExchangeInfo", c); -} -void generate_class_ITapTrade_TapAPIChangePasswordReq(pybind11::object & parent) -{ - // ITapTrade::TapAPIChangePasswordReq - pybind11::class_ c(parent, "TapAPIChangePasswordReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIChangePasswordReq::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIChangePasswordReq, "AccountNo", AccountNo); - // ITapTrade::TapAPIChangePasswordReq::PasswordType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIChangePasswordReq, "PasswordType", PasswordType); - // ITapTrade::TapAPIChangePasswordReq::OldPassword - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIChangePasswordReq, "OldPassword", OldPassword); - // ITapTrade::TapAPIChangePasswordReq::NewPassword - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIChangePasswordReq, "NewPassword", NewPassword); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIChangePasswordReq, c); - module_vntap::objects.emplace("ITapTrade::TapAPIChangePasswordReq", c); -} -void generate_class_ITapTrade_TapAPIAuthPasswordReq(pybind11::object & parent) -{ - // ITapTrade::TapAPIAuthPasswordReq - pybind11::class_ c(parent, "TapAPIAuthPasswordReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIAuthPasswordReq::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAuthPasswordReq, "AccountNo", AccountNo); - // ITapTrade::TapAPIAuthPasswordReq::PasswordType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAuthPasswordReq, "PasswordType", PasswordType); - // ITapTrade::TapAPIAuthPasswordReq::Password - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAuthPasswordReq, "Password", Password); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIAuthPasswordReq, c); - module_vntap::objects.emplace("ITapTrade::TapAPIAuthPasswordReq", c); -} -void generate_class_ITapTrade_TapAPITradeLoginAuth(pybind11::object & parent) -{ - // ITapTrade::TapAPITradeLoginAuth - pybind11::class_ c(parent, "TapAPITradeLoginAuth"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPITradeLoginAuth::UserNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeLoginAuth, "UserNo", UserNo); - // ITapTrade::TapAPITradeLoginAuth::ISModifyPassword - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeLoginAuth, "ISModifyPassword", ISModifyPassword); - // ITapTrade::TapAPITradeLoginAuth::Password - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeLoginAuth, "Password", Password); - // ITapTrade::TapAPITradeLoginAuth::NewPassword - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeLoginAuth, "NewPassword", NewPassword); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPITradeLoginAuth, c); - module_vntap::objects.emplace("ITapTrade::TapAPITradeLoginAuth", c); -} -void generate_class_ITapTrade_TapAPITradeLoginRspInfo(pybind11::object & parent) -{ - // ITapTrade::TapAPITradeLoginRspInfo - pybind11::class_ c(parent, "TapAPITradeLoginRspInfo"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPITradeLoginRspInfo::UserNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeLoginRspInfo, "UserNo", UserNo); - // ITapTrade::TapAPITradeLoginRspInfo::UserType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeLoginRspInfo, "UserType", UserType); - // ITapTrade::TapAPITradeLoginRspInfo::UserName - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeLoginRspInfo, "UserName", UserName); - // ITapTrade::TapAPITradeLoginRspInfo::ReservedInfo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeLoginRspInfo, "ReservedInfo", ReservedInfo); - // ITapTrade::TapAPITradeLoginRspInfo::LastLoginIP - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeLoginRspInfo, "LastLoginIP", LastLoginIP); - // ITapTrade::TapAPITradeLoginRspInfo::LastLoginProt - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeLoginRspInfo, "LastLoginProt", LastLoginProt); - // ITapTrade::TapAPITradeLoginRspInfo::LastLoginTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeLoginRspInfo, "LastLoginTime", LastLoginTime); - // ITapTrade::TapAPITradeLoginRspInfo::LastLogoutTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeLoginRspInfo, "LastLogoutTime", LastLogoutTime); - // ITapTrade::TapAPITradeLoginRspInfo::TradeDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeLoginRspInfo, "TradeDate", TradeDate); - // ITapTrade::TapAPITradeLoginRspInfo::LastSettleTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeLoginRspInfo, "LastSettleTime", LastSettleTime); - // ITapTrade::TapAPITradeLoginRspInfo::StartTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeLoginRspInfo, "StartTime", StartTime); - // ITapTrade::TapAPITradeLoginRspInfo::InitTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeLoginRspInfo, "InitTime", InitTime); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPITradeLoginRspInfo, c); - module_vntap::objects.emplace("ITapTrade::TapAPITradeLoginRspInfo", c); -} -void generate_class_ITapTrade_TapAPIRequestVertificateCodeRsp(pybind11::object & parent) -{ - // ITapTrade::TapAPIRequestVertificateCodeRsp - pybind11::class_ c(parent, "TapAPIRequestVertificateCodeRsp"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIRequestVertificateCodeRsp::SecondSerialID - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIRequestVertificateCodeRsp, "SecondSerialID", SecondSerialID); - // ITapTrade::TapAPIRequestVertificateCodeRsp::Effective - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIRequestVertificateCodeRsp, "Effective", Effective); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIRequestVertificateCodeRsp, c); - module_vntap::objects.emplace("ITapTrade::TapAPIRequestVertificateCodeRsp", c); -} -void generate_class_ITapTrade_TapAPIAccQryReq(pybind11::object & parent) -{ - // ITapTrade::TapAPIAccQryReq - pybind11::class_ c(parent, "TapAPIAccQryReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIAccQryReq, c); - module_vntap::objects.emplace("ITapTrade::TapAPIAccQryReq", c); -} -void generate_class_ITapTrade_TapAPIAccountInfo(pybind11::object & parent) -{ - // ITapTrade::TapAPIAccountInfo - pybind11::class_ c(parent, "TapAPIAccountInfo"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIAccountInfo::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountInfo, "AccountNo", AccountNo); - // ITapTrade::TapAPIAccountInfo::AccountType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountInfo, "AccountType", AccountType); - // ITapTrade::TapAPIAccountInfo::AccountState - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountInfo, "AccountState", AccountState); - // ITapTrade::TapAPIAccountInfo::AccountTradeRight - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountInfo, "AccountTradeRight", AccountTradeRight); - // ITapTrade::TapAPIAccountInfo::CommodityGroupNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountInfo, "CommodityGroupNo", CommodityGroupNo); - // ITapTrade::TapAPIAccountInfo::AccountShortName - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountInfo, "AccountShortName", AccountShortName); - // ITapTrade::TapAPIAccountInfo::AccountEnShortName - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountInfo, "AccountEnShortName", AccountEnShortName); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIAccountInfo, c); - module_vntap::objects.emplace("ITapTrade::TapAPIAccountInfo", c); -} -void generate_class_ITapTrade_TapAPINewOrder(pybind11::object & parent) -{ - // ITapTrade::TapAPINewOrder - pybind11::class_ c(parent, "TapAPINewOrder"); - if constexpr (std::is_constructible_v< - ITapTrade::TapAPINewOrder - >) - c.def(pybind11::init<>()); - // ITapTrade::TapAPINewOrder::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "AccountNo", AccountNo); - // ITapTrade::TapAPINewOrder::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "ExchangeNo", ExchangeNo); - // ITapTrade::TapAPINewOrder::CommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "CommodityType", CommodityType); - // ITapTrade::TapAPINewOrder::CommodityNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "CommodityNo", CommodityNo); - // ITapTrade::TapAPINewOrder::ContractNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "ContractNo", ContractNo); - // ITapTrade::TapAPINewOrder::StrikePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "StrikePrice", StrikePrice); - // ITapTrade::TapAPINewOrder::CallOrPutFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "CallOrPutFlag", CallOrPutFlag); - // ITapTrade::TapAPINewOrder::ContractNo2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "ContractNo2", ContractNo2); - // ITapTrade::TapAPINewOrder::StrikePrice2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "StrikePrice2", StrikePrice2); - // ITapTrade::TapAPINewOrder::CallOrPutFlag2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "CallOrPutFlag2", CallOrPutFlag2); - // ITapTrade::TapAPINewOrder::OrderType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "OrderType", OrderType); - // ITapTrade::TapAPINewOrder::OrderSource - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "OrderSource", OrderSource); - // ITapTrade::TapAPINewOrder::TimeInForce - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "TimeInForce", TimeInForce); - // ITapTrade::TapAPINewOrder::ExpireTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "ExpireTime", ExpireTime); - // ITapTrade::TapAPINewOrder::IsRiskOrder - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "IsRiskOrder", IsRiskOrder); - // ITapTrade::TapAPINewOrder::OrderSide - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "OrderSide", OrderSide); - // ITapTrade::TapAPINewOrder::PositionEffect - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "PositionEffect", PositionEffect); - // ITapTrade::TapAPINewOrder::PositionEffect2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "PositionEffect2", PositionEffect2); - // ITapTrade::TapAPINewOrder::InquiryNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "InquiryNo", InquiryNo); - // ITapTrade::TapAPINewOrder::HedgeFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "HedgeFlag", HedgeFlag); - // ITapTrade::TapAPINewOrder::OrderPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "OrderPrice", OrderPrice); - // ITapTrade::TapAPINewOrder::OrderPrice2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "OrderPrice2", OrderPrice2); - // ITapTrade::TapAPINewOrder::StopPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "StopPrice", StopPrice); - // ITapTrade::TapAPINewOrder::OrderQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "OrderQty", OrderQty); - // ITapTrade::TapAPINewOrder::OrderMinQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "OrderMinQty", OrderMinQty); - // ITapTrade::TapAPINewOrder::MinClipSize - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "MinClipSize", MinClipSize); - // ITapTrade::TapAPINewOrder::MaxClipSize - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "MaxClipSize", MaxClipSize); - // ITapTrade::TapAPINewOrder::RefInt - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "RefInt", RefInt); - // ITapTrade::TapAPINewOrder::RefDouble - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "RefDouble", RefDouble); - // ITapTrade::TapAPINewOrder::RefString - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "RefString", RefString); - // ITapTrade::TapAPINewOrder::ClientID - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "ClientID", ClientID); - // ITapTrade::TapAPINewOrder::TacticsType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "TacticsType", TacticsType); - // ITapTrade::TapAPINewOrder::TriggerCondition - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "TriggerCondition", TriggerCondition); - // ITapTrade::TapAPINewOrder::TriggerPriceType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "TriggerPriceType", TriggerPriceType); - // ITapTrade::TapAPINewOrder::AddOneIsValid - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPINewOrder, "AddOneIsValid", AddOneIsValid); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPINewOrder, c); - module_vntap::objects.emplace("ITapTrade::TapAPINewOrder", c); -} -void generate_class_ITapTrade_TapAPIOrderInfo(pybind11::object & parent) -{ - // ITapTrade::TapAPIOrderInfo - pybind11::class_ c(parent, "TapAPIOrderInfo"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIOrderInfo::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "AccountNo", AccountNo); - // ITapTrade::TapAPIOrderInfo::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "ExchangeNo", ExchangeNo); - // ITapTrade::TapAPIOrderInfo::CommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "CommodityType", CommodityType); - // ITapTrade::TapAPIOrderInfo::CommodityNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "CommodityNo", CommodityNo); - // ITapTrade::TapAPIOrderInfo::ContractNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "ContractNo", ContractNo); - // ITapTrade::TapAPIOrderInfo::StrikePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "StrikePrice", StrikePrice); - // ITapTrade::TapAPIOrderInfo::CallOrPutFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "CallOrPutFlag", CallOrPutFlag); - // ITapTrade::TapAPIOrderInfo::ContractNo2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "ContractNo2", ContractNo2); - // ITapTrade::TapAPIOrderInfo::StrikePrice2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "StrikePrice2", StrikePrice2); - // ITapTrade::TapAPIOrderInfo::CallOrPutFlag2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "CallOrPutFlag2", CallOrPutFlag2); - // ITapTrade::TapAPIOrderInfo::OrderType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "OrderType", OrderType); - // ITapTrade::TapAPIOrderInfo::OrderSource - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "OrderSource", OrderSource); - // ITapTrade::TapAPIOrderInfo::TimeInForce - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "TimeInForce", TimeInForce); - // ITapTrade::TapAPIOrderInfo::ExpireTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "ExpireTime", ExpireTime); - // ITapTrade::TapAPIOrderInfo::IsRiskOrder - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "IsRiskOrder", IsRiskOrder); - // ITapTrade::TapAPIOrderInfo::OrderSide - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "OrderSide", OrderSide); - // ITapTrade::TapAPIOrderInfo::PositionEffect - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "PositionEffect", PositionEffect); - // ITapTrade::TapAPIOrderInfo::PositionEffect2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "PositionEffect2", PositionEffect2); - // ITapTrade::TapAPIOrderInfo::InquiryNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "InquiryNo", InquiryNo); - // ITapTrade::TapAPIOrderInfo::HedgeFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "HedgeFlag", HedgeFlag); - // ITapTrade::TapAPIOrderInfo::OrderPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "OrderPrice", OrderPrice); - // ITapTrade::TapAPIOrderInfo::OrderPrice2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "OrderPrice2", OrderPrice2); - // ITapTrade::TapAPIOrderInfo::StopPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "StopPrice", StopPrice); - // ITapTrade::TapAPIOrderInfo::OrderQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "OrderQty", OrderQty); - // ITapTrade::TapAPIOrderInfo::OrderMinQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "OrderMinQty", OrderMinQty); - // ITapTrade::TapAPIOrderInfo::RefInt - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "RefInt", RefInt); - // ITapTrade::TapAPIOrderInfo::RefDouble - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "RefDouble", RefDouble); - // ITapTrade::TapAPIOrderInfo::RefString - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "RefString", RefString); - // ITapTrade::TapAPIOrderInfo::MinClipSize - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "MinClipSize", MinClipSize); - // ITapTrade::TapAPIOrderInfo::MaxClipSize - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "MaxClipSize", MaxClipSize); - // ITapTrade::TapAPIOrderInfo::LicenseNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "LicenseNo", LicenseNo); - // ITapTrade::TapAPIOrderInfo::ServerFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "ServerFlag", ServerFlag); - // ITapTrade::TapAPIOrderInfo::OrderNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "OrderNo", OrderNo); - // ITapTrade::TapAPIOrderInfo::ClientOrderNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "ClientOrderNo", ClientOrderNo); - // ITapTrade::TapAPIOrderInfo::ClientID - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "ClientID", ClientID); - // ITapTrade::TapAPIOrderInfo::TacticsType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "TacticsType", TacticsType); - // ITapTrade::TapAPIOrderInfo::TriggerCondition - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "TriggerCondition", TriggerCondition); - // ITapTrade::TapAPIOrderInfo::TriggerPriceType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "TriggerPriceType", TriggerPriceType); - // ITapTrade::TapAPIOrderInfo::AddOneIsValid - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "AddOneIsValid", AddOneIsValid); - // ITapTrade::TapAPIOrderInfo::ClientLocalIP - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "ClientLocalIP", ClientLocalIP); - // ITapTrade::TapAPIOrderInfo::ClientMac - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "ClientMac", ClientMac); - // ITapTrade::TapAPIOrderInfo::ClientIP - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "ClientIP", ClientIP); - // ITapTrade::TapAPIOrderInfo::OrderStreamID - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "OrderStreamID", OrderStreamID); - // ITapTrade::TapAPIOrderInfo::UpperNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "UpperNo", UpperNo); - // ITapTrade::TapAPIOrderInfo::UpperChannelNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "UpperChannelNo", UpperChannelNo); - // ITapTrade::TapAPIOrderInfo::OrderLocalNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "OrderLocalNo", OrderLocalNo); - // ITapTrade::TapAPIOrderInfo::UpperStreamID - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "UpperStreamID", UpperStreamID); - // ITapTrade::TapAPIOrderInfo::OrderSystemNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "OrderSystemNo", OrderSystemNo); - // ITapTrade::TapAPIOrderInfo::OrderExchangeSystemNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "OrderExchangeSystemNo", OrderExchangeSystemNo); - // ITapTrade::TapAPIOrderInfo::OrderParentSystemNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "OrderParentSystemNo", OrderParentSystemNo); - // ITapTrade::TapAPIOrderInfo::OrderInsertUserNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "OrderInsertUserNo", OrderInsertUserNo); - // ITapTrade::TapAPIOrderInfo::OrderInsertTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "OrderInsertTime", OrderInsertTime); - // ITapTrade::TapAPIOrderInfo::OrderCommandUserNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "OrderCommandUserNo", OrderCommandUserNo); - // ITapTrade::TapAPIOrderInfo::OrderUpdateUserNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "OrderUpdateUserNo", OrderUpdateUserNo); - // ITapTrade::TapAPIOrderInfo::OrderUpdateTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "OrderUpdateTime", OrderUpdateTime); - // ITapTrade::TapAPIOrderInfo::OrderState - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "OrderState", OrderState); - // ITapTrade::TapAPIOrderInfo::OrderMatchPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "OrderMatchPrice", OrderMatchPrice); - // ITapTrade::TapAPIOrderInfo::OrderMatchPrice2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "OrderMatchPrice2", OrderMatchPrice2); - // ITapTrade::TapAPIOrderInfo::OrderMatchQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "OrderMatchQty", OrderMatchQty); - // ITapTrade::TapAPIOrderInfo::OrderMatchQty2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "OrderMatchQty2", OrderMatchQty2); - // ITapTrade::TapAPIOrderInfo::ErrorCode - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "ErrorCode", ErrorCode); - // ITapTrade::TapAPIOrderInfo::ErrorText - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "ErrorText", ErrorText); - // ITapTrade::TapAPIOrderInfo::IsBackInput - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "IsBackInput", IsBackInput); - // ITapTrade::TapAPIOrderInfo::IsDeleted - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "IsDeleted", IsDeleted); - // ITapTrade::TapAPIOrderInfo::IsAddOne - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfo, "IsAddOne", IsAddOne); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIOrderInfo, c); - module_vntap::objects.emplace("ITapTrade::TapAPIOrderInfo", c); -} -void generate_class_ITapTrade_TapAPIOrderInfoNotice(pybind11::object & parent) -{ - // ITapTrade::TapAPIOrderInfoNotice - pybind11::class_ c(parent, "TapAPIOrderInfoNotice"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIOrderInfoNotice::SessionID - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfoNotice, "SessionID", SessionID); - // ITapTrade::TapAPIOrderInfoNotice::ErrorCode - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfoNotice, "ErrorCode", ErrorCode); - // ITapTrade::TapAPIOrderInfoNotice::OrderInfo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderInfoNotice, "OrderInfo", OrderInfo); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIOrderInfoNotice, c); - module_vntap::objects.emplace("ITapTrade::TapAPIOrderInfoNotice", c); -} -void generate_class_ITapTrade_TapAPIOrderActionRsp(pybind11::object & parent) -{ - // ITapTrade::TapAPIOrderActionRsp - pybind11::class_ c(parent, "TapAPIOrderActionRsp"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIOrderActionRsp::ActionType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderActionRsp, "ActionType", ActionType); - // ITapTrade::TapAPIOrderActionRsp::OrderInfo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderActionRsp, "OrderInfo", OrderInfo); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIOrderActionRsp, c); - module_vntap::objects.emplace("ITapTrade::TapAPIOrderActionRsp", c); -} -void generate_class_ITapTrade_TapAPIAmendOrder(pybind11::object & parent) -{ - // ITapTrade::TapAPIAmendOrder - pybind11::class_ c(parent, "TapAPIAmendOrder"); - if constexpr (std::is_constructible_v< - ITapTrade::TapAPIAmendOrder - >) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIAmendOrder::ReqData - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAmendOrder, "ReqData", ReqData); - // ITapTrade::TapAPIAmendOrder::ServerFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAmendOrder, "ServerFlag", ServerFlag); - // ITapTrade::TapAPIAmendOrder::OrderNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAmendOrder, "OrderNo", OrderNo); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIAmendOrder, c); - module_vntap::objects.emplace("ITapTrade::TapAPIAmendOrder", c); -} -void generate_class_ITapTrade_TapAPIOrderCancelReq(pybind11::object & parent) -{ - // ITapTrade::TapAPIOrderCancelReq - pybind11::class_ c(parent, "TapAPIOrderCancelReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIOrderCancelReq::RefInt - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderCancelReq, "RefInt", RefInt); - // ITapTrade::TapAPIOrderCancelReq::RefDouble - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderCancelReq, "RefDouble", RefDouble); - // ITapTrade::TapAPIOrderCancelReq::RefString - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderCancelReq, "RefString", RefString); - // ITapTrade::TapAPIOrderCancelReq::ServerFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderCancelReq, "ServerFlag", ServerFlag); - // ITapTrade::TapAPIOrderCancelReq::OrderNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderCancelReq, "OrderNo", OrderNo); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIOrderCancelReq, c); - module_vntap::objects.emplace("ITapTrade::TapAPIOrderCancelReq", c); -} diff --git a/vnpy/api/tap/vntap/generated_files/generated_functions_1.cpp b/vnpy/api/tap/vntap/generated_files/generated_functions_1.cpp deleted file mode 100644 index 9a3868ca04..0000000000 --- a/vnpy/api/tap/vntap/generated_files/generated_functions_1.cpp +++ /dev/null @@ -1,481 +0,0 @@ -#include "config.h" - -#include -#include -#include -#include -#include -#include - -#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_ITapTrade_TapAPIOrderQryReq(pybind11::object & parent) -{ - // ITapTrade::TapAPIOrderQryReq - pybind11::class_ c(parent, "TapAPIOrderQryReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIOrderQryReq::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderQryReq, "AccountNo", AccountNo); - // ITapTrade::TapAPIOrderQryReq::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderQryReq, "ExchangeNo", ExchangeNo); - // ITapTrade::TapAPIOrderQryReq::CommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderQryReq, "CommodityType", CommodityType); - // ITapTrade::TapAPIOrderQryReq::CommodityNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderQryReq, "CommodityNo", CommodityNo); - // ITapTrade::TapAPIOrderQryReq::OrderType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderQryReq, "OrderType", OrderType); - // ITapTrade::TapAPIOrderQryReq::OrderSource - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderQryReq, "OrderSource", OrderSource); - // ITapTrade::TapAPIOrderQryReq::TimeInForce - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderQryReq, "TimeInForce", TimeInForce); - // ITapTrade::TapAPIOrderQryReq::ExpireTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderQryReq, "ExpireTime", ExpireTime); - // ITapTrade::TapAPIOrderQryReq::IsRiskOrder - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderQryReq, "IsRiskOrder", IsRiskOrder); - // ITapTrade::TapAPIOrderQryReq::ServerFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderQryReq, "ServerFlag", ServerFlag); - // ITapTrade::TapAPIOrderQryReq::OrderNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderQryReq, "OrderNo", OrderNo); - // ITapTrade::TapAPIOrderQryReq::IsBackInput - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderQryReq, "IsBackInput", IsBackInput); - // ITapTrade::TapAPIOrderQryReq::IsDeleted - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderQryReq, "IsDeleted", IsDeleted); - // ITapTrade::TapAPIOrderQryReq::IsAddOne - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderQryReq, "IsAddOne", IsAddOne); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIOrderQryReq, c); - module_vntap::objects.emplace("ITapTrade::TapAPIOrderQryReq", c); -} -void generate_class_ITapTrade_TapAPIOrderProcessQryReq(pybind11::object & parent) -{ - // ITapTrade::TapAPIOrderProcessQryReq - pybind11::class_ c(parent, "TapAPIOrderProcessQryReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIOrderProcessQryReq::ServerFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderProcessQryReq, "ServerFlag", ServerFlag); - // ITapTrade::TapAPIOrderProcessQryReq::OrderNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderProcessQryReq, "OrderNo", OrderNo); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIOrderProcessQryReq, c); - module_vntap::objects.emplace("ITapTrade::TapAPIOrderProcessQryReq", c); -} -void generate_class_ITapTrade_TapAPIFillQryReq(pybind11::object & parent) -{ - // ITapTrade::TapAPIFillQryReq - pybind11::class_ c(parent, "TapAPIFillQryReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIFillQryReq::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillQryReq, "AccountNo", AccountNo); - // ITapTrade::TapAPIFillQryReq::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillQryReq, "ExchangeNo", ExchangeNo); - // ITapTrade::TapAPIFillQryReq::CommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillQryReq, "CommodityType", CommodityType); - // ITapTrade::TapAPIFillQryReq::CommodityNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillQryReq, "CommodityNo", CommodityNo); - // ITapTrade::TapAPIFillQryReq::ContractNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillQryReq, "ContractNo", ContractNo); - // ITapTrade::TapAPIFillQryReq::StrikePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillQryReq, "StrikePrice", StrikePrice); - // ITapTrade::TapAPIFillQryReq::CallOrPutFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillQryReq, "CallOrPutFlag", CallOrPutFlag); - // ITapTrade::TapAPIFillQryReq::MatchSource - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillQryReq, "MatchSource", MatchSource); - // ITapTrade::TapAPIFillQryReq::MatchSide - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillQryReq, "MatchSide", MatchSide); - // ITapTrade::TapAPIFillQryReq::PositionEffect - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillQryReq, "PositionEffect", PositionEffect); - // ITapTrade::TapAPIFillQryReq::ServerFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillQryReq, "ServerFlag", ServerFlag); - // ITapTrade::TapAPIFillQryReq::OrderNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillQryReq, "OrderNo", OrderNo); - // ITapTrade::TapAPIFillQryReq::UpperNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillQryReq, "UpperNo", UpperNo); - // ITapTrade::TapAPIFillQryReq::IsDeleted - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillQryReq, "IsDeleted", IsDeleted); - // ITapTrade::TapAPIFillQryReq::IsAddOne - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillQryReq, "IsAddOne", IsAddOne); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIFillQryReq, c); - module_vntap::objects.emplace("ITapTrade::TapAPIFillQryReq", c); -} -void generate_class_ITapTrade_TapAPIFillInfo(pybind11::object & parent) -{ - // ITapTrade::TapAPIFillInfo - pybind11::class_ c(parent, "TapAPIFillInfo"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIFillInfo::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "AccountNo", AccountNo); - // ITapTrade::TapAPIFillInfo::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "ExchangeNo", ExchangeNo); - // ITapTrade::TapAPIFillInfo::CommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "CommodityType", CommodityType); - // ITapTrade::TapAPIFillInfo::CommodityNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "CommodityNo", CommodityNo); - // ITapTrade::TapAPIFillInfo::ContractNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "ContractNo", ContractNo); - // ITapTrade::TapAPIFillInfo::StrikePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "StrikePrice", StrikePrice); - // ITapTrade::TapAPIFillInfo::CallOrPutFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "CallOrPutFlag", CallOrPutFlag); - // ITapTrade::TapAPIFillInfo::MatchSource - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "MatchSource", MatchSource); - // ITapTrade::TapAPIFillInfo::MatchSide - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "MatchSide", MatchSide); - // ITapTrade::TapAPIFillInfo::PositionEffect - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "PositionEffect", PositionEffect); - // ITapTrade::TapAPIFillInfo::ServerFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "ServerFlag", ServerFlag); - // ITapTrade::TapAPIFillInfo::OrderNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "OrderNo", OrderNo); - // ITapTrade::TapAPIFillInfo::OrderSystemNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "OrderSystemNo", OrderSystemNo); - // ITapTrade::TapAPIFillInfo::MatchNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "MatchNo", MatchNo); - // ITapTrade::TapAPIFillInfo::UpperMatchNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "UpperMatchNo", UpperMatchNo); - // ITapTrade::TapAPIFillInfo::ExchangeMatchNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "ExchangeMatchNo", ExchangeMatchNo); - // ITapTrade::TapAPIFillInfo::MatchDateTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "MatchDateTime", MatchDateTime); - // ITapTrade::TapAPIFillInfo::UpperMatchDateTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "UpperMatchDateTime", UpperMatchDateTime); - // ITapTrade::TapAPIFillInfo::UpperNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "UpperNo", UpperNo); - // ITapTrade::TapAPIFillInfo::MatchPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "MatchPrice", MatchPrice); - // ITapTrade::TapAPIFillInfo::MatchQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "MatchQty", MatchQty); - // ITapTrade::TapAPIFillInfo::IsDeleted - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "IsDeleted", IsDeleted); - // ITapTrade::TapAPIFillInfo::IsAddOne - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "IsAddOne", IsAddOne); - // ITapTrade::TapAPIFillInfo::FeeCurrencyGroup - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "FeeCurrencyGroup", FeeCurrencyGroup); - // ITapTrade::TapAPIFillInfo::FeeCurrency - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "FeeCurrency", FeeCurrency); - // ITapTrade::TapAPIFillInfo::FeeValue - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "FeeValue", FeeValue); - // ITapTrade::TapAPIFillInfo::IsManualFee - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "IsManualFee", IsManualFee); - // ITapTrade::TapAPIFillInfo::ClosePrositionPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillInfo, "ClosePrositionPrice", ClosePrositionPrice); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIFillInfo, c); - module_vntap::objects.emplace("ITapTrade::TapAPIFillInfo", c); -} -void generate_class_ITapTrade_TapAPICloseQryReq(pybind11::object & parent) -{ - // ITapTrade::TapAPICloseQryReq - pybind11::class_ c(parent, "TapAPICloseQryReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPICloseQryReq::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICloseQryReq, "AccountNo", AccountNo); - // ITapTrade::TapAPICloseQryReq::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICloseQryReq, "ExchangeNo", ExchangeNo); - // ITapTrade::TapAPICloseQryReq::CommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICloseQryReq, "CommodityType", CommodityType); - // ITapTrade::TapAPICloseQryReq::CommodityNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICloseQryReq, "CommodityNo", CommodityNo); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPICloseQryReq, c); - module_vntap::objects.emplace("ITapTrade::TapAPICloseQryReq", c); -} -void generate_class_ITapTrade_TapAPICloseInfo(pybind11::object & parent) -{ - // ITapTrade::TapAPICloseInfo - pybind11::class_ c(parent, "TapAPICloseInfo"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPICloseInfo::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICloseInfo, "AccountNo", AccountNo); - // ITapTrade::TapAPICloseInfo::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICloseInfo, "ExchangeNo", ExchangeNo); - // ITapTrade::TapAPICloseInfo::CommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICloseInfo, "CommodityType", CommodityType); - // ITapTrade::TapAPICloseInfo::CommodityNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICloseInfo, "CommodityNo", CommodityNo); - // ITapTrade::TapAPICloseInfo::ContractNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICloseInfo, "ContractNo", ContractNo); - // ITapTrade::TapAPICloseInfo::StrikePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICloseInfo, "StrikePrice", StrikePrice); - // ITapTrade::TapAPICloseInfo::CallOrPutFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICloseInfo, "CallOrPutFlag", CallOrPutFlag); - // ITapTrade::TapAPICloseInfo::CloseSide - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICloseInfo, "CloseSide", CloseSide); - // ITapTrade::TapAPICloseInfo::CloseQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICloseInfo, "CloseQty", CloseQty); - // ITapTrade::TapAPICloseInfo::OpenPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICloseInfo, "OpenPrice", OpenPrice); - // ITapTrade::TapAPICloseInfo::ClosePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICloseInfo, "ClosePrice", ClosePrice); - // ITapTrade::TapAPICloseInfo::OpenMatchNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICloseInfo, "OpenMatchNo", OpenMatchNo); - // ITapTrade::TapAPICloseInfo::OpenMatchDateTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICloseInfo, "OpenMatchDateTime", OpenMatchDateTime); - // ITapTrade::TapAPICloseInfo::CloseMatchNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICloseInfo, "CloseMatchNo", CloseMatchNo); - // ITapTrade::TapAPICloseInfo::CloseMatchDateTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICloseInfo, "CloseMatchDateTime", CloseMatchDateTime); - // ITapTrade::TapAPICloseInfo::CloseStreamId - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICloseInfo, "CloseStreamId", CloseStreamId); - // ITapTrade::TapAPICloseInfo::CommodityCurrencyGroup - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICloseInfo, "CommodityCurrencyGroup", CommodityCurrencyGroup); - // ITapTrade::TapAPICloseInfo::CommodityCurrency - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICloseInfo, "CommodityCurrency", CommodityCurrency); - // ITapTrade::TapAPICloseInfo::CloseProfit - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICloseInfo, "CloseProfit", CloseProfit); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPICloseInfo, c); - module_vntap::objects.emplace("ITapTrade::TapAPICloseInfo", c); -} -void generate_class_ITapTrade_TapAPIPositionQryReq(pybind11::object & parent) -{ - // ITapTrade::TapAPIPositionQryReq - pybind11::class_ c(parent, "TapAPIPositionQryReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIPositionQryReq::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionQryReq, "AccountNo", AccountNo); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIPositionQryReq, c); - module_vntap::objects.emplace("ITapTrade::TapAPIPositionQryReq", c); -} -void generate_class_ITapTrade_TapAPIPositionInfo(pybind11::object & parent) -{ - // ITapTrade::TapAPIPositionInfo - pybind11::class_ c(parent, "TapAPIPositionInfo"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIPositionInfo::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "AccountNo", AccountNo); - // ITapTrade::TapAPIPositionInfo::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "ExchangeNo", ExchangeNo); - // ITapTrade::TapAPIPositionInfo::CommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "CommodityType", CommodityType); - // ITapTrade::TapAPIPositionInfo::CommodityNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "CommodityNo", CommodityNo); - // ITapTrade::TapAPIPositionInfo::ContractNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "ContractNo", ContractNo); - // ITapTrade::TapAPIPositionInfo::StrikePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "StrikePrice", StrikePrice); - // ITapTrade::TapAPIPositionInfo::CallOrPutFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "CallOrPutFlag", CallOrPutFlag); - // ITapTrade::TapAPIPositionInfo::MatchSide - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "MatchSide", MatchSide); - // ITapTrade::TapAPIPositionInfo::HedgeFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "HedgeFlag", HedgeFlag); - // ITapTrade::TapAPIPositionInfo::PositionNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "PositionNo", PositionNo); - // ITapTrade::TapAPIPositionInfo::ServerFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "ServerFlag", ServerFlag); - // ITapTrade::TapAPIPositionInfo::OrderNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "OrderNo", OrderNo); - // ITapTrade::TapAPIPositionInfo::MatchNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "MatchNo", MatchNo); - // ITapTrade::TapAPIPositionInfo::UpperNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "UpperNo", UpperNo); - // ITapTrade::TapAPIPositionInfo::PositionPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "PositionPrice", PositionPrice); - // ITapTrade::TapAPIPositionInfo::PositionQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "PositionQty", PositionQty); - // ITapTrade::TapAPIPositionInfo::PositionStreamId - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "PositionStreamId", PositionStreamId); - // ITapTrade::TapAPIPositionInfo::CommodityCurrencyGroup - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "CommodityCurrencyGroup", CommodityCurrencyGroup); - // ITapTrade::TapAPIPositionInfo::CommodityCurrency - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "CommodityCurrency", CommodityCurrency); - // ITapTrade::TapAPIPositionInfo::CalculatePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "CalculatePrice", CalculatePrice); - // ITapTrade::TapAPIPositionInfo::AccountInitialMargin - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "AccountInitialMargin", AccountInitialMargin); - // ITapTrade::TapAPIPositionInfo::AccountMaintenanceMargin - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "AccountMaintenanceMargin", AccountMaintenanceMargin); - // ITapTrade::TapAPIPositionInfo::UpperInitialMargin - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "UpperInitialMargin", UpperInitialMargin); - // ITapTrade::TapAPIPositionInfo::UpperMaintenanceMargin - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "UpperMaintenanceMargin", UpperMaintenanceMargin); - // ITapTrade::TapAPIPositionInfo::PositionProfit - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "PositionProfit", PositionProfit); - // ITapTrade::TapAPIPositionInfo::LMEPositionProfit - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "LMEPositionProfit", LMEPositionProfit); - // ITapTrade::TapAPIPositionInfo::OptionMarketValue - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "OptionMarketValue", OptionMarketValue); - // ITapTrade::TapAPIPositionInfo::IsHistory - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionInfo, "IsHistory", IsHistory); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIPositionInfo, c); - module_vntap::objects.emplace("ITapTrade::TapAPIPositionInfo", c); -} -void generate_class_ITapTrade_TapAPIPositionProfit(pybind11::object & parent) -{ - // ITapTrade::TapAPIPositionProfit - pybind11::class_ c(parent, "TapAPIPositionProfit"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIPositionProfit::PositionNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionProfit, "PositionNo", PositionNo); - // ITapTrade::TapAPIPositionProfit::PositionStreamId - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionProfit, "PositionStreamId", PositionStreamId); - // ITapTrade::TapAPIPositionProfit::PositionProfit - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionProfit, "PositionProfit", PositionProfit); - // ITapTrade::TapAPIPositionProfit::LMEPositionProfit - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionProfit, "LMEPositionProfit", LMEPositionProfit); - // ITapTrade::TapAPIPositionProfit::OptionMarketValue - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionProfit, "OptionMarketValue", OptionMarketValue); - // ITapTrade::TapAPIPositionProfit::CalculatePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionProfit, "CalculatePrice", CalculatePrice); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIPositionProfit, c); - module_vntap::objects.emplace("ITapTrade::TapAPIPositionProfit", c); -} -void generate_class_ITapTrade_TapAPIPositionProfitNotice(pybind11::object & parent) -{ - // ITapTrade::TapAPIPositionProfitNotice - pybind11::class_ c(parent, "TapAPIPositionProfitNotice"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIPositionProfitNotice::IsLast - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionProfitNotice, "IsLast", IsLast); - // ITapTrade::TapAPIPositionProfitNotice::Data - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionProfitNotice, "Data", Data); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIPositionProfitNotice, c); - module_vntap::objects.emplace("ITapTrade::TapAPIPositionProfitNotice", c); -} -void generate_class_ITapTrade_TapAPIPositionSummary(pybind11::object & parent) -{ - // ITapTrade::TapAPIPositionSummary - pybind11::class_ c(parent, "TapAPIPositionSummary"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIPositionSummary::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionSummary, "AccountNo", AccountNo); - // ITapTrade::TapAPIPositionSummary::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionSummary, "ExchangeNo", ExchangeNo); - // ITapTrade::TapAPIPositionSummary::CommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionSummary, "CommodityType", CommodityType); - // ITapTrade::TapAPIPositionSummary::CommodityNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionSummary, "CommodityNo", CommodityNo); - // ITapTrade::TapAPIPositionSummary::ContractNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionSummary, "ContractNo", ContractNo); - // ITapTrade::TapAPIPositionSummary::StrikePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionSummary, "StrikePrice", StrikePrice); - // ITapTrade::TapAPIPositionSummary::CallOrPutFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionSummary, "CallOrPutFlag", CallOrPutFlag); - // ITapTrade::TapAPIPositionSummary::MatchSide - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionSummary, "MatchSide", MatchSide); - // ITapTrade::TapAPIPositionSummary::PositionPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionSummary, "PositionPrice", PositionPrice); - // ITapTrade::TapAPIPositionSummary::PositionQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionSummary, "PositionQty", PositionQty); - // ITapTrade::TapAPIPositionSummary::HisPositionQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIPositionSummary, "HisPositionQty", HisPositionQty); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIPositionSummary, c); - module_vntap::objects.emplace("ITapTrade::TapAPIPositionSummary", c); -} -void generate_class_ITapTrade_TapAPIFundReq(pybind11::object & parent) -{ - // ITapTrade::TapAPIFundReq - pybind11::class_ c(parent, "TapAPIFundReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIFundReq::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundReq, "AccountNo", AccountNo); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIFundReq, c); - module_vntap::objects.emplace("ITapTrade::TapAPIFundReq", c); -} -void generate_class_ITapTrade_TapAPIFundData(pybind11::object & parent) -{ - // ITapTrade::TapAPIFundData - pybind11::class_ c(parent, "TapAPIFundData"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIFundData::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "AccountNo", AccountNo); - // ITapTrade::TapAPIFundData::CurrencyGroupNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "CurrencyGroupNo", CurrencyGroupNo); - // ITapTrade::TapAPIFundData::CurrencyNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "CurrencyNo", CurrencyNo); - // ITapTrade::TapAPIFundData::TradeRate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "TradeRate", TradeRate); - // ITapTrade::TapAPIFundData::FutureAlg - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "FutureAlg", FutureAlg); - // ITapTrade::TapAPIFundData::OptionAlg - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "OptionAlg", OptionAlg); - // ITapTrade::TapAPIFundData::PreBalance - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "PreBalance", PreBalance); - // ITapTrade::TapAPIFundData::PreUnExpProfit - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "PreUnExpProfit", PreUnExpProfit); - // ITapTrade::TapAPIFundData::PreLMEPositionProfit - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "PreLMEPositionProfit", PreLMEPositionProfit); - // ITapTrade::TapAPIFundData::PreEquity - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "PreEquity", PreEquity); - // ITapTrade::TapAPIFundData::PreAvailable1 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "PreAvailable1", PreAvailable1); - // ITapTrade::TapAPIFundData::PreMarketEquity - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "PreMarketEquity", PreMarketEquity); - // ITapTrade::TapAPIFundData::CashInValue - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "CashInValue", CashInValue); - // ITapTrade::TapAPIFundData::CashOutValue - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "CashOutValue", CashOutValue); - // ITapTrade::TapAPIFundData::CashAdjustValue - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "CashAdjustValue", CashAdjustValue); - // ITapTrade::TapAPIFundData::CashPledged - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "CashPledged", CashPledged); - // ITapTrade::TapAPIFundData::FrozenFee - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "FrozenFee", FrozenFee); - // ITapTrade::TapAPIFundData::FrozenDeposit - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "FrozenDeposit", FrozenDeposit); - // ITapTrade::TapAPIFundData::AccountFee - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "AccountFee", AccountFee); - // ITapTrade::TapAPIFundData::SwapInValue - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "SwapInValue", SwapInValue); - // ITapTrade::TapAPIFundData::SwapOutValue - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "SwapOutValue", SwapOutValue); - // ITapTrade::TapAPIFundData::PremiumIncome - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "PremiumIncome", PremiumIncome); - // ITapTrade::TapAPIFundData::PremiumPay - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "PremiumPay", PremiumPay); - // ITapTrade::TapAPIFundData::CloseProfit - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "CloseProfit", CloseProfit); - // ITapTrade::TapAPIFundData::FrozenFund - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "FrozenFund", FrozenFund); - // ITapTrade::TapAPIFundData::UnExpProfit - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "UnExpProfit", UnExpProfit); - // ITapTrade::TapAPIFundData::ExpProfit - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "ExpProfit", ExpProfit); - // ITapTrade::TapAPIFundData::PositionProfit - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "PositionProfit", PositionProfit); - // ITapTrade::TapAPIFundData::LmePositionProfit - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "LmePositionProfit", LmePositionProfit); - // ITapTrade::TapAPIFundData::OptionMarketValue - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "OptionMarketValue", OptionMarketValue); - // ITapTrade::TapAPIFundData::AccountIntialMargin - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "AccountIntialMargin", AccountIntialMargin); - // ITapTrade::TapAPIFundData::AccountMaintenanceMargin - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "AccountMaintenanceMargin", AccountMaintenanceMargin); - // ITapTrade::TapAPIFundData::UpperInitalMargin - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "UpperInitalMargin", UpperInitalMargin); - // ITapTrade::TapAPIFundData::UpperMaintenanceMargin - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "UpperMaintenanceMargin", UpperMaintenanceMargin); - // ITapTrade::TapAPIFundData::Discount - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "Discount", Discount); - // ITapTrade::TapAPIFundData::Balance - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "Balance", Balance); - // ITapTrade::TapAPIFundData::Equity - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "Equity", Equity); - // ITapTrade::TapAPIFundData::Available - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "Available", Available); - // ITapTrade::TapAPIFundData::CanDraw - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "CanDraw", CanDraw); - // ITapTrade::TapAPIFundData::MarketEquity - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "MarketEquity", MarketEquity); - // ITapTrade::TapAPIFundData::AuthMoney - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFundData, "AuthMoney", AuthMoney); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIFundData, c); - module_vntap::objects.emplace("ITapTrade::TapAPIFundData", c); -} diff --git a/vnpy/api/tap/vntap/generated_files/generated_functions_10.cpp b/vnpy/api/tap/vntap/generated_files/generated_functions_10.cpp deleted file mode 100644 index add83ccf20..0000000000 --- a/vnpy/api/tap/vntap/generated_files/generated_functions_10.cpp +++ /dev/null @@ -1,500 +0,0 @@ -#include "config.h" - -#include -#include -#include -#include -#include -#include - -#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_vntap_variables(pybind11::module & parent) -{ - // APIYNFLAG_YES - parent.attr("APIYNFLAG_YES") = APIYNFLAG_YES; - // APIYNFLAG_NO - parent.attr("APIYNFLAG_NO") = APIYNFLAG_NO; - // APILOGLEVEL_NONE - parent.attr("APILOGLEVEL_NONE") = APILOGLEVEL_NONE; - // APILOGLEVEL_ERROR - parent.attr("APILOGLEVEL_ERROR") = APILOGLEVEL_ERROR; - // APILOGLEVEL_WARNING - parent.attr("APILOGLEVEL_WARNING") = APILOGLEVEL_WARNING; - // APILOGLEVEL_DEBUG - parent.attr("APILOGLEVEL_DEBUG") = APILOGLEVEL_DEBUG; - // TAPI_COMMODITY_TYPE_NONE - parent.attr("TAPI_COMMODITY_TYPE_NONE") = TAPI_COMMODITY_TYPE_NONE; - // TAPI_COMMODITY_TYPE_SPOT - parent.attr("TAPI_COMMODITY_TYPE_SPOT") = TAPI_COMMODITY_TYPE_SPOT; - // TAPI_COMMODITY_TYPE_FUTURES - parent.attr("TAPI_COMMODITY_TYPE_FUTURES") = TAPI_COMMODITY_TYPE_FUTURES; - // TAPI_COMMODITY_TYPE_OPTION - parent.attr("TAPI_COMMODITY_TYPE_OPTION") = TAPI_COMMODITY_TYPE_OPTION; - // TAPI_COMMODITY_TYPE_SPREAD_MONTH - parent.attr("TAPI_COMMODITY_TYPE_SPREAD_MONTH") = TAPI_COMMODITY_TYPE_SPREAD_MONTH; - // TAPI_COMMODITY_TYPE_SPREAD_COMMODITY - parent.attr("TAPI_COMMODITY_TYPE_SPREAD_COMMODITY") = TAPI_COMMODITY_TYPE_SPREAD_COMMODITY; - // TAPI_COMMODITY_TYPE_BUL - parent.attr("TAPI_COMMODITY_TYPE_BUL") = TAPI_COMMODITY_TYPE_BUL; - // TAPI_COMMODITY_TYPE_BER - parent.attr("TAPI_COMMODITY_TYPE_BER") = TAPI_COMMODITY_TYPE_BER; - // TAPI_COMMODITY_TYPE_STD - parent.attr("TAPI_COMMODITY_TYPE_STD") = TAPI_COMMODITY_TYPE_STD; - // TAPI_COMMODITY_TYPE_STG - parent.attr("TAPI_COMMODITY_TYPE_STG") = TAPI_COMMODITY_TYPE_STG; - // TAPI_COMMODITY_TYPE_PRT - parent.attr("TAPI_COMMODITY_TYPE_PRT") = TAPI_COMMODITY_TYPE_PRT; - // TAPI_COMMODITY_TYPE_BLT - parent.attr("TAPI_COMMODITY_TYPE_BLT") = TAPI_COMMODITY_TYPE_BLT; - // TAPI_COMMODITY_TYPE_BRT - parent.attr("TAPI_COMMODITY_TYPE_BRT") = TAPI_COMMODITY_TYPE_BRT; - // TAPI_COMMODITY_TYPE_DIRECTFOREX - parent.attr("TAPI_COMMODITY_TYPE_DIRECTFOREX") = TAPI_COMMODITY_TYPE_DIRECTFOREX; - // TAPI_COMMODITY_TYPE_INDIRECTFOREX - parent.attr("TAPI_COMMODITY_TYPE_INDIRECTFOREX") = TAPI_COMMODITY_TYPE_INDIRECTFOREX; - // TAPI_COMMODITY_TYPE_CROSSFOREX - parent.attr("TAPI_COMMODITY_TYPE_CROSSFOREX") = TAPI_COMMODITY_TYPE_CROSSFOREX; - // TAPI_COMMODITY_TYPE_INDEX - parent.attr("TAPI_COMMODITY_TYPE_INDEX") = TAPI_COMMODITY_TYPE_INDEX; - // TAPI_COMMODITY_TYPE_STOCK - parent.attr("TAPI_COMMODITY_TYPE_STOCK") = TAPI_COMMODITY_TYPE_STOCK; - // TAPI_COMMODITY_TYPE_SPOT_TRADINGDEFER - parent.attr("TAPI_COMMODITY_TYPE_SPOT_TRADINGDEFER") = TAPI_COMMODITY_TYPE_SPOT_TRADINGDEFER; - // TAPI_COMMODITY_TYPE_FUTURE_LOCK - parent.attr("TAPI_COMMODITY_TYPE_FUTURE_LOCK") = TAPI_COMMODITY_TYPE_FUTURE_LOCK; - // TAPI_COMMODITY_TYPE_EFP - parent.attr("TAPI_COMMODITY_TYPE_EFP") = TAPI_COMMODITY_TYPE_EFP; - // TAPI_CALLPUT_FLAG_CALL - parent.attr("TAPI_CALLPUT_FLAG_CALL") = TAPI_CALLPUT_FLAG_CALL; - // TAPI_CALLPUT_FLAG_PUT - parent.attr("TAPI_CALLPUT_FLAG_PUT") = TAPI_CALLPUT_FLAG_PUT; - // TAPI_CALLPUT_FLAG_NONE - parent.attr("TAPI_CALLPUT_FLAG_NONE") = TAPI_CALLPUT_FLAG_NONE; - // TAPIERROR_SUCCEED - parent.attr("TAPIERROR_SUCCEED") = TAPIERROR_SUCCEED; - // TAPIERROR_ConnectFail - parent.attr("TAPIERROR_ConnectFail") = TAPIERROR_ConnectFail; - // TAPIERROR_LinkAuthFail - parent.attr("TAPIERROR_LinkAuthFail") = TAPIERROR_LinkAuthFail; - // TAPIERROR_HostUnavailable - parent.attr("TAPIERROR_HostUnavailable") = TAPIERROR_HostUnavailable; - // TAPIERROR_SendDataError - parent.attr("TAPIERROR_SendDataError") = TAPIERROR_SendDataError; - // TAPIERROR_TestIDError - parent.attr("TAPIERROR_TestIDError") = TAPIERROR_TestIDError; - // TAPIERROR_NotReadyTestNetwork - parent.attr("TAPIERROR_NotReadyTestNetwork") = TAPIERROR_NotReadyTestNetwork; - // TAPIERROR_CurTestNotOver - parent.attr("TAPIERROR_CurTestNotOver") = TAPIERROR_CurTestNotOver; - // TAPIERROR_NOFrontAvailable - parent.attr("TAPIERROR_NOFrontAvailable") = TAPIERROR_NOFrontAvailable; - // TAPIERROR_DataPathAvaiable - parent.attr("TAPIERROR_DataPathAvaiable") = TAPIERROR_DataPathAvaiable; - // TAPIERROR_RepeatLogin - parent.attr("TAPIERROR_RepeatLogin") = TAPIERROR_RepeatLogin; - // TAPIERROR_InnerError - parent.attr("TAPIERROR_InnerError") = TAPIERROR_InnerError; - // TAPIERROR_LastReqNotFinish - parent.attr("TAPIERROR_LastReqNotFinish") = TAPIERROR_LastReqNotFinish; - // TAPIERROR_InputValueError - parent.attr("TAPIERROR_InputValueError") = TAPIERROR_InputValueError; - // TAPIERROR_AuthCode_Invalid - parent.attr("TAPIERROR_AuthCode_Invalid") = TAPIERROR_AuthCode_Invalid; - // TAPIERROR_AuthCode_Expired - parent.attr("TAPIERROR_AuthCode_Expired") = TAPIERROR_AuthCode_Expired; - // TAPIERROR_AuthCode_TypeNotMatch - parent.attr("TAPIERROR_AuthCode_TypeNotMatch") = TAPIERROR_AuthCode_TypeNotMatch; - // TAPIERROR_API_NotReady - parent.attr("TAPIERROR_API_NotReady") = TAPIERROR_API_NotReady; - // TAPIERROR_UDP_LISTEN_FAILED - parent.attr("TAPIERROR_UDP_LISTEN_FAILED") = TAPIERROR_UDP_LISTEN_FAILED; - // TAPIERROR_UDP_LISTENING - parent.attr("TAPIERROR_UDP_LISTENING") = TAPIERROR_UDP_LISTENING; - // TAPIERROR_NotImplemented - parent.attr("TAPIERROR_NotImplemented") = TAPIERROR_NotImplemented; - // TAPIERROR_CallOneTimeOnly - parent.attr("TAPIERROR_CallOneTimeOnly") = TAPIERROR_CallOneTimeOnly; - // TAPIERROR_Frequently - parent.attr("TAPIERROR_Frequently") = TAPIERROR_Frequently; - // TAPIERROR_INPUTERROR_NULL - parent.attr("TAPIERROR_INPUTERROR_NULL") = TAPIERROR_INPUTERROR_NULL; - // TAPIERROR_INPUTERROR_TAPIYNFLAG - parent.attr("TAPIERROR_INPUTERROR_TAPIYNFLAG") = TAPIERROR_INPUTERROR_TAPIYNFLAG; - // TAPIERROR_INPUTERROR_TAPILOGLEVEL - parent.attr("TAPIERROR_INPUTERROR_TAPILOGLEVEL") = TAPIERROR_INPUTERROR_TAPILOGLEVEL; - // TAPIERROR_INPUTERROR_TAPICommodityType - parent.attr("TAPIERROR_INPUTERROR_TAPICommodityType") = TAPIERROR_INPUTERROR_TAPICommodityType; - // TAPIERROR_INPUTERROR_TAPICallOrPutFlagType - parent.attr("TAPIERROR_INPUTERROR_TAPICallOrPutFlagType") = TAPIERROR_INPUTERROR_TAPICallOrPutFlagType; - // TAPIERROR_INPUTERROR_TAPIAccountType - parent.attr("TAPIERROR_INPUTERROR_TAPIAccountType") = TAPIERROR_INPUTERROR_TAPIAccountType; - // TAPIERROR_INPUTERROR_TAPIAccountState - parent.attr("TAPIERROR_INPUTERROR_TAPIAccountState") = TAPIERROR_INPUTERROR_TAPIAccountState; - // TAPIERROR_INPUTERROR_TAPIAccountFamilyType - parent.attr("TAPIERROR_INPUTERROR_TAPIAccountFamilyType") = TAPIERROR_INPUTERROR_TAPIAccountFamilyType; - // TAPIERROR_INPUTERROR_TAPIOrderTypeType - parent.attr("TAPIERROR_INPUTERROR_TAPIOrderTypeType") = TAPIERROR_INPUTERROR_TAPIOrderTypeType; - // TAPIERROR_INPUTERROR_TAPIOrderSourceType - parent.attr("TAPIERROR_INPUTERROR_TAPIOrderSourceType") = TAPIERROR_INPUTERROR_TAPIOrderSourceType; - // TAPIERROR_INPUTERROR_TAPITimeInForceType - parent.attr("TAPIERROR_INPUTERROR_TAPITimeInForceType") = TAPIERROR_INPUTERROR_TAPITimeInForceType; - // TAPIERROR_INPUTERROR_TAPISideType - parent.attr("TAPIERROR_INPUTERROR_TAPISideType") = TAPIERROR_INPUTERROR_TAPISideType; - // TAPIERROR_INPUTERROR_TAPIPositionEffectType - parent.attr("TAPIERROR_INPUTERROR_TAPIPositionEffectType") = TAPIERROR_INPUTERROR_TAPIPositionEffectType; - // TAPIERROR_INPUTERROR_TAPIHedgeFlagType - parent.attr("TAPIERROR_INPUTERROR_TAPIHedgeFlagType") = TAPIERROR_INPUTERROR_TAPIHedgeFlagType; - // TAPIERROR_INPUTERROR_TAPIOrderStateType - parent.attr("TAPIERROR_INPUTERROR_TAPIOrderStateType") = TAPIERROR_INPUTERROR_TAPIOrderStateType; - // TAPIERROR_INPUTERROR_TAPICalculateModeType - parent.attr("TAPIERROR_INPUTERROR_TAPICalculateModeType") = TAPIERROR_INPUTERROR_TAPICalculateModeType; - // TAPIERROR_INPUTERROR_TAPIMatchSourceType - parent.attr("TAPIERROR_INPUTERROR_TAPIMatchSourceType") = TAPIERROR_INPUTERROR_TAPIMatchSourceType; - // TAPIERROR_INPUTERROR_TAPIOpenCloseModeType - parent.attr("TAPIERROR_INPUTERROR_TAPIOpenCloseModeType") = TAPIERROR_INPUTERROR_TAPIOpenCloseModeType; - // TAPIERROR_INPUTERROR_TAPIFutureAlgType - parent.attr("TAPIERROR_INPUTERROR_TAPIFutureAlgType") = TAPIERROR_INPUTERROR_TAPIFutureAlgType; - // TAPIERROR_INPUTERROR_TAPIOptionAlgType - parent.attr("TAPIERROR_INPUTERROR_TAPIOptionAlgType") = TAPIERROR_INPUTERROR_TAPIOptionAlgType; - // TAPIERROR_INPUTERROR_TAPIBankAccountLWFlagType - parent.attr("TAPIERROR_INPUTERROR_TAPIBankAccountLWFlagType") = TAPIERROR_INPUTERROR_TAPIBankAccountLWFlagType; - // TAPIERROR_INPUTERROR_TAPIMarginCalculateModeType - parent.attr("TAPIERROR_INPUTERROR_TAPIMarginCalculateModeType") = TAPIERROR_INPUTERROR_TAPIMarginCalculateModeType; - // TAPIERROR_INPUTERROR_TAPIOptionMarginCalculateModeType - parent.attr("TAPIERROR_INPUTERROR_TAPIOptionMarginCalculateModeType") = TAPIERROR_INPUTERROR_TAPIOptionMarginCalculateModeType; - // TAPIERROR_INPUTERROR_TAPICmbDirectType - parent.attr("TAPIERROR_INPUTERROR_TAPICmbDirectType") = TAPIERROR_INPUTERROR_TAPICmbDirectType; - // TAPIERROR_INPUTERROR_TAPIDeliveryModeType - parent.attr("TAPIERROR_INPUTERROR_TAPIDeliveryModeType") = TAPIERROR_INPUTERROR_TAPIDeliveryModeType; - // TAPIERROR_INPUTERROR_TAPIContractTypeType - parent.attr("TAPIERROR_INPUTERROR_TAPIContractTypeType") = TAPIERROR_INPUTERROR_TAPIContractTypeType; - // TAPIERROR_INPUTERROR_TAPITacticsTypeType - parent.attr("TAPIERROR_INPUTERROR_TAPITacticsTypeType") = TAPIERROR_INPUTERROR_TAPITacticsTypeType; - // TAPIERROR_INPUTERROR_TAPIORDERACT - parent.attr("TAPIERROR_INPUTERROR_TAPIORDERACT") = TAPIERROR_INPUTERROR_TAPIORDERACT; - // TAPIERROR_INPUTERROR_TAPITriggerConditionType - parent.attr("TAPIERROR_INPUTERROR_TAPITriggerConditionType") = TAPIERROR_INPUTERROR_TAPITriggerConditionType; - // TAPIERROR_INPUTERROR_TAPITriggerPriceTypeType - parent.attr("TAPIERROR_INPUTERROR_TAPITriggerPriceTypeType") = TAPIERROR_INPUTERROR_TAPITriggerPriceTypeType; - // TAPIERROR_INPUTERROR_TAPITradingStateType - parent.attr("TAPIERROR_INPUTERROR_TAPITradingStateType") = TAPIERROR_INPUTERROR_TAPITradingStateType; - // TAPIERROR_INPUTERROR_TAPIMarketLevelType - parent.attr("TAPIERROR_INPUTERROR_TAPIMarketLevelType") = TAPIERROR_INPUTERROR_TAPIMarketLevelType; - // TAPIERROR_INPUTERROR_TAPIOrderQryTypeType - parent.attr("TAPIERROR_INPUTERROR_TAPIOrderQryTypeType") = TAPIERROR_INPUTERROR_TAPIOrderQryTypeType; - // TAPIERROR_DISCONNECT_CLOSE_INIT - parent.attr("TAPIERROR_DISCONNECT_CLOSE_INIT") = TAPIERROR_DISCONNECT_CLOSE_INIT; - // TAPIERROR_DISCONNECT_CLOSE_PASS - parent.attr("TAPIERROR_DISCONNECT_CLOSE_PASS") = TAPIERROR_DISCONNECT_CLOSE_PASS; - // TAPIERROR_DISCONNECT_READ_ERROR - parent.attr("TAPIERROR_DISCONNECT_READ_ERROR") = TAPIERROR_DISCONNECT_READ_ERROR; - // TAPIERROR_DISCONNECT_WRITE_ERROR - parent.attr("TAPIERROR_DISCONNECT_WRITE_ERROR") = TAPIERROR_DISCONNECT_WRITE_ERROR; - // TAPIERROR_DISCONNECT_BUF_FULL - parent.attr("TAPIERROR_DISCONNECT_BUF_FULL") = TAPIERROR_DISCONNECT_BUF_FULL; - // TAPIERROR_DISCONNECT_IOCP_ERROR - parent.attr("TAPIERROR_DISCONNECT_IOCP_ERROR") = TAPIERROR_DISCONNECT_IOCP_ERROR; - // TAPIERROR_DISCONNECT_PARSE_ERROR - parent.attr("TAPIERROR_DISCONNECT_PARSE_ERROR") = TAPIERROR_DISCONNECT_PARSE_ERROR; - // TAPIERROR_DISCONNECT_CONNECT_TIMEOUT - parent.attr("TAPIERROR_DISCONNECT_CONNECT_TIMEOUT") = TAPIERROR_DISCONNECT_CONNECT_TIMEOUT; - // TAPIERROR_DISCONNECT_INIT_ERROR - parent.attr("TAPIERROR_DISCONNECT_INIT_ERROR") = TAPIERROR_DISCONNECT_INIT_ERROR; - // TAPIERROR_DISCONNECT_HAS_CONNECTED - parent.attr("TAPIERROR_DISCONNECT_HAS_CONNECTED") = TAPIERROR_DISCONNECT_HAS_CONNECTED; - // TAPIERROR_DISCONNECT_HAS_EXIT - parent.attr("TAPIERROR_DISCONNECT_HAS_EXIT") = TAPIERROR_DISCONNECT_HAS_EXIT; - // TAPIERROR_DISCONNECT_TRY_LATER - parent.attr("TAPIERROR_DISCONNECT_TRY_LATER") = TAPIERROR_DISCONNECT_TRY_LATER; - // TAPIERROR_DISCONNECT_HEARTBEAT_FAILED - parent.attr("TAPIERROR_DISCONNECT_HEARTBEAT_FAILED") = TAPIERROR_DISCONNECT_HEARTBEAT_FAILED; - // TAPIERROR_LOGIN - parent.attr("TAPIERROR_LOGIN") = TAPIERROR_LOGIN; - // TAPIERROR_LOGIN_USER - parent.attr("TAPIERROR_LOGIN_USER") = TAPIERROR_LOGIN_USER; - // TAPIERROR_LOGIN_DDA - parent.attr("TAPIERROR_LOGIN_DDA") = TAPIERROR_LOGIN_DDA; - // TAPIERROR_LOGIN_LICENSE - parent.attr("TAPIERROR_LOGIN_LICENSE") = TAPIERROR_LOGIN_LICENSE; - // TAPIERROR_LOGIN_MODULE - parent.attr("TAPIERROR_LOGIN_MODULE") = TAPIERROR_LOGIN_MODULE; - // TAPIERROR_LOGIN_FORCE - parent.attr("TAPIERROR_LOGIN_FORCE") = TAPIERROR_LOGIN_FORCE; - // TAPIERROR_LOGIN_STATE - parent.attr("TAPIERROR_LOGIN_STATE") = TAPIERROR_LOGIN_STATE; - // TAPIERROR_LOGIN_PASS - parent.attr("TAPIERROR_LOGIN_PASS") = TAPIERROR_LOGIN_PASS; - // TAPIERROR_LOGIN_RIGHT - parent.attr("TAPIERROR_LOGIN_RIGHT") = TAPIERROR_LOGIN_RIGHT; - // TAPIERROR_LOGIN_COUNT - parent.attr("TAPIERROR_LOGIN_COUNT") = TAPIERROR_LOGIN_COUNT; - // TAPIERROR_LOGIN_NOTIN_SERVERFLAGUSRES - parent.attr("TAPIERROR_LOGIN_NOTIN_SERVERFLAGUSRES") = TAPIERROR_LOGIN_NOTIN_SERVERFLAGUSRES; - // TAPIERROR_LOGIN_USER_EXPIRED - parent.attr("TAPIERROR_LOGIN_USER_EXPIRED") = TAPIERROR_LOGIN_USER_EXPIRED; - // TAPIERROR_LOGIN_NO_ACCOUNT - parent.attr("TAPIERROR_LOGIN_NO_ACCOUNT") = TAPIERROR_LOGIN_NO_ACCOUNT; - // TAPIERROR_LOGIN_NO_JGT - parent.attr("TAPIERROR_LOGIN_NO_JGT") = TAPIERROR_LOGIN_NO_JGT; - // TAPIERROR_LOGIN_ERROR_TIMES - parent.attr("TAPIERROR_LOGIN_ERROR_TIMES") = TAPIERROR_LOGIN_ERROR_TIMES; - // TAPIERROR_LOGIN_ERROR_AUTHTYPE - parent.attr("TAPIERROR_LOGIN_ERROR_AUTHTYPE") = TAPIERROR_LOGIN_ERROR_AUTHTYPE; - // TAPIERROR_LOGIN_ERROR_AUTHEXPIRED - parent.attr("TAPIERROR_LOGIN_ERROR_AUTHEXPIRED") = TAPIERROR_LOGIN_ERROR_AUTHEXPIRED; - // TAPIERROR_LOGIN_ERROR_PASSWDEXPIRED - parent.attr("TAPIERROR_LOGIN_ERROR_PASSWDEXPIRED") = TAPIERROR_LOGIN_ERROR_PASSWDEXPIRED; - // TAPIERROR_USERINFO_QRY - parent.attr("TAPIERROR_USERINFO_QRY") = TAPIERROR_USERINFO_QRY; - // TAPIERROR_USERALLRIGHT_QRY - parent.attr("TAPIERROR_USERALLRIGHT_QRY") = TAPIERROR_USERALLRIGHT_QRY; - // TAPIERROR_USERALLACCOUNT_QRY - parent.attr("TAPIERROR_USERALLACCOUNT_QRY") = TAPIERROR_USERALLACCOUNT_QRY; - // TAPIERROR_USERPASSWORD_MOD - parent.attr("TAPIERROR_USERPASSWORD_MOD") = TAPIERROR_USERPASSWORD_MOD; - // TAPIERROR_USERPASSWORD_MOD_SOURCE - parent.attr("TAPIERROR_USERPASSWORD_MOD_SOURCE") = TAPIERROR_USERPASSWORD_MOD_SOURCE; - // TAPIERROR_USERPASSWORD_MOD_SAME - parent.attr("TAPIERROR_USERPASSWORD_MOD_SAME") = TAPIERROR_USERPASSWORD_MOD_SAME; - // TAPIERROR_USERPASSWORD_MOD_COMPLEXITY - parent.attr("TAPIERROR_USERPASSWORD_MOD_COMPLEXITY") = TAPIERROR_USERPASSWORD_MOD_COMPLEXITY; - // TAPIERROR_ACCOUNTINFO_QRY - parent.attr("TAPIERROR_ACCOUNTINFO_QRY") = TAPIERROR_ACCOUNTINFO_QRY; - // TAPIERROR_TRADENO_QRY - parent.attr("TAPIERROR_TRADENO_QRY") = TAPIERROR_TRADENO_QRY; - // TAPIERROR_CONTRACTINFO_QRY - parent.attr("TAPIERROR_CONTRACTINFO_QRY") = TAPIERROR_CONTRACTINFO_QRY; - // TAPIERROR_SPECIALOPTIONFUTURE_QRY - parent.attr("TAPIERROR_SPECIALOPTIONFUTURE_QRY") = TAPIERROR_SPECIALOPTIONFUTURE_QRY; - // TAPIERROR_COMMODITYORDERTYPE_QRY - parent.attr("TAPIERROR_COMMODITYORDERTYPE_QRY") = TAPIERROR_COMMODITYORDERTYPE_QRY; - // TAPIERROR_ORDERTIMEINFORCE_QRY - parent.attr("TAPIERROR_ORDERTIMEINFORCE_QRY") = TAPIERROR_ORDERTIMEINFORCE_QRY; - // TAPIERROR_USER_ORDER_FREQUENCE_QRY - parent.attr("TAPIERROR_USER_ORDER_FREQUENCE_QRY") = TAPIERROR_USER_ORDER_FREQUENCE_QRY; - // TAPIERROR_ORDERINSERT_ACCOUNT - parent.attr("TAPIERROR_ORDERINSERT_ACCOUNT") = TAPIERROR_ORDERINSERT_ACCOUNT; - // TAPIERROR_ORDERINSERT_ACCOUNT_STATE - parent.attr("TAPIERROR_ORDERINSERT_ACCOUNT_STATE") = TAPIERROR_ORDERINSERT_ACCOUNT_STATE; - // TAPIERROR_ORDERINSERT_SIDE_TRADE - parent.attr("TAPIERROR_ORDERINSERT_SIDE_TRADE") = TAPIERROR_ORDERINSERT_SIDE_TRADE; - // TAPIERROR_ORDERINSERT_OPTIONS_TRADE - parent.attr("TAPIERROR_ORDERINSERT_OPTIONS_TRADE") = TAPIERROR_ORDERINSERT_OPTIONS_TRADE; - // TAPIERROR_ORDERINSERT_COMMODITY_TRADE - parent.attr("TAPIERROR_ORDERINSERT_COMMODITY_TRADE") = TAPIERROR_ORDERINSERT_COMMODITY_TRADE; - // TAPIERROR_ORDERINSERT_OPEN_RIGHT - parent.attr("TAPIERROR_ORDERINSERT_OPEN_RIGHT") = TAPIERROR_ORDERINSERT_OPEN_RIGHT; - // TAPIERROR_ORDERINSERT_RISK_CHECK - parent.attr("TAPIERROR_ORDERINSERT_RISK_CHECK") = TAPIERROR_ORDERINSERT_RISK_CHECK; - // TAPIERROR_ORDERINSERT_CONTRACT - parent.attr("TAPIERROR_ORDERINSERT_CONTRACT") = TAPIERROR_ORDERINSERT_CONTRACT; - // TAPIERROR_ORDERINSERT_TRADEROUTE - parent.attr("TAPIERROR_ORDERINSERT_TRADEROUTE") = TAPIERROR_ORDERINSERT_TRADEROUTE; - // TAPIERROR_ORDERINSERT_POSITIONMAX - parent.attr("TAPIERROR_ORDERINSERT_POSITIONMAX") = TAPIERROR_ORDERINSERT_POSITIONMAX; - // TAPIERROR_ORDER_NOTRADE - parent.attr("TAPIERROR_ORDER_NOTRADE") = TAPIERROR_ORDER_NOTRADE; - // TAPIERROR_ORDER_CLOSE - parent.attr("TAPIERROR_ORDER_CLOSE") = TAPIERROR_ORDER_CLOSE; - // TAPIERROR_ORDERINSERT_NOTENOUGHFUND - parent.attr("TAPIERROR_ORDERINSERT_NOTENOUGHFUND") = TAPIERROR_ORDERINSERT_NOTENOUGHFUND; - // TAPIERROR_ORDERINSERT_ORDERTYPE - parent.attr("TAPIERROR_ORDERINSERT_ORDERTYPE") = TAPIERROR_ORDERINSERT_ORDERTYPE; - // TAPIERROR_ORDERINSERT_TIMEINFORCE - parent.attr("TAPIERROR_ORDERINSERT_TIMEINFORCE") = TAPIERROR_ORDERINSERT_TIMEINFORCE; - // TAPIERROR_ORDERINSERT_NO_TACTICS - parent.attr("TAPIERROR_ORDERINSERT_NO_TACTICS") = TAPIERROR_ORDERINSERT_NO_TACTICS; - // TAPIERROR_ORDERINSERT_POSITION_CANNOT_CLOSE - parent.attr("TAPIERROR_ORDERINSERT_POSITION_CANNOT_CLOSE") = TAPIERROR_ORDERINSERT_POSITION_CANNOT_CLOSE; - // TAPIERROR_ORDERINSERT_AUTOCHECK_FAIL - parent.attr("TAPIERROR_ORDERINSERT_AUTOCHECK_FAIL") = TAPIERROR_ORDERINSERT_AUTOCHECK_FAIL; - // TAPIERROR_ORDERINSERT_LME_NOTREADY - parent.attr("TAPIERROR_ORDERINSERT_LME_NOTREADY") = TAPIERROR_ORDERINSERT_LME_NOTREADY; - // TAPIERROR_ORDERINSERT_CLOSEMODE - parent.attr("TAPIERROR_ORDERINSERT_CLOSEMODE") = TAPIERROR_ORDERINSERT_CLOSEMODE; - // TAPIERROR_ORDERINSERT_PARENTNOTENOUGHFUND - parent.attr("TAPIERROR_ORDERINSERT_PARENTNOTENOUGHFUND") = TAPIERROR_ORDERINSERT_PARENTNOTENOUGHFUND; - // TAPIERROR_SWAP_CONTRACT - parent.attr("TAPIERROR_SWAP_CONTRACT") = TAPIERROR_SWAP_CONTRACT; - // TAPIERROR_USERNO_NOTHAS_ACCOUNT - parent.attr("TAPIERROR_USERNO_NOTHAS_ACCOUNT") = TAPIERROR_USERNO_NOTHAS_ACCOUNT; - // TAPIERROR_UPPERCHANNEL_BROKEN - parent.attr("TAPIERROR_UPPERCHANNEL_BROKEN") = TAPIERROR_UPPERCHANNEL_BROKEN; - // TAPIERROR_UPPERCHANNEL_NOT_EXIST - parent.attr("TAPIERROR_UPPERCHANNEL_NOT_EXIST") = TAPIERROR_UPPERCHANNEL_NOT_EXIST; - // TAPIERROR_ORDERDELETE_NOT_SYSNO - parent.attr("TAPIERROR_ORDERDELETE_NOT_SYSNO") = TAPIERROR_ORDERDELETE_NOT_SYSNO; - // TAPIERROR_ORDERDELETE_NOT_STATE - parent.attr("TAPIERROR_ORDERDELETE_NOT_STATE") = TAPIERROR_ORDERDELETE_NOT_STATE; - // TAPIERROR_ORDERACTIVE_NOT_STATE - parent.attr("TAPIERROR_ORDERACTIVE_NOT_STATE") = TAPIERROR_ORDERACTIVE_NOT_STATE; - // TAPIERROR_ORDERCHECK_NOT_STATE - parent.attr("TAPIERROR_ORDERCHECK_NOT_STATE") = TAPIERROR_ORDERCHECK_NOT_STATE; - // TAPIERROR_ORDERCHECK_FAIL - parent.attr("TAPIERROR_ORDERCHECK_FAIL") = TAPIERROR_ORDERCHECK_FAIL; - // TAPIERROR_ORDERMODIFY_NOT_STATE - parent.attr("TAPIERROR_ORDERMODIFY_NOT_STATE") = TAPIERROR_ORDERMODIFY_NOT_STATE; - // TAPIERROR_ORDERMODIFY_BACK_INPUT - parent.attr("TAPIERROR_ORDERMODIFY_BACK_INPUT") = TAPIERROR_ORDERMODIFY_BACK_INPUT; - // TAPIERROR_ORDERINSERT_FEE - parent.attr("TAPIERROR_ORDERINSERT_FEE") = TAPIERROR_ORDERINSERT_FEE; - // TAPIERROR_ORDERINSERT_MARGIN - parent.attr("TAPIERROR_ORDERINSERT_MARGIN") = TAPIERROR_ORDERINSERT_MARGIN; - // TAPIERROR_ORDER_NO_PERMIT - parent.attr("TAPIERROR_ORDER_NO_PERMIT") = TAPIERROR_ORDER_NO_PERMIT; - // TAPIERROR_RSPQUOTE_NO_PERMIT - parent.attr("TAPIERROR_RSPQUOTE_NO_PERMIT") = TAPIERROR_RSPQUOTE_NO_PERMIT; - // TAPIERROR_RSPQUOTE_CHILD_NO_PERMIT - parent.attr("TAPIERROR_RSPQUOTE_CHILD_NO_PERMIT") = TAPIERROR_RSPQUOTE_CHILD_NO_PERMIT; - // TAPIERROR_TRADENO_NOT_FIND - parent.attr("TAPIERROR_TRADENO_NOT_FIND") = TAPIERROR_TRADENO_NOT_FIND; - // TAPIERROR_ORDER_NO_CLOSE - parent.attr("TAPIERROR_ORDER_NO_CLOSE") = TAPIERROR_ORDER_NO_CLOSE; - // TAPIERROR_QRY_QUOTE_NO_PERMIT - parent.attr("TAPIERROR_QRY_QUOTE_NO_PERMIT") = TAPIERROR_QRY_QUOTE_NO_PERMIT; - // TAPIERROR_EXPIREDATE_NO_PERMIT - parent.attr("TAPIERROR_EXPIREDATE_NO_PERMIT") = TAPIERROR_EXPIREDATE_NO_PERMIT; - // TAPIERROR_CMB_NO_PERMIT - parent.attr("TAPIERROR_CMB_NO_PERMIT") = TAPIERROR_CMB_NO_PERMIT; - // TAPIERROR_ORDERSERVER_NO_PERMIT - parent.attr("TAPIERROR_ORDERSERVER_NO_PERMIT") = TAPIERROR_ORDERSERVER_NO_PERMIT; - // TAPIERROR_POSITION_CANNOT_EXEC_OR_ABANDON - parent.attr("TAPIERROR_POSITION_CANNOT_EXEC_OR_ABANDON") = TAPIERROR_POSITION_CANNOT_EXEC_OR_ABANDON; - // TAPIERROR_ORDERCHECK_NO_PERMIT - parent.attr("TAPIERROR_ORDERCHECK_NO_PERMIT") = TAPIERROR_ORDERCHECK_NO_PERMIT; - // TAPIERROR_ORDERMAXOPENVOL_NO_PERMIT - parent.attr("TAPIERROR_ORDERMAXOPENVOL_NO_PERMIT") = TAPIERROR_ORDERMAXOPENVOL_NO_PERMIT; - // TAPIERROR_ORDER_QTY_NO_PERMIT - parent.attr("TAPIERROR_ORDER_QTY_NO_PERMIT") = TAPIERROR_ORDER_QTY_NO_PERMIT; - // TAPIERROR_ORDER_APPLY_NO_PERMIT - parent.attr("TAPIERROR_ORDER_APPLY_NO_PERMIT") = TAPIERROR_ORDER_APPLY_NO_PERMIT; - // TAPIERROR_ORDER_FREQ_OVERRUN - parent.attr("TAPIERROR_ORDER_FREQ_OVERRUN") = TAPIERROR_ORDER_FREQ_OVERRUN; - // TAPIERROR_COMB_NO_SIDEORHEDGE - parent.attr("TAPIERROR_COMB_NO_SIDEORHEDGE") = TAPIERROR_COMB_NO_SIDEORHEDGE; - // TAPIERROR_ORDER_FREQUENCY - parent.attr("TAPIERROR_ORDER_FREQUENCY") = TAPIERROR_ORDER_FREQUENCY; - // TAPIERROR_ORDER_QUERYING - parent.attr("TAPIERROR_ORDER_QUERYING") = TAPIERROR_ORDER_QUERYING; - // TAPIERROR_SUBSCRIBEQUOTE_MAX - parent.attr("TAPIERROR_SUBSCRIBEQUOTE_MAX") = TAPIERROR_SUBSCRIBEQUOTE_MAX; - // TAPIERROR_SUBSCRIBEQUOTE_EXCHANGE_MAX - parent.attr("TAPIERROR_SUBSCRIBEQUOTE_EXCHANGE_MAX") = TAPIERROR_SUBSCRIBEQUOTE_EXCHANGE_MAX; - // TAPIERROR_SUBSCRIBEQUOTE_NO_RIGHT - parent.attr("TAPIERROR_SUBSCRIBEQUOTE_NO_RIGHT") = TAPIERROR_SUBSCRIBEQUOTE_NO_RIGHT; - // TAPIERROR_SUBSCRIBEQUOTE_NO_EXCHANGE_RIGHT - parent.attr("TAPIERROR_SUBSCRIBEQUOTE_NO_EXCHANGE_RIGHT") = TAPIERROR_SUBSCRIBEQUOTE_NO_EXCHANGE_RIGHT; - // TAPIERROR_SUBSCRIBEQUOTE_COMMODITY_NOT_EXIST - parent.attr("TAPIERROR_SUBSCRIBEQUOTE_COMMODITY_NOT_EXIST") = TAPIERROR_SUBSCRIBEQUOTE_COMMODITY_NOT_EXIST; - // TAPIERROR_SUBSCRIBEQUOTE_CONTRACT_MAY_NOT_EXIST - parent.attr("TAPIERROR_SUBSCRIBEQUOTE_CONTRACT_MAY_NOT_EXIST") = TAPIERROR_SUBSCRIBEQUOTE_CONTRACT_MAY_NOT_EXIST; - // TAPIERROR_QUOTEFRONT_UNKNOWN_PROTOCOL - parent.attr("TAPIERROR_QUOTEFRONT_UNKNOWN_PROTOCOL") = TAPIERROR_QUOTEFRONT_UNKNOWN_PROTOCOL; -} -void generate_vntap_typedefs(pybind11::module & parent) -{ - -} -void generate_caster_(pybind11::object & parent) -{ - struct caster: c2py::caster{}; - auto c = c2py::caster::bind(parent, "caster"); - // TapAPIApplicationInfo - c2py::caster::try_generate(c, "toTapAPIApplicationInfo"); - // TapAPICommodity - c2py::caster::try_generate(c, "toTapAPICommodity"); - // TapAPIContract - c2py::caster::try_generate(c, "toTapAPIContract"); - // TapAPIExchangeInfo - c2py::caster::try_generate(c, "toTapAPIExchangeInfo"); - // TapAPIChangePasswordReq - c2py::caster::try_generate(c, "toTapAPIChangePasswordReq"); - // TapAPIQuoteLoginAuth - c2py::caster::try_generate(c, "toTapAPIQuoteLoginAuth"); - // TapAPIQuotLoginRspInfo - c2py::caster::try_generate(c, "toTapAPIQuotLoginRspInfo"); - // TapAPIQuoteCommodityInfo - c2py::caster::try_generate(c, "toTapAPIQuoteCommodityInfo"); - // TapAPIQuoteContractInfo - c2py::caster::try_generate(c, "toTapAPIQuoteContractInfo"); - // TapAPIQuoteWhole - c2py::caster::try_generate(c, "toTapAPIQuoteWhole"); - // ITapQuoteAPINotify - c2py::caster::try_generate(c, "toITapQuoteAPINotify"); - // ITapQuoteAPI - c2py::caster::try_generate(c, "toITapQuoteAPI"); - // TAPISTR_10 - c2py::caster::try_generate(c, "toTAPISTR_10"); - // TAPISTR_20 - c2py::caster::try_generate(c, "toTAPISTR_20"); - // TAPISTR_30 - c2py::caster::try_generate(c, "toTAPISTR_30"); - // TAPISTR_40 - c2py::caster::try_generate(c, "toTAPISTR_40"); - // TAPISTR_50 - c2py::caster::try_generate(c, "toTAPISTR_50"); - // TAPISTR_70 - c2py::caster::try_generate(c, "toTAPISTR_70"); - // TAPISTR_100 - c2py::caster::try_generate(c, "toTAPISTR_100"); - // TAPISTR_300 - c2py::caster::try_generate(c, "toTAPISTR_300"); - // TAPISTR_500 - c2py::caster::try_generate(c, "toTAPISTR_500"); - // TAPISTR_2000 - c2py::caster::try_generate(c, "toTAPISTR_2000"); - // TAPIAUTHCODE - c2py::caster::try_generate(c, "toTAPIAUTHCODE"); - // TAPICHAR - c2py::caster::try_generate(c, "toTAPICHAR"); - // TAPIINT32 - c2py::caster::try_generate(c, "toTAPIINT32"); - // TAPIUINT32 - c2py::caster::try_generate(c, "toTAPIUINT32"); - // TAPIINT64 - c2py::caster::try_generate(c, "toTAPIINT64"); - // TAPIUINT64 - c2py::caster::try_generate(c, "toTAPIUINT64"); - // TAPIUINT16 - c2py::caster::try_generate(c, "toTAPIUINT16"); - // TAPIUINT8 - c2py::caster::try_generate(c, "toTAPIUINT8"); - // TAPIREAL64 - c2py::caster::try_generate(c, "toTAPIREAL64"); - // TAPIYNFLAG - c2py::caster::try_generate(c, "toTAPIYNFLAG"); - // TAPIDTSTAMP - c2py::caster::try_generate(c, "toTAPIDTSTAMP"); - // TAPIDATETIME - c2py::caster::try_generate(c, "toTAPIDATETIME"); - // TAPIDATE - c2py::caster::try_generate(c, "toTAPIDATE"); - // TAPITIME - c2py::caster::try_generate(c, "toTAPITIME"); - // TAPILOGLEVEL - c2py::caster::try_generate(c, "toTAPILOGLEVEL"); - // TAPICommodityType - c2py::caster::try_generate(c, "toTAPICommodityType"); - // TAPICallOrPutFlagType - c2py::caster::try_generate(c, "toTAPICallOrPutFlagType"); - // TAPIQPRICE - c2py::caster::try_generate(c, "toTAPIQPRICE"); - // TAPIQVOLUME - c2py::caster::try_generate(c, "toTAPIQVOLUME"); - // TAPIQDIFF - c2py::caster::try_generate(c, "toTAPIQDIFF"); -} -void generate_vntap_caster(pybind11::module & parent) -{ - generate_caster_(parent); -} diff --git a/vnpy/api/tap/vntap/generated_files/generated_functions_2.cpp b/vnpy/api/tap/vntap/generated_files/generated_functions_2.cpp deleted file mode 100644 index d68459b461..0000000000 --- a/vnpy/api/tap/vntap/generated_files/generated_functions_2.cpp +++ /dev/null @@ -1,498 +0,0 @@ -#include "config.h" - -#include -#include -#include -#include -#include -#include - -#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_ITapTrade_TapAPICommodityInfo(pybind11::object & parent) -{ - // ITapTrade::TapAPICommodityInfo - pybind11::class_ c(parent, "TapAPICommodityInfo"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPICommodityInfo::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "ExchangeNo", ExchangeNo); - // ITapTrade::TapAPICommodityInfo::CommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CommodityType", CommodityType); - // ITapTrade::TapAPICommodityInfo::CommodityNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CommodityNo", CommodityNo); - // ITapTrade::TapAPICommodityInfo::CommodityName - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CommodityName", CommodityName); - // ITapTrade::TapAPICommodityInfo::CommodityEngName - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CommodityEngName", CommodityEngName); - // ITapTrade::TapAPICommodityInfo::RelateExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "RelateExchangeNo", RelateExchangeNo); - // ITapTrade::TapAPICommodityInfo::RelateCommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "RelateCommodityType", RelateCommodityType); - // ITapTrade::TapAPICommodityInfo::RelateCommodityNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "RelateCommodityNo", RelateCommodityNo); - // ITapTrade::TapAPICommodityInfo::RelateExchangeNo2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "RelateExchangeNo2", RelateExchangeNo2); - // ITapTrade::TapAPICommodityInfo::RelateCommodityType2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "RelateCommodityType2", RelateCommodityType2); - // ITapTrade::TapAPICommodityInfo::RelateCommodityNo2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "RelateCommodityNo2", RelateCommodityNo2); - // ITapTrade::TapAPICommodityInfo::CurrencyGroupNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CurrencyGroupNo", CurrencyGroupNo); - // ITapTrade::TapAPICommodityInfo::TradeCurrency - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "TradeCurrency", TradeCurrency); - // ITapTrade::TapAPICommodityInfo::ContractSize - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "ContractSize", ContractSize); - // ITapTrade::TapAPICommodityInfo::OpenCloseMode - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "OpenCloseMode", OpenCloseMode); - // ITapTrade::TapAPICommodityInfo::StrikePriceTimes - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "StrikePriceTimes", StrikePriceTimes); - // ITapTrade::TapAPICommodityInfo::CommodityTickSize - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CommodityTickSize", CommodityTickSize); - // ITapTrade::TapAPICommodityInfo::CommodityDenominator - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CommodityDenominator", CommodityDenominator); - // ITapTrade::TapAPICommodityInfo::CmbDirect - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CmbDirect", CmbDirect); - // ITapTrade::TapAPICommodityInfo::DeliveryMode - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "DeliveryMode", DeliveryMode); - // ITapTrade::TapAPICommodityInfo::DeliveryDays - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "DeliveryDays", DeliveryDays); - // ITapTrade::TapAPICommodityInfo::AddOneTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "AddOneTime", AddOneTime); - // ITapTrade::TapAPICommodityInfo::CommodityTimeZone - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICommodityInfo, "CommodityTimeZone", CommodityTimeZone); - // ITapTrade::TapAPICommodityInfo::IsAddOne - 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) -{ - // ITapTrade::TapAPITradeContractInfo - pybind11::class_ c(parent, "TapAPITradeContractInfo"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPITradeContractInfo::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeContractInfo, "ExchangeNo", ExchangeNo); - // ITapTrade::TapAPITradeContractInfo::CommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeContractInfo, "CommodityType", CommodityType); - // ITapTrade::TapAPITradeContractInfo::CommodityNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeContractInfo, "CommodityNo", CommodityNo); - // ITapTrade::TapAPITradeContractInfo::ContractNo1 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeContractInfo, "ContractNo1", ContractNo1); - // ITapTrade::TapAPITradeContractInfo::StrikePrice1 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeContractInfo, "StrikePrice1", StrikePrice1); - // ITapTrade::TapAPITradeContractInfo::CallOrPutFlag1 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeContractInfo, "CallOrPutFlag1", CallOrPutFlag1); - // ITapTrade::TapAPITradeContractInfo::ContractNo2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeContractInfo, "ContractNo2", ContractNo2); - // ITapTrade::TapAPITradeContractInfo::StrikePrice2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeContractInfo, "StrikePrice2", StrikePrice2); - // ITapTrade::TapAPITradeContractInfo::CallOrPutFlag2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeContractInfo, "CallOrPutFlag2", CallOrPutFlag2); - // ITapTrade::TapAPITradeContractInfo::ContractType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeContractInfo, "ContractType", ContractType); - // ITapTrade::TapAPITradeContractInfo::QuoteUnderlyingContract - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeContractInfo, "QuoteUnderlyingContract", QuoteUnderlyingContract); - // ITapTrade::TapAPITradeContractInfo::ContractName - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeContractInfo, "ContractName", ContractName); - // ITapTrade::TapAPITradeContractInfo::ContractExpDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeContractInfo, "ContractExpDate", ContractExpDate); - // ITapTrade::TapAPITradeContractInfo::LastTradeDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeContractInfo, "LastTradeDate", LastTradeDate); - // ITapTrade::TapAPITradeContractInfo::FirstNoticeDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeContractInfo, "FirstNoticeDate", FirstNoticeDate); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPITradeContractInfo, c); - module_vntap::objects.emplace("ITapTrade::TapAPITradeContractInfo", c); -} -void generate_class_ITapTrade_TapAPICurrencyInfo(pybind11::object & parent) -{ - // ITapTrade::TapAPICurrencyInfo - pybind11::class_ c(parent, "TapAPICurrencyInfo"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPICurrencyInfo::CurrencyNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICurrencyInfo, "CurrencyNo", CurrencyNo); - // ITapTrade::TapAPICurrencyInfo::CurrencyGroupNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICurrencyInfo, "CurrencyGroupNo", CurrencyGroupNo); - // ITapTrade::TapAPICurrencyInfo::TradeRate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICurrencyInfo, "TradeRate", TradeRate); - // ITapTrade::TapAPICurrencyInfo::TradeRate2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICurrencyInfo, "TradeRate2", TradeRate2); - // ITapTrade::TapAPICurrencyInfo::FutureAlg - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICurrencyInfo, "FutureAlg", FutureAlg); - // ITapTrade::TapAPICurrencyInfo::OptionAlg - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPICurrencyInfo, "OptionAlg", OptionAlg); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPICurrencyInfo, c); - module_vntap::objects.emplace("ITapTrade::TapAPICurrencyInfo", c); -} -void generate_class_ITapTrade_TapAPITradeMessageReq(pybind11::object & parent) -{ - // ITapTrade::TapAPITradeMessageReq - pybind11::class_ c(parent, "TapAPITradeMessageReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPITradeMessageReq::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeMessageReq, "AccountNo", AccountNo); - // ITapTrade::TapAPITradeMessageReq::AccountAttributeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeMessageReq, "AccountAttributeNo", AccountAttributeNo); - // ITapTrade::TapAPITradeMessageReq::BenginSendDateTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeMessageReq, "BenginSendDateTime", BenginSendDateTime); - // ITapTrade::TapAPITradeMessageReq::EndSendDateTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeMessageReq, "EndSendDateTime", EndSendDateTime); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPITradeMessageReq, c); - module_vntap::objects.emplace("ITapTrade::TapAPITradeMessageReq", c); -} -void generate_class_ITapTrade_TapAPITradeMessage(pybind11::object & parent) -{ - // ITapTrade::TapAPITradeMessage - pybind11::class_ c(parent, "TapAPITradeMessage"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPITradeMessage::SerialID - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeMessage, "SerialID", SerialID); - // ITapTrade::TapAPITradeMessage::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeMessage, "AccountNo", AccountNo); - // ITapTrade::TapAPITradeMessage::TMsgValidDateTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeMessage, "TMsgValidDateTime", TMsgValidDateTime); - // ITapTrade::TapAPITradeMessage::TMsgTitle - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeMessage, "TMsgTitle", TMsgTitle); - // ITapTrade::TapAPITradeMessage::TMsgContent - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeMessage, "TMsgContent", TMsgContent); - // ITapTrade::TapAPITradeMessage::TMsgType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeMessage, "TMsgType", TMsgType); - // ITapTrade::TapAPITradeMessage::TMsgLevel - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeMessage, "TMsgLevel", TMsgLevel); - // ITapTrade::TapAPITradeMessage::IsSendBySMS - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeMessage, "IsSendBySMS", IsSendBySMS); - // ITapTrade::TapAPITradeMessage::IsSendByEMail - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeMessage, "IsSendByEMail", IsSendByEMail); - // ITapTrade::TapAPITradeMessage::Sender - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeMessage, "Sender", Sender); - // ITapTrade::TapAPITradeMessage::SendDateTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradeMessage, "SendDateTime", SendDateTime); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPITradeMessage, c); - module_vntap::objects.emplace("ITapTrade::TapAPITradeMessage", c); -} -void generate_class_ITapTrade_TapAPIBillQryReq(pybind11::object & parent) -{ - // ITapTrade::TapAPIBillQryReq - pybind11::class_ c(parent, "TapAPIBillQryReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIBillQryReq::UserNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIBillQryReq, "UserNo", UserNo); - // ITapTrade::TapAPIBillQryReq::BillType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIBillQryReq, "BillType", BillType); - // ITapTrade::TapAPIBillQryReq::BillDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIBillQryReq, "BillDate", BillDate); - // ITapTrade::TapAPIBillQryReq::BillFileType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIBillQryReq, "BillFileType", BillFileType); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIBillQryReq, c); - module_vntap::objects.emplace("ITapTrade::TapAPIBillQryReq", c); -} -void generate_class_ITapTrade_TapAPIBillQryRsp(pybind11::object & parent) -{ - // ITapTrade::TapAPIBillQryRsp - pybind11::class_ c(parent, "TapAPIBillQryRsp"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIBillQryRsp::Reqdata - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIBillQryRsp, "Reqdata", Reqdata); - // ITapTrade::TapAPIBillQryRsp::BillLen - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIBillQryRsp, "BillLen", BillLen); - // ITapTrade::TapAPIBillQryRsp::BillText - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIBillQryRsp, "BillText", BillText); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIBillQryRsp, c); - module_vntap::objects.emplace("ITapTrade::TapAPIBillQryRsp", c); -} -void generate_class_ITapTrade_TapAPIHisOrderQryReq(pybind11::object & parent) -{ - // ITapTrade::TapAPIHisOrderQryReq - pybind11::class_ c(parent, "TapAPIHisOrderQryReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIHisOrderQryReq::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryReq, "AccountNo", AccountNo); - // ITapTrade::TapAPIHisOrderQryReq::AccountAttributeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryReq, "AccountAttributeNo", AccountAttributeNo); - // ITapTrade::TapAPIHisOrderQryReq::BeginDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryReq, "BeginDate", BeginDate); - // ITapTrade::TapAPIHisOrderQryReq::EndDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryReq, "EndDate", EndDate); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIHisOrderQryReq, c); - module_vntap::objects.emplace("ITapTrade::TapAPIHisOrderQryReq", c); -} -void generate_class_ITapTrade_TapAPIHisOrderQryRsp(pybind11::object & parent) -{ - // ITapTrade::TapAPIHisOrderQryRsp - pybind11::class_ c(parent, "TapAPIHisOrderQryRsp"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIHisOrderQryRsp::Date - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "Date", Date); - // ITapTrade::TapAPIHisOrderQryRsp::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "AccountNo", AccountNo); - // ITapTrade::TapAPIHisOrderQryRsp::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "ExchangeNo", ExchangeNo); - // ITapTrade::TapAPIHisOrderQryRsp::CommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "CommodityType", CommodityType); - // ITapTrade::TapAPIHisOrderQryRsp::CommodityNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "CommodityNo", CommodityNo); - // ITapTrade::TapAPIHisOrderQryRsp::ContractNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "ContractNo", ContractNo); - // ITapTrade::TapAPIHisOrderQryRsp::StrikePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "StrikePrice", StrikePrice); - // ITapTrade::TapAPIHisOrderQryRsp::CallOrPutFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "CallOrPutFlag", CallOrPutFlag); - // ITapTrade::TapAPIHisOrderQryRsp::ContractNo2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "ContractNo2", ContractNo2); - // ITapTrade::TapAPIHisOrderQryRsp::StrikePrice2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "StrikePrice2", StrikePrice2); - // ITapTrade::TapAPIHisOrderQryRsp::CallOrPutFlag2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "CallOrPutFlag2", CallOrPutFlag2); - // ITapTrade::TapAPIHisOrderQryRsp::OrderType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "OrderType", OrderType); - // ITapTrade::TapAPIHisOrderQryRsp::OrderSource - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "OrderSource", OrderSource); - // ITapTrade::TapAPIHisOrderQryRsp::TimeInForce - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "TimeInForce", TimeInForce); - // ITapTrade::TapAPIHisOrderQryRsp::ExpireTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "ExpireTime", ExpireTime); - // ITapTrade::TapAPIHisOrderQryRsp::IsRiskOrder - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "IsRiskOrder", IsRiskOrder); - // ITapTrade::TapAPIHisOrderQryRsp::OrderSide - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "OrderSide", OrderSide); - // ITapTrade::TapAPIHisOrderQryRsp::PositionEffect - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "PositionEffect", PositionEffect); - // ITapTrade::TapAPIHisOrderQryRsp::PositionEffect2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "PositionEffect2", PositionEffect2); - // ITapTrade::TapAPIHisOrderQryRsp::InquiryNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "InquiryNo", InquiryNo); - // ITapTrade::TapAPIHisOrderQryRsp::HedgeFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "HedgeFlag", HedgeFlag); - // ITapTrade::TapAPIHisOrderQryRsp::OrderPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "OrderPrice", OrderPrice); - // ITapTrade::TapAPIHisOrderQryRsp::OrderPrice2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "OrderPrice2", OrderPrice2); - // ITapTrade::TapAPIHisOrderQryRsp::StopPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "StopPrice", StopPrice); - // ITapTrade::TapAPIHisOrderQryRsp::OrderQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "OrderQty", OrderQty); - // ITapTrade::TapAPIHisOrderQryRsp::OrderMinQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "OrderMinQty", OrderMinQty); - // ITapTrade::TapAPIHisOrderQryRsp::OrderCanceledQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "OrderCanceledQty", OrderCanceledQty); - // ITapTrade::TapAPIHisOrderQryRsp::RefInt - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "RefInt", RefInt); - // ITapTrade::TapAPIHisOrderQryRsp::RefDouble - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "RefDouble", RefDouble); - // ITapTrade::TapAPIHisOrderQryRsp::RefString - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "RefString", RefString); - // ITapTrade::TapAPIHisOrderQryRsp::ServerFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "ServerFlag", ServerFlag); - // ITapTrade::TapAPIHisOrderQryRsp::OrderNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "OrderNo", OrderNo); - // ITapTrade::TapAPIHisOrderQryRsp::OrderStreamID - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "OrderStreamID", OrderStreamID); - // ITapTrade::TapAPIHisOrderQryRsp::UpperNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "UpperNo", UpperNo); - // ITapTrade::TapAPIHisOrderQryRsp::UpperChannelNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "UpperChannelNo", UpperChannelNo); - // ITapTrade::TapAPIHisOrderQryRsp::OrderLocalNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "OrderLocalNo", OrderLocalNo); - // ITapTrade::TapAPIHisOrderQryRsp::UpperStreamID - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "UpperStreamID", UpperStreamID); - // ITapTrade::TapAPIHisOrderQryRsp::OrderSystemNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "OrderSystemNo", OrderSystemNo); - // ITapTrade::TapAPIHisOrderQryRsp::OrderExchangeSystemNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "OrderExchangeSystemNo", OrderExchangeSystemNo); - // ITapTrade::TapAPIHisOrderQryRsp::OrderParentSystemNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "OrderParentSystemNo", OrderParentSystemNo); - // ITapTrade::TapAPIHisOrderQryRsp::OrderInsertUserNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "OrderInsertUserNo", OrderInsertUserNo); - // ITapTrade::TapAPIHisOrderQryRsp::OrderInsertTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "OrderInsertTime", OrderInsertTime); - // ITapTrade::TapAPIHisOrderQryRsp::OrderCommandUserNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "OrderCommandUserNo", OrderCommandUserNo); - // ITapTrade::TapAPIHisOrderQryRsp::OrderUpdateUserNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "OrderUpdateUserNo", OrderUpdateUserNo); - // ITapTrade::TapAPIHisOrderQryRsp::OrderUpdateTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "OrderUpdateTime", OrderUpdateTime); - // ITapTrade::TapAPIHisOrderQryRsp::OrderState - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "OrderState", OrderState); - // ITapTrade::TapAPIHisOrderQryRsp::OrderMatchPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "OrderMatchPrice", OrderMatchPrice); - // ITapTrade::TapAPIHisOrderQryRsp::OrderMatchPrice2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "OrderMatchPrice2", OrderMatchPrice2); - // ITapTrade::TapAPIHisOrderQryRsp::OrderMatchQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "OrderMatchQty", OrderMatchQty); - // ITapTrade::TapAPIHisOrderQryRsp::OrderMatchQty2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "OrderMatchQty2", OrderMatchQty2); - // ITapTrade::TapAPIHisOrderQryRsp::ErrorCode - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "ErrorCode", ErrorCode); - // ITapTrade::TapAPIHisOrderQryRsp::ErrorText - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "ErrorText", ErrorText); - // ITapTrade::TapAPIHisOrderQryRsp::IsBackInput - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "IsBackInput", IsBackInput); - // ITapTrade::TapAPIHisOrderQryRsp::IsDeleted - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "IsDeleted", IsDeleted); - // ITapTrade::TapAPIHisOrderQryRsp::IsAddOne - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "IsAddOne", IsAddOne); - // ITapTrade::TapAPIHisOrderQryRsp::AddOneIsValid - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "AddOneIsValid", AddOneIsValid); - // ITapTrade::TapAPIHisOrderQryRsp::MinClipSize - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "MinClipSize", MinClipSize); - // ITapTrade::TapAPIHisOrderQryRsp::MaxClipSize - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "MaxClipSize", MaxClipSize); - // ITapTrade::TapAPIHisOrderQryRsp::LicenseNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "LicenseNo", LicenseNo); - // ITapTrade::TapAPIHisOrderQryRsp::TacticsType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "TacticsType", TacticsType); - // ITapTrade::TapAPIHisOrderQryRsp::TriggerCondition - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "TriggerCondition", TriggerCondition); - // ITapTrade::TapAPIHisOrderQryRsp::TriggerPriceType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, "TriggerPriceType", TriggerPriceType); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIHisOrderQryRsp, c); - module_vntap::objects.emplace("ITapTrade::TapAPIHisOrderQryRsp", c); -} -void generate_class_ITapTrade_TapAPIHisMatchQryReq(pybind11::object & parent) -{ - // ITapTrade::TapAPIHisMatchQryReq - pybind11::class_ c(parent, "TapAPIHisMatchQryReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIHisMatchQryReq::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryReq, "AccountNo", AccountNo); - // ITapTrade::TapAPIHisMatchQryReq::AccountAttributeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryReq, "AccountAttributeNo", AccountAttributeNo); - // ITapTrade::TapAPIHisMatchQryReq::BeginDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryReq, "BeginDate", BeginDate); - // ITapTrade::TapAPIHisMatchQryReq::EndDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryReq, "EndDate", EndDate); - // ITapTrade::TapAPIHisMatchQryReq::CountType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryReq, "CountType", CountType); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIHisMatchQryReq, c); - module_vntap::objects.emplace("ITapTrade::TapAPIHisMatchQryReq", c); -} -void generate_class_ITapTrade_TapAPIHisMatchQryRsp(pybind11::object & parent) -{ - // ITapTrade::TapAPIHisMatchQryRsp - pybind11::class_ c(parent, "TapAPIHisMatchQryRsp"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIHisMatchQryRsp::SettleDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "SettleDate", SettleDate); - // ITapTrade::TapAPIHisMatchQryRsp::TradeDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "TradeDate", TradeDate); - // ITapTrade::TapAPIHisMatchQryRsp::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "AccountNo", AccountNo); - // ITapTrade::TapAPIHisMatchQryRsp::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "ExchangeNo", ExchangeNo); - // ITapTrade::TapAPIHisMatchQryRsp::CommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "CommodityType", CommodityType); - // ITapTrade::TapAPIHisMatchQryRsp::CommodityNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "CommodityNo", CommodityNo); - // ITapTrade::TapAPIHisMatchQryRsp::ContractNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "ContractNo", ContractNo); - // ITapTrade::TapAPIHisMatchQryRsp::StrikePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "StrikePrice", StrikePrice); - // ITapTrade::TapAPIHisMatchQryRsp::CallOrPutFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "CallOrPutFlag", CallOrPutFlag); - // ITapTrade::TapAPIHisMatchQryRsp::MatchSource - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "MatchSource", MatchSource); - // ITapTrade::TapAPIHisMatchQryRsp::MatchSide - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "MatchSide", MatchSide); - // ITapTrade::TapAPIHisMatchQryRsp::PositionEffect - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "PositionEffect", PositionEffect); - // ITapTrade::TapAPIHisMatchQryRsp::HedgeFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "HedgeFlag", HedgeFlag); - // ITapTrade::TapAPIHisMatchQryRsp::MatchPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "MatchPrice", MatchPrice); - // ITapTrade::TapAPIHisMatchQryRsp::MatchQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "MatchQty", MatchQty); - // ITapTrade::TapAPIHisMatchQryRsp::OrderNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "OrderNo", OrderNo); - // ITapTrade::TapAPIHisMatchQryRsp::MatchNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "MatchNo", MatchNo); - // ITapTrade::TapAPIHisMatchQryRsp::MatchStreamID - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "MatchStreamID", MatchStreamID); - // ITapTrade::TapAPIHisMatchQryRsp::UpperNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "UpperNo", UpperNo); - // ITapTrade::TapAPIHisMatchQryRsp::MatchCmbNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "MatchCmbNo", MatchCmbNo); - // ITapTrade::TapAPIHisMatchQryRsp::ExchangeMatchNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "ExchangeMatchNo", ExchangeMatchNo); - // ITapTrade::TapAPIHisMatchQryRsp::MatchUpperStreamID - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "MatchUpperStreamID", MatchUpperStreamID); - // ITapTrade::TapAPIHisMatchQryRsp::CommodityCurrencyGroup - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "CommodityCurrencyGroup", CommodityCurrencyGroup); - // ITapTrade::TapAPIHisMatchQryRsp::CommodityCurrency - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "CommodityCurrency", CommodityCurrency); - // ITapTrade::TapAPIHisMatchQryRsp::Turnover - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "Turnover", Turnover); - // ITapTrade::TapAPIHisMatchQryRsp::PremiumIncome - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "PremiumIncome", PremiumIncome); - // ITapTrade::TapAPIHisMatchQryRsp::PremiumPay - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "PremiumPay", PremiumPay); - // ITapTrade::TapAPIHisMatchQryRsp::AccountFee - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "AccountFee", AccountFee); - // ITapTrade::TapAPIHisMatchQryRsp::AccountFeeCurrencyGroup - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "AccountFeeCurrencyGroup", AccountFeeCurrencyGroup); - // ITapTrade::TapAPIHisMatchQryRsp::AccountFeeCurrency - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "AccountFeeCurrency", AccountFeeCurrency); - // ITapTrade::TapAPIHisMatchQryRsp::IsManualFee - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "IsManualFee", IsManualFee); - // ITapTrade::TapAPIHisMatchQryRsp::AccountOtherFee - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "AccountOtherFee", AccountOtherFee); - // ITapTrade::TapAPIHisMatchQryRsp::UpperFee - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "UpperFee", UpperFee); - // ITapTrade::TapAPIHisMatchQryRsp::UpperFeeCurrencyGroup - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "UpperFeeCurrencyGroup", UpperFeeCurrencyGroup); - // ITapTrade::TapAPIHisMatchQryRsp::UpperFeeCurrency - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "UpperFeeCurrency", UpperFeeCurrency); - // ITapTrade::TapAPIHisMatchQryRsp::IsUpperManualFee - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "IsUpperManualFee", IsUpperManualFee); - // ITapTrade::TapAPIHisMatchQryRsp::UpperOtherFee - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "UpperOtherFee", UpperOtherFee); - // ITapTrade::TapAPIHisMatchQryRsp::MatchDateTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "MatchDateTime", MatchDateTime); - // ITapTrade::TapAPIHisMatchQryRsp::UpperMatchDateTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "UpperMatchDateTime", UpperMatchDateTime); - // ITapTrade::TapAPIHisMatchQryRsp::CloseProfit - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "CloseProfit", CloseProfit); - // ITapTrade::TapAPIHisMatchQryRsp::ClosePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "ClosePrice", ClosePrice); - // ITapTrade::TapAPIHisMatchQryRsp::CloseQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "CloseQty", CloseQty); - // ITapTrade::TapAPIHisMatchQryRsp::SettleGroupNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "SettleGroupNo", SettleGroupNo); - // ITapTrade::TapAPIHisMatchQryRsp::OperatorNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "OperatorNo", OperatorNo); - // ITapTrade::TapAPIHisMatchQryRsp::OperateTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, "OperateTime", OperateTime); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIHisMatchQryRsp, c); - module_vntap::objects.emplace("ITapTrade::TapAPIHisMatchQryRsp", c); -} -void generate_class_ITapTrade_TapAPIHisOrderProcessQryReq(pybind11::object & parent) -{ - // ITapTrade::TapAPIHisOrderProcessQryReq - pybind11::class_ c(parent, "TapAPIHisOrderProcessQryReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIHisOrderProcessQryReq::Date - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderProcessQryReq, "Date", Date); - // ITapTrade::TapAPIHisOrderProcessQryReq::OrderNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisOrderProcessQryReq, "OrderNo", OrderNo); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIHisOrderProcessQryReq, c); - module_vntap::objects.emplace("ITapTrade::TapAPIHisOrderProcessQryReq", c); -} diff --git a/vnpy/api/tap/vntap/generated_files/generated_functions_3.cpp b/vnpy/api/tap/vntap/generated_files/generated_functions_3.cpp deleted file mode 100644 index 0ececd083a..0000000000 --- a/vnpy/api/tap/vntap/generated_files/generated_functions_3.cpp +++ /dev/null @@ -1,511 +0,0 @@ -#include "config.h" - -#include -#include -#include -#include -#include -#include - -#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_ITapTrade_TapAPIHisPositionQryReq(pybind11::object & parent) -{ - // ITapTrade::TapAPIHisPositionQryReq - pybind11::class_ c(parent, "TapAPIHisPositionQryReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIHisPositionQryReq::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryReq, "AccountNo", AccountNo); - // ITapTrade::TapAPIHisPositionQryReq::Date - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryReq, "Date", Date); - // ITapTrade::TapAPIHisPositionQryReq::SettleFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryReq, "SettleFlag", SettleFlag); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIHisPositionQryReq, c); - module_vntap::objects.emplace("ITapTrade::TapAPIHisPositionQryReq", c); -} -void generate_class_ITapTrade_TapAPIHisPositionQryRsp(pybind11::object & parent) -{ - // ITapTrade::TapAPIHisPositionQryRsp - pybind11::class_ c(parent, "TapAPIHisPositionQryRsp"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIHisPositionQryRsp::SettleDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "SettleDate", SettleDate); - // ITapTrade::TapAPIHisPositionQryRsp::OpenDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "OpenDate", OpenDate); - // ITapTrade::TapAPIHisPositionQryRsp::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "AccountNo", AccountNo); - // ITapTrade::TapAPIHisPositionQryRsp::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "ExchangeNo", ExchangeNo); - // ITapTrade::TapAPIHisPositionQryRsp::CommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "CommodityType", CommodityType); - // ITapTrade::TapAPIHisPositionQryRsp::CommodityNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "CommodityNo", CommodityNo); - // ITapTrade::TapAPIHisPositionQryRsp::ContractNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "ContractNo", ContractNo); - // ITapTrade::TapAPIHisPositionQryRsp::StrikePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "StrikePrice", StrikePrice); - // ITapTrade::TapAPIHisPositionQryRsp::CallOrPutFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "CallOrPutFlag", CallOrPutFlag); - // ITapTrade::TapAPIHisPositionQryRsp::MatchSide - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "MatchSide", MatchSide); - // ITapTrade::TapAPIHisPositionQryRsp::HedgeFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "HedgeFlag", HedgeFlag); - // ITapTrade::TapAPIHisPositionQryRsp::PositionPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "PositionPrice", PositionPrice); - // ITapTrade::TapAPIHisPositionQryRsp::PositionQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "PositionQty", PositionQty); - // ITapTrade::TapAPIHisPositionQryRsp::OrderNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "OrderNo", OrderNo); - // ITapTrade::TapAPIHisPositionQryRsp::PositionNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "PositionNo", PositionNo); - // ITapTrade::TapAPIHisPositionQryRsp::UpperNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "UpperNo", UpperNo); - // ITapTrade::TapAPIHisPositionQryRsp::CurrencyGroup - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "CurrencyGroup", CurrencyGroup); - // ITapTrade::TapAPIHisPositionQryRsp::Currency - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "Currency", Currency); - // ITapTrade::TapAPIHisPositionQryRsp::PreSettlePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "PreSettlePrice", PreSettlePrice); - // ITapTrade::TapAPIHisPositionQryRsp::SettlePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "SettlePrice", SettlePrice); - // ITapTrade::TapAPIHisPositionQryRsp::PositionDProfit - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "PositionDProfit", PositionDProfit); - // ITapTrade::TapAPIHisPositionQryRsp::LMEPositionProfit - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "LMEPositionProfit", LMEPositionProfit); - // ITapTrade::TapAPIHisPositionQryRsp::OptionMarketValue - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "OptionMarketValue", OptionMarketValue); - // ITapTrade::TapAPIHisPositionQryRsp::AccountInitialMargin - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "AccountInitialMargin", AccountInitialMargin); - // ITapTrade::TapAPIHisPositionQryRsp::AccountMaintenanceMargin - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "AccountMaintenanceMargin", AccountMaintenanceMargin); - // ITapTrade::TapAPIHisPositionQryRsp::UpperInitialMargin - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "UpperInitialMargin", UpperInitialMargin); - // ITapTrade::TapAPIHisPositionQryRsp::UpperMaintenanceMargin - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "UpperMaintenanceMargin", UpperMaintenanceMargin); - // ITapTrade::TapAPIHisPositionQryRsp::SettleGroupNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, "SettleGroupNo", SettleGroupNo); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIHisPositionQryRsp, c); - module_vntap::objects.emplace("ITapTrade::TapAPIHisPositionQryRsp", c); -} -void generate_class_ITapTrade_TapAPIHisDeliveryQryReq(pybind11::object & parent) -{ - // ITapTrade::TapAPIHisDeliveryQryReq - pybind11::class_ c(parent, "TapAPIHisDeliveryQryReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIHisDeliveryQryReq::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryReq, "AccountNo", AccountNo); - // ITapTrade::TapAPIHisDeliveryQryReq::AccountAttributeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryReq, "AccountAttributeNo", AccountAttributeNo); - // ITapTrade::TapAPIHisDeliveryQryReq::BeginDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryReq, "BeginDate", BeginDate); - // ITapTrade::TapAPIHisDeliveryQryReq::EndDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryReq, "EndDate", EndDate); - // ITapTrade::TapAPIHisDeliveryQryReq::CountType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryReq, "CountType", CountType); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIHisDeliveryQryReq, c); - module_vntap::objects.emplace("ITapTrade::TapAPIHisDeliveryQryReq", c); -} -void generate_class_ITapTrade_TapAPIHisDeliveryQryRsp(pybind11::object & parent) -{ - // ITapTrade::TapAPIHisDeliveryQryRsp - pybind11::class_ c(parent, "TapAPIHisDeliveryQryRsp"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIHisDeliveryQryRsp::DeliveryDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "DeliveryDate", DeliveryDate); - // ITapTrade::TapAPIHisDeliveryQryRsp::OpenDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "OpenDate", OpenDate); - // ITapTrade::TapAPIHisDeliveryQryRsp::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "AccountNo", AccountNo); - // ITapTrade::TapAPIHisDeliveryQryRsp::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "ExchangeNo", ExchangeNo); - // ITapTrade::TapAPIHisDeliveryQryRsp::CommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "CommodityType", CommodityType); - // ITapTrade::TapAPIHisDeliveryQryRsp::CommodityNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "CommodityNo", CommodityNo); - // ITapTrade::TapAPIHisDeliveryQryRsp::ContractNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "ContractNo", ContractNo); - // ITapTrade::TapAPIHisDeliveryQryRsp::StrikePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "StrikePrice", StrikePrice); - // ITapTrade::TapAPIHisDeliveryQryRsp::CallOrPutFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "CallOrPutFlag", CallOrPutFlag); - // ITapTrade::TapAPIHisDeliveryQryRsp::MatchSource - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "MatchSource", MatchSource); - // ITapTrade::TapAPIHisDeliveryQryRsp::OpenSide - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "OpenSide", OpenSide); - // ITapTrade::TapAPIHisDeliveryQryRsp::OpenPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "OpenPrice", OpenPrice); - // ITapTrade::TapAPIHisDeliveryQryRsp::DeliveryPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "DeliveryPrice", DeliveryPrice); - // ITapTrade::TapAPIHisDeliveryQryRsp::DeliveryQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "DeliveryQty", DeliveryQty); - // ITapTrade::TapAPIHisDeliveryQryRsp::FrozenQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "FrozenQty", FrozenQty); - // ITapTrade::TapAPIHisDeliveryQryRsp::OpenNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "OpenNo", OpenNo); - // ITapTrade::TapAPIHisDeliveryQryRsp::UpperNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "UpperNo", UpperNo); - // ITapTrade::TapAPIHisDeliveryQryRsp::CommodityCurrencyGroupy - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "CommodityCurrencyGroupy", CommodityCurrencyGroupy); - // ITapTrade::TapAPIHisDeliveryQryRsp::CommodityCurrency - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "CommodityCurrency", CommodityCurrency); - // ITapTrade::TapAPIHisDeliveryQryRsp::PreSettlePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "PreSettlePrice", PreSettlePrice); - // ITapTrade::TapAPIHisDeliveryQryRsp::DeliveryProfit - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "DeliveryProfit", DeliveryProfit); - // ITapTrade::TapAPIHisDeliveryQryRsp::AccountFrozenInitialMargin - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "AccountFrozenInitialMargin", AccountFrozenInitialMargin); - // ITapTrade::TapAPIHisDeliveryQryRsp::AccountFrozenMaintenanceMargin - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "AccountFrozenMaintenanceMargin", AccountFrozenMaintenanceMargin); - // ITapTrade::TapAPIHisDeliveryQryRsp::UpperFrozenInitialMargin - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "UpperFrozenInitialMargin", UpperFrozenInitialMargin); - // ITapTrade::TapAPIHisDeliveryQryRsp::UpperFrozenMaintenanceMargin - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "UpperFrozenMaintenanceMargin", UpperFrozenMaintenanceMargin); - // ITapTrade::TapAPIHisDeliveryQryRsp::AccountFeeCurrencyGroup - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "AccountFeeCurrencyGroup", AccountFeeCurrencyGroup); - // ITapTrade::TapAPIHisDeliveryQryRsp::AccountFeeCurrency - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "AccountFeeCurrency", AccountFeeCurrency); - // ITapTrade::TapAPIHisDeliveryQryRsp::AccountDeliveryFee - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "AccountDeliveryFee", AccountDeliveryFee); - // ITapTrade::TapAPIHisDeliveryQryRsp::UpperFeeCurrencyGroup - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "UpperFeeCurrencyGroup", UpperFeeCurrencyGroup); - // ITapTrade::TapAPIHisDeliveryQryRsp::UpperFeeCurrency - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "UpperFeeCurrency", UpperFeeCurrency); - // ITapTrade::TapAPIHisDeliveryQryRsp::UpperDeliveryFee - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "UpperDeliveryFee", UpperDeliveryFee); - // ITapTrade::TapAPIHisDeliveryQryRsp::DeliveryMode - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "DeliveryMode", DeliveryMode); - // ITapTrade::TapAPIHisDeliveryQryRsp::OperatorNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "OperatorNo", OperatorNo); - // ITapTrade::TapAPIHisDeliveryQryRsp::OperateTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "OperateTime", OperateTime); - // ITapTrade::TapAPIHisDeliveryQryRsp::SettleGourpNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, "SettleGourpNo", SettleGourpNo); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIHisDeliveryQryRsp, c); - module_vntap::objects.emplace("ITapTrade::TapAPIHisDeliveryQryRsp", c); -} -void generate_class_ITapTrade_TapAPIAccountCashAdjustQryReq(pybind11::object & parent) -{ - // ITapTrade::TapAPIAccountCashAdjustQryReq - pybind11::class_ c(parent, "TapAPIAccountCashAdjustQryReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIAccountCashAdjustQryReq::SerialID - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountCashAdjustQryReq, "SerialID", SerialID); - // ITapTrade::TapAPIAccountCashAdjustQryReq::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountCashAdjustQryReq, "AccountNo", AccountNo); - // ITapTrade::TapAPIAccountCashAdjustQryReq::AccountAttributeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountCashAdjustQryReq, "AccountAttributeNo", AccountAttributeNo); - // ITapTrade::TapAPIAccountCashAdjustQryReq::BeginDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountCashAdjustQryReq, "BeginDate", BeginDate); - // ITapTrade::TapAPIAccountCashAdjustQryReq::EndDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountCashAdjustQryReq, "EndDate", EndDate); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIAccountCashAdjustQryReq, c); - module_vntap::objects.emplace("ITapTrade::TapAPIAccountCashAdjustQryReq", c); -} -void generate_class_ITapTrade_TapAPIAccountCashAdjustQryRsp(pybind11::object & parent) -{ - // ITapTrade::TapAPIAccountCashAdjustQryRsp - pybind11::class_ c(parent, "TapAPIAccountCashAdjustQryRsp"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIAccountCashAdjustQryRsp::Date - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountCashAdjustQryRsp, "Date", Date); - // ITapTrade::TapAPIAccountCashAdjustQryRsp::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountCashAdjustQryRsp, "AccountNo", AccountNo); - // ITapTrade::TapAPIAccountCashAdjustQryRsp::CashAdjustType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountCashAdjustQryRsp, "CashAdjustType", CashAdjustType); - // ITapTrade::TapAPIAccountCashAdjustQryRsp::CurrencyGroupNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountCashAdjustQryRsp, "CurrencyGroupNo", CurrencyGroupNo); - // ITapTrade::TapAPIAccountCashAdjustQryRsp::CurrencyNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountCashAdjustQryRsp, "CurrencyNo", CurrencyNo); - // ITapTrade::TapAPIAccountCashAdjustQryRsp::CashAdjustValue - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountCashAdjustQryRsp, "CashAdjustValue", CashAdjustValue); - // ITapTrade::TapAPIAccountCashAdjustQryRsp::CashAdjustRemark - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountCashAdjustQryRsp, "CashAdjustRemark", CashAdjustRemark); - // ITapTrade::TapAPIAccountCashAdjustQryRsp::OperateTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountCashAdjustQryRsp, "OperateTime", OperateTime); - // ITapTrade::TapAPIAccountCashAdjustQryRsp::OperatorNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountCashAdjustQryRsp, "OperatorNo", OperatorNo); - // ITapTrade::TapAPIAccountCashAdjustQryRsp::AccountBank - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountCashAdjustQryRsp, "AccountBank", AccountBank); - // ITapTrade::TapAPIAccountCashAdjustQryRsp::BankAccount - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountCashAdjustQryRsp, "BankAccount", BankAccount); - // ITapTrade::TapAPIAccountCashAdjustQryRsp::AccountLWFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountCashAdjustQryRsp, "AccountLWFlag", AccountLWFlag); - // ITapTrade::TapAPIAccountCashAdjustQryRsp::CompanyBank - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountCashAdjustQryRsp, "CompanyBank", CompanyBank); - // ITapTrade::TapAPIAccountCashAdjustQryRsp::InternalBankAccount - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountCashAdjustQryRsp, "InternalBankAccount", InternalBankAccount); - // ITapTrade::TapAPIAccountCashAdjustQryRsp::CompanyLWFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountCashAdjustQryRsp, "CompanyLWFlag", CompanyLWFlag); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIAccountCashAdjustQryRsp, c); - module_vntap::objects.emplace("ITapTrade::TapAPIAccountCashAdjustQryRsp", c); -} -void generate_class_ITapTrade_TapAPIAccountFeeRentQryReq(pybind11::object & parent) -{ - // ITapTrade::TapAPIAccountFeeRentQryReq - pybind11::class_ c(parent, "TapAPIAccountFeeRentQryReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIAccountFeeRentQryReq::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountFeeRentQryReq, "AccountNo", AccountNo); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIAccountFeeRentQryReq, c); - module_vntap::objects.emplace("ITapTrade::TapAPIAccountFeeRentQryReq", c); -} -void generate_class_ITapTrade_TapAPIAccountFeeRentQryRsp(pybind11::object & parent) -{ - // ITapTrade::TapAPIAccountFeeRentQryRsp - pybind11::class_ c(parent, "TapAPIAccountFeeRentQryRsp"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIAccountFeeRentQryRsp::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountFeeRentQryRsp, "AccountNo", AccountNo); - // ITapTrade::TapAPIAccountFeeRentQryRsp::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountFeeRentQryRsp, "ExchangeNo", ExchangeNo); - // ITapTrade::TapAPIAccountFeeRentQryRsp::CommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountFeeRentQryRsp, "CommodityType", CommodityType); - // ITapTrade::TapAPIAccountFeeRentQryRsp::CommodityNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountFeeRentQryRsp, "CommodityNo", CommodityNo); - // ITapTrade::TapAPIAccountFeeRentQryRsp::MatchSource - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountFeeRentQryRsp, "MatchSource", MatchSource); - // ITapTrade::TapAPIAccountFeeRentQryRsp::CalculateMode - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountFeeRentQryRsp, "CalculateMode", CalculateMode); - // ITapTrade::TapAPIAccountFeeRentQryRsp::CurrencyGroupNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountFeeRentQryRsp, "CurrencyGroupNo", CurrencyGroupNo); - // ITapTrade::TapAPIAccountFeeRentQryRsp::CurrencyNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountFeeRentQryRsp, "CurrencyNo", CurrencyNo); - // ITapTrade::TapAPIAccountFeeRentQryRsp::OpenCloseFee - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountFeeRentQryRsp, "OpenCloseFee", OpenCloseFee); - // ITapTrade::TapAPIAccountFeeRentQryRsp::CloseTodayFee - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountFeeRentQryRsp, "CloseTodayFee", CloseTodayFee); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIAccountFeeRentQryRsp, c); - module_vntap::objects.emplace("ITapTrade::TapAPIAccountFeeRentQryRsp", c); -} -void generate_class_ITapTrade_TapAPIAccountMarginRentQryReq(pybind11::object & parent) -{ - // ITapTrade::TapAPIAccountMarginRentQryReq - pybind11::class_ c(parent, "TapAPIAccountMarginRentQryReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIAccountMarginRentQryReq::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountMarginRentQryReq, "AccountNo", AccountNo); - // ITapTrade::TapAPIAccountMarginRentQryReq::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountMarginRentQryReq, "ExchangeNo", ExchangeNo); - // ITapTrade::TapAPIAccountMarginRentQryReq::CommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountMarginRentQryReq, "CommodityType", CommodityType); - // ITapTrade::TapAPIAccountMarginRentQryReq::CommodityNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountMarginRentQryReq, "CommodityNo", CommodityNo); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIAccountMarginRentQryReq, c); - module_vntap::objects.emplace("ITapTrade::TapAPIAccountMarginRentQryReq", c); -} -void generate_class_ITapTrade_TapAPIAccountMarginRentQryRsp(pybind11::object & parent) -{ - // ITapTrade::TapAPIAccountMarginRentQryRsp - pybind11::class_ c(parent, "TapAPIAccountMarginRentQryRsp"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIAccountMarginRentQryRsp::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountMarginRentQryRsp, "AccountNo", AccountNo); - // ITapTrade::TapAPIAccountMarginRentQryRsp::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountMarginRentQryRsp, "ExchangeNo", ExchangeNo); - // ITapTrade::TapAPIAccountMarginRentQryRsp::CommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountMarginRentQryRsp, "CommodityType", CommodityType); - // ITapTrade::TapAPIAccountMarginRentQryRsp::CommodityNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountMarginRentQryRsp, "CommodityNo", CommodityNo); - // ITapTrade::TapAPIAccountMarginRentQryRsp::ContractNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountMarginRentQryRsp, "ContractNo", ContractNo); - // ITapTrade::TapAPIAccountMarginRentQryRsp::StrikePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountMarginRentQryRsp, "StrikePrice", StrikePrice); - // ITapTrade::TapAPIAccountMarginRentQryRsp::CallOrPutFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountMarginRentQryRsp, "CallOrPutFlag", CallOrPutFlag); - // ITapTrade::TapAPIAccountMarginRentQryRsp::CalculateMode - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountMarginRentQryRsp, "CalculateMode", CalculateMode); - // ITapTrade::TapAPIAccountMarginRentQryRsp::CurrencyGroupNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountMarginRentQryRsp, "CurrencyGroupNo", CurrencyGroupNo); - // ITapTrade::TapAPIAccountMarginRentQryRsp::CurrencyNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountMarginRentQryRsp, "CurrencyNo", CurrencyNo); - // ITapTrade::TapAPIAccountMarginRentQryRsp::InitialMargin - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountMarginRentQryRsp, "InitialMargin", InitialMargin); - // ITapTrade::TapAPIAccountMarginRentQryRsp::MaintenanceMargin - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountMarginRentQryRsp, "MaintenanceMargin", MaintenanceMargin); - // ITapTrade::TapAPIAccountMarginRentQryRsp::SellInitialMargin - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountMarginRentQryRsp, "SellInitialMargin", SellInitialMargin); - // ITapTrade::TapAPIAccountMarginRentQryRsp::SellMaintenanceMargin - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountMarginRentQryRsp, "SellMaintenanceMargin", SellMaintenanceMargin); - // ITapTrade::TapAPIAccountMarginRentQryRsp::LockMargin - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIAccountMarginRentQryRsp, "LockMargin", LockMargin); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIAccountMarginRentQryRsp, c); - module_vntap::objects.emplace("ITapTrade::TapAPIAccountMarginRentQryRsp", c); -} -void generate_class_ITapTrade_TapAPIOrderQuoteMarketNotice(pybind11::object & parent) -{ - // ITapTrade::TapAPIOrderQuoteMarketNotice - pybind11::class_ c(parent, "TapAPIOrderQuoteMarketNotice"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIOrderQuoteMarketNotice::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderQuoteMarketNotice, "ExchangeNo", ExchangeNo); - // ITapTrade::TapAPIOrderQuoteMarketNotice::CommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderQuoteMarketNotice, "CommodityType", CommodityType); - // ITapTrade::TapAPIOrderQuoteMarketNotice::CommodityNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderQuoteMarketNotice, "CommodityNo", CommodityNo); - // ITapTrade::TapAPIOrderQuoteMarketNotice::ContractNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderQuoteMarketNotice, "ContractNo", ContractNo); - // ITapTrade::TapAPIOrderQuoteMarketNotice::StrikePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderQuoteMarketNotice, "StrikePrice", StrikePrice); - // ITapTrade::TapAPIOrderQuoteMarketNotice::CallOrPutFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderQuoteMarketNotice, "CallOrPutFlag", CallOrPutFlag); - // ITapTrade::TapAPIOrderQuoteMarketNotice::OrderSide - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderQuoteMarketNotice, "OrderSide", OrderSide); - // ITapTrade::TapAPIOrderQuoteMarketNotice::OrderQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderQuoteMarketNotice, "OrderQty", OrderQty); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIOrderQuoteMarketNotice, c); - module_vntap::objects.emplace("ITapTrade::TapAPIOrderQuoteMarketNotice", c); -} -void generate_class_ITapTrade_TapAPIOrderMarketInsertReq(pybind11::object & parent) -{ - // ITapTrade::TapAPIOrderMarketInsertReq - pybind11::class_ c(parent, "TapAPIOrderMarketInsertReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIOrderMarketInsertReq::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertReq, "AccountNo", AccountNo); - // ITapTrade::TapAPIOrderMarketInsertReq::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertReq, "ExchangeNo", ExchangeNo); - // ITapTrade::TapAPIOrderMarketInsertReq::CommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertReq, "CommodityType", CommodityType); - // ITapTrade::TapAPIOrderMarketInsertReq::CommodityNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertReq, "CommodityNo", CommodityNo); - // ITapTrade::TapAPIOrderMarketInsertReq::ContractNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertReq, "ContractNo", ContractNo); - // ITapTrade::TapAPIOrderMarketInsertReq::StrikePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertReq, "StrikePrice", StrikePrice); - // ITapTrade::TapAPIOrderMarketInsertReq::CallOrPutFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertReq, "CallOrPutFlag", CallOrPutFlag); - // ITapTrade::TapAPIOrderMarketInsertReq::OrderType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertReq, "OrderType", OrderType); - // ITapTrade::TapAPIOrderMarketInsertReq::TimeInForce - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertReq, "TimeInForce", TimeInForce); - // ITapTrade::TapAPIOrderMarketInsertReq::ExpireTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertReq, "ExpireTime", ExpireTime); - // ITapTrade::TapAPIOrderMarketInsertReq::OrderSource - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertReq, "OrderSource", OrderSource); - // ITapTrade::TapAPIOrderMarketInsertReq::BuyPositionEffect - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertReq, "BuyPositionEffect", BuyPositionEffect); - // ITapTrade::TapAPIOrderMarketInsertReq::SellPositionEffect - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertReq, "SellPositionEffect", SellPositionEffect); - // ITapTrade::TapAPIOrderMarketInsertReq::AddOneIsValid - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertReq, "AddOneIsValid", AddOneIsValid); - // ITapTrade::TapAPIOrderMarketInsertReq::OrderBuyPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertReq, "OrderBuyPrice", OrderBuyPrice); - // ITapTrade::TapAPIOrderMarketInsertReq::OrderSellPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertReq, "OrderSellPrice", OrderSellPrice); - // ITapTrade::TapAPIOrderMarketInsertReq::OrderBuyQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertReq, "OrderBuyQty", OrderBuyQty); - // ITapTrade::TapAPIOrderMarketInsertReq::OrderSellQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertReq, "OrderSellQty", OrderSellQty); - // ITapTrade::TapAPIOrderMarketInsertReq::ClientBuyOrderNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertReq, "ClientBuyOrderNo", ClientBuyOrderNo); - // ITapTrade::TapAPIOrderMarketInsertReq::ClientSellOrderNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertReq, "ClientSellOrderNo", ClientSellOrderNo); - // ITapTrade::TapAPIOrderMarketInsertReq::RefInt - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertReq, "RefInt", RefInt); - // ITapTrade::TapAPIOrderMarketInsertReq::RefDouble - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertReq, "RefDouble", RefDouble); - // ITapTrade::TapAPIOrderMarketInsertReq::RefString - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertReq, "RefString", RefString); - // ITapTrade::TapAPIOrderMarketInsertReq::Remark - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertReq, "Remark", Remark); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIOrderMarketInsertReq, c); - module_vntap::objects.emplace("ITapTrade::TapAPIOrderMarketInsertReq", c); -} -void generate_class_ITapTrade_TapAPIOrderMarketInsertRsp(pybind11::object & parent) -{ - // ITapTrade::TapAPIOrderMarketInsertRsp - pybind11::class_ c(parent, "TapAPIOrderMarketInsertRsp"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIOrderMarketInsertRsp::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "AccountNo", AccountNo); - // ITapTrade::TapAPIOrderMarketInsertRsp::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "ExchangeNo", ExchangeNo); - // ITapTrade::TapAPIOrderMarketInsertRsp::CommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "CommodityType", CommodityType); - // ITapTrade::TapAPIOrderMarketInsertRsp::CommodityNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "CommodityNo", CommodityNo); - // ITapTrade::TapAPIOrderMarketInsertRsp::ContractNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "ContractNo", ContractNo); - // ITapTrade::TapAPIOrderMarketInsertRsp::StrikePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "StrikePrice", StrikePrice); - // ITapTrade::TapAPIOrderMarketInsertRsp::CallOrPutFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "CallOrPutFlag", CallOrPutFlag); - // ITapTrade::TapAPIOrderMarketInsertRsp::OrderType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "OrderType", OrderType); - // ITapTrade::TapAPIOrderMarketInsertRsp::TimeInForce - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "TimeInForce", TimeInForce); - // ITapTrade::TapAPIOrderMarketInsertRsp::ExpireTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "ExpireTime", ExpireTime); - // ITapTrade::TapAPIOrderMarketInsertRsp::OrderSource - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "OrderSource", OrderSource); - // ITapTrade::TapAPIOrderMarketInsertRsp::BuyPositionEffect - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "BuyPositionEffect", BuyPositionEffect); - // ITapTrade::TapAPIOrderMarketInsertRsp::SellPositionEffect - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "SellPositionEffect", SellPositionEffect); - // ITapTrade::TapAPIOrderMarketInsertRsp::OrderBuyPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "OrderBuyPrice", OrderBuyPrice); - // ITapTrade::TapAPIOrderMarketInsertRsp::OrderSellPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "OrderSellPrice", OrderSellPrice); - // ITapTrade::TapAPIOrderMarketInsertRsp::OrderBuyQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "OrderBuyQty", OrderBuyQty); - // ITapTrade::TapAPIOrderMarketInsertRsp::OrderSellQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "OrderSellQty", OrderSellQty); - // ITapTrade::TapAPIOrderMarketInsertRsp::ServerFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "ServerFlag", ServerFlag); - // ITapTrade::TapAPIOrderMarketInsertRsp::OrderBuyNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "OrderBuyNo", OrderBuyNo); - // ITapTrade::TapAPIOrderMarketInsertRsp::OrderSellNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "OrderSellNo", OrderSellNo); - // ITapTrade::TapAPIOrderMarketInsertRsp::AddOneIsValid - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "AddOneIsValid", AddOneIsValid); - // ITapTrade::TapAPIOrderMarketInsertRsp::OrderMarketUserNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "OrderMarketUserNo", OrderMarketUserNo); - // ITapTrade::TapAPIOrderMarketInsertRsp::OrderMarketTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "OrderMarketTime", OrderMarketTime); - // ITapTrade::TapAPIOrderMarketInsertRsp::RefInt - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "RefInt", RefInt); - // ITapTrade::TapAPIOrderMarketInsertRsp::RefDouble - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "RefDouble", RefDouble); - // ITapTrade::TapAPIOrderMarketInsertRsp::RefString - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "RefString", RefString); - // ITapTrade::TapAPIOrderMarketInsertRsp::ClientBuyOrderNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "ClientBuyOrderNo", ClientBuyOrderNo); - // ITapTrade::TapAPIOrderMarketInsertRsp::ClientSellOrderNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "ClientSellOrderNo", ClientSellOrderNo); - // ITapTrade::TapAPIOrderMarketInsertRsp::ErrorCode - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "ErrorCode", ErrorCode); - // ITapTrade::TapAPIOrderMarketInsertRsp::ErrorText - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "ErrorText", ErrorText); - // ITapTrade::TapAPIOrderMarketInsertRsp::ClientLocalIP - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "ClientLocalIP", ClientLocalIP); - // ITapTrade::TapAPIOrderMarketInsertRsp::ClientMac - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "ClientMac", ClientMac); - // ITapTrade::TapAPIOrderMarketInsertRsp::ClientIP - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "ClientIP", ClientIP); - // ITapTrade::TapAPIOrderMarketInsertRsp::Remark - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, "Remark", Remark); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIOrderMarketInsertRsp, c); - module_vntap::objects.emplace("ITapTrade::TapAPIOrderMarketInsertRsp", c); -} diff --git a/vnpy/api/tap/vntap/generated_files/generated_functions_4.cpp b/vnpy/api/tap/vntap/generated_files/generated_functions_4.cpp deleted file mode 100644 index 63b1a7f39b..0000000000 --- a/vnpy/api/tap/vntap/generated_files/generated_functions_4.cpp +++ /dev/null @@ -1,257 +0,0 @@ -#include "config.h" - -#include -#include -#include -#include -#include -#include - -#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_ITapTrade_TapAPIOrderMarketDeleteReq(pybind11::object & parent) -{ - // ITapTrade::TapAPIOrderMarketDeleteReq - pybind11::class_ c(parent, "TapAPIOrderMarketDeleteReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIOrderMarketDeleteReq::ServerFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketDeleteReq, "ServerFlag", ServerFlag); - // ITapTrade::TapAPIOrderMarketDeleteReq::OrderBuyNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderMarketDeleteReq, "OrderBuyNo", OrderBuyNo); - // ITapTrade::TapAPIOrderMarketDeleteReq::OrderSellNo - 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) -{ - // ITapTrade::TapAPIOrderLocalRemoveReq - pybind11::class_ c(parent, "TapAPIOrderLocalRemoveReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIOrderLocalRemoveReq::ServerFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalRemoveReq, "ServerFlag", ServerFlag); - // ITapTrade::TapAPIOrderLocalRemoveReq::OrderNo - 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) -{ - // ITapTrade::TapAPIOrderLocalRemoveRsp - pybind11::class_ c(parent, "TapAPIOrderLocalRemoveRsp"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIOrderLocalRemoveRsp::req - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalRemoveRsp, "req", req); - // ITapTrade::TapAPIOrderLocalRemoveRsp::ClientLocalIP - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalRemoveRsp, "ClientLocalIP", ClientLocalIP); - // ITapTrade::TapAPIOrderLocalRemoveRsp::ClientMac - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalRemoveRsp, "ClientMac", ClientMac); - // ITapTrade::TapAPIOrderLocalRemoveRsp::ClientIP - 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) -{ - // ITapTrade::TapAPIOrderLocalInputReq - pybind11::class_ c(parent, "TapAPIOrderLocalInputReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIOrderLocalInputReq::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "AccountNo", AccountNo); - // ITapTrade::TapAPIOrderLocalInputReq::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "ExchangeNo", ExchangeNo); - // ITapTrade::TapAPIOrderLocalInputReq::CommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "CommodityType", CommodityType); - // ITapTrade::TapAPIOrderLocalInputReq::CommodityNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "CommodityNo", CommodityNo); - // ITapTrade::TapAPIOrderLocalInputReq::ContractNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "ContractNo", ContractNo); - // ITapTrade::TapAPIOrderLocalInputReq::StrikePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "StrikePrice", StrikePrice); - // ITapTrade::TapAPIOrderLocalInputReq::CallOrPutFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "CallOrPutFlag", CallOrPutFlag); - // ITapTrade::TapAPIOrderLocalInputReq::ContractNo2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "ContractNo2", ContractNo2); - // ITapTrade::TapAPIOrderLocalInputReq::StrikePrice2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "StrikePrice2", StrikePrice2); - // ITapTrade::TapAPIOrderLocalInputReq::CallOrPutFlag2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "CallOrPutFlag2", CallOrPutFlag2); - // ITapTrade::TapAPIOrderLocalInputReq::OrderType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderType", OrderType); - // ITapTrade::TapAPIOrderLocalInputReq::OrderSource - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderSource", OrderSource); - // ITapTrade::TapAPIOrderLocalInputReq::TimeInForce - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "TimeInForce", TimeInForce); - // ITapTrade::TapAPIOrderLocalInputReq::ExpireTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "ExpireTime", ExpireTime); - // ITapTrade::TapAPIOrderLocalInputReq::IsRiskOrder - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "IsRiskOrder", IsRiskOrder); - // ITapTrade::TapAPIOrderLocalInputReq::OrderSide - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderSide", OrderSide); - // ITapTrade::TapAPIOrderLocalInputReq::PositionEffect - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "PositionEffect", PositionEffect); - // ITapTrade::TapAPIOrderLocalInputReq::PositionEffect2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "PositionEffect2", PositionEffect2); - // ITapTrade::TapAPIOrderLocalInputReq::InquiryNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "InquiryNo", InquiryNo); - // ITapTrade::TapAPIOrderLocalInputReq::HedgeFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "HedgeFlag", HedgeFlag); - // ITapTrade::TapAPIOrderLocalInputReq::OrderPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderPrice", OrderPrice); - // ITapTrade::TapAPIOrderLocalInputReq::OrderPrice2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderPrice2", OrderPrice2); - // ITapTrade::TapAPIOrderLocalInputReq::StopPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "StopPrice", StopPrice); - // ITapTrade::TapAPIOrderLocalInputReq::OrderQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderQty", OrderQty); - // ITapTrade::TapAPIOrderLocalInputReq::OrderMinQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderMinQty", OrderMinQty); - // ITapTrade::TapAPIOrderLocalInputReq::OrderSystemNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderSystemNo", OrderSystemNo); - // ITapTrade::TapAPIOrderLocalInputReq::OrderExchangeSystemNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderExchangeSystemNo", OrderExchangeSystemNo); - // ITapTrade::TapAPIOrderLocalInputReq::UpperNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "UpperNo", UpperNo); - // ITapTrade::TapAPIOrderLocalInputReq::OrderMatchPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderMatchPrice", OrderMatchPrice); - // ITapTrade::TapAPIOrderLocalInputReq::OrderMatchPrice2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderMatchPrice2", OrderMatchPrice2); - // ITapTrade::TapAPIOrderLocalInputReq::OrderMatchQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderMatchQty", OrderMatchQty); - // ITapTrade::TapAPIOrderLocalInputReq::OrderMatchQty2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderMatchQty2", OrderMatchQty2); - // ITapTrade::TapAPIOrderLocalInputReq::OrderState - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalInputReq, "OrderState", OrderState); - // ITapTrade::TapAPIOrderLocalInputReq::IsAddOne - 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); -} -void generate_class_ITapTrade_TapAPIOrderLocalModifyReq(pybind11::object & parent) -{ - // ITapTrade::TapAPIOrderLocalModifyReq - pybind11::class_ c(parent, "TapAPIOrderLocalModifyReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIOrderLocalModifyReq::req - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalModifyReq, "req", req); - // ITapTrade::TapAPIOrderLocalModifyReq::ServerFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalModifyReq, "ServerFlag", ServerFlag); - // ITapTrade::TapAPIOrderLocalModifyReq::OrderNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalModifyReq, "OrderNo", OrderNo); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIOrderLocalModifyReq, c); - module_vntap::objects.emplace("ITapTrade::TapAPIOrderLocalModifyReq", c); -} -void generate_class_ITapTrade_TapAPIOrderLocalTransferReq(pybind11::object & parent) -{ - // ITapTrade::TapAPIOrderLocalTransferReq - pybind11::class_ c(parent, "TapAPIOrderLocalTransferReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIOrderLocalTransferReq::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalTransferReq, "AccountNo", AccountNo); - // ITapTrade::TapAPIOrderLocalTransferReq::ServerFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalTransferReq, "ServerFlag", ServerFlag); - // ITapTrade::TapAPIOrderLocalTransferReq::OrderNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIOrderLocalTransferReq, "OrderNo", OrderNo); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIOrderLocalTransferReq, c); - module_vntap::objects.emplace("ITapTrade::TapAPIOrderLocalTransferReq", c); -} -void generate_class_ITapTrade_TapAPIFillLocalInputReq(pybind11::object & parent) -{ - // ITapTrade::TapAPIFillLocalInputReq - pybind11::class_ c(parent, "TapAPIFillLocalInputReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIFillLocalInputReq::AccountNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillLocalInputReq, "AccountNo", AccountNo); - // ITapTrade::TapAPIFillLocalInputReq::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillLocalInputReq, "ExchangeNo", ExchangeNo); - // ITapTrade::TapAPIFillLocalInputReq::CommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillLocalInputReq, "CommodityType", CommodityType); - // ITapTrade::TapAPIFillLocalInputReq::CommodityNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillLocalInputReq, "CommodityNo", CommodityNo); - // ITapTrade::TapAPIFillLocalInputReq::ContractNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillLocalInputReq, "ContractNo", ContractNo); - // ITapTrade::TapAPIFillLocalInputReq::StrikePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillLocalInputReq, "StrikePrice", StrikePrice); - // ITapTrade::TapAPIFillLocalInputReq::CallOrPutFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillLocalInputReq, "CallOrPutFlag", CallOrPutFlag); - // ITapTrade::TapAPIFillLocalInputReq::MatchSide - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillLocalInputReq, "MatchSide", MatchSide); - // ITapTrade::TapAPIFillLocalInputReq::PositionEffect - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillLocalInputReq, "PositionEffect", PositionEffect); - // ITapTrade::TapAPIFillLocalInputReq::HedgeFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillLocalInputReq, "HedgeFlag", HedgeFlag); - // ITapTrade::TapAPIFillLocalInputReq::MatchPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillLocalInputReq, "MatchPrice", MatchPrice); - // ITapTrade::TapAPIFillLocalInputReq::MatchQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillLocalInputReq, "MatchQty", MatchQty); - // ITapTrade::TapAPIFillLocalInputReq::OrderSystemNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillLocalInputReq, "OrderSystemNo", OrderSystemNo); - // ITapTrade::TapAPIFillLocalInputReq::UpperMatchNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillLocalInputReq, "UpperMatchNo", UpperMatchNo); - // ITapTrade::TapAPIFillLocalInputReq::MatchDateTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillLocalInputReq, "MatchDateTime", MatchDateTime); - // ITapTrade::TapAPIFillLocalInputReq::UpperMatchDateTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillLocalInputReq, "UpperMatchDateTime", UpperMatchDateTime); - // ITapTrade::TapAPIFillLocalInputReq::UpperNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillLocalInputReq, "UpperNo", UpperNo); - // ITapTrade::TapAPIFillLocalInputReq::IsAddOne - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillLocalInputReq, "IsAddOne", IsAddOne); - // ITapTrade::TapAPIFillLocalInputReq::FeeCurrencyGroup - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillLocalInputReq, "FeeCurrencyGroup", FeeCurrencyGroup); - // ITapTrade::TapAPIFillLocalInputReq::FeeCurrency - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillLocalInputReq, "FeeCurrency", FeeCurrency); - // ITapTrade::TapAPIFillLocalInputReq::FeeValue - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillLocalInputReq, "FeeValue", FeeValue); - // ITapTrade::TapAPIFillLocalInputReq::IsManualFee - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillLocalInputReq, "IsManualFee", IsManualFee); - // ITapTrade::TapAPIFillLocalInputReq::ClosePositionPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillLocalInputReq, "ClosePositionPrice", ClosePositionPrice); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIFillLocalInputReq, c); - module_vntap::objects.emplace("ITapTrade::TapAPIFillLocalInputReq", c); -} -void generate_class_ITapTrade_TapAPIFillLocalRemoveReq(pybind11::object & parent) -{ - // ITapTrade::TapAPIFillLocalRemoveReq - pybind11::class_ c(parent, "TapAPIFillLocalRemoveReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPIFillLocalRemoveReq::ServerFlag - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillLocalRemoveReq, "ServerFlag", ServerFlag); - // ITapTrade::TapAPIFillLocalRemoveReq::MatchNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPIFillLocalRemoveReq, "MatchNo", MatchNo); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPIFillLocalRemoveReq, c); - module_vntap::objects.emplace("ITapTrade::TapAPIFillLocalRemoveReq", c); -} -void generate_class_ITapTrade_TapAPITradingCalendarQryRsp(pybind11::object & parent) -{ - // ITapTrade::TapAPITradingCalendarQryRsp - pybind11::class_ c(parent, "TapAPITradingCalendarQryRsp"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::TapAPITradingCalendarQryRsp::CurrTradeDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradingCalendarQryRsp, "CurrTradeDate", CurrTradeDate); - // ITapTrade::TapAPITradingCalendarQryRsp::LastSettlementDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradingCalendarQryRsp, "LastSettlementDate", LastSettlementDate); - // ITapTrade::TapAPITradingCalendarQryRsp::PromptDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradingCalendarQryRsp, "PromptDate", PromptDate); - // ITapTrade::TapAPITradingCalendarQryRsp::LastPromptDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, ITapTrade::TapAPITradingCalendarQryRsp, "LastPromptDate", LastPromptDate); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::TapAPITradingCalendarQryRsp, c); - module_vntap::objects.emplace("ITapTrade::TapAPITradingCalendarQryRsp", c); -} diff --git a/vnpy/api/tap/vntap/generated_files/generated_functions_5.cpp b/vnpy/api/tap/vntap/generated_files/generated_functions_5.cpp deleted file mode 100644 index 605483c730..0000000000 --- a/vnpy/api/tap/vntap/generated_files/generated_functions_5.cpp +++ /dev/null @@ -1,329 +0,0 @@ -#include "config.h" - -#include -#include -#include -#include -#include -#include - -#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_ITapTrade_ITapTradeAPINotify(pybind11::object & parent) -{ - // ITapTrade::ITapTradeAPINotify - pybind11::class_ c(parent, "ITapTradeAPINotify"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::ITapTradeAPINotify::OnConnect - c.def("OnConnect", - &ITapTrade::ITapTradeAPINotify::OnConnect, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspLogin - c.def("OnRspLogin", - &ITapTrade::ITapTradeAPINotify::OnRspLogin, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRtnContactInfo - c.def("OnRtnContactInfo", - &ITapTrade::ITapTradeAPINotify::OnRtnContactInfo, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspRequestVertificateCode - c.def("OnRspRequestVertificateCode", - &ITapTrade::ITapTradeAPINotify::OnRspRequestVertificateCode, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnExpriationDate - c.def("OnExpriationDate", - &ITapTrade::ITapTradeAPINotify::OnExpriationDate, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnAPIReady - c.def("OnAPIReady", - &ITapTrade::ITapTradeAPINotify::OnAPIReady, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnDisconnect - c.def("OnDisconnect", - &ITapTrade::ITapTradeAPINotify::OnDisconnect, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspChangePassword - c.def("OnRspChangePassword", - &ITapTrade::ITapTradeAPINotify::OnRspChangePassword, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspAuthPassword - c.def("OnRspAuthPassword", - &ITapTrade::ITapTradeAPINotify::OnRspAuthPassword, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspQryTradingDate - c.def("OnRspQryTradingDate", - &ITapTrade::ITapTradeAPINotify::OnRspQryTradingDate, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspSetReservedInfo - c.def("OnRspSetReservedInfo", - &ITapTrade::ITapTradeAPINotify::OnRspSetReservedInfo, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspQryAccount - c.def("OnRspQryAccount", - &ITapTrade::ITapTradeAPINotify::OnRspQryAccount, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspQryFund - c.def("OnRspQryFund", - &ITapTrade::ITapTradeAPINotify::OnRspQryFund, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRtnFund - c.def("OnRtnFund", - &ITapTrade::ITapTradeAPINotify::OnRtnFund, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspQryExchange - c.def("OnRspQryExchange", - &ITapTrade::ITapTradeAPINotify::OnRspQryExchange, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspQryCommodity - c.def("OnRspQryCommodity", - &ITapTrade::ITapTradeAPINotify::OnRspQryCommodity, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspQryContract - c.def("OnRspQryContract", - &ITapTrade::ITapTradeAPINotify::OnRspQryContract, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRtnContract - c.def("OnRtnContract", - &ITapTrade::ITapTradeAPINotify::OnRtnContract, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspOrderAction - c.def("OnRspOrderAction", - &ITapTrade::ITapTradeAPINotify::OnRspOrderAction, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRtnOrder - c.def("OnRtnOrder", - &ITapTrade::ITapTradeAPINotify::OnRtnOrder, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspQryOrder - c.def("OnRspQryOrder", - &ITapTrade::ITapTradeAPINotify::OnRspQryOrder, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspQryOrderProcess - c.def("OnRspQryOrderProcess", - &ITapTrade::ITapTradeAPINotify::OnRspQryOrderProcess, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspQryFill - c.def("OnRspQryFill", - &ITapTrade::ITapTradeAPINotify::OnRspQryFill, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRtnFill - c.def("OnRtnFill", - &ITapTrade::ITapTradeAPINotify::OnRtnFill, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspQryPosition - c.def("OnRspQryPosition", - &ITapTrade::ITapTradeAPINotify::OnRspQryPosition, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRtnPosition - c.def("OnRtnPosition", - &ITapTrade::ITapTradeAPINotify::OnRtnPosition, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspQryPositionSummary - c.def("OnRspQryPositionSummary", - &ITapTrade::ITapTradeAPINotify::OnRspQryPositionSummary, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRtnPositionSummary - c.def("OnRtnPositionSummary", - &ITapTrade::ITapTradeAPINotify::OnRtnPositionSummary, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRtnPositionProfit - c.def("OnRtnPositionProfit", - &ITapTrade::ITapTradeAPINotify::OnRtnPositionProfit, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspQryCurrency - c.def("OnRspQryCurrency", - &ITapTrade::ITapTradeAPINotify::OnRspQryCurrency, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspQryTradeMessage - c.def("OnRspQryTradeMessage", - &ITapTrade::ITapTradeAPINotify::OnRspQryTradeMessage, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRtnTradeMessage - c.def("OnRtnTradeMessage", - &ITapTrade::ITapTradeAPINotify::OnRtnTradeMessage, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspQryHisOrder - c.def("OnRspQryHisOrder", - &ITapTrade::ITapTradeAPINotify::OnRspQryHisOrder, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspQryHisOrderProcess - c.def("OnRspQryHisOrderProcess", - &ITapTrade::ITapTradeAPINotify::OnRspQryHisOrderProcess, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspQryHisMatch - c.def("OnRspQryHisMatch", - &ITapTrade::ITapTradeAPINotify::OnRspQryHisMatch, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspQryHisPosition - c.def("OnRspQryHisPosition", - &ITapTrade::ITapTradeAPINotify::OnRspQryHisPosition, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspQryHisDelivery - c.def("OnRspQryHisDelivery", - &ITapTrade::ITapTradeAPINotify::OnRspQryHisDelivery, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspQryAccountCashAdjust - c.def("OnRspQryAccountCashAdjust", - &ITapTrade::ITapTradeAPINotify::OnRspQryAccountCashAdjust, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspQryBill - c.def("OnRspQryBill", - &ITapTrade::ITapTradeAPINotify::OnRspQryBill, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspQryAccountFeeRent - c.def("OnRspQryAccountFeeRent", - &ITapTrade::ITapTradeAPINotify::OnRspQryAccountFeeRent, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspQryAccountMarginRent - c.def("OnRspQryAccountMarginRent", - &ITapTrade::ITapTradeAPINotify::OnRspQryAccountMarginRent, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspHKMarketOrderInsert - c.def("OnRspHKMarketOrderInsert", - &ITapTrade::ITapTradeAPINotify::OnRspHKMarketOrderInsert, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspHKMarketOrderDelete - c.def("OnRspHKMarketOrderDelete", - &ITapTrade::ITapTradeAPINotify::OnRspHKMarketOrderDelete, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnHKMarketQuoteNotice - c.def("OnHKMarketQuoteNotice", - &ITapTrade::ITapTradeAPINotify::OnHKMarketQuoteNotice, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspOrderLocalRemove - c.def("OnRspOrderLocalRemove", - &ITapTrade::ITapTradeAPINotify::OnRspOrderLocalRemove, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspOrderLocalInput - c.def("OnRspOrderLocalInput", - &ITapTrade::ITapTradeAPINotify::OnRspOrderLocalInput, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspOrderLocalModify - c.def("OnRspOrderLocalModify", - &ITapTrade::ITapTradeAPINotify::OnRspOrderLocalModify, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspOrderLocalTransfer - c.def("OnRspOrderLocalTransfer", - &ITapTrade::ITapTradeAPINotify::OnRspOrderLocalTransfer, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspFillLocalInput - c.def("OnRspFillLocalInput", - &ITapTrade::ITapTradeAPINotify::OnRspFillLocalInput, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPINotify::OnRspFillLocalRemove - c.def("OnRspFillLocalRemove", - &ITapTrade::ITapTradeAPINotify::OnRspFillLocalRemove, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::ITapTradeAPINotify, c); - module_vntap::objects.emplace("ITapTrade::ITapTradeAPINotify", c); -} diff --git a/vnpy/api/tap/vntap/generated_files/generated_functions_6.cpp b/vnpy/api/tap/vntap/generated_files/generated_functions_6.cpp deleted file mode 100644 index 0d7ceddfcc..0000000000 --- a/vnpy/api/tap/vntap/generated_files/generated_functions_6.cpp +++ /dev/null @@ -1,495 +0,0 @@ -#include "config.h" - -#include -#include -#include -#include -#include -#include - -#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_ITapTrade_ITapTradeAPI(pybind11::object & parent) -{ - // ITapTrade::ITapTradeAPI - pybind11::class_ c(parent, "ITapTradeAPI"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapTrade::ITapTradeAPI::SetAPINotify - c.def("SetAPINotify", - &ITapTrade::ITapTradeAPI::SetAPINotify, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::SetHostAddress - c.def("SetHostAddress", - &ITapTrade::ITapTradeAPI::SetHostAddress, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::Login - c.def("Login", - &ITapTrade::ITapTradeAPI::Login, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::RequestVertificateCode - c.def("RequestVertificateCode", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::RequestVertificateCode>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::SetVertificateCode - c.def("SetVertificateCode", - &ITapTrade::ITapTradeAPI::SetVertificateCode, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::Disconnect - c.def("Disconnect", - &ITapTrade::ITapTradeAPI::Disconnect, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::ChangePassword - c.def("ChangePassword", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::ChangePassword>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::AuthPassword - c.def("AuthPassword", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::AuthPassword>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::HaveCertainRight - c.def("HaveCertainRight", - &ITapTrade::ITapTradeAPI::HaveCertainRight, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::QryTradingDate - c.def("QryTradingDate", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::QryTradingDate>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::SetReservedInfo - c.def("SetReservedInfo", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::SetReservedInfo>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::QryAccount - c.def("QryAccount", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::QryAccount>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::QryFund - c.def("QryFund", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::QryFund>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::QryExchange - c.def("QryExchange", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::QryExchange>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::QryCommodity - c.def("QryCommodity", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::QryCommodity>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::QryContract - c.def("QryContract", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::QryContract>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::InsertOrder - c.def("InsertOrder", - c2py::apply_function_transform< - c2py::function_constant<&ITapTrade::ITapTradeAPI::InsertOrder>, - brigand::list< - c2py::indexed_transform_holder, - c2py::indexed_transform_holder - > - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::CancelOrder - c.def("CancelOrder", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::CancelOrder>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::AmendOrder - c.def("AmendOrder", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::AmendOrder>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::ActivateOrder - c.def("ActivateOrder", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::ActivateOrder>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::QryOrder - c.def("QryOrder", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::QryOrder>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::QryOrderProcess - c.def("QryOrderProcess", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::QryOrderProcess>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::QryFill - c.def("QryFill", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::QryFill>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::QryPosition - c.def("QryPosition", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::QryPosition>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::QryPositionSummary - c.def("QryPositionSummary", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::QryPositionSummary>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::QryCurrency - c.def("QryCurrency", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::QryCurrency>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::QryAccountCashAdjust - c.def("QryAccountCashAdjust", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::QryAccountCashAdjust>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::QryTradeMessage - c.def("QryTradeMessage", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::QryTradeMessage>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::QryBill - c.def("QryBill", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::QryBill>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::QryHisOrder - c.def("QryHisOrder", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::QryHisOrder>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::QryHisOrderProcess - c.def("QryHisOrderProcess", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::QryHisOrderProcess>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::QryHisMatch - c.def("QryHisMatch", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::QryHisMatch>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::QryHisPosition - c.def("QryHisPosition", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::QryHisPosition>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::QryHisDelivery - c.def("QryHisDelivery", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::QryHisDelivery>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::QryAccountFeeRent - c.def("QryAccountFeeRent", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::QryAccountFeeRent>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::QryAccountMarginRent - c.def("QryAccountMarginRent", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::QryAccountMarginRent>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::InsertHKMarketOrder - c.def("InsertHKMarketOrder", - c2py::apply_function_transform< - c2py::function_constant<&ITapTrade::ITapTradeAPI::InsertHKMarketOrder>, - brigand::list< - c2py::indexed_transform_holder, - c2py::indexed_transform_holder, - c2py::indexed_transform_holder - > - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::CancelHKMarketOrder - c.def("CancelHKMarketOrder", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::CancelHKMarketOrder>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::OrderLocalRemove - c.def("OrderLocalRemove", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::OrderLocalRemove>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::OrderLocalInput - c.def("OrderLocalInput", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::OrderLocalInput>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::OrderLocalModify - c.def("OrderLocalModify", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::OrderLocalModify>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::OrderLocalTransfer - c.def("OrderLocalTransfer", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::OrderLocalTransfer>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::FillLocalInput - c.def("FillLocalInput", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::FillLocalInput>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapTrade::ITapTradeAPI::FillLocalRemove - c.def("FillLocalRemove", - c2py::output_argument_transform < - c2py::function_constant<&ITapTrade::ITapTradeAPI::FillLocalRemove>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapTrade::ITapTradeAPI, c); - module_vntap::objects.emplace("ITapTrade::ITapTradeAPI", c); -} -void generate_ITapTrade_classes(pybind11::module & parent) -{ - generate_class_ITapTrade_TapAPIApplicationInfo(parent); - generate_class_ITapTrade_TapAPICommodity(parent); - generate_class_ITapTrade_TapAPIContract(parent); - generate_class_ITapTrade_TapAPIExchangeInfo(parent); - generate_class_ITapTrade_TapAPIChangePasswordReq(parent); - generate_class_ITapTrade_TapAPIAuthPasswordReq(parent); - generate_class_ITapTrade_TapAPITradeLoginAuth(parent); - generate_class_ITapTrade_TapAPITradeLoginRspInfo(parent); - generate_class_ITapTrade_TapAPIRequestVertificateCodeRsp(parent); - generate_class_ITapTrade_TapAPIAccQryReq(parent); - generate_class_ITapTrade_TapAPIAccountInfo(parent); - generate_class_ITapTrade_TapAPINewOrder(parent); - generate_class_ITapTrade_TapAPIOrderInfo(parent); - generate_class_ITapTrade_TapAPIOrderInfoNotice(parent); - generate_class_ITapTrade_TapAPIOrderActionRsp(parent); - generate_class_ITapTrade_TapAPIAmendOrder(parent); - generate_class_ITapTrade_TapAPIOrderCancelReq(parent); - generate_class_ITapTrade_TapAPIOrderQryReq(parent); - generate_class_ITapTrade_TapAPIOrderProcessQryReq(parent); - generate_class_ITapTrade_TapAPIFillQryReq(parent); - generate_class_ITapTrade_TapAPIFillInfo(parent); - generate_class_ITapTrade_TapAPICloseQryReq(parent); - generate_class_ITapTrade_TapAPICloseInfo(parent); - generate_class_ITapTrade_TapAPIPositionQryReq(parent); - generate_class_ITapTrade_TapAPIPositionInfo(parent); - generate_class_ITapTrade_TapAPIPositionProfit(parent); - generate_class_ITapTrade_TapAPIPositionProfitNotice(parent); - generate_class_ITapTrade_TapAPIPositionSummary(parent); - generate_class_ITapTrade_TapAPIFundReq(parent); - generate_class_ITapTrade_TapAPIFundData(parent); - generate_class_ITapTrade_TapAPICommodityInfo(parent); - generate_class_ITapTrade_TapAPITradeContractInfo(parent); - generate_class_ITapTrade_TapAPICurrencyInfo(parent); - generate_class_ITapTrade_TapAPITradeMessageReq(parent); - generate_class_ITapTrade_TapAPITradeMessage(parent); - generate_class_ITapTrade_TapAPIBillQryReq(parent); - generate_class_ITapTrade_TapAPIBillQryRsp(parent); - generate_class_ITapTrade_TapAPIHisOrderQryReq(parent); - generate_class_ITapTrade_TapAPIHisOrderQryRsp(parent); - generate_class_ITapTrade_TapAPIHisMatchQryReq(parent); - generate_class_ITapTrade_TapAPIHisMatchQryRsp(parent); - generate_class_ITapTrade_TapAPIHisOrderProcessQryReq(parent); - generate_class_ITapTrade_TapAPIHisPositionQryReq(parent); - generate_class_ITapTrade_TapAPIHisPositionQryRsp(parent); - generate_class_ITapTrade_TapAPIHisDeliveryQryReq(parent); - generate_class_ITapTrade_TapAPIHisDeliveryQryRsp(parent); - generate_class_ITapTrade_TapAPIAccountCashAdjustQryReq(parent); - generate_class_ITapTrade_TapAPIAccountCashAdjustQryRsp(parent); - generate_class_ITapTrade_TapAPIAccountFeeRentQryReq(parent); - generate_class_ITapTrade_TapAPIAccountFeeRentQryRsp(parent); - generate_class_ITapTrade_TapAPIAccountMarginRentQryReq(parent); - generate_class_ITapTrade_TapAPIAccountMarginRentQryRsp(parent); - generate_class_ITapTrade_TapAPIOrderQuoteMarketNotice(parent); - generate_class_ITapTrade_TapAPIOrderMarketInsertReq(parent); - generate_class_ITapTrade_TapAPIOrderMarketInsertRsp(parent); - generate_class_ITapTrade_TapAPIOrderMarketDeleteReq(parent); - generate_class_ITapTrade_TapAPIOrderLocalRemoveReq(parent); - generate_class_ITapTrade_TapAPIOrderLocalRemoveRsp(parent); - generate_class_ITapTrade_TapAPIOrderLocalInputReq(parent); - generate_class_ITapTrade_TapAPIOrderLocalModifyReq(parent); - generate_class_ITapTrade_TapAPIOrderLocalTransferReq(parent); - generate_class_ITapTrade_TapAPIFillLocalInputReq(parent); - generate_class_ITapTrade_TapAPIFillLocalRemoveReq(parent); - generate_class_ITapTrade_TapAPITradingCalendarQryRsp(parent); - generate_class_ITapTrade_ITapTradeAPINotify(parent); - generate_class_ITapTrade_ITapTradeAPI(parent); -} -void generate_ITapTrade_enums(pybind11::module & parent) -{ - -} -void generate_ITapTrade_functions_0(pybind11::module & parent) -{ - -} -void generate_ITapTrade_functions(pybind11::module & parent) -{ - generate_ITapTrade_functions_0(parent); -} diff --git a/vnpy/api/tap/vntap/generated_files/generated_functions_7.cpp b/vnpy/api/tap/vntap/generated_files/generated_functions_7.cpp deleted file mode 100644 index 7efd26c2f3..0000000000 --- a/vnpy/api/tap/vntap/generated_files/generated_functions_7.cpp +++ /dev/null @@ -1,909 +0,0 @@ -#include "config.h" - -#include -#include -#include -#include -#include -#include - -#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_ITapTrade_variables(pybind11::module & parent) -{ - // ITapTrade::APIYNFLAG_YES - parent.attr("APIYNFLAG_YES") = ITapTrade::APIYNFLAG_YES; - // ITapTrade::APIYNFLAG_NO - parent.attr("APIYNFLAG_NO") = ITapTrade::APIYNFLAG_NO; - // ITapTrade::APIPASSWORD_TRADE - parent.attr("APIPASSWORD_TRADE") = ITapTrade::APIPASSWORD_TRADE; - // ITapTrade::APIPASSWORD_PHONE - parent.attr("APIPASSWORD_PHONE") = ITapTrade::APIPASSWORD_PHONE; - // ITapTrade::APILOGLEVEL_NONE - parent.attr("APILOGLEVEL_NONE") = ITapTrade::APILOGLEVEL_NONE; - // ITapTrade::APILOGLEVEL_ERROR - parent.attr("APILOGLEVEL_ERROR") = ITapTrade::APILOGLEVEL_ERROR; - // ITapTrade::APILOGLEVEL_WARNING - parent.attr("APILOGLEVEL_WARNING") = ITapTrade::APILOGLEVEL_WARNING; - // ITapTrade::APILOGLEVEL_DEBUG - parent.attr("APILOGLEVEL_DEBUG") = ITapTrade::APILOGLEVEL_DEBUG; - // ITapTrade::TAPI_OPTION_TYPE_AMERICAN - parent.attr("TAPI_OPTION_TYPE_AMERICAN") = ITapTrade::TAPI_OPTION_TYPE_AMERICAN; - // ITapTrade::TAPI_OPTION_TYPE_AMERICAN2 - parent.attr("TAPI_OPTION_TYPE_AMERICAN2") = ITapTrade::TAPI_OPTION_TYPE_AMERICAN2; - // ITapTrade::TAPI_OPTION_TYPE_EUROPEAN - parent.attr("TAPI_OPTION_TYPE_EUROPEAN") = ITapTrade::TAPI_OPTION_TYPE_EUROPEAN; - // ITapTrade::TAPI_OPTION_TYPE_EUROPEAN2 - parent.attr("TAPI_OPTION_TYPE_EUROPEAN2") = ITapTrade::TAPI_OPTION_TYPE_EUROPEAN2; - // ITapTrade::TAPI_COMMODITY_TYPE_NONE - parent.attr("TAPI_COMMODITY_TYPE_NONE") = ITapTrade::TAPI_COMMODITY_TYPE_NONE; - // ITapTrade::TAPI_COMMODITY_TYPE_SPOT - parent.attr("TAPI_COMMODITY_TYPE_SPOT") = ITapTrade::TAPI_COMMODITY_TYPE_SPOT; - // ITapTrade::TAPI_COMMODITY_TYPE_FUTURES - parent.attr("TAPI_COMMODITY_TYPE_FUTURES") = ITapTrade::TAPI_COMMODITY_TYPE_FUTURES; - // ITapTrade::TAPI_COMMODITY_TYPE_OPTION - parent.attr("TAPI_COMMODITY_TYPE_OPTION") = ITapTrade::TAPI_COMMODITY_TYPE_OPTION; - // ITapTrade::TAPI_COMMODITY_TYPE_SPREAD_MONTH - parent.attr("TAPI_COMMODITY_TYPE_SPREAD_MONTH") = ITapTrade::TAPI_COMMODITY_TYPE_SPREAD_MONTH; - // ITapTrade::TAPI_COMMODITY_TYPE_SPREAD_COMMODITY - parent.attr("TAPI_COMMODITY_TYPE_SPREAD_COMMODITY") = ITapTrade::TAPI_COMMODITY_TYPE_SPREAD_COMMODITY; - // ITapTrade::TAPI_COMMODITY_TYPE_BUL - parent.attr("TAPI_COMMODITY_TYPE_BUL") = ITapTrade::TAPI_COMMODITY_TYPE_BUL; - // ITapTrade::TAPI_COMMODITY_TYPE_BER - parent.attr("TAPI_COMMODITY_TYPE_BER") = ITapTrade::TAPI_COMMODITY_TYPE_BER; - // ITapTrade::TAPI_COMMODITY_TYPE_STD - parent.attr("TAPI_COMMODITY_TYPE_STD") = ITapTrade::TAPI_COMMODITY_TYPE_STD; - // ITapTrade::TAPI_COMMODITY_TYPE_STG - parent.attr("TAPI_COMMODITY_TYPE_STG") = ITapTrade::TAPI_COMMODITY_TYPE_STG; - // ITapTrade::TAPI_COMMODITY_TYPE_PRT - parent.attr("TAPI_COMMODITY_TYPE_PRT") = ITapTrade::TAPI_COMMODITY_TYPE_PRT; - // ITapTrade::TAPI_COMMODITY_TYPE_DIRECTFOREX - parent.attr("TAPI_COMMODITY_TYPE_DIRECTFOREX") = ITapTrade::TAPI_COMMODITY_TYPE_DIRECTFOREX; - // ITapTrade::TAPI_COMMODITY_TYPE_INDIRECTFOREX - parent.attr("TAPI_COMMODITY_TYPE_INDIRECTFOREX") = ITapTrade::TAPI_COMMODITY_TYPE_INDIRECTFOREX; - // ITapTrade::TAPI_COMMODITY_TYPE_CROSSFOREX - parent.attr("TAPI_COMMODITY_TYPE_CROSSFOREX") = ITapTrade::TAPI_COMMODITY_TYPE_CROSSFOREX; - // ITapTrade::TAPI_COMMODITY_TYPE_INDEX - parent.attr("TAPI_COMMODITY_TYPE_INDEX") = ITapTrade::TAPI_COMMODITY_TYPE_INDEX; - // ITapTrade::TAPI_COMMODITY_TYPE_STOCK - parent.attr("TAPI_COMMODITY_TYPE_STOCK") = ITapTrade::TAPI_COMMODITY_TYPE_STOCK; - // ITapTrade::TAPI_CALLPUT_FLAG_CALL - parent.attr("TAPI_CALLPUT_FLAG_CALL") = ITapTrade::TAPI_CALLPUT_FLAG_CALL; - // ITapTrade::TAPI_CALLPUT_FLAG_PUT - parent.attr("TAPI_CALLPUT_FLAG_PUT") = ITapTrade::TAPI_CALLPUT_FLAG_PUT; - // ITapTrade::TAPI_CALLPUT_FLAG_NONE - parent.attr("TAPI_CALLPUT_FLAG_NONE") = ITapTrade::TAPI_CALLPUT_FLAG_NONE; - // ITapTrade::TAPI_ACCOUNT_TYPE_PERSON - parent.attr("TAPI_ACCOUNT_TYPE_PERSON") = ITapTrade::TAPI_ACCOUNT_TYPE_PERSON; - // ITapTrade::TAPI_ACCOUNT_TYPE_ORGANIZATION - parent.attr("TAPI_ACCOUNT_TYPE_ORGANIZATION") = ITapTrade::TAPI_ACCOUNT_TYPE_ORGANIZATION; - // ITapTrade::TAPI_ACCOUNT_TYPE_AGENT - parent.attr("TAPI_ACCOUNT_TYPE_AGENT") = ITapTrade::TAPI_ACCOUNT_TYPE_AGENT; - // ITapTrade::TAPI_ACCOUNT_TYPE_MARGIN - parent.attr("TAPI_ACCOUNT_TYPE_MARGIN") = ITapTrade::TAPI_ACCOUNT_TYPE_MARGIN; - // ITapTrade::TAPI_ACCOUNT_TYPE_HOUSE - parent.attr("TAPI_ACCOUNT_TYPE_HOUSE") = ITapTrade::TAPI_ACCOUNT_TYPE_HOUSE; - // ITapTrade::TAPI_ACCOUNT_TYPE_STOCK - parent.attr("TAPI_ACCOUNT_TYPE_STOCK") = ITapTrade::TAPI_ACCOUNT_TYPE_STOCK; - // ITapTrade::TAPI_RIGHT_ORDER_DEL - parent.attr("TAPI_RIGHT_ORDER_DEL") = ITapTrade::TAPI_RIGHT_ORDER_DEL; - // ITapTrade::TAPI_RIGHT_ORDER_CHECK - parent.attr("TAPI_RIGHT_ORDER_CHECK") = ITapTrade::TAPI_RIGHT_ORDER_CHECK; - // ITapTrade::TAPI_RIGHT_ONLY_QRY - parent.attr("TAPI_RIGHT_ONLY_QRY") = ITapTrade::TAPI_RIGHT_ONLY_QRY; - // ITapTrade::TAPI_RIGHT_ONLY_OPEN - parent.attr("TAPI_RIGHT_ONLY_OPEN") = ITapTrade::TAPI_RIGHT_ONLY_OPEN; - // ITapTrade::TAPI_USERTYPE_CLIENT - parent.attr("TAPI_USERTYPE_CLIENT") = ITapTrade::TAPI_USERTYPE_CLIENT; - // ITapTrade::TAPI_USERTYPE_BROKER - parent.attr("TAPI_USERTYPE_BROKER") = ITapTrade::TAPI_USERTYPE_BROKER; - // ITapTrade::TAPI_USERTYPE_TRADER - parent.attr("TAPI_USERTYPE_TRADER") = ITapTrade::TAPI_USERTYPE_TRADER; - // ITapTrade::TAPI_USERTYPE_RISK - parent.attr("TAPI_USERTYPE_RISK") = ITapTrade::TAPI_USERTYPE_RISK; - // ITapTrade::TAPI_USERTYPE_MANAGER - parent.attr("TAPI_USERTYPE_MANAGER") = ITapTrade::TAPI_USERTYPE_MANAGER; - // ITapTrade::TAPI_USERTYPE_QUOTE - parent.attr("TAPI_USERTYPE_QUOTE") = ITapTrade::TAPI_USERTYPE_QUOTE; - // ITapTrade::TAPI_ACCOUNT_STATE_NORMAL - parent.attr("TAPI_ACCOUNT_STATE_NORMAL") = ITapTrade::TAPI_ACCOUNT_STATE_NORMAL; - // ITapTrade::TAPI_ACCOUNT_STATE_CANCEL - parent.attr("TAPI_ACCOUNT_STATE_CANCEL") = ITapTrade::TAPI_ACCOUNT_STATE_CANCEL; - // ITapTrade::TAPI_ACCOUNT_STATE_SLEEP - parent.attr("TAPI_ACCOUNT_STATE_SLEEP") = ITapTrade::TAPI_ACCOUNT_STATE_SLEEP; - // ITapTrade::TAPI_ACCOUNT_TRADING_RIGHT_NORMAL - parent.attr("TAPI_ACCOUNT_TRADING_RIGHT_NORMAL") = ITapTrade::TAPI_ACCOUNT_TRADING_RIGHT_NORMAL; - // ITapTrade::TAPI_ACCOUNT_TRADING_RIGHT_NOTRADE - parent.attr("TAPI_ACCOUNT_TRADING_RIGHT_NOTRADE") = ITapTrade::TAPI_ACCOUNT_TRADING_RIGHT_NOTRADE; - // ITapTrade::TAPI_ACCOUNT_TRADING_RIGHT_CLOSE - parent.attr("TAPI_ACCOUNT_TRADING_RIGHT_CLOSE") = ITapTrade::TAPI_ACCOUNT_TRADING_RIGHT_CLOSE; - // ITapTrade::TAPI_ORDER_TYPE_MARKET - parent.attr("TAPI_ORDER_TYPE_MARKET") = ITapTrade::TAPI_ORDER_TYPE_MARKET; - // ITapTrade::TAPI_ORDER_TYPE_LIMIT - parent.attr("TAPI_ORDER_TYPE_LIMIT") = ITapTrade::TAPI_ORDER_TYPE_LIMIT; - // ITapTrade::TAPI_ORDER_TYPE_STOP_MARKET - parent.attr("TAPI_ORDER_TYPE_STOP_MARKET") = ITapTrade::TAPI_ORDER_TYPE_STOP_MARKET; - // ITapTrade::TAPI_ORDER_TYPE_STOP_LIMIT - parent.attr("TAPI_ORDER_TYPE_STOP_LIMIT") = ITapTrade::TAPI_ORDER_TYPE_STOP_LIMIT; - // ITapTrade::TAPI_ORDER_TYPE_OPT_EXEC - parent.attr("TAPI_ORDER_TYPE_OPT_EXEC") = ITapTrade::TAPI_ORDER_TYPE_OPT_EXEC; - // ITapTrade::TAPI_ORDER_TYPE_OPT_ABANDON - parent.attr("TAPI_ORDER_TYPE_OPT_ABANDON") = ITapTrade::TAPI_ORDER_TYPE_OPT_ABANDON; - // ITapTrade::TAPI_ORDER_TYPE_REQQUOT - parent.attr("TAPI_ORDER_TYPE_REQQUOT") = ITapTrade::TAPI_ORDER_TYPE_REQQUOT; - // ITapTrade::TAPI_ORDER_TYPE_RSPQUOT - parent.attr("TAPI_ORDER_TYPE_RSPQUOT") = ITapTrade::TAPI_ORDER_TYPE_RSPQUOT; - // ITapTrade::TAPI_ORDER_TYPE_ICEBERG - parent.attr("TAPI_ORDER_TYPE_ICEBERG") = ITapTrade::TAPI_ORDER_TYPE_ICEBERG; - // ITapTrade::TAPI_ORDER_TYPE_GHOST - parent.attr("TAPI_ORDER_TYPE_GHOST") = ITapTrade::TAPI_ORDER_TYPE_GHOST; - // ITapTrade::TAPI_ORDER_TYPE_HKEX_AUCTION - parent.attr("TAPI_ORDER_TYPE_HKEX_AUCTION") = ITapTrade::TAPI_ORDER_TYPE_HKEX_AUCTION; - // ITapTrade::TAPI_ORDER_TYPE_SWAP - parent.attr("TAPI_ORDER_TYPE_SWAP") = ITapTrade::TAPI_ORDER_TYPE_SWAP; - // ITapTrade::TAPI_ORDER_SOURCE_SELF_ETRADER - parent.attr("TAPI_ORDER_SOURCE_SELF_ETRADER") = ITapTrade::TAPI_ORDER_SOURCE_SELF_ETRADER; - // ITapTrade::TAPI_ORDER_SOURCE_PROXY_ETRADER - parent.attr("TAPI_ORDER_SOURCE_PROXY_ETRADER") = ITapTrade::TAPI_ORDER_SOURCE_PROXY_ETRADER; - // ITapTrade::TAPI_ORDER_SOURCE_JTRADER - parent.attr("TAPI_ORDER_SOURCE_JTRADER") = ITapTrade::TAPI_ORDER_SOURCE_JTRADER; - // ITapTrade::TAPI_ORDER_SOURCE_MANUAL - parent.attr("TAPI_ORDER_SOURCE_MANUAL") = ITapTrade::TAPI_ORDER_SOURCE_MANUAL; - // ITapTrade::TAPI_ORDER_SOURCE_CARRY - parent.attr("TAPI_ORDER_SOURCE_CARRY") = ITapTrade::TAPI_ORDER_SOURCE_CARRY; - // ITapTrade::TAPI_ORDER_SOURCE_PROGRAM - parent.attr("TAPI_ORDER_SOURCE_PROGRAM") = ITapTrade::TAPI_ORDER_SOURCE_PROGRAM; - // ITapTrade::TAPI_ORDER_SOURCE_DELIVERY - parent.attr("TAPI_ORDER_SOURCE_DELIVERY") = ITapTrade::TAPI_ORDER_SOURCE_DELIVERY; - // ITapTrade::TAPI_ORDER_SOURCE_ABANDON - parent.attr("TAPI_ORDER_SOURCE_ABANDON") = ITapTrade::TAPI_ORDER_SOURCE_ABANDON; - // ITapTrade::TAPI_ORDER_SOURCE_CHANNEL - parent.attr("TAPI_ORDER_SOURCE_CHANNEL") = ITapTrade::TAPI_ORDER_SOURCE_CHANNEL; - // ITapTrade::TAPI_ORDER_TIMEINFORCE_GFD - parent.attr("TAPI_ORDER_TIMEINFORCE_GFD") = ITapTrade::TAPI_ORDER_TIMEINFORCE_GFD; - // ITapTrade::TAPI_ORDER_TIMEINFORCE_GTC - parent.attr("TAPI_ORDER_TIMEINFORCE_GTC") = ITapTrade::TAPI_ORDER_TIMEINFORCE_GTC; - // ITapTrade::TAPI_ORDER_TIMEINFORCE_GTD - parent.attr("TAPI_ORDER_TIMEINFORCE_GTD") = ITapTrade::TAPI_ORDER_TIMEINFORCE_GTD; - // ITapTrade::TAPI_ORDER_TIMEINFORCE_FAK - parent.attr("TAPI_ORDER_TIMEINFORCE_FAK") = ITapTrade::TAPI_ORDER_TIMEINFORCE_FAK; - // ITapTrade::TAPI_ORDER_TIMEINFORCE_FOK - parent.attr("TAPI_ORDER_TIMEINFORCE_FOK") = ITapTrade::TAPI_ORDER_TIMEINFORCE_FOK; - // ITapTrade::TAPI_SIDE_NONE - parent.attr("TAPI_SIDE_NONE") = ITapTrade::TAPI_SIDE_NONE; - // ITapTrade::TAPI_SIDE_BUY - parent.attr("TAPI_SIDE_BUY") = ITapTrade::TAPI_SIDE_BUY; - // ITapTrade::TAPI_SIDE_SELL - parent.attr("TAPI_SIDE_SELL") = ITapTrade::TAPI_SIDE_SELL; - // ITapTrade::TAPI_PositionEffect_NONE - parent.attr("TAPI_PositionEffect_NONE") = ITapTrade::TAPI_PositionEffect_NONE; - // ITapTrade::TAPI_PositionEffect_OPEN - parent.attr("TAPI_PositionEffect_OPEN") = ITapTrade::TAPI_PositionEffect_OPEN; - // ITapTrade::TAPI_PositionEffect_COVER - parent.attr("TAPI_PositionEffect_COVER") = ITapTrade::TAPI_PositionEffect_COVER; - // ITapTrade::TAPI_PositionEffect_COVER_TODAY - parent.attr("TAPI_PositionEffect_COVER_TODAY") = ITapTrade::TAPI_PositionEffect_COVER_TODAY; - // ITapTrade::TAPI_HEDGEFLAG_NONE - parent.attr("TAPI_HEDGEFLAG_NONE") = ITapTrade::TAPI_HEDGEFLAG_NONE; - // ITapTrade::TAPI_HEDGEFLAG_T - parent.attr("TAPI_HEDGEFLAG_T") = ITapTrade::TAPI_HEDGEFLAG_T; - // ITapTrade::TAPI_HEDGEFLAG_B - parent.attr("TAPI_HEDGEFLAG_B") = ITapTrade::TAPI_HEDGEFLAG_B; - // ITapTrade::TAPI_HEDGEFLAG_L - parent.attr("TAPI_HEDGEFLAG_L") = ITapTrade::TAPI_HEDGEFLAG_L; - // ITapTrade::TAPI_ORDER_STATE_SUBMIT - parent.attr("TAPI_ORDER_STATE_SUBMIT") = ITapTrade::TAPI_ORDER_STATE_SUBMIT; - // ITapTrade::TAPI_ORDER_STATE_ACCEPT - parent.attr("TAPI_ORDER_STATE_ACCEPT") = ITapTrade::TAPI_ORDER_STATE_ACCEPT; - // ITapTrade::TAPI_ORDER_STATE_TRIGGERING - parent.attr("TAPI_ORDER_STATE_TRIGGERING") = ITapTrade::TAPI_ORDER_STATE_TRIGGERING; - // ITapTrade::TAPI_ORDER_STATE_EXCTRIGGERING - parent.attr("TAPI_ORDER_STATE_EXCTRIGGERING") = ITapTrade::TAPI_ORDER_STATE_EXCTRIGGERING; - // ITapTrade::TAPI_ORDER_STATE_QUEUED - parent.attr("TAPI_ORDER_STATE_QUEUED") = ITapTrade::TAPI_ORDER_STATE_QUEUED; - // ITapTrade::TAPI_ORDER_STATE_PARTFINISHED - parent.attr("TAPI_ORDER_STATE_PARTFINISHED") = ITapTrade::TAPI_ORDER_STATE_PARTFINISHED; - // ITapTrade::TAPI_ORDER_STATE_FINISHED - parent.attr("TAPI_ORDER_STATE_FINISHED") = ITapTrade::TAPI_ORDER_STATE_FINISHED; - // ITapTrade::TAPI_ORDER_STATE_CANCELING - parent.attr("TAPI_ORDER_STATE_CANCELING") = ITapTrade::TAPI_ORDER_STATE_CANCELING; - // ITapTrade::TAPI_ORDER_STATE_MODIFYING - parent.attr("TAPI_ORDER_STATE_MODIFYING") = ITapTrade::TAPI_ORDER_STATE_MODIFYING; - // ITapTrade::TAPI_ORDER_STATE_CANCELED - parent.attr("TAPI_ORDER_STATE_CANCELED") = ITapTrade::TAPI_ORDER_STATE_CANCELED; - // ITapTrade::TAPI_ORDER_STATE_LEFTDELETED - parent.attr("TAPI_ORDER_STATE_LEFTDELETED") = ITapTrade::TAPI_ORDER_STATE_LEFTDELETED; - // ITapTrade::TAPI_ORDER_STATE_FAIL - parent.attr("TAPI_ORDER_STATE_FAIL") = ITapTrade::TAPI_ORDER_STATE_FAIL; - // ITapTrade::TAPI_ORDER_STATE_DELETED - parent.attr("TAPI_ORDER_STATE_DELETED") = ITapTrade::TAPI_ORDER_STATE_DELETED; - // ITapTrade::TAPI_ORDER_STATE_SUPPENDED - parent.attr("TAPI_ORDER_STATE_SUPPENDED") = ITapTrade::TAPI_ORDER_STATE_SUPPENDED; - // ITapTrade::TAPI_ORDER_STATE_DELETEDFOREXPIRE - parent.attr("TAPI_ORDER_STATE_DELETEDFOREXPIRE") = ITapTrade::TAPI_ORDER_STATE_DELETEDFOREXPIRE; - // ITapTrade::TAPI_ORDER_STATE_EFFECT - parent.attr("TAPI_ORDER_STATE_EFFECT") = ITapTrade::TAPI_ORDER_STATE_EFFECT; - // ITapTrade::TAPI_ORDER_STATE_APPLY - parent.attr("TAPI_ORDER_STATE_APPLY") = ITapTrade::TAPI_ORDER_STATE_APPLY; - // ITapTrade::TAPI_CALULATE_MODE_COMBINE - parent.attr("TAPI_CALULATE_MODE_COMBINE") = ITapTrade::TAPI_CALULATE_MODE_COMBINE; - // ITapTrade::TAPI_CALCULATE_MODE_PERCENTAGE - parent.attr("TAPI_CALCULATE_MODE_PERCENTAGE") = ITapTrade::TAPI_CALCULATE_MODE_PERCENTAGE; - // ITapTrade::TAPI_CALCULATE_MODE_QUOTA - parent.attr("TAPI_CALCULATE_MODE_QUOTA") = ITapTrade::TAPI_CALCULATE_MODE_QUOTA; - // ITapTrade::TAPI_CALCULATE_MODE_CHAPERCENTAGE - parent.attr("TAPI_CALCULATE_MODE_CHAPERCENTAGE") = ITapTrade::TAPI_CALCULATE_MODE_CHAPERCENTAGE; - // ITapTrade::TAPI_CALCULATE_MODE_CHAQUOTA - parent.attr("TAPI_CALCULATE_MODE_CHAQUOTA") = ITapTrade::TAPI_CALCULATE_MODE_CHAQUOTA; - // ITapTrade::TAPI_CALCULATE_MODE_DISCOUNT - parent.attr("TAPI_CALCULATE_MODE_DISCOUNT") = ITapTrade::TAPI_CALCULATE_MODE_DISCOUNT; - // ITapTrade::TAPI_MATCH_SOURCE_ALL - parent.attr("TAPI_MATCH_SOURCE_ALL") = ITapTrade::TAPI_MATCH_SOURCE_ALL; - // ITapTrade::TAPI_MATCH_SOURCE_SELF_ETRADER - parent.attr("TAPI_MATCH_SOURCE_SELF_ETRADER") = ITapTrade::TAPI_MATCH_SOURCE_SELF_ETRADER; - // ITapTrade::TAPI_MATCH_SOURCE_PROXY_ETRADER - parent.attr("TAPI_MATCH_SOURCE_PROXY_ETRADER") = ITapTrade::TAPI_MATCH_SOURCE_PROXY_ETRADER; - // ITapTrade::TAPI_MATCH_SOURCE_JTRADER - parent.attr("TAPI_MATCH_SOURCE_JTRADER") = ITapTrade::TAPI_MATCH_SOURCE_JTRADER; - // ITapTrade::TAPI_MATCH_SOURCE_MANUAL - parent.attr("TAPI_MATCH_SOURCE_MANUAL") = ITapTrade::TAPI_MATCH_SOURCE_MANUAL; - // ITapTrade::TAPI_MATCH_SOURCE_CARRY - parent.attr("TAPI_MATCH_SOURCE_CARRY") = ITapTrade::TAPI_MATCH_SOURCE_CARRY; - // ITapTrade::TAPI_MATCH_SOURCE_PROGRAM - parent.attr("TAPI_MATCH_SOURCE_PROGRAM") = ITapTrade::TAPI_MATCH_SOURCE_PROGRAM; - // ITapTrade::TAPI_MATCH_SOURCE_DELIVERY - parent.attr("TAPI_MATCH_SOURCE_DELIVERY") = ITapTrade::TAPI_MATCH_SOURCE_DELIVERY; - // ITapTrade::TAPI_MATCH_SOURCE_ABANDON - parent.attr("TAPI_MATCH_SOURCE_ABANDON") = ITapTrade::TAPI_MATCH_SOURCE_ABANDON; - // ITapTrade::TAPI_MATCH_SOURCE_CHANNEL - parent.attr("TAPI_MATCH_SOURCE_CHANNEL") = ITapTrade::TAPI_MATCH_SOURCE_CHANNEL; - // ITapTrade::TAPI_MATCH_SOURCE_ESUNNY_API - parent.attr("TAPI_MATCH_SOURCE_ESUNNY_API") = ITapTrade::TAPI_MATCH_SOURCE_ESUNNY_API; - // ITapTrade::TAPI_CLOSE_MODE_NONE - parent.attr("TAPI_CLOSE_MODE_NONE") = ITapTrade::TAPI_CLOSE_MODE_NONE; - // ITapTrade::TAPI_CLOSE_MODE_UNFINISHED - parent.attr("TAPI_CLOSE_MODE_UNFINISHED") = ITapTrade::TAPI_CLOSE_MODE_UNFINISHED; - // ITapTrade::TAPI_CLOSE_MODE_OPENCOVER - parent.attr("TAPI_CLOSE_MODE_OPENCOVER") = ITapTrade::TAPI_CLOSE_MODE_OPENCOVER; - // ITapTrade::TAPI_CLOSE_MODE_CLOSETODAY - parent.attr("TAPI_CLOSE_MODE_CLOSETODAY") = ITapTrade::TAPI_CLOSE_MODE_CLOSETODAY; - // ITapTrade::TAPI_FUTURES_ALG_ZHUBI - parent.attr("TAPI_FUTURES_ALG_ZHUBI") = ITapTrade::TAPI_FUTURES_ALG_ZHUBI; - // ITapTrade::TAPI_FUTURES_ALG_DINGSHI - parent.attr("TAPI_FUTURES_ALG_DINGSHI") = ITapTrade::TAPI_FUTURES_ALG_DINGSHI; - // ITapTrade::TAPI_OPTION_ALG_FUTURES - parent.attr("TAPI_OPTION_ALG_FUTURES") = ITapTrade::TAPI_OPTION_ALG_FUTURES; - // ITapTrade::TAPI_OPTION_ALG_OPTION - parent.attr("TAPI_OPTION_ALG_OPTION") = ITapTrade::TAPI_OPTION_ALG_OPTION; - // ITapTrade::SENDTYPE_SMS - parent.attr("SENDTYPE_SMS") = ITapTrade::SENDTYPE_SMS; - // ITapTrade::SENDTYPE_MAIL - parent.attr("SENDTYPE_MAIL") = ITapTrade::SENDTYPE_MAIL; - // ITapTrade::TAPI_LWFlag_L - parent.attr("TAPI_LWFlag_L") = ITapTrade::TAPI_LWFlag_L; - // ITapTrade::TAPI_LWFlag_W - parent.attr("TAPI_LWFlag_W") = ITapTrade::TAPI_LWFlag_W; - // ITapTrade::TAPI_CASHINOUT_MODE_FEEADJUST - parent.attr("TAPI_CASHINOUT_MODE_FEEADJUST") = ITapTrade::TAPI_CASHINOUT_MODE_FEEADJUST; - // ITapTrade::TAPI_CASHINOUT_MODE_YKADJUST - parent.attr("TAPI_CASHINOUT_MODE_YKADJUST") = ITapTrade::TAPI_CASHINOUT_MODE_YKADJUST; - // ITapTrade::TAPI_CASHINOUT_MODE_PLEDGE - parent.attr("TAPI_CASHINOUT_MODE_PLEDGE") = ITapTrade::TAPI_CASHINOUT_MODE_PLEDGE; - // ITapTrade::TAPI_CASHINOUT_MODE_INTERESTREVENUE - parent.attr("TAPI_CASHINOUT_MODE_INTERESTREVENUE") = ITapTrade::TAPI_CASHINOUT_MODE_INTERESTREVENUE; - // ITapTrade::TAPI_CASHINOUT_MODE_COLLECTIONCOST - parent.attr("TAPI_CASHINOUT_MODE_COLLECTIONCOST") = ITapTrade::TAPI_CASHINOUT_MODE_COLLECTIONCOST; - // ITapTrade::TAPI_CASHINOUT_MODE_OTHER - parent.attr("TAPI_CASHINOUT_MODE_OTHER") = ITapTrade::TAPI_CASHINOUT_MODE_OTHER; - // ITapTrade::TAPI_CASHINOUT_MODE_COMPANY - parent.attr("TAPI_CASHINOUT_MODE_COMPANY") = ITapTrade::TAPI_CASHINOUT_MODE_COMPANY; - // ITapTrade::TAPI_DEPOSITCALCULATE_MODE_FEN - parent.attr("TAPI_DEPOSITCALCULATE_MODE_FEN") = ITapTrade::TAPI_DEPOSITCALCULATE_MODE_FEN; - // ITapTrade::TAPI_DEPOSITCALCULATE_MODE_SUO - parent.attr("TAPI_DEPOSITCALCULATE_MODE_SUO") = ITapTrade::TAPI_DEPOSITCALCULATE_MODE_SUO; - // ITapTrade::TAPI_CMB_DIRECT_FIRST - parent.attr("TAPI_CMB_DIRECT_FIRST") = ITapTrade::TAPI_CMB_DIRECT_FIRST; - // ITapTrade::TAPI_CMB_DIRECT_SECOND - parent.attr("TAPI_CMB_DIRECT_SECOND") = ITapTrade::TAPI_CMB_DIRECT_SECOND; - // ITapTrade::TAPI_DELIVERY_MODE_GOODS - parent.attr("TAPI_DELIVERY_MODE_GOODS") = ITapTrade::TAPI_DELIVERY_MODE_GOODS; - // ITapTrade::TAPI_DELIVERY_MODE_CASH - parent.attr("TAPI_DELIVERY_MODE_CASH") = ITapTrade::TAPI_DELIVERY_MODE_CASH; - // ITapTrade::TAPI_DELIVERY_MODE_EXECUTE - parent.attr("TAPI_DELIVERY_MODE_EXECUTE") = ITapTrade::TAPI_DELIVERY_MODE_EXECUTE; - // ITapTrade::TAPI_DELIVERY_MODE_ABANDON - parent.attr("TAPI_DELIVERY_MODE_ABANDON") = ITapTrade::TAPI_DELIVERY_MODE_ABANDON; - // ITapTrade::TAPI_DELIVERY_MODE_HKF - parent.attr("TAPI_DELIVERY_MODE_HKF") = ITapTrade::TAPI_DELIVERY_MODE_HKF; - // ITapTrade::TAPI_CONTRACT_TYPE_TRADEQUOTE - parent.attr("TAPI_CONTRACT_TYPE_TRADEQUOTE") = ITapTrade::TAPI_CONTRACT_TYPE_TRADEQUOTE; - // ITapTrade::TAPI_CONTRACT_TYPE_QUOTE - parent.attr("TAPI_CONTRACT_TYPE_QUOTE") = ITapTrade::TAPI_CONTRACT_TYPE_QUOTE; - // ITapTrade::TAPI_TACTICS_TYPE_NONE - parent.attr("TAPI_TACTICS_TYPE_NONE") = ITapTrade::TAPI_TACTICS_TYPE_NONE; - // ITapTrade::TAPI_TACTICS_TYPE_READY - parent.attr("TAPI_TACTICS_TYPE_READY") = ITapTrade::TAPI_TACTICS_TYPE_READY; - // ITapTrade::TAPI_TACTICS_TYPE_ATUO - parent.attr("TAPI_TACTICS_TYPE_ATUO") = ITapTrade::TAPI_TACTICS_TYPE_ATUO; - // ITapTrade::TAPI_TACTICS_TYPE_CONDITION - parent.attr("TAPI_TACTICS_TYPE_CONDITION") = ITapTrade::TAPI_TACTICS_TYPE_CONDITION; - // ITapTrade::APIORDER_INSERT - parent.attr("APIORDER_INSERT") = ITapTrade::APIORDER_INSERT; - // ITapTrade::APIORDER_MODIFY - parent.attr("APIORDER_MODIFY") = ITapTrade::APIORDER_MODIFY; - // ITapTrade::APIORDER_DELETE - parent.attr("APIORDER_DELETE") = ITapTrade::APIORDER_DELETE; - // ITapTrade::APIORDER_SUSPEND - parent.attr("APIORDER_SUSPEND") = ITapTrade::APIORDER_SUSPEND; - // ITapTrade::APIORDER_ACTIVATE - parent.attr("APIORDER_ACTIVATE") = ITapTrade::APIORDER_ACTIVATE; - // ITapTrade::APIORDER_SYSTEM_DELETE - parent.attr("APIORDER_SYSTEM_DELETE") = ITapTrade::APIORDER_SYSTEM_DELETE; - // ITapTrade::TAPI_TRIGGER_CONDITION_NONE - parent.attr("TAPI_TRIGGER_CONDITION_NONE") = ITapTrade::TAPI_TRIGGER_CONDITION_NONE; - // ITapTrade::TAPI_TRIGGER_CONDITION_GREAT - parent.attr("TAPI_TRIGGER_CONDITION_GREAT") = ITapTrade::TAPI_TRIGGER_CONDITION_GREAT; - // ITapTrade::TAPI_TRIGGER_CONDITION_LITTLE - parent.attr("TAPI_TRIGGER_CONDITION_LITTLE") = ITapTrade::TAPI_TRIGGER_CONDITION_LITTLE; - // ITapTrade::TAPI_TRIGGER_PRICE_NONE - parent.attr("TAPI_TRIGGER_PRICE_NONE") = ITapTrade::TAPI_TRIGGER_PRICE_NONE; - // ITapTrade::TAPI_TRIGGER_PRICE_BUY - parent.attr("TAPI_TRIGGER_PRICE_BUY") = ITapTrade::TAPI_TRIGGER_PRICE_BUY; - // ITapTrade::TAPI_TRIGGER_PRICE_SELL - parent.attr("TAPI_TRIGGER_PRICE_SELL") = ITapTrade::TAPI_TRIGGER_PRICE_SELL; - // ITapTrade::TAPI_TRIGGER_PRICE_LAST - parent.attr("TAPI_TRIGGER_PRICE_LAST") = ITapTrade::TAPI_TRIGGER_PRICE_LAST; - // ITapTrade::TAPI_TRADE_STATE_BID - parent.attr("TAPI_TRADE_STATE_BID") = ITapTrade::TAPI_TRADE_STATE_BID; - // ITapTrade::TAPI_TRADE_STATE_MATCH - parent.attr("TAPI_TRADE_STATE_MATCH") = ITapTrade::TAPI_TRADE_STATE_MATCH; - // ITapTrade::TAPI_TRADE_STATE_CONTINUOUS - parent.attr("TAPI_TRADE_STATE_CONTINUOUS") = ITapTrade::TAPI_TRADE_STATE_CONTINUOUS; - // ITapTrade::TAPI_TRADE_STATE_PAUSED - parent.attr("TAPI_TRADE_STATE_PAUSED") = ITapTrade::TAPI_TRADE_STATE_PAUSED; - // ITapTrade::TAPI_TRADE_STATE_CLOSE - parent.attr("TAPI_TRADE_STATE_CLOSE") = ITapTrade::TAPI_TRADE_STATE_CLOSE; - // ITapTrade::TAPI_TRADE_STATE_DEALLAST - parent.attr("TAPI_TRADE_STATE_DEALLAST") = ITapTrade::TAPI_TRADE_STATE_DEALLAST; - // ITapTrade::TAPI_TRADE_STATE_GWDISCONNECT - parent.attr("TAPI_TRADE_STATE_GWDISCONNECT") = ITapTrade::TAPI_TRADE_STATE_GWDISCONNECT; - // ITapTrade::TAPI_TRADE_STATE_UNKNOWN - parent.attr("TAPI_TRADE_STATE_UNKNOWN") = ITapTrade::TAPI_TRADE_STATE_UNKNOWN; - // ITapTrade::TAPI_TRADE_STATE_INITIALIZE - parent.attr("TAPI_TRADE_STATE_INITIALIZE") = ITapTrade::TAPI_TRADE_STATE_INITIALIZE; - // ITapTrade::TAPI_TRADE_STATE_READY - parent.attr("TAPI_TRADE_STATE_READY") = ITapTrade::TAPI_TRADE_STATE_READY; - // ITapTrade::TAPI_NOTICE_IGNORE_NONE - parent.attr("TAPI_NOTICE_IGNORE_NONE") = ITapTrade::TAPI_NOTICE_IGNORE_NONE; - // ITapTrade::TAPI_NOTICE_IGNORE_ALL - parent.attr("TAPI_NOTICE_IGNORE_ALL") = ITapTrade::TAPI_NOTICE_IGNORE_ALL; - // ITapTrade::TAPI_NOTICE_IGNORE_FUND - parent.attr("TAPI_NOTICE_IGNORE_FUND") = ITapTrade::TAPI_NOTICE_IGNORE_FUND; - // ITapTrade::TAPI_NOTICE_IGNORE_ORDER - parent.attr("TAPI_NOTICE_IGNORE_ORDER") = ITapTrade::TAPI_NOTICE_IGNORE_ORDER; - // ITapTrade::TAPI_NOTICE_IGNORE_FILL - parent.attr("TAPI_NOTICE_IGNORE_FILL") = ITapTrade::TAPI_NOTICE_IGNORE_FILL; - // ITapTrade::TAPI_NOTICE_IGNORE_POSITION - parent.attr("TAPI_NOTICE_IGNORE_POSITION") = ITapTrade::TAPI_NOTICE_IGNORE_POSITION; - // ITapTrade::TAPI_NOTICE_IGNORE_CLOSE - parent.attr("TAPI_NOTICE_IGNORE_CLOSE") = ITapTrade::TAPI_NOTICE_IGNORE_CLOSE; - // ITapTrade::TAPI_NOTICE_IGNORE_POSITIONPROFIT - parent.attr("TAPI_NOTICE_IGNORE_POSITIONPROFIT") = ITapTrade::TAPI_NOTICE_IGNORE_POSITIONPROFIT; - // ITapTrade::TAPI_ORDER_QRY_TYPE_ALL - parent.attr("TAPI_ORDER_QRY_TYPE_ALL") = ITapTrade::TAPI_ORDER_QRY_TYPE_ALL; - // ITapTrade::TAPI_ORDER_QRY_TYPE_UNENDED - parent.attr("TAPI_ORDER_QRY_TYPE_UNENDED") = ITapTrade::TAPI_ORDER_QRY_TYPE_UNENDED; - // ITapTrade::TAPI_MSG_RECEIVER_ACCOUNTNO - parent.attr("TAPI_MSG_RECEIVER_ACCOUNTNO") = ITapTrade::TAPI_MSG_RECEIVER_ACCOUNTNO; - // ITapTrade::TAPI_MSG_RECEIVER_ACCOUNTGROUPNO - parent.attr("TAPI_MSG_RECEIVER_ACCOUNTGROUPNO") = ITapTrade::TAPI_MSG_RECEIVER_ACCOUNTGROUPNO; - // ITapTrade::TAPI_MSG_RECEIVER_ATTRIBUTE - parent.attr("TAPI_MSG_RECEIVER_ATTRIBUTE") = ITapTrade::TAPI_MSG_RECEIVER_ATTRIBUTE; - // ITapTrade::TAPI_MSG_RECEIVER_USERNO - parent.attr("TAPI_MSG_RECEIVER_USERNO") = ITapTrade::TAPI_MSG_RECEIVER_USERNO; - // ITapTrade::TAPI_MSG_LEVEL_NORMAL - parent.attr("TAPI_MSG_LEVEL_NORMAL") = ITapTrade::TAPI_MSG_LEVEL_NORMAL; - // ITapTrade::TAPI_MSG_LEVEL_IMPORTANT - parent.attr("TAPI_MSG_LEVEL_IMPORTANT") = ITapTrade::TAPI_MSG_LEVEL_IMPORTANT; - // ITapTrade::TAPI_MSG_LEVEL_IMERGENCY - parent.attr("TAPI_MSG_LEVEL_IMERGENCY") = ITapTrade::TAPI_MSG_LEVEL_IMERGENCY; - // ITapTrade::TAPI_Msg_TYPE_MANAGER - parent.attr("TAPI_Msg_TYPE_MANAGER") = ITapTrade::TAPI_Msg_TYPE_MANAGER; - // ITapTrade::TAPI_Msg_TYPE_RISKCONTROL - parent.attr("TAPI_Msg_TYPE_RISKCONTROL") = ITapTrade::TAPI_Msg_TYPE_RISKCONTROL; - // ITapTrade::TAPI_BILL_DATE - parent.attr("TAPI_BILL_DATE") = ITapTrade::TAPI_BILL_DATE; - // ITapTrade::TAPI_BILL_MONTH - parent.attr("TAPI_BILL_MONTH") = ITapTrade::TAPI_BILL_MONTH; - // ITapTrade::TAPI_BILL_FILE_TXT - parent.attr("TAPI_BILL_FILE_TXT") = ITapTrade::TAPI_BILL_FILE_TXT; - // ITapTrade::TAPI_BILL_FILE_PDF - parent.attr("TAPI_BILL_FILE_PDF") = ITapTrade::TAPI_BILL_FILE_PDF; - // ITapTrade::SettleFlag_AutoSettle - parent.attr("SettleFlag_AutoSettle") = ITapTrade::SettleFlag_AutoSettle; - // ITapTrade::SettleFlagh_Manual - parent.attr("SettleFlagh_Manual") = ITapTrade::SettleFlagh_Manual; - // ITapTrade::TAPIERROR_LOGIN - parent.attr("TAPIERROR_LOGIN") = ITapTrade::TAPIERROR_LOGIN; - // ITapTrade::TAPIERROR_LOGIN_USER - parent.attr("TAPIERROR_LOGIN_USER") = ITapTrade::TAPIERROR_LOGIN_USER; - // ITapTrade::TAPIERROR_LOGIN_DDA - parent.attr("TAPIERROR_LOGIN_DDA") = ITapTrade::TAPIERROR_LOGIN_DDA; - // ITapTrade::TAPIERROR_LOGIN_LICENSE - parent.attr("TAPIERROR_LOGIN_LICENSE") = ITapTrade::TAPIERROR_LOGIN_LICENSE; - // ITapTrade::TAPIERROR_LOGIN_MODULE - parent.attr("TAPIERROR_LOGIN_MODULE") = ITapTrade::TAPIERROR_LOGIN_MODULE; - // ITapTrade::TAPIERROR_LOGIN_FORCE - parent.attr("TAPIERROR_LOGIN_FORCE") = ITapTrade::TAPIERROR_LOGIN_FORCE; - // ITapTrade::TAPIERROR_LOGIN_STATE - parent.attr("TAPIERROR_LOGIN_STATE") = ITapTrade::TAPIERROR_LOGIN_STATE; - // ITapTrade::TAPIERROR_LOGIN_PASS - parent.attr("TAPIERROR_LOGIN_PASS") = ITapTrade::TAPIERROR_LOGIN_PASS; - // ITapTrade::TAPIERROR_LOGIN_RIGHT - parent.attr("TAPIERROR_LOGIN_RIGHT") = ITapTrade::TAPIERROR_LOGIN_RIGHT; - // ITapTrade::TAPIERROR_LOGIN_COUNT - parent.attr("TAPIERROR_LOGIN_COUNT") = ITapTrade::TAPIERROR_LOGIN_COUNT; - // ITapTrade::TAPIERROR_LOGIN_NOTIN_SERVERFLAGUSRES - parent.attr("TAPIERROR_LOGIN_NOTIN_SERVERFLAGUSRES") = ITapTrade::TAPIERROR_LOGIN_NOTIN_SERVERFLAGUSRES; - // ITapTrade::TAPIERROR_LOGIN_FREEZE - parent.attr("TAPIERROR_LOGIN_FREEZE") = ITapTrade::TAPIERROR_LOGIN_FREEZE; - // ITapTrade::TAPIERROR_LOGIN_TOFREEZE - parent.attr("TAPIERROR_LOGIN_TOFREEZE") = ITapTrade::TAPIERROR_LOGIN_TOFREEZE; - // ITapTrade::TAPIERROR_LOGIN_ACCOUNTSTATE - parent.attr("TAPIERROR_LOGIN_ACCOUNTSTATE") = ITapTrade::TAPIERROR_LOGIN_ACCOUNTSTATE; - // ITapTrade::TAPIERROR_LOGIN_SECCERTIFI - parent.attr("TAPIERROR_LOGIN_SECCERTIFI") = ITapTrade::TAPIERROR_LOGIN_SECCERTIFI; - // ITapTrade::TAPIERROR_LOGIN_NOSECONDSET - parent.attr("TAPIERROR_LOGIN_NOSECONDSET") = ITapTrade::TAPIERROR_LOGIN_NOSECONDSET; - // ITapTrade::TAPIERROR_LOGIN_NOTURSTHOST - parent.attr("TAPIERROR_LOGIN_NOTURSTHOST") = ITapTrade::TAPIERROR_LOGIN_NOTURSTHOST; - // ITapTrade::TAPITAPIERROR_SECONDCERTIFICATION_FAIL - parent.attr("TAPITAPIERROR_SECONDCERTIFICATION_FAIL") = ITapTrade::TAPITAPIERROR_SECONDCERTIFICATION_FAIL; - // ITapTrade::TAPITAPIERROR_SECONDCERTIFICATION_TIMEOVER - parent.attr("TAPITAPIERROR_SECONDCERTIFICATION_TIMEOVER") = ITapTrade::TAPITAPIERROR_SECONDCERTIFICATION_TIMEOVER; - // ITapTrade::TAPIERROR_CONN_DATABASE - parent.attr("TAPIERROR_CONN_DATABASE") = ITapTrade::TAPIERROR_CONN_DATABASE; - // ITapTrade::TAPIERROR_OPER_DATABASE - parent.attr("TAPIERROR_OPER_DATABASE") = ITapTrade::TAPIERROR_OPER_DATABASE; - // ITapTrade::TAPIERROR_NEED_ONETOONE - parent.attr("TAPIERROR_NEED_ONETOONE") = ITapTrade::TAPIERROR_NEED_ONETOONE; - // ITapTrade::TAPIERROR_EXIST_RELATEINFO - parent.attr("TAPIERROR_EXIST_RELATEINFO") = ITapTrade::TAPIERROR_EXIST_RELATEINFO; - // ITapTrade::TAPIERROR_EXIST_RELATEINFOOFGROUP - parent.attr("TAPIERROR_EXIST_RELATEINFOOFGROUP") = ITapTrade::TAPIERROR_EXIST_RELATEINFOOFGROUP; - // ITapTrade::TAPIERROR_USERPASSWORD_MOD_SOURCE - parent.attr("TAPIERROR_USERPASSWORD_MOD_SOURCE") = ITapTrade::TAPIERROR_USERPASSWORD_MOD_SOURCE; - // ITapTrade::TAPIERROR_USERPASSWORD_MOD_SAME - parent.attr("TAPIERROR_USERPASSWORD_MOD_SAME") = ITapTrade::TAPIERROR_USERPASSWORD_MOD_SAME; - // ITapTrade::TAPIERROR_USERPASSWORD_MOD_COMPLEXITY - parent.attr("TAPIERROR_USERPASSWORD_MOD_COMPLEXITY") = ITapTrade::TAPIERROR_USERPASSWORD_MOD_COMPLEXITY; - // ITapTrade::TAPIERROR_CURRENCY_ONLY_ONEBASE - parent.attr("TAPIERROR_CURRENCY_ONLY_ONEBASE") = ITapTrade::TAPIERROR_CURRENCY_ONLY_ONEBASE; - // ITapTrade::TAPIERROR_CURRENCY_ONLY_USDHKD - parent.attr("TAPIERROR_CURRENCY_ONLY_USDHKD") = ITapTrade::TAPIERROR_CURRENCY_ONLY_USDHKD; - // ITapTrade::TAPIERROR_ORDERINSERT_ACCOUNT - parent.attr("TAPIERROR_ORDERINSERT_ACCOUNT") = ITapTrade::TAPIERROR_ORDERINSERT_ACCOUNT; - // ITapTrade::TAPIERROR_ORDERINSERT_ACCOUNT_STATE - parent.attr("TAPIERROR_ORDERINSERT_ACCOUNT_STATE") = ITapTrade::TAPIERROR_ORDERINSERT_ACCOUNT_STATE; - // ITapTrade::TAPIERROR_ORDERINSERT_TRADECENT_ERROR - parent.attr("TAPIERROR_ORDERINSERT_TRADECENT_ERROR") = ITapTrade::TAPIERROR_ORDERINSERT_TRADECENT_ERROR; - // ITapTrade::TAPIERROR_ORDERINSERT_CONTRACT - parent.attr("TAPIERROR_ORDERINSERT_CONTRACT") = ITapTrade::TAPIERROR_ORDERINSERT_CONTRACT; - // ITapTrade::TAPIERROR_ORDERINSERT_LME_NOTREADY - parent.attr("TAPIERROR_ORDERINSERT_LME_NOTREADY") = ITapTrade::TAPIERROR_ORDERINSERT_LME_NOTREADY; - // ITapTrade::TAPIERROR_ORDERINSERT_ERROR_ORDER_TYPE - parent.attr("TAPIERROR_ORDERINSERT_ERROR_ORDER_TYPE") = ITapTrade::TAPIERROR_ORDERINSERT_ERROR_ORDER_TYPE; - // ITapTrade::TAPIERROR_ORDERINSERT_READY_TYPE_ERROR - parent.attr("TAPIERROR_ORDERINSERT_READY_TYPE_ERROR") = ITapTrade::TAPIERROR_ORDERINSERT_READY_TYPE_ERROR; - // ITapTrade::TAPIERROR_ORDERINSERT_ORDER_TYPE_ERROR - parent.attr("TAPIERROR_ORDERINSERT_ORDER_TYPE_ERROR") = ITapTrade::TAPIERROR_ORDERINSERT_ORDER_TYPE_ERROR; - // ITapTrade::TAPIERROR_ORDER_NOTRADE_ACCOUNT - parent.attr("TAPIERROR_ORDER_NOTRADE_ACCOUNT") = ITapTrade::TAPIERROR_ORDER_NOTRADE_ACCOUNT; - // ITapTrade::TAPIERROR_ORDER_NOTRADE_COM_GROUP - parent.attr("TAPIERROR_ORDER_NOTRADE_COM_GROUP") = ITapTrade::TAPIERROR_ORDER_NOTRADE_COM_GROUP; - // ITapTrade::TAPIERROR_ORDER_NOTRADE_ACC_CONTRACT - parent.attr("TAPIERROR_ORDER_NOTRADE_ACC_CONTRACT") = ITapTrade::TAPIERROR_ORDER_NOTRADE_ACC_CONTRACT; - // ITapTrade::TAPIERROR_ORDER_NOTRADE_SYSTEM - parent.attr("TAPIERROR_ORDER_NOTRADE_SYSTEM") = ITapTrade::TAPIERROR_ORDER_NOTRADE_SYSTEM; - // ITapTrade::TAPIERROR_ORDER_CLOSE_ACCOUNT - parent.attr("TAPIERROR_ORDER_CLOSE_ACCOUNT") = ITapTrade::TAPIERROR_ORDER_CLOSE_ACCOUNT; - // ITapTrade::TAPIERROR_ORDER_CLOSE_ACC_CONTRACT - parent.attr("TAPIERROR_ORDER_CLOSE_ACC_CONTRACT") = ITapTrade::TAPIERROR_ORDER_CLOSE_ACC_CONTRACT; - // ITapTrade::TAPIERROR_ORDER_CLOSE_SYSTEM - parent.attr("TAPIERROR_ORDER_CLOSE_SYSTEM") = ITapTrade::TAPIERROR_ORDER_CLOSE_SYSTEM; - // ITapTrade::TAPIERROR_ORDER_CLOSE_DAYS - parent.attr("TAPIERROR_ORDER_CLOSE_DAYS") = ITapTrade::TAPIERROR_ORDER_CLOSE_DAYS; - // ITapTrade::TAPIERROR_ORDER_NOTRADE_RISK - parent.attr("TAPIERROR_ORDER_NOTRADE_RISK") = ITapTrade::TAPIERROR_ORDER_NOTRADE_RISK; - // ITapTrade::TAPIERROR_ORDER_CLOSE_RISK - parent.attr("TAPIERROR_ORDER_CLOSE_RISK") = ITapTrade::TAPIERROR_ORDER_CLOSE_RISK; - // ITapTrade::TAPIERROR_ORDERINSERT_POSITIONMAX - parent.attr("TAPIERROR_ORDERINSERT_POSITIONMAX") = ITapTrade::TAPIERROR_ORDERINSERT_POSITIONMAX; - // ITapTrade::TAPIERROR_ORDERINSERT_ONCEMAX - parent.attr("TAPIERROR_ORDERINSERT_ONCEMAX") = ITapTrade::TAPIERROR_ORDERINSERT_ONCEMAX; - // ITapTrade::TAPIERROR_ORDERINSERT_TRADEROUTE - parent.attr("TAPIERROR_ORDERINSERT_TRADEROUTE") = ITapTrade::TAPIERROR_ORDERINSERT_TRADEROUTE; - // ITapTrade::TAPIERROR_ORDER_IN_MOD_PRICE_ERROR - parent.attr("TAPIERROR_ORDER_IN_MOD_PRICE_ERROR") = ITapTrade::TAPIERROR_ORDER_IN_MOD_PRICE_ERROR; - // ITapTrade::TAPIERROR_ORDER_IN_GIVEUP_POS_MAX - parent.attr("TAPIERROR_ORDER_IN_GIVEUP_POS_MAX") = ITapTrade::TAPIERROR_ORDER_IN_GIVEUP_POS_MAX; - // ITapTrade::TAPIERROR_UPPERCHANNEL_NOT_LOGIN - parent.attr("TAPIERROR_UPPERCHANNEL_NOT_LOGIN") = ITapTrade::TAPIERROR_UPPERCHANNEL_NOT_LOGIN; - // ITapTrade::TAPIERROR_UPPERCHANNEL_NOT_FOUND - parent.attr("TAPIERROR_UPPERCHANNEL_NOT_FOUND") = ITapTrade::TAPIERROR_UPPERCHANNEL_NOT_FOUND; - // ITapTrade::TAPIERROR_ORDERINSERT_NOTENOUGHFUND - parent.attr("TAPIERROR_ORDERINSERT_NOTENOUGHFUND") = ITapTrade::TAPIERROR_ORDERINSERT_NOTENOUGHFUND; - // ITapTrade::TAPIERROR_ORDERINSERT_FEE - parent.attr("TAPIERROR_ORDERINSERT_FEE") = ITapTrade::TAPIERROR_ORDERINSERT_FEE; - // ITapTrade::TAPIERROR_ORDERINSERT_MARGIN - parent.attr("TAPIERROR_ORDERINSERT_MARGIN") = ITapTrade::TAPIERROR_ORDERINSERT_MARGIN; - // ITapTrade::TAPIERROR_ORDERINSERT_BASENOFUND - parent.attr("TAPIERROR_ORDERINSERT_BASENOFUND") = ITapTrade::TAPIERROR_ORDERINSERT_BASENOFUND; - // ITapTrade::TAPIERROR_ORDERINSERT_MARGINAMOUNT - parent.attr("TAPIERROR_ORDERINSERT_MARGINAMOUNT") = ITapTrade::TAPIERROR_ORDERINSERT_MARGINAMOUNT; - // ITapTrade::TAPIERROR_ORDERINSERT_OPENRATIO - parent.attr("TAPIERROR_ORDERINSERT_OPENRATIO") = ITapTrade::TAPIERROR_ORDERINSERT_OPENRATIO; - // ITapTrade::TAPIERROR_ORDERINSERT_GROUP_OPENRATIO - parent.attr("TAPIERROR_ORDERINSERT_GROUP_OPENRATIO") = ITapTrade::TAPIERROR_ORDERINSERT_GROUP_OPENRATIO; - // ITapTrade::TAPIERROR_ORDERINSERT_RISKARRAY - parent.attr("TAPIERROR_ORDERINSERT_RISKARRAY") = ITapTrade::TAPIERROR_ORDERINSERT_RISKARRAY; - // ITapTrade::TAPIERROR_ORDERDELETE_NOT_SYSNO - parent.attr("TAPIERROR_ORDERDELETE_NOT_SYSNO") = ITapTrade::TAPIERROR_ORDERDELETE_NOT_SYSNO; - // ITapTrade::TAPIERROR_ORDERDELETE_NOT_STATE - parent.attr("TAPIERROR_ORDERDELETE_NOT_STATE") = ITapTrade::TAPIERROR_ORDERDELETE_NOT_STATE; - // ITapTrade::TAPIERROR_ORDERDELETE_NO_INPUT - parent.attr("TAPIERROR_ORDERDELETE_NO_INPUT") = ITapTrade::TAPIERROR_ORDERDELETE_NO_INPUT; - // ITapTrade::TAPIERROR_ORDERMODIFY_NOT_STATE - parent.attr("TAPIERROR_ORDERMODIFY_NOT_STATE") = ITapTrade::TAPIERROR_ORDERMODIFY_NOT_STATE; - // ITapTrade::TAPIERROR_ORDERMODIFY_BACK_INPUT - parent.attr("TAPIERROR_ORDERMODIFY_BACK_INPUT") = ITapTrade::TAPIERROR_ORDERMODIFY_BACK_INPUT; - // ITapTrade::TAPIERROR_ORDERMODIFY_RISK_ORDER - parent.attr("TAPIERROR_ORDERMODIFY_RISK_ORDER") = ITapTrade::TAPIERROR_ORDERMODIFY_RISK_ORDER; - // ITapTrade::TAPIERROR_ORDERMODIFY_ERROR_QTY - parent.attr("TAPIERROR_ORDERMODIFY_ERROR_QTY") = ITapTrade::TAPIERROR_ORDERMODIFY_ERROR_QTY; - // ITapTrade::TAPIERROR_ORDERMODIFY_ERROR_READY - parent.attr("TAPIERROR_ORDERMODIFY_ERROR_READY") = ITapTrade::TAPIERROR_ORDERMODIFY_ERROR_READY; - // ITapTrade::TAPIERROR_ORDERINPUT_CANNOTMOVE - parent.attr("TAPIERROR_ORDERINPUT_CANNOTMOVE") = ITapTrade::TAPIERROR_ORDERINPUT_CANNOTMOVE; - // ITapTrade::TAPIERROR_ORDERINPUT_REPEAT - parent.attr("TAPIERROR_ORDERINPUT_REPEAT") = ITapTrade::TAPIERROR_ORDERINPUT_REPEAT; - // ITapTrade::TAPIERROR_CONTRACT_QUOTE - parent.attr("TAPIERROR_CONTRACT_QUOTE") = ITapTrade::TAPIERROR_CONTRACT_QUOTE; - // ITapTrade::TAPIERROR_UPPER_ONCEMAX - parent.attr("TAPIERROR_UPPER_ONCEMAX") = ITapTrade::TAPIERROR_UPPER_ONCEMAX; - // ITapTrade::TAPIERROR_UPPER_POSITIONMAX - parent.attr("TAPIERROR_UPPER_POSITIONMAX") = ITapTrade::TAPIERROR_UPPER_POSITIONMAX; - // ITapTrade::TAPIERROR_ORDERINSERT_CLOSEMODE - parent.attr("TAPIERROR_ORDERINSERT_CLOSEMODE") = ITapTrade::TAPIERROR_ORDERINSERT_CLOSEMODE; - // ITapTrade::TAPIERROR_CLOSE_ORDER - parent.attr("TAPIERROR_CLOSE_ORDER") = ITapTrade::TAPIERROR_CLOSE_ORDER; - // ITapTrade::TAPIERROR_CLOSE_MATCH - parent.attr("TAPIERROR_CLOSE_MATCH") = ITapTrade::TAPIERROR_CLOSE_MATCH; - // ITapTrade::TAPIERROR_MOD_DEL_NO_ORDER - parent.attr("TAPIERROR_MOD_DEL_NO_ORDER") = ITapTrade::TAPIERROR_MOD_DEL_NO_ORDER; - // ITapTrade::TAPIERROR_MOD_DEL_GATEWAY_DISCON - parent.attr("TAPIERROR_MOD_DEL_GATEWAY_DISCON") = ITapTrade::TAPIERROR_MOD_DEL_GATEWAY_DISCON; - // ITapTrade::TAPIERROR_MATCHINPUT_REPEAT - parent.attr("TAPIERROR_MATCHINPUT_REPEAT") = ITapTrade::TAPIERROR_MATCHINPUT_REPEAT; - // ITapTrade::TAPIERROR_MATCHINPUT_NO_ORDER - parent.attr("TAPIERROR_MATCHINPUT_NO_ORDER") = ITapTrade::TAPIERROR_MATCHINPUT_NO_ORDER; - // ITapTrade::TAPIERROR_MATCHINPUT_NO_CONTRACT - parent.attr("TAPIERROR_MATCHINPUT_NO_CONTRACT") = ITapTrade::TAPIERROR_MATCHINPUT_NO_CONTRACT; - // ITapTrade::TAPIERROR_MATCHINPUT_PARM_ERROR - parent.attr("TAPIERROR_MATCHINPUT_PARM_ERROR") = ITapTrade::TAPIERROR_MATCHINPUT_PARM_ERROR; - // ITapTrade::TAPIERROR_MATCHINPUT_OSTATE_ERROR - parent.attr("TAPIERROR_MATCHINPUT_OSTATE_ERROR") = ITapTrade::TAPIERROR_MATCHINPUT_OSTATE_ERROR; - // ITapTrade::TAPIERROR_MATCHREMOVE_NO_MATCH - parent.attr("TAPIERROR_MATCHREMOVE_NO_MATCH") = ITapTrade::TAPIERROR_MATCHREMOVE_NO_MATCH; - // ITapTrade::TAPIERROR_MATCHREMOVE_STATE_ERROR - parent.attr("TAPIERROR_MATCHREMOVE_STATE_ERROR") = ITapTrade::TAPIERROR_MATCHREMOVE_STATE_ERROR; - // ITapTrade::TAPIERROR_ORDERINPUT_STATE_ERROR - parent.attr("TAPIERROR_ORDERINPUT_STATE_ERROR") = ITapTrade::TAPIERROR_ORDERINPUT_STATE_ERROR; - // ITapTrade::TAPIERROR_ORDERINPUT_MOD_ERROR - parent.attr("TAPIERROR_ORDERINPUT_MOD_ERROR") = ITapTrade::TAPIERROR_ORDERINPUT_MOD_ERROR; - // ITapTrade::TAPIERROR_ORDERREMOVE_ERROR - parent.attr("TAPIERROR_ORDERREMOVE_ERROR") = ITapTrade::TAPIERROR_ORDERREMOVE_ERROR; - // ITapTrade::TAPIERROR_ORDERINPUT_MOD_STATE_ERROR - parent.attr("TAPIERROR_ORDERINPUT_MOD_STATE_ERROR") = ITapTrade::TAPIERROR_ORDERINPUT_MOD_STATE_ERROR; - // ITapTrade::TAPIERROR_ORDEREXCHANGE_STATE_ERROR - parent.attr("TAPIERROR_ORDEREXCHANGE_STATE_ERROR") = ITapTrade::TAPIERROR_ORDEREXCHANGE_STATE_ERROR; - // ITapTrade::TAPIERROR_ORDERREMOVE_NOT_ERROR - parent.attr("TAPIERROR_ORDERREMOVE_NOT_ERROR") = ITapTrade::TAPIERROR_ORDERREMOVE_NOT_ERROR; - // ITapTrade::TAPIERROR_ORDERMARKET_DELETE_NOTFOUND - parent.attr("TAPIERROR_ORDERMARKET_DELETE_NOTFOUND") = ITapTrade::TAPIERROR_ORDERMARKET_DELETE_NOTFOUND; - // ITapTrade::TAPIERROR_ORDERMARKET_DEL_ACCOUNT_NE - parent.attr("TAPIERROR_ORDERMARKET_DEL_ACCOUNT_NE") = ITapTrade::TAPIERROR_ORDERMARKET_DEL_ACCOUNT_NE; - // ITapTrade::TAPIERROR_ORDERMARKET_DEL_COMMODITY_NE - parent.attr("TAPIERROR_ORDERMARKET_DEL_COMMODITY_NE") = ITapTrade::TAPIERROR_ORDERMARKET_DEL_COMMODITY_NE; - // ITapTrade::TAPIERROR_ORDERMARKET_DEL_CONTRACT_NE - parent.attr("TAPIERROR_ORDERMARKET_DEL_CONTRACT_NE") = ITapTrade::TAPIERROR_ORDERMARKET_DEL_CONTRACT_NE; - // ITapTrade::TAPIERROR_ORDERMARKET_DEL_SIDE_EQ - parent.attr("TAPIERROR_ORDERMARKET_DEL_SIDE_EQ") = ITapTrade::TAPIERROR_ORDERMARKET_DEL_SIDE_EQ; - // ITapTrade::TAPIERROR_ORDERMARKET_DEL_SIDE_ERROR - parent.attr("TAPIERROR_ORDERMARKET_DEL_SIDE_ERROR") = ITapTrade::TAPIERROR_ORDERMARKET_DEL_SIDE_ERROR; - // ITapTrade::TAPIERROR_ORDERMARKET_OTHER_SIDE_ERROR - parent.attr("TAPIERROR_ORDERMARKET_OTHER_SIDE_ERROR") = ITapTrade::TAPIERROR_ORDERMARKET_OTHER_SIDE_ERROR; - // ITapTrade::TAPIERROR_ORDERACTIVATE_NOTFOUND_ERROR - parent.attr("TAPIERROR_ORDERACTIVATE_NOTFOUND_ERROR") = ITapTrade::TAPIERROR_ORDERACTIVATE_NOTFOUND_ERROR; - // ITapTrade::TAPIERROR_ORDERACTIVATE_STATE_ERROR - parent.attr("TAPIERROR_ORDERACTIVATE_STATE_ERROR") = ITapTrade::TAPIERROR_ORDERACTIVATE_STATE_ERROR; - // ITapTrade::TAPIERROR_GW_NOT_READY - parent.attr("TAPIERROR_GW_NOT_READY") = ITapTrade::TAPIERROR_GW_NOT_READY; - // ITapTrade::TAPIERROR_GW_INVALID_COMMODITY - parent.attr("TAPIERROR_GW_INVALID_COMMODITY") = ITapTrade::TAPIERROR_GW_INVALID_COMMODITY; - // ITapTrade::TAPIERROR_GW_INVALID_CONTRACT - parent.attr("TAPIERROR_GW_INVALID_CONTRACT") = ITapTrade::TAPIERROR_GW_INVALID_CONTRACT; - // ITapTrade::TAPIERROR_GW_INVALID_FIELD - parent.attr("TAPIERROR_GW_INVALID_FIELD") = ITapTrade::TAPIERROR_GW_INVALID_FIELD; - // ITapTrade::TAPIERROR_GW_INVALID_PRICE - parent.attr("TAPIERROR_GW_INVALID_PRICE") = ITapTrade::TAPIERROR_GW_INVALID_PRICE; - // ITapTrade::TAPIERROR_GW_INVALID_VOLUME - parent.attr("TAPIERROR_GW_INVALID_VOLUME") = ITapTrade::TAPIERROR_GW_INVALID_VOLUME; - // ITapTrade::TAPIERROR_GW_INVALID_TYPE - parent.attr("TAPIERROR_GW_INVALID_TYPE") = ITapTrade::TAPIERROR_GW_INVALID_TYPE; - // ITapTrade::TAPIERROR_GW_INVALID_MODE - parent.attr("TAPIERROR_GW_INVALID_MODE") = ITapTrade::TAPIERROR_GW_INVALID_MODE; - // ITapTrade::TAPIERROR_GW_ORDER_NOT_EXIST - parent.attr("TAPIERROR_GW_ORDER_NOT_EXIST") = ITapTrade::TAPIERROR_GW_ORDER_NOT_EXIST; - // ITapTrade::TAPIERROR_GW_SEND_FAIL - parent.attr("TAPIERROR_GW_SEND_FAIL") = ITapTrade::TAPIERROR_GW_SEND_FAIL; - // ITapTrade::TAPIERROR_GW_REJ_BYUPPER - parent.attr("TAPIERROR_GW_REJ_BYUPPER") = ITapTrade::TAPIERROR_GW_REJ_BYUPPER; - // ITapTrade::TAPIERROR_TRADEFRONT_MODULETYPEERR - parent.attr("TAPIERROR_TRADEFRONT_MODULETYPEERR") = ITapTrade::TAPIERROR_TRADEFRONT_MODULETYPEERR; - // ITapTrade::TAPIERROR_TRADEFRONT_TOOMANYDATA - parent.attr("TAPIERROR_TRADEFRONT_TOOMANYDATA") = ITapTrade::TAPIERROR_TRADEFRONT_TOOMANYDATA; - // ITapTrade::TAPIERROR_TRADEFRONT_NODATA - parent.attr("TAPIERROR_TRADEFRONT_NODATA") = ITapTrade::TAPIERROR_TRADEFRONT_NODATA; - // ITapTrade::TAPIERROT_TRADEFRONT_NOUSER - parent.attr("TAPIERROT_TRADEFRONT_NOUSER") = ITapTrade::TAPIERROT_TRADEFRONT_NOUSER; - // ITapTrade::TAPIERROR_TRADEFRONT_DISCONNECT_TRADE - parent.attr("TAPIERROR_TRADEFRONT_DISCONNECT_TRADE") = ITapTrade::TAPIERROR_TRADEFRONT_DISCONNECT_TRADE; - // ITapTrade::TAPIERROR_TRADEFRONT_DISCONNECT_MANAGE - parent.attr("TAPIERROR_TRADEFRONT_DISCONNECT_MANAGE") = ITapTrade::TAPIERROR_TRADEFRONT_DISCONNECT_MANAGE; - // ITapTrade::TAPIERROR_TRADEFRONT_ACCOUNT - parent.attr("TAPIERROR_TRADEFRONT_ACCOUNT") = ITapTrade::TAPIERROR_TRADEFRONT_ACCOUNT; - // ITapTrade::TAPIERROR_TRADEFRONT_ORDER - parent.attr("TAPIERROR_TRADEFRONT_ORDER") = ITapTrade::TAPIERROR_TRADEFRONT_ORDER; - // ITapTrade::TAPIERROR_TRADEFRONT_FREQUENCY - parent.attr("TAPIERROR_TRADEFRONT_FREQUENCY") = ITapTrade::TAPIERROR_TRADEFRONT_FREQUENCY; - // ITapTrade::TAPIERROR_TRADEFRONT_RUFUSE - parent.attr("TAPIERROR_TRADEFRONT_RUFUSE") = ITapTrade::TAPIERROR_TRADEFRONT_RUFUSE; - // ITapTrade::TAPIERROR_TRADEFRONT_SELFMATCH - parent.attr("TAPIERROR_TRADEFRONT_SELFMATCH") = ITapTrade::TAPIERROR_TRADEFRONT_SELFMATCH; - // ITapTrade::TAPIERROR_SUCCEED - parent.attr("TAPIERROR_SUCCEED") = ITapTrade::TAPIERROR_SUCCEED; - // ITapTrade::TAPIERROR_ConnectFail - parent.attr("TAPIERROR_ConnectFail") = ITapTrade::TAPIERROR_ConnectFail; - // ITapTrade::TAPIERROR_LinkAuthFail - parent.attr("TAPIERROR_LinkAuthFail") = ITapTrade::TAPIERROR_LinkAuthFail; - // ITapTrade::TAPIERROR_HostUnavailable - parent.attr("TAPIERROR_HostUnavailable") = ITapTrade::TAPIERROR_HostUnavailable; - // ITapTrade::TAPIERROR_SendDataError - parent.attr("TAPIERROR_SendDataError") = ITapTrade::TAPIERROR_SendDataError; - // ITapTrade::TAPIERROR_TestIDError - parent.attr("TAPIERROR_TestIDError") = ITapTrade::TAPIERROR_TestIDError; - // ITapTrade::TAPIERROR_NotReadyTestNetwork - parent.attr("TAPIERROR_NotReadyTestNetwork") = ITapTrade::TAPIERROR_NotReadyTestNetwork; - // ITapTrade::TAPIERROR_CurTestNotOver - parent.attr("TAPIERROR_CurTestNotOver") = ITapTrade::TAPIERROR_CurTestNotOver; - // ITapTrade::TAPIERROR_NOFrontAvailable - parent.attr("TAPIERROR_NOFrontAvailable") = ITapTrade::TAPIERROR_NOFrontAvailable; - // ITapTrade::TAPIERROR_DataPathAvaiable - parent.attr("TAPIERROR_DataPathAvaiable") = ITapTrade::TAPIERROR_DataPathAvaiable; - // ITapTrade::TAPIERROR_RepeatLogin - parent.attr("TAPIERROR_RepeatLogin") = ITapTrade::TAPIERROR_RepeatLogin; - // ITapTrade::TAPIERROR_InnerError - parent.attr("TAPIERROR_InnerError") = ITapTrade::TAPIERROR_InnerError; - // ITapTrade::TAPIERROR_LastReqNotFinish - parent.attr("TAPIERROR_LastReqNotFinish") = ITapTrade::TAPIERROR_LastReqNotFinish; - // ITapTrade::TAPIERROR_InputValueError - parent.attr("TAPIERROR_InputValueError") = ITapTrade::TAPIERROR_InputValueError; - // ITapTrade::TAPIERROR_AuthCode_Invalid - parent.attr("TAPIERROR_AuthCode_Invalid") = ITapTrade::TAPIERROR_AuthCode_Invalid; - // ITapTrade::TAPIERROR_AuthCode_Expired - parent.attr("TAPIERROR_AuthCode_Expired") = ITapTrade::TAPIERROR_AuthCode_Expired; - // ITapTrade::TAPIERROR_AuthCode_TypeNotMatch - parent.attr("TAPIERROR_AuthCode_TypeNotMatch") = ITapTrade::TAPIERROR_AuthCode_TypeNotMatch; - // ITapTrade::TAPIERROR_API_NotReady - parent.attr("TAPIERROR_API_NotReady") = ITapTrade::TAPIERROR_API_NotReady; - // ITapTrade::TAPIERROR_UDP_LISTEN_FAILED - parent.attr("TAPIERROR_UDP_LISTEN_FAILED") = ITapTrade::TAPIERROR_UDP_LISTEN_FAILED; - // ITapTrade::TAPIERROR_UDP_LISTENING - parent.attr("TAPIERROR_UDP_LISTENING") = ITapTrade::TAPIERROR_UDP_LISTENING; - // ITapTrade::TAPIERROR_NotImplemented - parent.attr("TAPIERROR_NotImplemented") = ITapTrade::TAPIERROR_NotImplemented; - // ITapTrade::TAPIERROR_CallOneTimeOnly - parent.attr("TAPIERROR_CallOneTimeOnly") = ITapTrade::TAPIERROR_CallOneTimeOnly; - // ITapTrade::TAPIERROR_ORDER_FREQUENCY - parent.attr("TAPIERROR_ORDER_FREQUENCY") = ITapTrade::TAPIERROR_ORDER_FREQUENCY; - // ITapTrade::TAPIERROR_RENTQRY_TOOFAST - parent.attr("TAPIERROR_RENTQRY_TOOFAST") = ITapTrade::TAPIERROR_RENTQRY_TOOFAST; - // ITapTrade::TAPIERROR_CALL_NOCONDITION - parent.attr("TAPIERROR_CALL_NOCONDITION") = ITapTrade::TAPIERROR_CALL_NOCONDITION; - // ITapTrade::TAPIERROR_ORDER_NOTFOUND - parent.attr("TAPIERROR_ORDER_NOTFOUND") = ITapTrade::TAPIERROR_ORDER_NOTFOUND; - // ITapTrade::TAPIERROR_LOGPATH_EMPTY - parent.attr("TAPIERROR_LOGPATH_EMPTY") = ITapTrade::TAPIERROR_LOGPATH_EMPTY; - // ITapTrade::TAPIERROR_LOGPATH_FAILOPEN - parent.attr("TAPIERROR_LOGPATH_FAILOPEN") = ITapTrade::TAPIERROR_LOGPATH_FAILOPEN; - // ITapTrade::TAPIERROR_RIGHT_TRADER - parent.attr("TAPIERROR_RIGHT_TRADER") = ITapTrade::TAPIERROR_RIGHT_TRADER; - // ITapTrade::TAPIERROR_RIGHT_ORDERINPUT - parent.attr("TAPIERROR_RIGHT_ORDERINPUT") = ITapTrade::TAPIERROR_RIGHT_ORDERINPUT; - // ITapTrade::TAPIERROR_RIGHT_LOCALOPERATION - parent.attr("TAPIERROR_RIGHT_LOCALOPERATION") = ITapTrade::TAPIERROR_RIGHT_LOCALOPERATION; - // ITapTrade::TAPIERROR_RIGHT_ORDERTRANSFER - parent.attr("TAPIERROR_RIGHT_ORDERTRANSFER") = ITapTrade::TAPIERROR_RIGHT_ORDERTRANSFER; - // ITapTrade::TAPIERROR_FILLINPUT_SYSTEMNO - parent.attr("TAPIERROR_FILLINPUT_SYSTEMNO") = ITapTrade::TAPIERROR_FILLINPUT_SYSTEMNO; - // ITapTrade::TAPIERROR_FILLREMOVE_MATCHNO - parent.attr("TAPIERROR_FILLREMOVE_MATCHNO") = ITapTrade::TAPIERROR_FILLREMOVE_MATCHNO; - // ITapTrade::TAPIERROR_FILLREQMOVE_NOFUND - parent.attr("TAPIERROR_FILLREQMOVE_NOFUND") = ITapTrade::TAPIERROR_FILLREQMOVE_NOFUND; - // ITapTrade::TAPIERROR_LOCALMODIFY_ACCOUNT - parent.attr("TAPIERROR_LOCALMODIFY_ACCOUNT") = ITapTrade::TAPIERROR_LOCALMODIFY_ACCOUNT; - // ITapTrade::TAPIERROR_LOCALTRANSFER_ACCOUNT - parent.attr("TAPIERROR_LOCALTRANSFER_ACCOUNT") = ITapTrade::TAPIERROR_LOCALTRANSFER_ACCOUNT; - // ITapTrade::TAPIERROR_INPUTERROR_PHONE - parent.attr("TAPIERROR_INPUTERROR_PHONE") = ITapTrade::TAPIERROR_INPUTERROR_PHONE; - // ITapTrade::TAPIERROR_ERROR_CONTACT - parent.attr("TAPIERROR_ERROR_CONTACT") = ITapTrade::TAPIERROR_ERROR_CONTACT; - // ITapTrade::TAPIERROR_ERROR_REJESTVERTIFICATE - parent.attr("TAPIERROR_ERROR_REJESTVERTIFICATE") = ITapTrade::TAPIERROR_ERROR_REJESTVERTIFICATE; - // ITapTrade::TAPIERROR_RIGHT_SETPASSWORD - parent.attr("TAPIERROR_RIGHT_SETPASSWORD") = ITapTrade::TAPIERROR_RIGHT_SETPASSWORD; - // ITapTrade::TAPIERROR_RISK_OPERERROR - parent.attr("TAPIERROR_RISK_OPERERROR") = ITapTrade::TAPIERROR_RISK_OPERERROR; - // ITapTrade::TAPIERROR_ORDER_MODACCOUNT - parent.attr("TAPIERROR_ORDER_MODACCOUNT") = ITapTrade::TAPIERROR_ORDER_MODACCOUNT; - // ITapTrade::TAPIERROR_INPUTERROR_NULL - parent.attr("TAPIERROR_INPUTERROR_NULL") = ITapTrade::TAPIERROR_INPUTERROR_NULL; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIYNFLAG - parent.attr("TAPIERROR_INPUTERROR_TAPIYNFLAG") = ITapTrade::TAPIERROR_INPUTERROR_TAPIYNFLAG; - // ITapTrade::TAPIERROR_INPUTERROR_TAPILOGLEVEL - parent.attr("TAPIERROR_INPUTERROR_TAPILOGLEVEL") = ITapTrade::TAPIERROR_INPUTERROR_TAPILOGLEVEL; - // ITapTrade::TAPIERROR_INPUTERROR_TAPICommodityType - parent.attr("TAPIERROR_INPUTERROR_TAPICommodityType") = ITapTrade::TAPIERROR_INPUTERROR_TAPICommodityType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPICallOrPutFlagType - parent.attr("TAPIERROR_INPUTERROR_TAPICallOrPutFlagType") = ITapTrade::TAPIERROR_INPUTERROR_TAPICallOrPutFlagType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIBucketDateFlag - parent.attr("TAPIERROR_INPUTERROR_TAPIBucketDateFlag") = ITapTrade::TAPIERROR_INPUTERROR_TAPIBucketDateFlag; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIHisQuoteType - parent.attr("TAPIERROR_INPUTERROR_TAPIHisQuoteType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIHisQuoteType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIAccountType - parent.attr("TAPIERROR_INPUTERROR_TAPIAccountType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIAccountType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIUserTypeType - parent.attr("TAPIERROR_INPUTERROR_TAPIUserTypeType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIUserTypeType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIAccountState - parent.attr("TAPIERROR_INPUTERROR_TAPIAccountState") = ITapTrade::TAPIERROR_INPUTERROR_TAPIAccountState; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIAccountFamilyType - parent.attr("TAPIERROR_INPUTERROR_TAPIAccountFamilyType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIAccountFamilyType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIOrderTypeType - parent.attr("TAPIERROR_INPUTERROR_TAPIOrderTypeType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIOrderTypeType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIOrderSourceType - parent.attr("TAPIERROR_INPUTERROR_TAPIOrderSourceType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIOrderSourceType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPITimeInForceType - parent.attr("TAPIERROR_INPUTERROR_TAPITimeInForceType") = ITapTrade::TAPIERROR_INPUTERROR_TAPITimeInForceType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPISideType - parent.attr("TAPIERROR_INPUTERROR_TAPISideType") = ITapTrade::TAPIERROR_INPUTERROR_TAPISideType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIPositionEffectType - parent.attr("TAPIERROR_INPUTERROR_TAPIPositionEffectType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIPositionEffectType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIHedgeFlagType - parent.attr("TAPIERROR_INPUTERROR_TAPIHedgeFlagType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIHedgeFlagType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIOrderStateType - parent.attr("TAPIERROR_INPUTERROR_TAPIOrderStateType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIOrderStateType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPICalculateModeType - parent.attr("TAPIERROR_INPUTERROR_TAPICalculateModeType") = ITapTrade::TAPIERROR_INPUTERROR_TAPICalculateModeType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIMatchSourceType - parent.attr("TAPIERROR_INPUTERROR_TAPIMatchSourceType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIMatchSourceType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIOpenCloseModeType - parent.attr("TAPIERROR_INPUTERROR_TAPIOpenCloseModeType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIOpenCloseModeType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIFutureAlgType - parent.attr("TAPIERROR_INPUTERROR_TAPIFutureAlgType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIFutureAlgType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIOptionAlgType - parent.attr("TAPIERROR_INPUTERROR_TAPIOptionAlgType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIOptionAlgType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIBankAccountLWFlagType - parent.attr("TAPIERROR_INPUTERROR_TAPIBankAccountLWFlagType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIBankAccountLWFlagType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIBankAccountStateType - parent.attr("TAPIERROR_INPUTERROR_TAPIBankAccountStateType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIBankAccountStateType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIBankAccountSwapStateType - parent.attr("TAPIERROR_INPUTERROR_TAPIBankAccountSwapStateType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIBankAccountSwapStateType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIBankAccountTransferStateType - parent.attr("TAPIERROR_INPUTERROR_TAPIBankAccountTransferStateType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIBankAccountTransferStateType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIMarginCalculateModeType - parent.attr("TAPIERROR_INPUTERROR_TAPIMarginCalculateModeType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIMarginCalculateModeType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIOptionMarginCalculateModeType - parent.attr("TAPIERROR_INPUTERROR_TAPIOptionMarginCalculateModeType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIOptionMarginCalculateModeType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPICmbDirectType - parent.attr("TAPIERROR_INPUTERROR_TAPICmbDirectType") = ITapTrade::TAPIERROR_INPUTERROR_TAPICmbDirectType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIDeliveryModeType - parent.attr("TAPIERROR_INPUTERROR_TAPIDeliveryModeType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIDeliveryModeType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIContractTypeType - parent.attr("TAPIERROR_INPUTERROR_TAPIContractTypeType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIContractTypeType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIPartyTypeType - parent.attr("TAPIERROR_INPUTERROR_TAPIPartyTypeType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIPartyTypeType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIPartyCertificateTypeType - parent.attr("TAPIERROR_INPUTERROR_TAPIPartyCertificateTypeType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIPartyCertificateTypeType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIMsgReceiverType - parent.attr("TAPIERROR_INPUTERROR_TAPIMsgReceiverType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIMsgReceiverType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIMsgTypeType - parent.attr("TAPIERROR_INPUTERROR_TAPIMsgTypeType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIMsgTypeType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIMsgLevelType - parent.attr("TAPIERROR_INPUTERROR_TAPIMsgLevelType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIMsgLevelType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPITransferDirectType - parent.attr("TAPIERROR_INPUTERROR_TAPITransferDirectType") = ITapTrade::TAPIERROR_INPUTERROR_TAPITransferDirectType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPITransferStateType - parent.attr("TAPIERROR_INPUTERROR_TAPITransferStateType") = ITapTrade::TAPIERROR_INPUTERROR_TAPITransferStateType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPITransferTypeType - parent.attr("TAPIERROR_INPUTERROR_TAPITransferTypeType") = ITapTrade::TAPIERROR_INPUTERROR_TAPITransferTypeType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPITransferDeviceIDType - parent.attr("TAPIERROR_INPUTERROR_TAPITransferDeviceIDType") = ITapTrade::TAPIERROR_INPUTERROR_TAPITransferDeviceIDType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPITacticsTypeType - parent.attr("TAPIERROR_INPUTERROR_TAPITacticsTypeType") = ITapTrade::TAPIERROR_INPUTERROR_TAPITacticsTypeType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIORDERACT - parent.attr("TAPIERROR_INPUTERROR_TAPIORDERACT") = ITapTrade::TAPIERROR_INPUTERROR_TAPIORDERACT; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIBillTypeType - parent.attr("TAPIERROR_INPUTERROR_TAPIBillTypeType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIBillTypeType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIBillFileTypeType - parent.attr("TAPIERROR_INPUTERROR_TAPIBillFileTypeType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIBillFileTypeType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIOFFFlagType - parent.attr("TAPIERROR_INPUTERROR_TAPIOFFFlagType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIOFFFlagType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPICashAdjustTypeType - parent.attr("TAPIERROR_INPUTERROR_TAPICashAdjustTypeType") = ITapTrade::TAPIERROR_INPUTERROR_TAPICashAdjustTypeType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPITriggerConditionType - parent.attr("TAPIERROR_INPUTERROR_TAPITriggerConditionType") = ITapTrade::TAPIERROR_INPUTERROR_TAPITriggerConditionType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPITriggerPriceTypeType - parent.attr("TAPIERROR_INPUTERROR_TAPITriggerPriceTypeType") = ITapTrade::TAPIERROR_INPUTERROR_TAPITriggerPriceTypeType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPITradingStateType - parent.attr("TAPIERROR_INPUTERROR_TAPITradingStateType") = ITapTrade::TAPIERROR_INPUTERROR_TAPITradingStateType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIMarketLevelType - parent.attr("TAPIERROR_INPUTERROR_TAPIMarketLevelType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIMarketLevelType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIOrderQryTypeType - parent.attr("TAPIERROR_INPUTERROR_TAPIOrderQryTypeType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIOrderQryTypeType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIClientID - parent.attr("TAPIERROR_INPUTERROR_TAPIClientID") = ITapTrade::TAPIERROR_INPUTERROR_TAPIClientID; - // ITapTrade::TAPIERROR_INPUTERROR_QryHisQuoteParam - parent.attr("TAPIERROR_INPUTERROR_QryHisQuoteParam") = ITapTrade::TAPIERROR_INPUTERROR_QryHisQuoteParam; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIIncludeNAN - parent.attr("TAPIERROR_INPUTERROR_TAPIIncludeNAN") = ITapTrade::TAPIERROR_INPUTERROR_TAPIIncludeNAN; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIExpireTime - parent.attr("TAPIERROR_INPUTERROR_TAPIExpireTime") = ITapTrade::TAPIERROR_INPUTERROR_TAPIExpireTime; - // ITapTrade::TAPIERROR_INPUTERROR_TAPIPasswordType - parent.attr("TAPIERROR_INPUTERROR_TAPIPasswordType") = ITapTrade::TAPIERROR_INPUTERROR_TAPIPasswordType; - // ITapTrade::TAPIERROR_INPUTERROR_TAPISettleFlagType - parent.attr("TAPIERROR_INPUTERROR_TAPISettleFlagType") = ITapTrade::TAPIERROR_INPUTERROR_TAPISettleFlagType; - // ITapTrade::TAPIERROR_DISCONNECT_CLOSE_INIT - parent.attr("TAPIERROR_DISCONNECT_CLOSE_INIT") = ITapTrade::TAPIERROR_DISCONNECT_CLOSE_INIT; - // ITapTrade::TAPIERROR_DISCONNECT_CLOSE_PASS - parent.attr("TAPIERROR_DISCONNECT_CLOSE_PASS") = ITapTrade::TAPIERROR_DISCONNECT_CLOSE_PASS; - // ITapTrade::TAPIERROR_DISCONNECT_READ_ERROR - parent.attr("TAPIERROR_DISCONNECT_READ_ERROR") = ITapTrade::TAPIERROR_DISCONNECT_READ_ERROR; - // ITapTrade::TAPIERROR_DISCONNECT_WRITE_ERROR - parent.attr("TAPIERROR_DISCONNECT_WRITE_ERROR") = ITapTrade::TAPIERROR_DISCONNECT_WRITE_ERROR; - // ITapTrade::TAPIERROR_DISCONNECT_BUF_FULL - parent.attr("TAPIERROR_DISCONNECT_BUF_FULL") = ITapTrade::TAPIERROR_DISCONNECT_BUF_FULL; - // ITapTrade::TAPIERROR_DISCONNECT_IOCP_ERROR - parent.attr("TAPIERROR_DISCONNECT_IOCP_ERROR") = ITapTrade::TAPIERROR_DISCONNECT_IOCP_ERROR; - // ITapTrade::TAPIERROR_DISCONNECT_PARSE_ERROR - parent.attr("TAPIERROR_DISCONNECT_PARSE_ERROR") = ITapTrade::TAPIERROR_DISCONNECT_PARSE_ERROR; - // ITapTrade::TAPIERROR_DISCONNECT_CONNECT_TIMEOUT - parent.attr("TAPIERROR_DISCONNECT_CONNECT_TIMEOUT") = ITapTrade::TAPIERROR_DISCONNECT_CONNECT_TIMEOUT; - // ITapTrade::TAPIERROR_DISCONNECT_INIT_ERROR - parent.attr("TAPIERROR_DISCONNECT_INIT_ERROR") = ITapTrade::TAPIERROR_DISCONNECT_INIT_ERROR; - // ITapTrade::TAPIERROR_DISCONNECT_HAS_CONNECTED - parent.attr("TAPIERROR_DISCONNECT_HAS_CONNECTED") = ITapTrade::TAPIERROR_DISCONNECT_HAS_CONNECTED; - // ITapTrade::TAPIERROR_DISCONNECT_HAS_EXIT - parent.attr("TAPIERROR_DISCONNECT_HAS_EXIT") = ITapTrade::TAPIERROR_DISCONNECT_HAS_EXIT; - // ITapTrade::TAPIERROR_DISCONNECT_TRY_LATER - parent.attr("TAPIERROR_DISCONNECT_TRY_LATER") = ITapTrade::TAPIERROR_DISCONNECT_TRY_LATER; -} diff --git a/vnpy/api/tap/vntap/generated_files/generated_functions_8.cpp b/vnpy/api/tap/vntap/generated_files/generated_functions_8.cpp deleted file mode 100644 index cc3f0a0730..0000000000 --- a/vnpy/api/tap/vntap/generated_files/generated_functions_8.cpp +++ /dev/null @@ -1,487 +0,0 @@ -#include "config.h" - -#include -#include -#include -#include -#include -#include - -#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_ITapTrade_typedefs(pybind11::module & parent) -{ - // ITapTrade::TapAPIOrderDeactivateReq - module_vntap::cross.record_assign(parent, "TapAPIOrderDeactivateReq", "ITapTrade::TapAPIOrderDeactivateReq", "::ITapTrade::TapAPIOrderCancelReq"); - // ITapTrade::TapAPIOrderActivateReq - module_vntap::cross.record_assign(parent, "TapAPIOrderActivateReq", "ITapTrade::TapAPIOrderActivateReq", "::ITapTrade::TapAPIOrderCancelReq"); - // ITapTrade::TapAPIOrderDeleteReq - module_vntap::cross.record_assign(parent, "TapAPIOrderDeleteReq", "ITapTrade::TapAPIOrderDeleteReq", "::ITapTrade::TapAPIOrderCancelReq"); - // ITapTrade::TapAPIHisOrderProcessQryRsp - module_vntap::cross.record_assign(parent, "TapAPIHisOrderProcessQryRsp", "ITapTrade::TapAPIHisOrderProcessQryRsp", "::ITapTrade::TapAPIHisOrderQryRsp"); - // ITapTrade::TapAPIOrderMarketDeleteRsp - module_vntap::cross.record_assign(parent, "TapAPIOrderMarketDeleteRsp", "ITapTrade::TapAPIOrderMarketDeleteRsp", "::ITapTrade::TapAPIOrderMarketInsertRsp"); - // ITapTrade::TapAPIOrderLocalInputRsp - module_vntap::cross.record_assign(parent, "TapAPIOrderLocalInputRsp", "ITapTrade::TapAPIOrderLocalInputRsp", "::ITapTrade::TapAPIOrderInfo"); - // ITapTrade::TapAPIOrderLocalModifyRsp - module_vntap::cross.record_assign(parent, "TapAPIOrderLocalModifyRsp", "ITapTrade::TapAPIOrderLocalModifyRsp", "::ITapTrade::TapAPIOrderInfo"); - // ITapTrade::TapAPIOrderLocalTransferRsp - module_vntap::cross.record_assign(parent, "TapAPIOrderLocalTransferRsp", "ITapTrade::TapAPIOrderLocalTransferRsp", "::ITapTrade::TapAPIOrderInfo"); - // ITapTrade::TapAPIFillLocalInputRsp - module_vntap::cross.record_assign(parent, "TapAPIFillLocalInputRsp", "ITapTrade::TapAPIFillLocalInputRsp", "::ITapTrade::TapAPIFillLocalInputReq"); - // ITapTrade::TapAPIFillLocalRemoveRsp - module_vntap::cross.record_assign(parent, "TapAPIFillLocalRemoveRsp", "ITapTrade::TapAPIFillLocalRemoveRsp", "::ITapTrade::TapAPIFillLocalRemoveReq"); -} -void generate_caster_ITapTrade(pybind11::object & parent) -{ - struct caster: c2py::caster{}; - auto c = c2py::caster::bind(parent, "caster"); - // ITapTrade::TapAPIApplicationInfo - c2py::caster::try_generate(c, "toTapAPIApplicationInfo"); - // ITapTrade::TapAPICommodity - c2py::caster::try_generate(c, "toTapAPICommodity"); - // ITapTrade::TapAPIContract - c2py::caster::try_generate(c, "toTapAPIContract"); - // ITapTrade::TapAPIExchangeInfo - c2py::caster::try_generate(c, "toTapAPIExchangeInfo"); - // ITapTrade::TapAPIChangePasswordReq - c2py::caster::try_generate(c, "toTapAPIChangePasswordReq"); - // ITapTrade::TapAPIAuthPasswordReq - c2py::caster::try_generate(c, "toTapAPIAuthPasswordReq"); - // ITapTrade::TapAPITradeLoginAuth - c2py::caster::try_generate(c, "toTapAPITradeLoginAuth"); - // ITapTrade::TapAPITradeLoginRspInfo - c2py::caster::try_generate(c, "toTapAPITradeLoginRspInfo"); - // ITapTrade::TapAPIRequestVertificateCodeRsp - c2py::caster::try_generate(c, "toTapAPIRequestVertificateCodeRsp"); - // ITapTrade::TapAPIAccQryReq - c2py::caster::try_generate(c, "toTapAPIAccQryReq"); - // ITapTrade::TapAPIAccountInfo - c2py::caster::try_generate(c, "toTapAPIAccountInfo"); - // ITapTrade::TapAPINewOrder - c2py::caster::try_generate(c, "toTapAPINewOrder"); - // ITapTrade::TapAPIOrderInfo - c2py::caster::try_generate(c, "toTapAPIOrderInfo"); - // ITapTrade::TapAPIOrderInfoNotice - c2py::caster::try_generate(c, "toTapAPIOrderInfoNotice"); - // ITapTrade::TapAPIOrderActionRsp - c2py::caster::try_generate(c, "toTapAPIOrderActionRsp"); - // ITapTrade::TapAPIAmendOrder - c2py::caster::try_generate(c, "toTapAPIAmendOrder"); - // ITapTrade::TapAPIOrderCancelReq - c2py::caster::try_generate(c, "toTapAPIOrderCancelReq"); - // ITapTrade::TapAPIOrderQryReq - c2py::caster::try_generate(c, "toTapAPIOrderQryReq"); - // ITapTrade::TapAPIOrderProcessQryReq - c2py::caster::try_generate(c, "toTapAPIOrderProcessQryReq"); - // ITapTrade::TapAPIFillQryReq - c2py::caster::try_generate(c, "toTapAPIFillQryReq"); - // ITapTrade::TapAPIFillInfo - c2py::caster::try_generate(c, "toTapAPIFillInfo"); - // ITapTrade::TapAPICloseQryReq - c2py::caster::try_generate(c, "toTapAPICloseQryReq"); - // ITapTrade::TapAPICloseInfo - c2py::caster::try_generate(c, "toTapAPICloseInfo"); - // ITapTrade::TapAPIPositionQryReq - c2py::caster::try_generate(c, "toTapAPIPositionQryReq"); - // ITapTrade::TapAPIPositionInfo - c2py::caster::try_generate(c, "toTapAPIPositionInfo"); - // ITapTrade::TapAPIPositionProfit - c2py::caster::try_generate(c, "toTapAPIPositionProfit"); - // ITapTrade::TapAPIPositionProfitNotice - c2py::caster::try_generate(c, "toTapAPIPositionProfitNotice"); - // ITapTrade::TapAPIPositionSummary - c2py::caster::try_generate(c, "toTapAPIPositionSummary"); - // ITapTrade::TapAPIFundReq - c2py::caster::try_generate(c, "toTapAPIFundReq"); - // ITapTrade::TapAPIFundData - c2py::caster::try_generate(c, "toTapAPIFundData"); - // ITapTrade::TapAPICommodityInfo - c2py::caster::try_generate(c, "toTapAPICommodityInfo"); - // ITapTrade::TapAPITradeContractInfo - c2py::caster::try_generate(c, "toTapAPITradeContractInfo"); - // ITapTrade::TapAPICurrencyInfo - c2py::caster::try_generate(c, "toTapAPICurrencyInfo"); - // ITapTrade::TapAPITradeMessageReq - c2py::caster::try_generate(c, "toTapAPITradeMessageReq"); - // ITapTrade::TapAPITradeMessage - c2py::caster::try_generate(c, "toTapAPITradeMessage"); - // ITapTrade::TapAPIBillQryReq - c2py::caster::try_generate(c, "toTapAPIBillQryReq"); - // ITapTrade::TapAPIBillQryRsp - c2py::caster::try_generate(c, "toTapAPIBillQryRsp"); - // ITapTrade::TapAPIHisOrderQryReq - c2py::caster::try_generate(c, "toTapAPIHisOrderQryReq"); - // ITapTrade::TapAPIHisOrderQryRsp - c2py::caster::try_generate(c, "toTapAPIHisOrderQryRsp"); - // ITapTrade::TapAPIHisMatchQryReq - c2py::caster::try_generate(c, "toTapAPIHisMatchQryReq"); - // ITapTrade::TapAPIHisMatchQryRsp - c2py::caster::try_generate(c, "toTapAPIHisMatchQryRsp"); - // ITapTrade::TapAPIHisOrderProcessQryReq - c2py::caster::try_generate(c, "toTapAPIHisOrderProcessQryReq"); - // ITapTrade::TapAPIHisPositionQryReq - c2py::caster::try_generate(c, "toTapAPIHisPositionQryReq"); - // ITapTrade::TapAPIHisPositionQryRsp - c2py::caster::try_generate(c, "toTapAPIHisPositionQryRsp"); - // ITapTrade::TapAPIHisDeliveryQryReq - c2py::caster::try_generate(c, "toTapAPIHisDeliveryQryReq"); - // ITapTrade::TapAPIHisDeliveryQryRsp - c2py::caster::try_generate(c, "toTapAPIHisDeliveryQryRsp"); - // ITapTrade::TapAPIAccountCashAdjustQryReq - c2py::caster::try_generate(c, "toTapAPIAccountCashAdjustQryReq"); - // ITapTrade::TapAPIAccountCashAdjustQryRsp - c2py::caster::try_generate(c, "toTapAPIAccountCashAdjustQryRsp"); - // ITapTrade::TapAPIAccountFeeRentQryReq - c2py::caster::try_generate(c, "toTapAPIAccountFeeRentQryReq"); - // ITapTrade::TapAPIAccountFeeRentQryRsp - c2py::caster::try_generate(c, "toTapAPIAccountFeeRentQryRsp"); - // ITapTrade::TapAPIAccountMarginRentQryReq - c2py::caster::try_generate(c, "toTapAPIAccountMarginRentQryReq"); - // ITapTrade::TapAPIAccountMarginRentQryRsp - c2py::caster::try_generate(c, "toTapAPIAccountMarginRentQryRsp"); - // ITapTrade::TapAPIOrderQuoteMarketNotice - c2py::caster::try_generate(c, "toTapAPIOrderQuoteMarketNotice"); - // ITapTrade::TapAPIOrderMarketInsertReq - c2py::caster::try_generate(c, "toTapAPIOrderMarketInsertReq"); - // ITapTrade::TapAPIOrderMarketInsertRsp - c2py::caster::try_generate(c, "toTapAPIOrderMarketInsertRsp"); - // ITapTrade::TapAPIOrderMarketDeleteReq - c2py::caster::try_generate(c, "toTapAPIOrderMarketDeleteReq"); - // ITapTrade::TapAPIOrderLocalRemoveReq - c2py::caster::try_generate(c, "toTapAPIOrderLocalRemoveReq"); - // ITapTrade::TapAPIOrderLocalRemoveRsp - c2py::caster::try_generate(c, "toTapAPIOrderLocalRemoveRsp"); - // ITapTrade::TapAPIOrderLocalInputReq - c2py::caster::try_generate(c, "toTapAPIOrderLocalInputReq"); - // ITapTrade::TapAPIOrderLocalModifyReq - c2py::caster::try_generate(c, "toTapAPIOrderLocalModifyReq"); - // ITapTrade::TapAPIOrderLocalTransferReq - c2py::caster::try_generate(c, "toTapAPIOrderLocalTransferReq"); - // ITapTrade::TapAPIFillLocalInputReq - c2py::caster::try_generate(c, "toTapAPIFillLocalInputReq"); - // ITapTrade::TapAPIFillLocalRemoveReq - c2py::caster::try_generate(c, "toTapAPIFillLocalRemoveReq"); - // ITapTrade::TapAPITradingCalendarQryRsp - c2py::caster::try_generate(c, "toTapAPITradingCalendarQryRsp"); - // ITapTrade::ITapTradeAPINotify - c2py::caster::try_generate(c, "toITapTradeAPINotify"); - // ITapTrade::ITapTradeAPI - c2py::caster::try_generate(c, "toITapTradeAPI"); - // ITapTrade::TAPISTR_10 - c2py::caster::try_generate(c, "toTAPISTR_10"); - // ITapTrade::TAPISTR_20 - c2py::caster::try_generate(c, "toTAPISTR_20"); - // ITapTrade::TAPISTR_30 - c2py::caster::try_generate(c, "toTAPISTR_30"); - // ITapTrade::TAPISTR_40 - c2py::caster::try_generate(c, "toTAPISTR_40"); - // ITapTrade::TAPISTR_50 - c2py::caster::try_generate(c, "toTAPISTR_50"); - // ITapTrade::TAPISTR_70 - c2py::caster::try_generate(c, "toTAPISTR_70"); - // ITapTrade::TAPISTR_100 - c2py::caster::try_generate(c, "toTAPISTR_100"); - // ITapTrade::TAPISTR_300 - c2py::caster::try_generate(c, "toTAPISTR_300"); - // ITapTrade::TAPISTR_500 - c2py::caster::try_generate(c, "toTAPISTR_500"); - // ITapTrade::TAPISTR_2000 - c2py::caster::try_generate(c, "toTAPISTR_2000"); - // ITapTrade::TAPIAUTHCODE - c2py::caster::try_generate(c, "toTAPIAUTHCODE"); - // ITapTrade::TAPIMACTYPE - c2py::caster::try_generate(c, "toTAPIMACTYPE"); - // ITapTrade::TAPISecondSerialIDType - c2py::caster::try_generate(c, "toTAPISecondSerialIDType"); - // ITapTrade::TAPICHAR - c2py::caster::try_generate(c, "toTAPICHAR"); - // ITapTrade::TAPIClientIDType - c2py::caster::try_generate(c, "toTAPIClientIDType"); - // ITapTrade::TAPIINT32 - c2py::caster::try_generate(c, "toTAPIINT32"); - // ITapTrade::TAPIUINT32 - c2py::caster::try_generate(c, "toTAPIUINT32"); - // ITapTrade::TAPIINT64 - c2py::caster::try_generate(c, "toTAPIINT64"); - // ITapTrade::TAPIUINT64 - c2py::caster::try_generate(c, "toTAPIUINT64"); - // ITapTrade::TAPIUINT16 - c2py::caster::try_generate(c, "toTAPIUINT16"); - // ITapTrade::TAPIUINT8 - c2py::caster::try_generate(c, "toTAPIUINT8"); - // ITapTrade::TAPIREAL64 - c2py::caster::try_generate(c, "toTAPIREAL64"); - // ITapTrade::TAPIYNFLAG - c2py::caster::try_generate(c, "toTAPIYNFLAG"); - // ITapTrade::TAPIPasswordType - c2py::caster::try_generate(c, "toTAPIPasswordType"); - // ITapTrade::TAPIDTSTAMP - c2py::caster::try_generate(c, "toTAPIDTSTAMP"); - // ITapTrade::TAPIDATETIME - c2py::caster::try_generate(c, "toTAPIDATETIME"); - // ITapTrade::TAPIDATE - c2py::caster::try_generate(c, "toTAPIDATE"); - // ITapTrade::TAPITIME - c2py::caster::try_generate(c, "toTAPITIME"); - // ITapTrade::TAPILOGLEVEL - c2py::caster::try_generate(c, "toTAPILOGLEVEL"); - // ITapTrade::TAPIOptionType - c2py::caster::try_generate(c, "toTAPIOptionType"); - // ITapTrade::TAPICommodityType - c2py::caster::try_generate(c, "toTAPICommodityType"); - // ITapTrade::TAPICallOrPutFlagType - c2py::caster::try_generate(c, "toTAPICallOrPutFlagType"); - // ITapTrade::TAPIAccountType - c2py::caster::try_generate(c, "toTAPIAccountType"); - // ITapTrade::TAPIRightIDType - c2py::caster::try_generate(c, "toTAPIRightIDType"); - // ITapTrade::TAPIUserTypeType - c2py::caster::try_generate(c, "toTAPIUserTypeType"); - // ITapTrade::TAPIAccountState - c2py::caster::try_generate(c, "toTAPIAccountState"); - // ITapTrade::TAPIAccountRightType - c2py::caster::try_generate(c, "toTAPIAccountRightType"); - // ITapTrade::TAPIOrderTypeType - c2py::caster::try_generate(c, "toTAPIOrderTypeType"); - // ITapTrade::TAPIOrderSourceType - c2py::caster::try_generate(c, "toTAPIOrderSourceType"); - // ITapTrade::TAPITimeInForceType - c2py::caster::try_generate(c, "toTAPITimeInForceType"); - // ITapTrade::TAPISideType - c2py::caster::try_generate(c, "toTAPISideType"); - // ITapTrade::TAPIPositionEffectType - c2py::caster::try_generate(c, "toTAPIPositionEffectType"); - // ITapTrade::TAPIHedgeFlagType - c2py::caster::try_generate(c, "toTAPIHedgeFlagType"); - // ITapTrade::TAPIOrderStateType - c2py::caster::try_generate(c, "toTAPIOrderStateType"); - // ITapTrade::TAPICalculateModeType - c2py::caster::try_generate(c, "toTAPICalculateModeType"); - // ITapTrade::TAPIMatchSourceType - c2py::caster::try_generate(c, "toTAPIMatchSourceType"); - // ITapTrade::TAPIOpenCloseModeType - c2py::caster::try_generate(c, "toTAPIOpenCloseModeType"); - // ITapTrade::TAPIFutureAlgType - c2py::caster::try_generate(c, "toTAPIFutureAlgType"); - // ITapTrade::TAPIOptionAlgType - c2py::caster::try_generate(c, "toTAPIOptionAlgType"); - // ITapTrade::TAPISendType - c2py::caster::try_generate(c, "toTAPISendType"); - // ITapTrade::TAPIBankAccountLWFlagType - c2py::caster::try_generate(c, "toTAPIBankAccountLWFlagType"); - // ITapTrade::TAPICashAdjustTypeType - c2py::caster::try_generate(c, "toTAPICashAdjustTypeType"); - // ITapTrade::TAPIMarginCalculateModeType - c2py::caster::try_generate(c, "toTAPIMarginCalculateModeType"); - // ITapTrade::TAPIOptionMarginCalculateModeType - c2py::caster::try_generate(c, "toTAPIOptionMarginCalculateModeType"); - // ITapTrade::TAPICmbDirectType - c2py::caster::try_generate(c, "toTAPICmbDirectType"); - // ITapTrade::TAPIDeliveryModeType - c2py::caster::try_generate(c, "toTAPIDeliveryModeType"); - // ITapTrade::TAPIContractTypeType - c2py::caster::try_generate(c, "toTAPIContractTypeType"); - // ITapTrade::TAPITacticsTypeType - c2py::caster::try_generate(c, "toTAPITacticsTypeType"); - // ITapTrade::TAPIORDERACT - c2py::caster::try_generate(c, "toTAPIORDERACT"); - // ITapTrade::TAPITriggerConditionType - c2py::caster::try_generate(c, "toTAPITriggerConditionType"); - // ITapTrade::TAPITriggerPriceTypeType - c2py::caster::try_generate(c, "toTAPITriggerPriceTypeType"); - // ITapTrade::TAPITradingStateType - c2py::caster::try_generate(c, "toTAPITradingStateType"); - // ITapTrade::TAPINoticeIgnoreFlagType - c2py::caster::try_generate(c, "toTAPINoticeIgnoreFlagType"); - // ITapTrade::TAPIOrderQryTypeType - c2py::caster::try_generate(c, "toTAPIOrderQryTypeType"); - // ITapTrade::TapAPIOrderDeactivateReq - c2py::caster::try_generate(c, "toTapAPIOrderDeactivateReq"); - // ITapTrade::TapAPIOrderActivateReq - c2py::caster::try_generate(c, "toTapAPIOrderActivateReq"); - // ITapTrade::TapAPIOrderDeleteReq - c2py::caster::try_generate(c, "toTapAPIOrderDeleteReq"); - // ITapTrade::TAPIMsgReceiverType - c2py::caster::try_generate(c, "toTAPIMsgReceiverType"); - // ITapTrade::TAPIMsgLevelType - c2py::caster::try_generate(c, "toTAPIMsgLevelType"); - // ITapTrade::TAPIMsgTypeType - c2py::caster::try_generate(c, "toTAPIMsgTypeType"); - // ITapTrade::TAPIBillTypeType - c2py::caster::try_generate(c, "toTAPIBillTypeType"); - // ITapTrade::TAPIBillFileTypeType - c2py::caster::try_generate(c, "toTAPIBillFileTypeType"); - // ITapTrade::TapAPIHisOrderProcessQryRsp - c2py::caster::try_generate(c, "toTapAPIHisOrderProcessQryRsp"); - // ITapTrade::TAPISettleFlagType - c2py::caster::try_generate(c, "toTAPISettleFlagType"); - // ITapTrade::TapAPIOrderMarketDeleteRsp - c2py::caster::try_generate(c, "toTapAPIOrderMarketDeleteRsp"); - // ITapTrade::TapAPIOrderLocalInputRsp - c2py::caster::try_generate(c, "toTapAPIOrderLocalInputRsp"); - // ITapTrade::TapAPIOrderLocalModifyRsp - c2py::caster::try_generate(c, "toTapAPIOrderLocalModifyRsp"); - // ITapTrade::TapAPIOrderLocalTransferRsp - c2py::caster::try_generate(c, "toTapAPIOrderLocalTransferRsp"); - // ITapTrade::TapAPIFillLocalInputRsp - c2py::caster::try_generate(c, "toTapAPIFillLocalInputRsp"); - // ITapTrade::TapAPIFillLocalRemoveRsp - c2py::caster::try_generate(c, "toTapAPIFillLocalRemoveRsp"); -} -void generate_ITapTrade_caster(pybind11::module & parent) -{ - generate_caster_ITapTrade(parent); -} -void generate_vntap_sub_namespace(pybind11::module & parent) -{ - // ITapTrade - { - auto m = parent.def_submodule("ITapTrade"); - generate_sub_namespace_ITapTrade(m); - } -} -void generate_class_TapAPIApplicationInfo(pybind11::object & parent) -{ - // TapAPIApplicationInfo - pybind11::class_ c(parent, "TapAPIApplicationInfo"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // TapAPIApplicationInfo::AuthCode - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIApplicationInfo, "AuthCode", AuthCode); - // TapAPIApplicationInfo::KeyOperationLogPath - 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) -{ - // TapAPICommodity - pybind11::class_ c(parent, "TapAPICommodity"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // TapAPICommodity::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPICommodity, "ExchangeNo", ExchangeNo); - // TapAPICommodity::CommodityType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPICommodity, "CommodityType", CommodityType); - // TapAPICommodity::CommodityNo - 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) -{ - // TapAPIContract - pybind11::class_ c(parent, "TapAPIContract"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // TapAPIContract::Commodity - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIContract, "Commodity", Commodity); - // TapAPIContract::ContractNo1 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIContract, "ContractNo1", ContractNo1); - // TapAPIContract::StrikePrice1 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIContract, "StrikePrice1", StrikePrice1); - // TapAPIContract::CallOrPutFlag1 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIContract, "CallOrPutFlag1", CallOrPutFlag1); - // TapAPIContract::ContractNo2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIContract, "ContractNo2", ContractNo2); - // TapAPIContract::StrikePrice2 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIContract, "StrikePrice2", StrikePrice2); - // TapAPIContract::CallOrPutFlag2 - 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) -{ - // TapAPIExchangeInfo - pybind11::class_ c(parent, "TapAPIExchangeInfo"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // TapAPIExchangeInfo::ExchangeNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIExchangeInfo, "ExchangeNo", ExchangeNo); - // TapAPIExchangeInfo::ExchangeName - 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) -{ - // TapAPIChangePasswordReq - pybind11::class_ c(parent, "TapAPIChangePasswordReq"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // TapAPIChangePasswordReq::OldPassword - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIChangePasswordReq, "OldPassword", OldPassword); - // TapAPIChangePasswordReq::NewPassword - 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) -{ - // TapAPIQuoteLoginAuth - pybind11::class_ c(parent, "TapAPIQuoteLoginAuth"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // TapAPIQuoteLoginAuth::UserNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteLoginAuth, "UserNo", UserNo); - // TapAPIQuoteLoginAuth::ISModifyPassword - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteLoginAuth, "ISModifyPassword", ISModifyPassword); - // TapAPIQuoteLoginAuth::Password - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteLoginAuth, "Password", Password); - // TapAPIQuoteLoginAuth::NewPassword - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteLoginAuth, "NewPassword", NewPassword); - // TapAPIQuoteLoginAuth::QuoteTempPassword - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteLoginAuth, "QuoteTempPassword", QuoteTempPassword); - // TapAPIQuoteLoginAuth::ISDDA - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteLoginAuth, "ISDDA", ISDDA); - // TapAPIQuoteLoginAuth::DDASerialNo - 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) -{ - // TapAPIQuotLoginRspInfo - pybind11::class_ c(parent, "TapAPIQuotLoginRspInfo"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // TapAPIQuotLoginRspInfo::UserNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "UserNo", UserNo); - // TapAPIQuotLoginRspInfo::UserType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "UserType", UserType); - // TapAPIQuotLoginRspInfo::UserName - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "UserName", UserName); - // TapAPIQuotLoginRspInfo::QuoteTempPassword - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "QuoteTempPassword", QuoteTempPassword); - // TapAPIQuotLoginRspInfo::ReservedInfo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "ReservedInfo", ReservedInfo); - // TapAPIQuotLoginRspInfo::LastLoginIP - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "LastLoginIP", LastLoginIP); - // TapAPIQuotLoginRspInfo::LastLoginProt - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "LastLoginProt", LastLoginProt); - // TapAPIQuotLoginRspInfo::LastLoginTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "LastLoginTime", LastLoginTime); - // TapAPIQuotLoginRspInfo::LastLogoutTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "LastLogoutTime", LastLogoutTime); - // TapAPIQuotLoginRspInfo::TradeDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "TradeDate", TradeDate); - // TapAPIQuotLoginRspInfo::LastSettleTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "LastSettleTime", LastSettleTime); - // TapAPIQuotLoginRspInfo::StartTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "StartTime", StartTime); - // TapAPIQuotLoginRspInfo::InitTime - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuotLoginRspInfo, "InitTime", InitTime); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, TapAPIQuotLoginRspInfo, c); - module_vntap::objects.emplace("TapAPIQuotLoginRspInfo", c); -} diff --git a/vnpy/api/tap/vntap/generated_files/generated_functions_9.cpp b/vnpy/api/tap/vntap/generated_files/generated_functions_9.cpp deleted file mode 100644 index 38e78cd16e..0000000000 --- a/vnpy/api/tap/vntap/generated_files/generated_functions_9.cpp +++ /dev/null @@ -1,390 +0,0 @@ -#include "config.h" - -#include -#include -#include -#include -#include -#include - -#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_TapAPIQuoteCommodityInfo(pybind11::object & parent) -{ - // TapAPIQuoteCommodityInfo - pybind11::class_ c(parent, "TapAPIQuoteCommodityInfo"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // TapAPIQuoteCommodityInfo::Commodity - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "Commodity", Commodity); - // TapAPIQuoteCommodityInfo::CommodityName - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "CommodityName", CommodityName); - // TapAPIQuoteCommodityInfo::CommodityEngName - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "CommodityEngName", CommodityEngName); - // TapAPIQuoteCommodityInfo::ContractSize - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "ContractSize", ContractSize); - // TapAPIQuoteCommodityInfo::CommodityTickSize - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "CommodityTickSize", CommodityTickSize); - // TapAPIQuoteCommodityInfo::CommodityDenominator - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "CommodityDenominator", CommodityDenominator); - // TapAPIQuoteCommodityInfo::CmbDirect - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "CmbDirect", CmbDirect); - // TapAPIQuoteCommodityInfo::CommodityContractLen - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "CommodityContractLen", CommodityContractLen); - // TapAPIQuoteCommodityInfo::IsDST - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "IsDST", IsDST); - // TapAPIQuoteCommodityInfo::RelateCommodity1 - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteCommodityInfo, "RelateCommodity1", RelateCommodity1); - // TapAPIQuoteCommodityInfo::RelateCommodity2 - 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) -{ - // TapAPIQuoteContractInfo - pybind11::class_ c(parent, "TapAPIQuoteContractInfo"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // TapAPIQuoteContractInfo::Contract - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteContractInfo, "Contract", Contract); - // TapAPIQuoteContractInfo::ContractType - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteContractInfo, "ContractType", ContractType); - // TapAPIQuoteContractInfo::QuoteUnderlyingContract - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteContractInfo, "QuoteUnderlyingContract", QuoteUnderlyingContract); - // TapAPIQuoteContractInfo::ContractName - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteContractInfo, "ContractName", ContractName); - // TapAPIQuoteContractInfo::ContractExpDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteContractInfo, "ContractExpDate", ContractExpDate); - // TapAPIQuoteContractInfo::LastTradeDate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteContractInfo, "LastTradeDate", LastTradeDate); - // TapAPIQuoteContractInfo::FirstNoticeDate - 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) -{ - // TapAPIQuoteWhole - pybind11::class_ c(parent, "TapAPIQuoteWhole"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // TapAPIQuoteWhole::Contract - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "Contract", Contract); - // TapAPIQuoteWhole::CurrencyNo - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "CurrencyNo", CurrencyNo); - // TapAPIQuoteWhole::TradingState - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "TradingState", TradingState); - // TapAPIQuoteWhole::DateTimeStamp - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "DateTimeStamp", DateTimeStamp); - // TapAPIQuoteWhole::QPreClosingPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QPreClosingPrice", QPreClosingPrice); - // TapAPIQuoteWhole::QPreSettlePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QPreSettlePrice", QPreSettlePrice); - // TapAPIQuoteWhole::QPrePositionQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QPrePositionQty", QPrePositionQty); - // TapAPIQuoteWhole::QOpeningPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QOpeningPrice", QOpeningPrice); - // TapAPIQuoteWhole::QLastPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QLastPrice", QLastPrice); - // TapAPIQuoteWhole::QHighPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QHighPrice", QHighPrice); - // TapAPIQuoteWhole::QLowPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QLowPrice", QLowPrice); - // TapAPIQuoteWhole::QHisHighPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QHisHighPrice", QHisHighPrice); - // TapAPIQuoteWhole::QHisLowPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QHisLowPrice", QHisLowPrice); - // TapAPIQuoteWhole::QLimitUpPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QLimitUpPrice", QLimitUpPrice); - // TapAPIQuoteWhole::QLimitDownPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QLimitDownPrice", QLimitDownPrice); - // TapAPIQuoteWhole::QTotalQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QTotalQty", QTotalQty); - // TapAPIQuoteWhole::QTotalTurnover - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QTotalTurnover", QTotalTurnover); - // TapAPIQuoteWhole::QPositionQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QPositionQty", QPositionQty); - // TapAPIQuoteWhole::QAveragePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QAveragePrice", QAveragePrice); - // TapAPIQuoteWhole::QClosingPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QClosingPrice", QClosingPrice); - // TapAPIQuoteWhole::QSettlePrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QSettlePrice", QSettlePrice); - // TapAPIQuoteWhole::QLastQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QLastQty", QLastQty); - // TapAPIQuoteWhole::QBidPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QBidPrice", QBidPrice); - // TapAPIQuoteWhole::QBidQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QBidQty", QBidQty); - // TapAPIQuoteWhole::QAskPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QAskPrice", QAskPrice); - // TapAPIQuoteWhole::QAskQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QAskQty", QAskQty); - // TapAPIQuoteWhole::QImpliedBidPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QImpliedBidPrice", QImpliedBidPrice); - // TapAPIQuoteWhole::QImpliedBidQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QImpliedBidQty", QImpliedBidQty); - // TapAPIQuoteWhole::QImpliedAskPrice - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QImpliedAskPrice", QImpliedAskPrice); - // TapAPIQuoteWhole::QImpliedAskQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QImpliedAskQty", QImpliedAskQty); - // TapAPIQuoteWhole::QPreDelta - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QPreDelta", QPreDelta); - // TapAPIQuoteWhole::QCurrDelta - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QCurrDelta", QCurrDelta); - // TapAPIQuoteWhole::QInsideQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QInsideQty", QInsideQty); - // TapAPIQuoteWhole::QOutsideQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QOutsideQty", QOutsideQty); - // TapAPIQuoteWhole::QTurnoverRate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QTurnoverRate", QTurnoverRate); - // TapAPIQuoteWhole::Q5DAvgQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "Q5DAvgQty", Q5DAvgQty); - // TapAPIQuoteWhole::QPERatio - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QPERatio", QPERatio); - // TapAPIQuoteWhole::QTotalValue - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QTotalValue", QTotalValue); - // TapAPIQuoteWhole::QNegotiableValue - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QNegotiableValue", QNegotiableValue); - // TapAPIQuoteWhole::QPositionTrend - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QPositionTrend", QPositionTrend); - // TapAPIQuoteWhole::QChangeSpeed - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QChangeSpeed", QChangeSpeed); - // TapAPIQuoteWhole::QChangeRate - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QChangeRate", QChangeRate); - // TapAPIQuoteWhole::QChangeValue - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QChangeValue", QChangeValue); - // TapAPIQuoteWhole::QSwing - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QSwing", QSwing); - // TapAPIQuoteWhole::QTotalBidQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QTotalBidQty", QTotalBidQty); - // TapAPIQuoteWhole::QTotalAskQty - c.AUTOCXXPY_DEF_PROPERTY(tag_vntap, TapAPIQuoteWhole, "QTotalAskQty", QTotalAskQty); - // TapAPIQuoteWhole::UnderlyContract - 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) -{ - // ITapQuoteAPINotify - pybind11::class_ c(parent, "ITapQuoteAPINotify"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapQuoteAPINotify::OnRspLogin - c.def("OnRspLogin", - &ITapQuoteAPINotify::OnRspLogin, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapQuoteAPINotify::OnAPIReady - c.def("OnAPIReady", - &ITapQuoteAPINotify::OnAPIReady, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapQuoteAPINotify::OnDisconnect - c.def("OnDisconnect", - &ITapQuoteAPINotify::OnDisconnect, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapQuoteAPINotify::OnRspQryCommodity - c.def("OnRspQryCommodity", - &ITapQuoteAPINotify::OnRspQryCommodity, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapQuoteAPINotify::OnRspQryContract - c.def("OnRspQryContract", - &ITapQuoteAPINotify::OnRspQryContract, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapQuoteAPINotify::OnRspSubscribeQuote - c.def("OnRspSubscribeQuote", - &ITapQuoteAPINotify::OnRspSubscribeQuote, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapQuoteAPINotify::OnRspUnSubscribeQuote - c.def("OnRspUnSubscribeQuote", - &ITapQuoteAPINotify::OnRspUnSubscribeQuote, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapQuoteAPINotify::OnRtnQuote - c.def("OnRtnQuote", - &ITapQuoteAPINotify::OnRtnQuote, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapQuoteAPINotify, c); - module_vntap::objects.emplace("ITapQuoteAPINotify", c); -} -void generate_class_ITapQuoteAPI(pybind11::object & parent) -{ - // ITapQuoteAPI - pybind11::class_ c(parent, "ITapQuoteAPI"); - if constexpr (std::is_default_constructible_v) - c.def(pybind11::init<>()); - // ITapQuoteAPI::SetAPINotify - c.def("SetAPINotify", - &ITapQuoteAPI::SetAPINotify, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapQuoteAPI::SetHostAddress - c.def("SetHostAddress", - &ITapQuoteAPI::SetHostAddress, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapQuoteAPI::Login - c.def("Login", - &ITapQuoteAPI::Login, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapQuoteAPI::Disconnect - c.def("Disconnect", - &ITapQuoteAPI::Disconnect, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapQuoteAPI::QryCommodity - c.def("QryCommodity", - c2py::output_argument_transform < - c2py::function_constant<&ITapQuoteAPI::QryCommodity>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapQuoteAPI::QryContract - c.def("QryContract", - c2py::output_argument_transform < - c2py::function_constant<&ITapQuoteAPI::QryContract>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapQuoteAPI::SubscribeQuote - c.def("SubscribeQuote", - c2py::output_argument_transform < - c2py::function_constant<&ITapQuoteAPI::SubscribeQuote>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - // ITapQuoteAPI::UnSubscribeQuote - c.def("UnSubscribeQuote", - c2py::output_argument_transform < - c2py::function_constant<&ITapQuoteAPI::UnSubscribeQuote>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - AUTOCXXPY_POST_REGISTER_CLASS(tag_vntap, ITapQuoteAPI, c); - module_vntap::objects.emplace("ITapQuoteAPI", c); -} -void generate_vntap_classes(pybind11::module & parent) -{ - generate_class_TapAPIApplicationInfo(parent); - generate_class_TapAPICommodity(parent); - generate_class_TapAPIContract(parent); - generate_class_TapAPIExchangeInfo(parent); - generate_class_TapAPIChangePasswordReq(parent); - generate_class_TapAPIQuoteLoginAuth(parent); - generate_class_TapAPIQuotLoginRspInfo(parent); - generate_class_TapAPIQuoteCommodityInfo(parent); - generate_class_TapAPIQuoteContractInfo(parent); - generate_class_TapAPIQuoteWhole(parent); - generate_class_ITapQuoteAPINotify(parent); - generate_class_ITapQuoteAPI(parent); -} -void generate_vntap_enums(pybind11::module & parent) -{ - -} -void generate_vntap_functions_0(pybind11::module & parent) -{ - parent.def("CreateITapTradeAPI", - c2py::output_argument_transform < - c2py::function_constant<&CreateITapTradeAPI>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - parent.def("FreeITapTradeAPI", - &FreeITapTradeAPI, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - parent.def("GetITapTradeAPIVersion", - &GetITapTradeAPIVersion, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - parent.def("SetITapTradeAPIDataPath", - &SetITapTradeAPIDataPath, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - parent.def("SetITapTradeAPILogLevel", - &SetITapTradeAPILogLevel, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - parent.def("GetITapErrorDescribe", - &GetITapErrorDescribe, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - parent.def("CreateTapQuoteAPI", - c2py::output_argument_transform < - c2py::function_constant<&CreateTapQuoteAPI>, - std::integral_constant - >::value, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - parent.def("FreeTapQuoteAPI", - &FreeTapQuoteAPI, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - parent.def("GetTapQuoteAPIVersion", - &GetTapQuoteAPIVersion, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - parent.def("SetTapQuoteAPIDataPath", - &SetTapQuoteAPIDataPath, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); - parent.def("SetTapQuoteAPILogLevel", - &SetTapQuoteAPILogLevel, - pybind11::return_value_policy::reference, - pybind11::call_guard() - ); -} -void generate_vntap_functions(pybind11::module & parent) -{ - generate_vntap_functions_0(parent); -} diff --git a/vnpy/api/tap/vntap/generated_files/module.cpp b/vnpy/api/tap/vntap/generated_files/module.cpp deleted file mode 100644 index a8c26b8921..0000000000 --- a/vnpy/api/tap/vntap/generated_files/module.cpp +++ /dev/null @@ -1,49 +0,0 @@ -#include "config.h" - -#include -#include -#include -#include -#include -#include - -#include "module.hpp" -#include "generated_functions.h" - -#include "iTapTradeAPI.h" -#include "TapQuoteAPI.h" -#include "TapAPIError.h" -#include "iTapAPIError.h" -#include "custom/custom_wrappers.hpp" - - -c2py::cross_assign module_vntap::cross; -c2py::object_store module_vntap::objects; - -void additional_init(pybind11::module &m) -{ - c2py::additional_init::init(m); -} - -void init_dispatcher(pybind11::module &m) -{ - m.def("set_async_callback_exception_handler", &c2py::async_callback_exception_handler::set_handler); - - // maybe module_local is unnecessary - pybind11::class_ c(m, "AsyncDispatchException", pybind11::module_local()); - c.def_property_readonly("what", &c2py::async_dispatch_exception::what_mutable); - c.def_readonly("instance", &c2py::async_dispatch_exception::instance); - c.def_readonly("function_name", &c2py::async_dispatch_exception::function_name); - - c2py::dispatcher::instance().start(); -} - -PYBIND11_MODULE(vntap, m) -{ - generate_vntap(m); - - module_vntap::process_post_assign(); - - additional_init(m); - init_dispatcher(m); -} diff --git a/vnpy/api/tap/vntap/generated_files/module.hpp b/vnpy/api/tap/vntap/generated_files/module.hpp deleted file mode 100644 index 578d5561b2..0000000000 --- a/vnpy/api/tap/vntap/generated_files/module.hpp +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once -#include "config.h" - -#include - -struct tag_vntap{}; -struct module_vntap{ - static c2py::cross_assign cross; - static c2py::object_store objects; - static inline void process_post_assign() - { - cross.process_assign(objects); - cross.clear(); - objects.clear(); - } -}; -using module_tag=tag_vntap; - - diff --git a/vnpy/api/tap/vntap/generated_files/wrappers.hpp b/vnpy/api/tap/vntap/generated_files/wrappers.hpp deleted file mode 100644 index 5bc14c0405..0000000000 --- a/vnpy/api/tap/vntap/generated_files/wrappers.hpp +++ /dev/null @@ -1,388 +0,0 @@ -#pragma once -#include "config.h" - -#include -#include - -#include "generated_functions.h" - -#include "iTapTradeAPI.h" -#include "TapQuoteAPI.h" -#include "TapAPIError.h" -#include "iTapAPIError.h" -#include "custom/custom_wrappers.hpp" - - - -class PyITapQuoteAPINotify : public ITapQuoteAPINotify -{ -public: - void OnRspLogin(TAPIINT32 errorCode,const TapAPIQuotLoginRspInfo * info) override - { - return c2py::callback_wrapper<&ITapQuoteAPINotify::OnRspLogin>::call( - this,"OnRspLogin",errorCode,info - ); - } - void OnAPIReady() override - { - return c2py::callback_wrapper<&ITapQuoteAPINotify::OnAPIReady>::call( - this,"OnAPIReady" - ); - } - void OnDisconnect(TAPIINT32 reasonCode) override - { - return c2py::callback_wrapper<&ITapQuoteAPINotify::OnDisconnect>::call( - this,"OnDisconnect",reasonCode - ); - } - void OnRspQryCommodity(TAPIUINT32 sessionID,TAPIINT32 errorCode,TAPIYNFLAG isLast,const TapAPIQuoteCommodityInfo * info) override - { - return c2py::callback_wrapper<&ITapQuoteAPINotify::OnRspQryCommodity>::call( - this,"OnRspQryCommodity",sessionID,errorCode,isLast,info - ); - } - void OnRspQryContract(TAPIUINT32 sessionID,TAPIINT32 errorCode,TAPIYNFLAG isLast,const TapAPIQuoteContractInfo * info) override - { - return c2py::callback_wrapper<&ITapQuoteAPINotify::OnRspQryContract>::call( - this,"OnRspQryContract",sessionID,errorCode,isLast,info - ); - } - void OnRspSubscribeQuote(TAPIUINT32 sessionID,TAPIINT32 errorCode,TAPIYNFLAG isLast,const TapAPIQuoteWhole * info) override - { - return c2py::callback_wrapper<&ITapQuoteAPINotify::OnRspSubscribeQuote>::call( - this,"OnRspSubscribeQuote",sessionID,errorCode,isLast,info - ); - } - void OnRspUnSubscribeQuote(TAPIUINT32 sessionID,TAPIINT32 errorCode,TAPIYNFLAG isLast,const TapAPIContract * info) override - { - return c2py::callback_wrapper<&ITapQuoteAPINotify::OnRspUnSubscribeQuote>::call( - this,"OnRspUnSubscribeQuote",sessionID,errorCode,isLast,info - ); - } - void OnRtnQuote(const TapAPIQuoteWhole * info) override - { - return c2py::callback_wrapper<&ITapQuoteAPINotify::OnRtnQuote>::call( - this,"OnRtnQuote",info - ); - } - -}; - -class PyITapQuoteAPI : public ITapQuoteAPI -{ -public: - -}; - -class PyITapTradeAPINotify : public ITapTrade::ITapTradeAPINotify -{ -public: - void OnConnect() override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnConnect>::call( - this,"OnConnect" - ); - } - void OnRspLogin(ITapTrade::TAPIINT32 errorCode,const ITapTrade::TapAPITradeLoginRspInfo * loginRspInfo) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspLogin>::call( - this,"OnRspLogin",errorCode,loginRspInfo - ); - } - void OnRtnContactInfo(ITapTrade::TAPIINT32 errorCode,ITapTrade::TAPIYNFLAG isLast,const ITapTrade::TAPISTR_40 ContactInfo) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRtnContactInfo>::call( - this,"OnRtnContactInfo",errorCode,isLast,ContactInfo - ); - } - void OnRspRequestVertificateCode(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,const ITapTrade::TapAPIRequestVertificateCodeRsp * rsp) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspRequestVertificateCode>::call( - this,"OnRspRequestVertificateCode",sessionID,errorCode,rsp - ); - } - void OnExpriationDate(ITapTrade::TAPIDATE date,int days) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnExpriationDate>::call( - this,"OnExpriationDate",date,days - ); - } - void OnAPIReady(ITapTrade::TAPIINT32 errorCode) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnAPIReady>::call( - this,"OnAPIReady",errorCode - ); - } - void OnDisconnect(ITapTrade::TAPIINT32 reasonCode) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnDisconnect>::call( - this,"OnDisconnect",reasonCode - ); - } - void OnRspChangePassword(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspChangePassword>::call( - this,"OnRspChangePassword",sessionID,errorCode - ); - } - void OnRspAuthPassword(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspAuthPassword>::call( - this,"OnRspAuthPassword",sessionID,errorCode - ); - } - void OnRspQryTradingDate(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,const ITapTrade::TapAPITradingCalendarQryRsp * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspQryTradingDate>::call( - this,"OnRspQryTradingDate",sessionID,errorCode,info - ); - } - void OnRspSetReservedInfo(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,const ITapTrade::TAPISTR_50 info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspSetReservedInfo>::call( - this,"OnRspSetReservedInfo",sessionID,errorCode,info - ); - } - void OnRspQryAccount(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIUINT32 errorCode,ITapTrade::TAPIYNFLAG isLast,const ITapTrade::TapAPIAccountInfo * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspQryAccount>::call( - this,"OnRspQryAccount",sessionID,errorCode,isLast,info - ); - } - void OnRspQryFund(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,ITapTrade::TAPIYNFLAG isLast,const ITapTrade::TapAPIFundData * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspQryFund>::call( - this,"OnRspQryFund",sessionID,errorCode,isLast,info - ); - } - void OnRtnFund(const ITapTrade::TapAPIFundData * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRtnFund>::call( - this,"OnRtnFund",info - ); - } - void OnRspQryExchange(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,ITapTrade::TAPIYNFLAG isLast,const ITapTrade::TapAPIExchangeInfo * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspQryExchange>::call( - this,"OnRspQryExchange",sessionID,errorCode,isLast,info - ); - } - void OnRspQryCommodity(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,ITapTrade::TAPIYNFLAG isLast,const ITapTrade::TapAPICommodityInfo * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspQryCommodity>::call( - this,"OnRspQryCommodity",sessionID,errorCode,isLast,info - ); - } - void OnRspQryContract(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,ITapTrade::TAPIYNFLAG isLast,const ITapTrade::TapAPITradeContractInfo * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspQryContract>::call( - this,"OnRspQryContract",sessionID,errorCode,isLast,info - ); - } - void OnRtnContract(const ITapTrade::TapAPITradeContractInfo * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRtnContract>::call( - this,"OnRtnContract",info - ); - } - void OnRspOrderAction(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,const ITapTrade::TapAPIOrderActionRsp * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspOrderAction>::call( - this,"OnRspOrderAction",sessionID,errorCode,info - ); - } - void OnRtnOrder(const ITapTrade::TapAPIOrderInfoNotice * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRtnOrder>::call( - this,"OnRtnOrder",info - ); - } - void OnRspQryOrder(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,ITapTrade::TAPIYNFLAG isLast,const ITapTrade::TapAPIOrderInfo * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspQryOrder>::call( - this,"OnRspQryOrder",sessionID,errorCode,isLast,info - ); - } - void OnRspQryOrderProcess(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,ITapTrade::TAPIYNFLAG isLast,const ITapTrade::TapAPIOrderInfo * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspQryOrderProcess>::call( - this,"OnRspQryOrderProcess",sessionID,errorCode,isLast,info - ); - } - void OnRspQryFill(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,ITapTrade::TAPIYNFLAG isLast,const ITapTrade::TapAPIFillInfo * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspQryFill>::call( - this,"OnRspQryFill",sessionID,errorCode,isLast,info - ); - } - void OnRtnFill(const ITapTrade::TapAPIFillInfo * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRtnFill>::call( - this,"OnRtnFill",info - ); - } - void OnRspQryPosition(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,ITapTrade::TAPIYNFLAG isLast,const ITapTrade::TapAPIPositionInfo * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspQryPosition>::call( - this,"OnRspQryPosition",sessionID,errorCode,isLast,info - ); - } - void OnRtnPosition(const ITapTrade::TapAPIPositionInfo * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRtnPosition>::call( - this,"OnRtnPosition",info - ); - } - void OnRspQryPositionSummary(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,ITapTrade::TAPIYNFLAG isLast,const ITapTrade::TapAPIPositionSummary * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspQryPositionSummary>::call( - this,"OnRspQryPositionSummary",sessionID,errorCode,isLast,info - ); - } - void OnRtnPositionSummary(const ITapTrade::TapAPIPositionSummary * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRtnPositionSummary>::call( - this,"OnRtnPositionSummary",info - ); - } - void OnRtnPositionProfit(const ITapTrade::TapAPIPositionProfitNotice * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRtnPositionProfit>::call( - this,"OnRtnPositionProfit",info - ); - } - void OnRspQryCurrency(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,ITapTrade::TAPIYNFLAG isLast,const ITapTrade::TapAPICurrencyInfo * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspQryCurrency>::call( - this,"OnRspQryCurrency",sessionID,errorCode,isLast,info - ); - } - void OnRspQryTradeMessage(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,ITapTrade::TAPIYNFLAG isLast,const ITapTrade::TapAPITradeMessage * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspQryTradeMessage>::call( - this,"OnRspQryTradeMessage",sessionID,errorCode,isLast,info - ); - } - void OnRtnTradeMessage(const ITapTrade::TapAPITradeMessage * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRtnTradeMessage>::call( - this,"OnRtnTradeMessage",info - ); - } - void OnRspQryHisOrder(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,ITapTrade::TAPIYNFLAG isLast,const ITapTrade::TapAPIHisOrderQryRsp * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspQryHisOrder>::call( - this,"OnRspQryHisOrder",sessionID,errorCode,isLast,info - ); - } - void OnRspQryHisOrderProcess(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,ITapTrade::TAPIYNFLAG isLast,const ITapTrade::TapAPIHisOrderProcessQryRsp * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspQryHisOrderProcess>::call( - this,"OnRspQryHisOrderProcess",sessionID,errorCode,isLast,info - ); - } - void OnRspQryHisMatch(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,ITapTrade::TAPIYNFLAG isLast,const ITapTrade::TapAPIHisMatchQryRsp * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspQryHisMatch>::call( - this,"OnRspQryHisMatch",sessionID,errorCode,isLast,info - ); - } - void OnRspQryHisPosition(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,ITapTrade::TAPIYNFLAG isLast,const ITapTrade::TapAPIHisPositionQryRsp * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspQryHisPosition>::call( - this,"OnRspQryHisPosition",sessionID,errorCode,isLast,info - ); - } - void OnRspQryHisDelivery(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,ITapTrade::TAPIYNFLAG isLast,const ITapTrade::TapAPIHisDeliveryQryRsp * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspQryHisDelivery>::call( - this,"OnRspQryHisDelivery",sessionID,errorCode,isLast,info - ); - } - void OnRspQryAccountCashAdjust(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,ITapTrade::TAPIYNFLAG isLast,const ITapTrade::TapAPIAccountCashAdjustQryRsp * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspQryAccountCashAdjust>::call( - this,"OnRspQryAccountCashAdjust",sessionID,errorCode,isLast,info - ); - } - void OnRspQryBill(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,ITapTrade::TAPIYNFLAG isLast,const ITapTrade::TapAPIBillQryRsp * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspQryBill>::call( - this,"OnRspQryBill",sessionID,errorCode,isLast,info - ); - } - void OnRspQryAccountFeeRent(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,ITapTrade::TAPIYNFLAG isLast,const ITapTrade::TapAPIAccountFeeRentQryRsp * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspQryAccountFeeRent>::call( - this,"OnRspQryAccountFeeRent",sessionID,errorCode,isLast,info - ); - } - void OnRspQryAccountMarginRent(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,ITapTrade::TAPIYNFLAG isLast,const ITapTrade::TapAPIAccountMarginRentQryRsp * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspQryAccountMarginRent>::call( - this,"OnRspQryAccountMarginRent",sessionID,errorCode,isLast,info - ); - } - void OnRspHKMarketOrderInsert(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,const ITapTrade::TapAPIOrderMarketInsertRsp * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspHKMarketOrderInsert>::call( - this,"OnRspHKMarketOrderInsert",sessionID,errorCode,info - ); - } - void OnRspHKMarketOrderDelete(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,const ITapTrade::TapAPIOrderMarketDeleteRsp * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspHKMarketOrderDelete>::call( - this,"OnRspHKMarketOrderDelete",sessionID,errorCode,info - ); - } - void OnHKMarketQuoteNotice(const ITapTrade::TapAPIOrderQuoteMarketNotice * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnHKMarketQuoteNotice>::call( - this,"OnHKMarketQuoteNotice",info - ); - } - void OnRspOrderLocalRemove(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,const ITapTrade::TapAPIOrderLocalRemoveRsp * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspOrderLocalRemove>::call( - this,"OnRspOrderLocalRemove",sessionID,errorCode,info - ); - } - void OnRspOrderLocalInput(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,const ITapTrade::TapAPIOrderLocalInputRsp * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspOrderLocalInput>::call( - this,"OnRspOrderLocalInput",sessionID,errorCode,info - ); - } - void OnRspOrderLocalModify(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,const ITapTrade::TapAPIOrderLocalModifyRsp * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspOrderLocalModify>::call( - this,"OnRspOrderLocalModify",sessionID,errorCode,info - ); - } - void OnRspOrderLocalTransfer(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,const ITapTrade::TapAPIOrderLocalTransferRsp * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspOrderLocalTransfer>::call( - this,"OnRspOrderLocalTransfer",sessionID,errorCode,info - ); - } - void OnRspFillLocalInput(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,const ITapTrade::TapAPIFillLocalInputRsp * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspFillLocalInput>::call( - this,"OnRspFillLocalInput",sessionID,errorCode,info - ); - } - void OnRspFillLocalRemove(ITapTrade::TAPIUINT32 sessionID,ITapTrade::TAPIINT32 errorCode,const ITapTrade::TapAPIFillLocalRemoveRsp * info) override - { - return c2py::callback_wrapper<&ITapTrade::ITapTradeAPINotify::OnRspFillLocalRemove>::call( - this,"OnRspFillLocalRemove",sessionID,errorCode,info - ); - } - -}; - -class PyITapTradeAPI : public ITapTrade::ITapTradeAPI -{ -public: - -}; - diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits.hpp deleted file mode 100644 index 87f0fa6220..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_BOOST_CLBL_TRTS_HPP -#define BOOST_CLBL_TRTS_BOOST_CLBL_TRTS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/add_member_const.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/add_member_const.hpp deleted file mode 100644 index cd7280ef8e..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/add_member_const.hpp +++ /dev/null @@ -1,105 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_ADD_MEMBER_CONST_HPP -#define BOOST_CLBL_TRTS_ADD_MEMBER_CONST_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ add_member_const_hpp -/*` -[section:ref_add_member_const add_member_const] -[heading Header] -``#include `` -[heading Definition] -*/ - -template -using add_member_const_t = //see below -//<- -#ifdef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS - - detail::sfinae_try< - typename detail::traits::add_member_const, - - detail::fail_when_same::add_member_const, - detail::abominable_functions_not_supported_on_this_compiler, - this_compiler_doesnt_support_abominable_function_types>, - - detail::fail_if_invalid::add_member_const, - member_qualifiers_are_illegal_for_this_type>>; -#else - - detail::try_but_fail_if_invalid< - typename detail::traits::add_member_const, - member_qualifiers_are_illegal_for_this_type>; - -#endif // #ifdef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS - -namespace detail { - - template - struct add_member_const_impl {}; - - template - struct add_member_const_impl , detail::dummy>::type> - { - using type = add_member_const_t; - }; -} - -//-> - -template -struct add_member_const : detail::add_member_const_impl {}; - -//<- -}} // namespace boost::callable_traits -//-> - - -/*` -[heading Constraints] -* `T` must be a function type or a member function pointer type -* If `T` is a pointer, it may not be cv/ref qualified - -[heading Behavior] -* A substitution failure occurs if the constraints are violated. -* Adds a member `const` qualifier to `T`, if not already present. - -[heading Input/Output Examples] -[table - [[`T`] [`add_member_const_t`]] - [[`int()`] [`int() const`]] - [[`int(foo::*)()`] [`int(foo::*)() const`]] - [[`int(foo::*)() &`] [`int(foo::*)() const &`]] - [[`int(foo::*)() &&`] [`int(foo::*)() const &&`]] - [[`int(foo::*)() const`] [`int(foo::*)() const`]] - [[`int(foo::*)() volatile`] [`int(foo::*)() const volatile`]] - [[`int(foo::*)() transaction_safe`] [`int(foo::*)() const transaction_safe`]] - [[`int`] [(substitution failure)]] - [[`int (&)()`] [(substitution failure)]] - [[`int (*)()`] [(substitution failure)]] - [[`int foo::*`] [(substitution failure)]] - [[`int (foo::* const)()`] [(substitution failure)]] -] - -[heading Example Program] -[import ../example/add_member_const.cpp] -[add_member_const] -[endsect] -*/ -//] - -#endif // #ifndef BOOST_CLBL_TRTS_ADD_MEMBER_CONST_HPP - - - diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/add_member_cv.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/add_member_cv.hpp deleted file mode 100644 index e11cc07540..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/add_member_cv.hpp +++ /dev/null @@ -1,101 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_ADD_MEMBER_CV_HPP -#define BOOST_CLBL_TRTS_ADD_MEMBER_CV_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ add_member_cv_hpp -/*` -[section:ref_add_member_cv add_member_cv] -[heading Header] -``#include `` -[heading Definition] -*/ - -template -using add_member_cv_t = //see below -//<- -#ifdef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS - - detail::sfinae_try< - typename detail::traits::add_member_cv, - - detail::fail_when_same::add_member_cv, - detail::abominable_functions_not_supported_on_this_compiler, - this_compiler_doesnt_support_abominable_function_types>, - - detail::fail_if_invalid::add_member_cv, - member_qualifiers_are_illegal_for_this_type>>; -#else - - detail::try_but_fail_if_invalid< - typename detail::traits::add_member_cv, - member_qualifiers_are_illegal_for_this_type>; - -#endif // #ifdef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS - -namespace detail { - - template - struct add_member_cv_impl {}; - - template - struct add_member_cv_impl , detail::dummy>::type> - { - using type = add_member_cv_t; - }; -} - -//-> - -template -struct add_member_cv : detail::add_member_cv_impl {}; - -//<- -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* `T` must be a function type or a member function pointer type -* If `T` is a pointer, it may not be cv/ref qualified - -[heading Behavior] -* A substitution failure occurs if the constraints are violated. -* Adds member `const` and `volatile` qualifiers to `T`, if not already present. - -[heading Input/Output Examples] -[table - [[`T`] [`add_member_cv_t`]] - [[`int()`] [`int() const volatile`]] - [[`int(foo::*)()`] [`int(foo::*)() const volatile`]] - [[`int(foo::*)() &`] [`int(foo::*)() const volatile &`]] - [[`int(foo::*)() &&`] [`int(foo::*)() const volatile &&`]] - [[`int(foo::*)() const`] [`int(foo::*)() const volatile`]] - [[`int(foo::*)() volatile`] [`int(foo::*)() const volatile`]] - [[`int(foo::*)() transaction_safe`] [`int(foo::*)() const volatile transaction_safe`]] - [[`int`] [(substitution failure)]] - [[`int (&)()`] [(substitution failure)]] - [[`int (*)()`] [(substitution failure)]] - [[`int foo::*`] [(substitution failure)]] - [[`int (foo::* const)()`] [(substitution failure)]] -] - -[heading Example Program] -[import ../example/add_member_cv.cpp] -[add_member_cv] -[endsect] -*/ -//] - -#endif diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/add_member_lvalue_reference.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/add_member_lvalue_reference.hpp deleted file mode 100644 index 4e77f8e0ed..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/add_member_lvalue_reference.hpp +++ /dev/null @@ -1,114 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2018 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_ADD_MEMBER_LVALUE_REFERENCE_HPP -#define BOOST_CLBL_TRTS_ADD_MEMBER_LVALUE_REFERENCE_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ add_member_lvalue_reference_hpp -/*` -[section:ref_add_member_lvalue_reference add_member_lvalue_reference] -[heading Header] -``#include `` -[heading Definition] -*/ -//<- -#ifdef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS - -template -struct add_member_lvalue_reference_t { - static_assert(std::is_same::value, - "Reference member qualifiers are not supported by this configuration."); -}; - -#else -//-> -template -using add_member_lvalue_reference_t = //see below -//<- -#ifdef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS - - detail::sfinae_try< - typename detail::traits::add_member_lvalue_reference, - - detail::fail_when_same::add_member_lvalue_reference, - detail::abominable_functions_not_supported_on_this_compiler, - this_compiler_doesnt_support_abominable_function_types>, - - detail::fail_if_invalid< - typename detail::traits::add_member_lvalue_reference, - member_qualifiers_are_illegal_for_this_type>>; -#else - - detail::try_but_fail_if_invalid< - typename detail::traits::add_member_lvalue_reference, - member_qualifiers_are_illegal_for_this_type>; - -#endif // #ifdef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS -#endif // #ifdef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS - -namespace detail { - - template - struct add_member_lvalue_reference_impl {}; - - template - struct add_member_lvalue_reference_impl , detail::dummy>::type> - { - using type = add_member_lvalue_reference_t; - }; -} -//-> - -template -struct add_member_lvalue_reference - : detail::add_member_lvalue_reference_impl {}; - -//<- -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* `T` must be a function type or a member function pointer type -* If `T` is a pointer, it may not be cv/ref qualified - -[heading Behavior] -* A substitution failure occurs if the constraints are violated. -* Adds a member lvalue reference qualifier (`&`) to `T`, if not already present. -* If an rvalue reference qualifier is present, the lvalue reference qualifier replaces it (in accordance with reference collapsing rules). - -[heading Input/Output Examples] -[table - [[`T`] [`add_member_lvalue_reference_t`]] - [[`int()`] [`int() &`]] - [[`int(foo::*)()`] [`int(foo::*)() &`]] - [[`int(foo::*)() &`] [`int(foo::*)() &`]] - [[`int(foo::*)() &&`] [`int(foo::*)() &`]] - [[`int(foo::*)() const`] [`int(foo::*)() const &`]] - [[`int(foo::*)() transaction_safe`] [`int(foo::*)() & transaction_safe`]] - [[`int`] [(substitution failure)]] - [[`int (&)()`] [(substitution failure)]] - [[`int (*)()`] [(substitution failure)]] - [[`int foo::*`] [(substitution failure)]] - [[`int (foo::* const)()`] [(substitution failure)]] -] - -[heading Example Program] -[import ../example/add_member_lvalue_reference.cpp] -[add_member_lvalue_reference] -[endsect] -*/ -//] - -#endif - diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/add_member_rvalue_reference.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/add_member_rvalue_reference.hpp deleted file mode 100644 index ea5a1c8ced..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/add_member_rvalue_reference.hpp +++ /dev/null @@ -1,113 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2018 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_ADD_MEMBER_RVALUE_REFERENCE_HPP -#define BOOST_CLBL_TRTS_ADD_MEMBER_RVALUE_REFERENCE_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ add_member_rvalue_reference_hpp -/*` -[section:ref_add_member_rvalue_reference add_member_rvalue_reference] -[heading Header] -``#include `` -[heading Definition] -*/ -//<- -#ifdef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS - -template -struct add_member_rvalue_reference_t { - static_assert(std::is_same::value, - "Reference member qualifiers are not supported by this configuration."); -}; - -#else -//-> -template -using add_member_rvalue_reference_t = //see below -//<- -#ifdef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS - - detail::sfinae_try< - typename detail::traits::add_member_rvalue_reference, - - detail::fail_when_same::add_member_rvalue_reference, - detail::abominable_functions_not_supported_on_this_compiler, - this_compiler_doesnt_support_abominable_function_types>, - - detail::fail_if_invalid::add_member_rvalue_reference, - member_qualifiers_are_illegal_for_this_type>>; -#else - - detail::try_but_fail_if_invalid< - typename detail::traits::add_member_rvalue_reference, - member_qualifiers_are_illegal_for_this_type>; - -#endif // #ifdef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS -#endif // #ifdef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS - -namespace detail { - - template - struct add_member_rvalue_reference_impl {}; - - template - struct add_member_rvalue_reference_impl , detail::dummy>::type> - { - using type = add_member_rvalue_reference_t; - }; -} -//-> - - -template -struct add_member_rvalue_reference - : detail::add_member_rvalue_reference_impl {}; - -//<- -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* `T` must be a function type or a member function pointer type -* If `T` is a pointer, it may not be cv/ref qualified - -[heading Behavior] -* A substitution failure occurs if the constraints are violated. -* Adds a member rvalue reference qualifier (`&&`) to `T`, if not already present. -* If an lvalue reference qualifier is present, the lvalue reference qualifier remains (in accordance with reference collapsing rules). - -[heading Input/Output Examples] -[table - [[`T`] [`add_member_rvalue_reference_t`]] - [[`int()`] [`int() &&`]] - [[`int(foo::*)()`] [`int(foo::*)() &&`]] - [[`int(foo::*)() &`] [`int(foo::*)() &`]] - [[`int(foo::*)() &&`] [`int(foo::*)() &&`]] - [[`int(foo::*)() const`] [`int(foo::*)() const &&`]] - [[`int(foo::*)() transaction_safe`] [`int(foo::*)() && transaction_safe`]] - [[`int`] [(substitution failure)]] - [[`int (&)()`] [(substitution failure)]] - [[`int (*)()`] [(substitution failure)]] - [[`int foo::*`] [(substitution failure)]] - [[`int (foo::* const)()`] [(substitution failure)]] -] - -[heading Example Program] -[import ../example/add_member_rvalue_reference.cpp] -[add_member_rvalue_reference] -[endsect][/section:ref_add_member_rvalue_reference] -*/ -//] - -#endif diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/add_member_volatile.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/add_member_volatile.hpp deleted file mode 100644 index cb0a508a64..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/add_member_volatile.hpp +++ /dev/null @@ -1,100 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_ADD_MEMBER_VOLATILE_HPP -#define BOOST_CLBL_TRTS_ADD_MEMBER_VOLATILE_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ add_member_volatile_hpp -/*` -[section:ref_add_member_volatile add_member_volatile] -[heading Header] -``#include `` -[heading Definition] -*/ - -template -using add_member_volatile_t = //see below -//<- -#ifdef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS - - detail::sfinae_try< - typename detail::traits::add_member_volatile, - - detail::fail_when_same::add_member_volatile, - detail::abominable_functions_not_supported_on_this_compiler, - this_compiler_doesnt_support_abominable_function_types>, - - detail::fail_if_invalid< - typename detail::traits::add_member_volatile, - member_qualifiers_are_illegal_for_this_type>>; -#else - - detail::try_but_fail_if_invalid< - typename detail::traits::add_member_volatile, - member_qualifiers_are_illegal_for_this_type>; - -#endif // #ifdef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS - -namespace detail { - - template - struct add_member_volatile_impl {}; - - template - struct add_member_volatile_impl , detail::dummy>::type> - { - using type = add_member_volatile_t; - }; -} -//-> - -template -struct add_member_volatile : detail::add_member_volatile_impl {}; - -//<- -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* `T` must be a function type or a member function pointer type -* If `T` is a pointer, it may not be cv/ref qualified - -[heading Behavior] -* A substitution failure occurs if the constraints are violated. -* Adds a member volatile qualifier to `T`, if not already present. - -[heading Input/Output Examples] -[table - [[`T`] [`add_member_volatile_t`]] - [[`int()`] [`int() volatile`]] - [[`int(foo::*)()`] [`int(foo::*)() volatile`]] - [[`int(foo::*)() &`] [`int(foo::*)() volatile &`]] - [[`int(foo::*)() &&`] [`int(foo::*)() volatile &&`]] - [[`int(foo::*)() const`] [`int(foo::*)() const volatile`]] - [[`int(foo::*)() transaction_safe`] [`int(foo::*)() volatile transaction_safe`]] - [[`int`] [(substitution failure)]] - [[`int (&)()`] [(substitution failure)]] - [[`int (*)()`] [(substitution failure)]] - [[`int foo::*`] [(substitution failure)]] - [[`int (foo::* const)()`] [(substitution failure)]] -] - -[heading Example Program] -[import ../example/add_member_volatile.cpp] -[add_member_volatile] -[endsect][/section:ref_add_member_volatile] -*/ -//] - -#endif diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/add_noexcept.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/add_noexcept.hpp deleted file mode 100644 index 92b2dc55af..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/add_noexcept.hpp +++ /dev/null @@ -1,108 +0,0 @@ -/* -@file add_noexcept - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_ADD_NOEXCEPT_HPP -#define BOOST_CLBL_TRTS_ADD_NOEXCEPT_HPP - -#include - -namespace boost { namespace callable_traits { - -BOOST_CLBL_TRTS_DEFINE_SFINAE_ERROR_ORIGIN(add_noexcept) -BOOST_CLBL_TRTS_SFINAE_MSG(add_noexcept, cannot_add_noexcept_to_this_type) - -#ifndef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES -template -struct add_noexcept_t { - static_assert(std::is_same::value, - "noexcept types not supported by this configuration."); -}; - -template -struct add_noexcept { - static_assert(std::is_same::value, - "noexcept types not supported by this configuration."); -}; - -#else - -//[ add_noexcept_hpp -/*` -[section:ref_add_noexcept add_noexcept] -[heading Header] -``#include `` -[heading Definition] -*/ - -template -using add_noexcept_t = //see below -//<- - detail::try_but_fail_if_invalid< - typename detail::traits::add_noexcept, - cannot_add_noexcept_to_this_type>; - -namespace detail { - - template - struct add_noexcept_impl {}; - - template - struct add_noexcept_impl , detail::dummy>::type> - { - using type = add_noexcept_t; - }; -} -//-> - -template -struct add_noexcept : detail::add_noexcept_impl {}; - -//<- -#endif // #ifdef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* `T` must be one of the following: - * function type - * function pointer type - * function reference type - * member function pointer type -* If `T` is a pointer, it may not be cv/ref qualified - -[heading Behavior] -* A substitution failure occurs if the constraints are violated. -* Adds a `noexcept` specifier to `T`, if not already present. - -[heading Input/Output Examples] -[table - [[`T`] [`add_noexcept_t`]] - [[`int()`] [`int() noexcept`]] - [[`int (&)()`] [`int(&)() noexcept`]] - [[`int (*)()`] [`int(*)() noexcept`]] - [[`int(foo::*)()`] [`int(foo::*)() noexcept`]] - [[`int(foo::*)() &`] [`int(foo::*)() & noexcept`]] - [[`int(foo::*)() &&`] [`int(foo::*)() && noexcept`]] - [[`int(foo::*)() const transaction_safe`] [`int(foo::*)() const transaction_safe noexcept`]] - [[`int(foo::*)() noexcept`] [`int(foo::*)() noexcept`]] - [[`int`] [(substitution failure)]] - [[`int foo::*`] [(substitution failure)]] - [[`int (*&)()`] [(substitution failure)]] -] - -[heading Example Program] -[import ../example/add_noexcept.cpp] -[add_noexcept] -[endsect] -*/ -//] - -#endif // #ifndef BOOST_CLBL_TRTS_ADD_NOEXCEPT_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/add_transaction_safe.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/add_transaction_safe.hpp deleted file mode 100644 index 2a634ba645..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/add_transaction_safe.hpp +++ /dev/null @@ -1,110 +0,0 @@ -/* -@file add_transaction_safe - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_ADD_TRANSACTION_SAFE_HPP -#define BOOST_CLBL_TRTS_ADD_TRANSACTION_SAFE_HPP - -#include - -namespace boost { namespace callable_traits { - -BOOST_CLBL_TRTS_DEFINE_SFINAE_ERROR_ORIGIN(add_transaction_safe) -BOOST_CLBL_TRTS_SFINAE_MSG(add_transaction_safe, cannot_add_transaction_safe_to_this_type) - -#ifndef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE -template -struct add_transaction_safe_t { - static_assert(std::is_same::value, - "transaction_safe not supported by this configuration."); -}; - -template -struct add_transaction_safe { - static_assert(std::is_same::value, - "transaction_safe not supported by this configuration."); -}; - -#else - -//[ add_transaction_safe_hpp -/*` -[section:ref_add_transaction_safe add_transaction_safe] -[heading Header] -``#include `` -[heading Definition] -*/ - - -template -using add_transaction_safe_t = //see below -//<- - detail::try_but_fail_if_invalid< - typename detail::traits::add_transaction_safe, - cannot_add_transaction_safe_to_this_type>; - -namespace detail { - - template - struct add_transaction_safe_impl {}; - - template - struct add_transaction_safe_impl , detail::dummy>::type> - { - using type = add_transaction_safe_t; - }; -} -//-> - -template -struct add_transaction_safe - : detail::add_transaction_safe_impl {}; - -//<- -#endif // #ifndef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* `T` must be one of the following: - * function type - * function pointer type - * function reference type - * member function pointer type -* If `T` is a pointer, it may not be cv/ref qualified - -[heading Behavior] -* A substitution failure occurs if the constraints are violated. -* Adds the `transaction_safe` specifier to `T`, if not already present. - -[heading Input/Output Examples] -[table - [[`T`] [`add_transaction_safe_t`]] - [[`int()`] [`int() transaction_safe`]] - [[`int (&)()`] [`int(&)() transaction_safe`]] - [[`int (*)()`] [`int(*)() transaction_safe`]] - [[`int(foo::*)()`] [`int(foo::*)() transaction_safe`]] - [[`int(foo::*)() &`] [`int(foo::*)() & transaction_safe`]] - [[`int(foo::*)() &&`] [`int(foo::*)() && transaction_safe`]] - [[`int(foo::*)() const`] [`int(foo::*)() const transaction_safe`]] - [[`int(foo::*)() transaction_safe`] [`int(foo::*)() transaction_safe`]] - [[`int`] [(substitution failure)]] - [[`int foo::*`] [(substitution failure)]] - [[`int (*&)()`] [(substitution failure)]] -] - -[heading Example Program] -[import ../example/add_transaction_safe.cpp] -[add_transaction_safe] -[endsect] -*/ -//] - -#endif // #ifndef BOOST_CLBL_TRTS_ADD_TRANSACTION_SAFE_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/add_varargs.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/add_varargs.hpp deleted file mode 100644 index 9357e38ba7..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/add_varargs.hpp +++ /dev/null @@ -1,90 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_ADD_VARARGS_HPP -#define BOOST_CLBL_TRTS_ADD_VARARGS_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ add_varargs_hpp -/*` -[section:ref_add_varargs add_varargs] -[heading Header] -``#include `` -[heading Definition] -*/ - -template -using add_varargs_t = //see below -//<- - detail::try_but_fail_if_invalid< - typename detail::traits::add_varargs, - varargs_are_illegal_for_this_type>; - -namespace detail { - - template - struct add_varargs_impl {}; - - template - struct add_varargs_impl , detail::dummy>::type> - { - using type = add_varargs_t; - }; -} -//-> - -template -struct add_varargs : detail::add_varargs_impl {}; - -//<- -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* `T` must be one of the following: - * function type - * function pointer type - * function reference type - * member function pointer type -* If `T` is a pointer, it may not be cv/ref qualified - -[heading Behavior] -* A substitution failure occurs if the constraints are violated. -* Adds C-style variadics (`...`) to the signature of `T`, if not already present. - -[heading Input/Output Examples] -[table - [[`T`] [`add_varargs_t`]] - [[`int()`] [`int(...)`]] - [[`int(int)`] [`int(int, ...)`]] - [[`int (&)()`] [`int(&)(...)`]] - [[`int (*)()`] [`int(*)(...)`]] - [[`int (*)(...)`] [`int(*)(...)`]] - [[`int(foo::*)()`] [`int(foo::*)(...)`]] - [[`int(foo::*)() &`] [`int(foo::*)(...) &`]] - [[`int(foo::*)() &&`] [`int(foo::*)(...) &&`]] - [[`int(foo::*)() const`] [`int(foo::*)(...) const`]] - [[`int(foo::*)() transaction_safe`] [`int(foo::*)(...) transaction_safe`]] - [[`int`] [(substitution failure)]] - [[`int foo::*`] [(substitution failure)]] - [[`int (*&)()`] [(substitution failure)]] -] - -[heading Example Program] -[import ../example/add_varargs.cpp] -[add_varargs] -[endsect] -*/ -//] - -#endif diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/apply_member_pointer.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/apply_member_pointer.hpp deleted file mode 100644 index efd3f95756..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/apply_member_pointer.hpp +++ /dev/null @@ -1,123 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_APPLY_MEMBER_POINTER_HPP -#define BOOST_CLBL_TRTS_APPLY_MEMBER_POINTER_HPP - -#include - -namespace boost { namespace callable_traits { - -BOOST_CLBL_TRTS_DEFINE_SFINAE_ERROR_ORIGIN(apply_member_pointer) -BOOST_CLBL_TRTS_SFINAE_MSG(apply_member_pointer, members_cannot_have_a_type_of_void) -BOOST_CLBL_TRTS_SFINAE_MSG(apply_member_pointer, second_template_argument_must_be_a_class_or_struct) - -namespace detail { - - template::value> - struct make_member_pointer; - - template - struct make_member_pointer { - using type = typename std::remove_reference::type C::*; - }; - - template - struct make_member_pointer { - using type = invalid_type; - }; - - template - struct make_member_pointer { - using type = error_type; - }; - - template - using make_member_pointer_t = typename make_member_pointer::type; -} - -//[ apply_member_pointer_hpp -/*` -[section:ref_apply_member_pointer apply_member_pointer] -[heading Header] -``#include `` -[heading Definition] -*/ - -template -using apply_member_pointer_t = //see below -//<- - detail::sfinae_try< - detail::fallback_if_invalid< - typename detail::traits::template apply_member_pointer, - typename detail::make_member_pointer::type>, - - detail::fail_when_same, - - detail::fail_if::value, - second_template_argument_must_be_a_class_or_struct> >; - -namespace detail { - - template - struct apply_member_pointer_impl {}; - - template - struct apply_member_pointer_impl , detail::dummy>::type> - { - using type = apply_member_pointer_t; - }; -} - -//-> - -template -struct apply_member_pointer : detail::apply_member_pointer_impl {}; - -//<- -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* `T` may be any type except `void` -* `C` must be a user-defined type - -[heading Behavior] -* A substitution failure occurs if the constraints are violated. -* When `T` is a function, function pointer (unqualified), or function reference, then the aliased type is a member function pointer of `C` with the same parameters and return type. -* When `T` is a member function pointer (unqualified) of any type, the aliased type is a member function pointer of `C` with the same parameters and return type. -* Otherwise, the aliased type is a member data pointer equivalent to `std::remove_reference_t C::*`. - -[heading Input/Output Examples] -[table - [[`T`] [`apply_member_pointer_t`]] - [[`int()`] [`int(foo::*)()`]] - [[`int (&)()`] [`int(foo::*)()`]] - [[`int (*)()`] [`int(foo::*)()`]] - [[`int(bar::*)()`] [`int(foo::*)()`]] - [[`int(bar::*)() &`] [`int(foo::*)() &`]] - [[`int(bar::*)() &&`] [`int(foo::*)() &&`]] - [[`int(bar::*)() const`] [`int(foo::*)() const`]] - [[`int(bar::*)() transaction_safe`] [`int(foo::*)() transaction_safe`]] - [[`int bar::*`] [`int foo::*`]] - [[`int`] [`int foo::*`]] - [[`int &`] [`int foo::*`]] - [[`const int &`] [`const int foo::*`]] - [[`int (*const)()`] [`int (*const foo::*)()`]] - [[`void`] [(substitution failure)]] -] - -[heading Example Program] -[import ../example/apply_member_pointer.cpp] -[apply_member_pointer] -[endsect] -*/ -//] -#endif diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/apply_return.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/apply_return.hpp deleted file mode 100644 index 6ed5ab74e8..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/apply_return.hpp +++ /dev/null @@ -1,109 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_APPLY_RETURN_HPP -#define BOOST_CLBL_TRTS_APPLY_RETURN_HPP - -#include - -namespace boost { namespace callable_traits { - -BOOST_CLBL_TRTS_DEFINE_SFINAE_ERROR_ORIGIN(apply_return) -BOOST_CLBL_TRTS_SFINAE_MSG(apply_return, invalid_types_for_apply_return) - -namespace detail { - - template - struct apply_return_helper { - using type = typename detail::traits::template apply_return; - }; - - //special case - template - struct apply_return_helper, R> { - using type = R(Args...); - }; -} - -//[ apply_return_hpp -/*` -[section:ref_apply_return apply_return] -[heading Header] -``#include `` -[heading Definition] -*/ - -template -using apply_return_t = //see below -//<- - detail::try_but_fail_if_invalid< - typename detail::apply_return_helper::type, - invalid_types_for_apply_return>; - -namespace detail { - - template - struct apply_return_impl {}; - - template - struct apply_return_impl , detail::dummy>::type> - { - using type = apply_return_t; - }; -} - //-> - -template -struct apply_return : detail::apply_return_impl {}; - -//<- -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* `T` must one of the following: - * `std::tuple` template instantiation - * function - * function pointer - * function reference - * member function pointer - * member data pointer -* If `T` is a pointer, it may not be cv/ref qualified - -[heading Behavior] -* When `T` is `std::tuple`, the aliased type is `R(Args...)`. -* When `T` is a function, function pointer, function reference, or member function pointer, the aliased type's return type is `R`, but is otherwise identical to `T`. -* When `T` is a member data pointer of class `foo` to a `U` type (such that `T` is `U foo::*`), the aliased type is `R foo::*`. - -[heading Input/Output Examples] -[table - [[`T`] [`apply_return_t`]] - [[`std::tuple`] [`float(int, int)`]] - [[`int()`] [`float()`]] - [[`int (&)()`] [`float(&)()`]] - [[`int (*)()`] [`float(*)()`]] - [[`int (*)(...)`] [`float(*)()`]] - [[`int(foo::*)()`] [`float(foo::*)()`]] - [[`int(foo::*)() &`] [`float(foo::*)() &`]] - [[`int(foo::*)() &&`] [`float(foo::*)() &&`]] - [[`int(foo::*)() const`] [`float(foo::*)() const`]] - [[`int(foo::*)() transaction_safe`] [`float(foo::*)() transaction_safe`]] - [[`int foo::*`] [`float foo::*`]] - [[`int`] [(substitution failure)]] - [[`int (*const)()`] [(substitution failure)]] -] - -[heading Example Program] -[/import ../example/apply_return.cpp] -[apply_return] -[endsect] -*/ -//] -#endif diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/args.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/args.hpp deleted file mode 100644 index 6dcaaccc12..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/args.hpp +++ /dev/null @@ -1,97 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_ARGS_HPP -#define BOOST_CLBL_TRTS_ARGS_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ args_hpp -/*`[section:ref_args args] -[heading Header] -``#include `` -[heading Definition] -*/ - -template class Container = std::tuple> -using args_t = //see below -//<- - detail::try_but_fail_if_invalid< - typename detail::traits< - detail::shallow_decay>::template expand_args, - cannot_expand_the_parameter_list_of_first_template_argument>; - -namespace detail { - - template class Container, - typename = std::false_type> - struct args_impl {}; - - template class Container> - struct args_impl , detail::dummy>::type> - { - using type = args_t; - }; -} - -//-> - -template class Container = std::tuple> -struct args : detail::args_impl {}; - -//<- -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* `T` must be one of the following: - * function - * function pointer - * function reference - * member function pointer - * member data pointer - * user-defined type with a non-overloaded `operator()` - * type of a non-generic lambda - -[heading Behavior] -* When the constraints are violated, a substitution failure occurs. -* When `T` is a function, function pointer, or function reference, the aliased type is `Container` instantiated with the function's parameter types. -* When `T` is a function object, the aliased type is `Container` instantiated with the `T::operator()` parameter types. -* When `T` is a member function pointer, the aliased type is a `Container` instantiation, where the first type argument is a reference to the parent class of `T`, qualified according to the member qualifiers on `T`, such that the first type is equivalent to `boost::callable_traits::qualified_class_of_t`. The subsequent type arguments, if any, are the parameter types of the member function. -* When `T` is a member data pointer, the aliased type is `Container` with a single element, which is a `const` reference to the parent class of `T`. - -[heading Input/Output Examples] -[table - [[`T`] [`args_t`]] - [[`void(float, char, int)`] [`std::tuple`]] - [[`void(*)(float, char, int)`] [`std::tuple`]] - [[`void(*)()`] [`std::tuple<>`]] - [[`void(foo::* const &)(float, char, int)`] [`std::tuple`]] - [[`int(foo::*)(int) const`] [`std::tuple`]] - [[`void(foo::*)() volatile &&`] [`std::tuple`]] - [[`int foo::*`] [`std::tuple`]] - [[`const int foo::*`] [`std::tuple`]] - [[`int`] [(substitution failure)]] - [[`int (*const)()`] [(substitution failure)]] -] - -[heading Example Program] -[import ../example/args.cpp] -[args] -[endsect] -*/ -//] - -#endif // #ifndef BOOST_CLBL_TRTS_ARGS_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/class_of.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/class_of.hpp deleted file mode 100644 index a9eee79706..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/class_of.hpp +++ /dev/null @@ -1,75 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_class_of_HPP -#define BOOST_CLBL_TRTS_class_of_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ class_of_hpp -/*` -[section:ref_class_of class_of] -[heading Header] -``#include `` -[heading Definition] -*/ - -template -using class_of_t = //see below -//<- - detail::try_but_fail_if_invalid< - typename detail::traits>::class_type, - type_is_not_a_member_pointer>; - -namespace detail { - - template - struct class_of_impl {}; - - template - struct class_of_impl , detail::dummy>::type> - { - using type = class_of_t; - }; -} - -//-> - -template -struct class_of : detail::class_of_impl {}; - -//<- -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* `T` must be a member pointer - -[heading Behavior] -* A substitution failure occurs if the constraints are violated. -* The aliased type is the parent class of the member. In other words, if `T` is expanded to `U C::*`, the aliased type is `C`. - -[heading Input/Output Examples] -[table - [[`T`] [`class_of_t`]] - [[`int foo::*`] [`foo`]] - [[`void(foo::* const &)() const`] [`foo`]] -] - -[heading Example Program] -[import ../example/class_of.cpp] -[class_of] -[endsect] -*/ -//] - -#endif // #ifndef BOOST_CLBL_TRTS_class_of_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/config.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/config.hpp deleted file mode 100644 index 946458187d..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/config.hpp +++ /dev/null @@ -1,109 +0,0 @@ -/* -@Copyright Barrett Adair 2016-2017 - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_DETAIL_CONFIG_HPP -#define BOOST_CLBL_TRTS_DETAIL_CONFIG_HPP - -#include -#include -#include -#include - -#define BOOST_CLBL_TRTS_EMPTY_ -#define BOOST_CLBL_TRTS_EMPTY BOOST_CLBL_TRTS_EMPTY_ - -#ifdef __cpp_transactional_memory -# define BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE -#endif - -#ifdef __cpp_inline_variables -# define BOOST_CLBL_TRAITS_INLINE_VAR inline -#else -# define BOOST_CLBL_TRAITS_INLINE_VAR -#endif - -#ifdef __cpp_noexcept_function_type -# define BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES -#endif - -#ifdef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE -# define BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER transaction_safe -#else -# define BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER -#endif - -#ifndef __clang__ -# if defined(__GNUC__) -# define BOOST_CLBL_TRTS_GCC -# if __GNUC__ >= 6 -# define BOOST_CLBL_TRTS_GCC_AT_LEAST_6_0_0 -# endif -# if __GNUC__ < 5 -# define BOOST_CLBL_TRTS_GCC_OLDER_THAN_5_0_0 -# endif -# if __GNUC__ >= 5 -# define BOOST_CLBL_TRTS_GCC_AT_LEAST_4_9_2 -# elif __GNUC__ == 4 && __GNUC_MINOR__ == 9 && __GNUC_PATCHLEVEL__ >= 2 -# define BOOST_CLBL_TRTS_GCC_AT_LEAST_4_9_2 -# else -# define BOOST_CLBL_TRTS_GCC_OLDER_THAN_4_9_2 -# endif //#if __GNUC__ >= 5 -# endif //#if defined __GNUC__ -#endif // #ifndef __clang__ - -#ifdef _MSC_VER -# ifdef __clang__ -# define BOOST_CLBL_TRTS_CLANG_C2 -# else -# define BOOST_CLBL_TRTS_MSVC -# endif // #ifdef __clang__ -#endif // #ifdef _MSC_VER - -#define BOOST_CLBL_TRTS_IX_SEQ(...) ::std::index_sequence< __VA_ARGS__ > -#define BOOST_CLBL_TRTS_MAKE_IX_SEQ(...) ::std::make_index_sequence< __VA_ARGS__ > -#define BOOST_CLBL_TRTS_DISJUNCTION(...) ::std::disjunction< __VA_ARGS__ > - -#ifndef __cpp_variable_templates -# define BOOST_CLBL_TRTS_DISABLE_VARIABLE_TEMPLATES -#endif - -#ifndef __cpp_lib_logical_traits -# include -#endif //__cpp_lib_logical_traits - -#ifndef __cpp_lib_integer_sequence -# include -#endif // __cpp_lib_integer_sequence - -#if defined(BOOST_CLBL_TRTS_MSVC) && !defined(BOOST_DISABLE_WIN32) -# define BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC __cdecl -# define BOOST_CLBL_TRTS_PMF_VARGARGS_CDECL_DEFAULT -#else -# define BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC -#endif // #if defined(BOOST_CLBL_TRTS_MSVC) && !defined(BOOST_DISABLE_WIN32)) - -#if (defined(BOOST_CLBL_TRTS_GCC) && !defined(BOOST_CLBL_TRTS_GCC_AT_LEAST_4_9_2)) || defined(__INTEL_COMPILER) -# define BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS -# define BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS -#endif // #if defined BOOST_CLBL_TRTS_GCC && !defined(BOOST_CLBL_TRTS_GCC_AT_LEAST_4_9_2) - -#ifdef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS -# define BOOST_CLBL_TRTS_ABOMINABLE_CONST BOOST_CLBL_TRTS_EMPTY -# define BOOST_CLBL_TRTS_ABOMINABLE_VOLATILE BOOST_CLBL_TRTS_EMPTY -#else -# define BOOST_CLBL_TRTS_ABOMINABLE_CONST const -# define BOOST_CLBL_TRTS_ABOMINABLE_VOLATILE volatile -#endif // #ifdef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS - -#ifdef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES -# define BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER noexcept -#else -# define BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER BOOST_CLBL_TRTS_EMPTY -#endif // #ifdef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES - -#endif // #ifndef BOOST_CLBL_TRTS_DETAIL_CONFIG_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/core.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/core.hpp deleted file mode 100644 index 77560283bd..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/core.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/* - -@Copyright Barrett Adair 2016-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_DETAIL_CORE_HPP -#define BOOST_CLBL_TRTS_DETAIL_CORE_HPP - -#include -#include -#include -#include -#include -#include - -#endif // #ifndef BOOST_CLBL_TRTS_DETAIL_CORE_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/default_callable_traits.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/default_callable_traits.hpp deleted file mode 100644 index 84970783a0..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/default_callable_traits.hpp +++ /dev/null @@ -1,207 +0,0 @@ -/* -Copyright Barrett Adair 2016-2017 - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_DETAIL_DEFAULT_BOOST_CLBL_TRTS_HPP -#define BOOST_CLBL_TRTS_DETAIL_DEFAULT_BOOST_CLBL_TRTS_HPP - -namespace boost { namespace callable_traits { namespace detail { - -template -struct default_callable_traits { - - // value is used by all traits classes to participate - // in the disjunction. - static constexpr bool value = false; - - // used facilitate the disjunction in - // - using traits = default_callable_traits; - - using error_t = error_type; - - // represents the type under consideration - using type = error_t; - - // std::true_type for callables with C-style variadics - using has_varargs = std::false_type; - - using return_type = error_t; - - // arg_types is a std::tuple of argument types for - // callables that are not overloaded/templated function objects. - // arg_types IS defined in terms of INVOKE, which means - // a PMF's arg_types tuple will use a reference to its - // parent class as the first argument, with qualifiers added to - // match the PMF's own qualifiers. - using arg_types = error_t; - - // arg_types without the decltype(*this) parameter for member functions - using non_invoke_arg_types = error_t; - - // An "approximation" of a callable type, in the form - // of a plain function type. Defined in terms of INVOKE. - // An identity alias for qualified/unqualified plain function - // types. - using function_type = error_t; - - // Used to smoothen the edges between PMFs and function objects - using function_object_signature = error_t; - - // An identity alias for qualified/unqualified plain function - // types. Equivalent to remove_member_pointer for PMFs. Same - // as function_type for other callable types. - using qualified_function_type = error_t; - - // Removes C-style variadics from a signature, if present. - // Aliases error_t for function objects and PMDs. - using remove_varargs = error_t; - - // Adds C-style variadics to a signature. Aliases - // error_t for function objects and PMDs. - using add_varargs = error_t; - - // std::true_type when the signature includes noexcept, when - // the feature is available - using is_noexcept = std::false_type; - - // adds noexcept to a signature if the feature is available - using add_noexcept = error_t; - - // removes noexcept from a signature if present - using remove_noexcept = error_t; - - // std::true_type when the signature includes transaction_safe, when - // the feature is available - using is_transaction_safe = std::false_type; - - // adds transaction_safe to a signature if the feature is available - using add_transaction_safe = error_t; - - // removes transaction_safe from a signature if present - using remove_transaction_safe = error_t; - - // The class of a PMD or PMF. error_t for other types - using class_type = error_t; - - // The qualified reference type of class_type. error_t - // for non-member-pointers. - using invoke_type = error_t; - - // Removes reference qualifiers from a signature. - using remove_reference = error_t; - - // Adds an lvalue qualifier to a signature, in arbitrary - // accordance with C++11 reference collapsing rules. - using add_member_lvalue_reference = error_t; - - // Adds an rvalue qualifier to a signature, in arbitrary - // accordance with C++11 reference collapsing rules. - using add_member_rvalue_reference = error_t; - - // Adds a const qualifier to a signature. - using add_member_const = error_t; - - // Adds a volatile qualifier to a signature. - using add_member_volatile = error_t; - - // Adds both const and volatile qualifiers to a signature. - using add_member_cv = error_t; - - // Removes a const qualifier from a signature, if present. - using remove_member_const = error_t; - - // Removes a volatile qualifier from a signature, if present. - using remove_member_volatile = error_t; - - // Removes both const and volatile qualifiers from a - // signature, if any. - using remove_member_cv = error_t; - - // Removes the member pointer from PMDs and PMFs. An identity - // alias for other callable types. - using remove_member_pointer = error_t; - - // Changes the parent class type for PMDs and PMFs. Turns - // function pointers, function references, and - // qualified/unqualified function types into PMFs. Turns - // everything else into member data pointers. - template::type, - typename L = typename std::conditional< - std::is_same::value, error_t, K>::type, - typename Class = typename std::conditional< - std::is_class::value, C, error_t>::type> - using apply_member_pointer = typename std::conditional< - std::is_same::value || std::is_same::value, - error_t, L Class::*>::type; - - // Changes the return type of PMFs, function pointers, function - // references, and qualified/unqualified function types. Changes - // the data type of PMDs. error_t for function objects. - template - using apply_return = error_t; - - // Expands the argument types into a template - template class Container> - using expand_args = error_t; - - template class Container, typename... RightArgs> - using expand_args_left = error_t; - - template class Container, typename... LeftArgs> - using expand_args_right = error_t; - - using clear_args = error_t; - - template - using push_front = error_t; - - template - using push_back = error_t; - - template - using pop_front = error_t; - - template - using pop_back = error_t; - - template - using insert_args = error_t; - - template - using remove_args = error_t; - - template - using replace_args = error_t; - - static constexpr qualifier_flags cv_flags = cv_of::value; - static constexpr qualifier_flags ref_flags = ref_of::value; - static constexpr qualifier_flags q_flags = cv_flags | ref_flags; - - using has_member_qualifiers = std::integral_constant; - using is_const_member = std::integral_constant; - using is_volatile_member = std::integral_constant; - using is_cv_member = std::integral_constant; - -#ifdef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS - using is_reference_member = std::false_type; - using is_lvalue_reference_member = std::false_type; - using is_rvalue_reference_member = std::false_type; -#else - using is_reference_member = std::integral_constant; - using is_lvalue_reference_member = std::integral_constant; - using is_rvalue_reference_member = std::integral_constant; -#endif //#ifdef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS - -}; - -}}} // namespace boost::callable_traits::detail - -#endif // BOOST_CLBL_TRTS_DETAIL_DEFAULT_BOOST_CLBL_TRTS_HPP - diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/forward_declarations.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/forward_declarations.hpp deleted file mode 100644 index 9327759f63..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/forward_declarations.hpp +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef BOOST_CLBL_TRTS_DETAIL_FORWARD_DECLARATIONS -#define BOOST_CLBL_TRTS_DETAIL_FORWARD_DECLARATIONS -#include -#include - -namespace boost { namespace callable_traits { namespace detail { - -template -struct function; - -template -struct has_normal_call_operator -{ - template - struct check { check(std::nullptr_t) {} }; - - template - static std::int8_t test( - check); - - template - static std::int16_t test(...); - - static constexpr bool value = - sizeof(test(nullptr)) == sizeof(std::int8_t); -}; - -struct callable_dummy { - void operator()() {} -}; - -template -using default_to_function_object = typename std::conditional< - has_normal_call_operator::value, - T, callable_dummy>::type; - -template -struct pmf; - -template -struct pmd; - -template::type> -using function_object_base = typename std::conditional< - has_normal_call_operator::value, - pmf::operator())>, - default_callable_traits>::type; - -template> -struct function_object; - -}}} // namespace boost::callable_traits::detail - -#endif // #ifndef BOOST_CLBL_TRTS_DETAIL_FORWARD_DECLARATIONS diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/function.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/function.hpp deleted file mode 100644 index 624c704d20..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/function.hpp +++ /dev/null @@ -1,192 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_DETAIL_FUNCTION_HPP -#define BOOST_CLBL_TRTS_DETAIL_FUNCTION_HPP - -#include -#include -#include -#include -#include - -namespace boost { namespace callable_traits { namespace detail { - -template -struct function : default_callable_traits {}; - -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - -#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS const -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS volatile -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS const volatile -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - -#ifndef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS & -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS && -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS const & -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS const && -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS volatile & -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS volatile && -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS const volatile & -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS const volatile && -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - -#endif // #ifndef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS -#endif // #ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS - -// function pointers - -#define BOOST_CLBL_TRTS_CC_TAG dummy -#define BOOST_CLBL_TRTS_VARARGS_CC BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC -#define BOOST_CLBL_TRTS_CC -#define BOOST_CLBL_TRTS_ST -#include -#include -#undef BOOST_CLBL_TRTS_ST -#undef BOOST_CLBL_TRTS_CC -#undef BOOST_CLBL_TRTS_CC_TAG -#undef BOOST_CLBL_TRTS_VARARGS_CC - -/* ? -#ifdef BOOST_CLBL_TRTS_ENABLE_CDECL -#define BOOST_CLBL_TRTS_CC_TAG cdecl_tag -#define BOOST_CLBL_TRTS_VARARGS_CC __cdecl -#define BOOST_CLBL_TRTS_CC __cdecl -#define BOOST_CLBL_TRTS_ST -#include -#undef BOOST_CLBL_TRTS_ST -#undef BOOST_CLBL_TRTS_CC -#undef BOOST_CLBL_TRTS_CC_TAG -#undef BOOST_CLBL_TRTS_VARARGS_CC -#endif*/ - -#ifdef BOOST_CLBL_TRTS_ENABLE_STDCALL -#define BOOST_CLBL_TRTS_CC_TAG stdcall_tag -#define BOOST_CLBL_TRTS_VARARGS_CC BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC -#define BOOST_CLBL_TRTS_CC __stdcall -#define BOOST_CLBL_TRTS_ST -#include -#undef BOOST_CLBL_TRTS_ST -#undef BOOST_CLBL_TRTS_CC -#undef BOOST_CLBL_TRTS_CC_TAG -#undef BOOST_CLBL_TRTS_VARARGS_CC -#endif - -#ifdef BOOST_CLBL_TRTS_ENABLE_FASTCALL -#define BOOST_CLBL_TRTS_CC_TAG fastcall_tag -#define BOOST_CLBL_TRTS_VARARGS_CC BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC -#define BOOST_CLBL_TRTS_CC __fastcall -#define BOOST_CLBL_TRTS_ST -#include -#undef BOOST_CLBL_TRTS_CC -#undef BOOST_CLBL_TRTS_ST -#undef BOOST_CLBL_TRTS_CC_TAG -#undef BOOST_CLBL_TRTS_VARARGS_CC -#endif - -#ifdef BOOST_CLBL_TRTS_ENABLE_PASCAL -#define BOOST_CLBL_TRTS_CC_TAG pascal_tag -#define BOOST_CLBL_TRTS_VARARGS_CC BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC -#define BOOST_CLBL_TRTS_CC -#define BOOST_CLBL_TRTS_ST pascal -#include -#undef BOOST_CLBL_TRTS_CC -#undef BOOST_CLBL_TRTS_ST -#undef BOOST_CLBL_TRTS_CC_TAG -#undef BOOST_CLBL_TRTS_VARARGS_CC -#endif - -template -struct function : std::conditional::value, - function, default_callable_traits>::type { - - static constexpr const bool value = !std::is_pointer::value; - - using traits = function; - using base = function; - using type = T&; - using remove_varargs = typename base::remove_varargs&; - using add_varargs = typename base::add_varargs&; - - using remove_member_reference = reference_error; - using add_member_lvalue_reference = reference_error; - using add_member_rvalue_reference = reference_error; - using add_member_const = reference_error; - using add_member_volatile = reference_error; - using add_member_cv = reference_error; - using remove_member_const = reference_error; - using remove_member_volatile = reference_error; - using remove_member_cv = reference_error; - - template - using apply_return = typename base::template apply_return&; - - using clear_args = typename base::clear_args&; - - template - using push_front = typename base::template push_front&; - - template - using push_back = typename base::template push_back&; - - template - using pop_back = typename base::template pop_back&; - - template - using pop_front = typename base::template pop_front&; - - template - using insert_args = typename base::template insert_args&; - - template - using remove_args = typename base::template remove_args&; - - template - using replace_args = typename base::template replace_args&; -}; - -}}} // namespace boost::callable_traits::detail - -#endif // #ifndef BOOST_CLBL_TRTS_DETAIL_FUNCTION_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/function_object.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/function_object.hpp deleted file mode 100644 index d12fc00e63..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/function_object.hpp +++ /dev/null @@ -1,107 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_DETAIL_FUNCTION_OBJECT_HPP -#define BOOST_CLBL_TRTS_DETAIL_FUNCTION_OBJECT_HPP - -#include -#include -#include -#include - -namespace boost { namespace callable_traits { namespace detail { - -template -struct function_object : Base { - - using type = T; - using error_t = error_type; - using function_type = typename Base::function_object_signature; - using arg_types = typename Base::non_invoke_arg_types; - using non_invoke_arg_types = arg_types; - - static constexpr const bool value = std::is_class< - typename std::remove_reference::type>::value; - - using traits = function_object; - using class_type = error_t; - using invoke_type = error_t; - using remove_varargs = error_t; - using add_varargs = error_t; - using is_noexcept = typename Base::is_noexcept; - using add_noexcept = error_t; - using remove_noexcept = error_t; - using is_transaction_safe = typename Base::is_transaction_safe; - using add_transaction_safe = error_t; - using remove_transaction_safe = error_t; - using clear_args = error_t; - - template class Container> - using expand_args = typename function::template - expand_args; - - template class Container, typename... RightArgs> - using expand_args_left = typename function::template - expand_args_left; - - template class Container, typename... LeftArgs> - using expand_args_right = typename function::template - expand_args_right; - - template - using apply_member_pointer = - typename std::remove_reference::type C::*; - - template - using apply_return = error_t; - - template - using push_front = error_t; - - template - using push_back = error_t; - - template - using pop_args_front = error_t; - - template - using pop_args_back = error_t; - - template - using insert_args = error_t; - - template - using remove_args = error_t; - - template - using replace_args = error_t; - - template - using pop_front = error_t; - - template - using pop_back = error_t; - - using remove_member_reference = error_t; - using add_member_lvalue_reference = error_t; - using add_member_rvalue_reference = error_t; - using add_member_const = error_t; - using add_member_volatile = error_t; - using add_member_cv = error_t; - using remove_member_const = error_t; - using remove_member_volatile = error_t; - using remove_member_cv = error_t; -}; - -template -struct function_object - : default_callable_traits<> {}; - -}}} // namespace boost::callable_traits::detail - -#endif // #ifndef BOOST_CLBL_TRTS_DETAIL_FUNCTION_OBJECT_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/is_invocable_impl.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/is_invocable_impl.hpp deleted file mode 100644 index 3238865726..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/is_invocable_impl.hpp +++ /dev/null @@ -1,148 +0,0 @@ - /*! -@file - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_IS_INVOCABLE_IMPL_HPP -#define BOOST_CLBL_TRTS_IS_INVOCABLE_IMPL_HPP - -#include -#include -#include -#include -#include - -namespace boost { namespace callable_traits { namespace detail { - - template - struct can_dereference_t - { - template - struct check {}; - - template - static std::int8_t test( - check())>::type>* - ); - - template - static std::int16_t test(...); - - static constexpr const bool value = - sizeof(test(nullptr)) == sizeof(std::int8_t); - }; - - //returns std::true_type for pointers and smart pointers - template - using can_dereference = std::integral_constant::value>; - - - template - struct generalize_t { - using type = T; - }; - - template - struct generalize_t::value && !is_reference_wrapper::value - >>{ - using type = decltype(*std::declval()); - }; - - template - struct generalize_t> { - using type = decltype(std::declval().get()); - }; - - // When T is a pointer, generalize is the resulting type of the - // pointer dereferenced. When T is an std::reference_wrapper, generalize - // is the underlying reference type. Otherwise, generalize is T. - template - using generalize = typename generalize_t::type; - - // handles the member pointer rules of INVOKE - template>, - typename IsSame = std::is_same>> - using generalize_if_dissimilar = typename std::conditional< - IsBaseOf::value || IsSame::value, T, generalize>::type; - - template - struct test_invoke { - - template - auto operator()(Rgs&&... rgs) const -> - success()(static_cast(rgs)...))>; - - auto operator()(...) const -> substitution_failure; - }; - - template - struct test_invoke, true /*abominable*/> { - auto operator()(...) const -> substitution_failure; - }; - - template - struct test_invoke, Ignored> { - - using class_t = typename pmf::class_type; - - template> - auto operator()(U&& u, Rgs&&... rgs) const -> - success().*std::declval())(static_cast(rgs)...))>; - - auto operator()(...) const -> substitution_failure; - }; - - template - struct test_invoke, Ignored> { - - using class_t = typename pmd::class_type; - - template> - auto operator()(U&& u) const -> - success().*std::declval())>; - - auto operator()(...) const -> substitution_failure; - }; - - template - struct is_invocable_impl { - using traits = detail::traits; - using test = detail::test_invoke; - using result = decltype(test{}(::std::declval()...)); - using type = std::integral_constant; - }; - - template - struct is_invocable_impl { - using type = std::false_type; - }; - - template - struct is_invocable_r_impl { - using traits = detail::traits; - using test = detail::test_invoke; - using result = decltype(test{}(::std::declval()...)); - using type = typename std::is_convertible::type; - }; - - template - struct is_invocable_r_impl { - using type = std::false_type; - }; - -}}} // namespace boost::callable_traits::detail - -#endif // #ifndef BOOST_CLBL_TRTS_IS_INVOCABLE_IMPL_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/parameter_index_helper.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/parameter_index_helper.hpp deleted file mode 100644 index 4302175910..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/parameter_index_helper.hpp +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef BOOST_CLBL_TRTS_PARAMETER_INDEX_HELPER_HPP -#define BOOST_CLBL_TRTS_PARAMETER_INDEX_HELPER_HPP - -#include - -namespace boost { namespace callable_traits { namespace detail { - -template -struct parameter_index_helper { - - using error_t = error_type; - - using args_tuple = typename std::conditional::non_invoke_arg_types, - typename detail::traits::arg_types>::type; - - static constexpr bool has_parameter_list = - !std::is_same::value - && !std::is_same::value; - - using temp_tuple = typename std::conditional>::type; - - static constexpr std::size_t parameter_list_size = - std::tuple_size::value; - - static constexpr bool is_out_of_range = has_parameter_list && - I >= parameter_list_size + static_cast(AllowPlus1); - - static constexpr bool is_count_out_of_range = has_parameter_list && - I + Count > parameter_list_size + static_cast(AllowPlus1); - - static constexpr std::size_t index = - has_parameter_list && !is_out_of_range ? I : 0; - - static constexpr std::size_t count = - has_parameter_list && !is_count_out_of_range ? Count : 0; - - using permissive_tuple = typename std::conditional< - has_parameter_list && !is_out_of_range, - args_tuple, std::tuple>::type; - - using permissive_function = typename std::conditional< - has_parameter_list && !is_out_of_range, - T, error_t(error_t)>::type; -}; - -}}} // namespace boost::callable_traits::detail - -#endif // #ifndef BOOST_CLBL_TRTS_PARAMETER_INDEX_HELPER_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/pmd.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/pmd.hpp deleted file mode 100644 index 13a2c44633..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/pmd.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_DETAIL_PMD_HPP -#define BOOST_CLBL_TRTS_DETAIL_PMD_HPP - -#include -#include -#include -#include -#include - -namespace boost { namespace callable_traits { namespace detail { - -template -struct pmd : default_callable_traits {}; - -template -struct pmd : default_callable_traits<> { - - static constexpr bool value = true; - - using traits = pmd; - using class_type = T; - using invoke_type = T const &; - using type = D T::*; - using function_type = typename std::add_lvalue_reference::type(invoke_type); - using qualified_function_type = D(invoke_type); - using arg_types = std::tuple; - using non_invoke_arg_types = std::tuple<>; - - using return_type = typename std::add_lvalue_reference::type; - - template - using apply_member_pointer = D C::*; - - template - using apply_return = R T::*; - - template class Container> - using expand_args = Container; - - using is_member_pointer = std::true_type; -}; - -}}} // namespace boost::callable_traits::detail - -#endif diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/pmf.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/pmf.hpp deleted file mode 100644 index 5284e0d599..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/pmf.hpp +++ /dev/null @@ -1,97 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_DETAIL_PMF_HPP -#define BOOST_CLBL_TRTS_DETAIL_PMF_HPP - -#include -#include -#include -#include -#include - -namespace boost { namespace callable_traits { namespace detail { - -template -struct set_member_function_qualifiers_t; - -template -struct set_varargs_member_function_qualifiers_t; - -template -using set_member_function_qualifiers = - typename set_member_function_qualifiers_t::type; - -template -using set_varargs_member_function_qualifiers = - typename set_varargs_member_function_qualifiers_t::type; - -template -struct pmf : default_callable_traits {}; - -#define BOOST_CLBL_TRTS_CC_TAG dummy -#define BOOST_CLBL_TRTS_VARARGS_CC BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC -#define BOOST_CLBL_TRTS_CC -#include -#undef BOOST_CLBL_TRTS_CC -#undef BOOST_CLBL_TRTS_CC_TAG -#undef BOOST_CLBL_TRTS_VARARGS_CC - -#define BOOST_CLBL_TRTS_CC_TAG dummy -#define BOOST_CLBL_TRTS_VARARGS_CC BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC -#define BOOST_CLBL_TRTS_CC -#include -#undef BOOST_CLBL_TRTS_CC -#undef BOOST_CLBL_TRTS_CC_TAG -#undef BOOST_CLBL_TRTS_VARARGS_CC - -#ifdef BOOST_CLBL_TRTS_ENABLE_CDECL -#define BOOST_CLBL_TRTS_CC_TAG cdecl_tag -#define BOOST_CLBL_TRTS_VARARGS_CC __cdecl -#define BOOST_CLBL_TRTS_CC __cdecl -#include -#undef BOOST_CLBL_TRTS_CC -#undef BOOST_CLBL_TRTS_CC_TAG -#undef BOOST_CLBL_TRTS_VARARGS_CC -#endif // #ifdef BOOST_CLBL_TRTS_ENABLE_CDECL - -// Defining this macro enables undocumented features, likely broken. -// Too much work to maintain, but knock yourself out -#ifdef BOOST_CLBL_TRTS_ENABLE_STDCALL -#define BOOST_CLBL_TRTS_CC_TAG stdcall_tag -#define BOOST_CLBL_TRTS_VARARGS_CC BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC -#define BOOST_CLBL_TRTS_CC __stdcall -#include -#undef BOOST_CLBL_TRTS_CC -#undef BOOST_CLBL_TRTS_CC_TAG -#undef BOOST_CLBL_TRTS_VARARGS_CC -#endif // #ifdef BOOST_CLBL_TRTS_ENABLE_STDCALL - -// Defining this macro enables undocumented features, likely broken. -// Too much work to officially maintain, but knock yourself out -#ifdef BOOST_CLBL_TRTS_ENABLE_FASTCALL -#define BOOST_CLBL_TRTS_CC_TAG fastcall_tag -#define BOOST_CLBL_TRTS_VARARGS_CC BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC -#define BOOST_CLBL_TRTS_CC __fastcall -#include -#undef BOOST_CLBL_TRTS_CC -#undef BOOST_CLBL_TRTS_CC_TAG -#undef BOOST_CLBL_TRTS_VARARGS_CC -#endif // #ifdef BOOST_CLBL_TRTS_ENABLE_FASTCALL - -}}} // namespace boost::callable_traits::detail - -#endif // #ifndef BOOST_CLBL_TRTS_DETAIL_PMF_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/polyfills/disjunction.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/polyfills/disjunction.hpp deleted file mode 100644 index dc4f65c7ca..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/polyfills/disjunction.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/* -Copyright Barrett Adair 2015-2017 - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_DETAIL_POLYFILLS_DISJUNCTION_HPP -#define BOOST_CLBL_TRTS_DETAIL_POLYFILLS_DISJUNCTION_HPP - -#undef BOOST_CLBL_TRTS_DISJUNCTION -#define BOOST_CLBL_TRTS_DISJUNCTION(...) \ - ::boost::callable_traits::detail::disjunction<__VA_ARGS__> - -namespace boost { namespace callable_traits { namespace detail { - -//polyfill for C++17 std::disjunction -template -struct disjunction : std::false_type {}; - -template -struct disjunction : T {}; - -template -struct disjunction - : std::conditional>::type {}; - -}}} // namespace boost::callable_traits::detail - -#endif // #ifndef BOOST_CLBL_TRTS_DETAIL_POLYFILLS_DISJUNCTION_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/polyfills/make_index_sequence.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/polyfills/make_index_sequence.hpp deleted file mode 100644 index a4a6e820c1..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/polyfills/make_index_sequence.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright Barrett Adair 2016-2017 - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) -*/ - -#ifndef BOOST_CLBL_TRTS_DETAIL_POLYFILLS_MAKE_INDEX_SEQUENCE_HPP -#define BOOST_CLBL_TRTS_DETAIL_POLYFILLS_MAKE_INDEX_SEQUENCE_HPP - -#undef BOOST_CLBL_TRTS_IX_SEQ -#define BOOST_CLBL_TRTS_IX_SEQ(...) \ - ::boost::callable_traits::detail::index_sequence<__VA_ARGS__> - -#undef BOOST_CLBL_TRTS_MAKE_IX_SEQ -#define BOOST_CLBL_TRTS_MAKE_IX_SEQ(...) \ - ::boost::callable_traits::detail::make_index_sequence<__VA_ARGS__> - -namespace boost { namespace callable_traits { namespace detail { - -template -struct index_sequence { using type = index_sequence; }; - -template -struct concat; - -template -struct concat, index_sequence> - : index_sequence {}; - -template - struct make_index_sequence_t; - -template -struct make_index_sequence_t : concat< - typename make_index_sequence_t::type, - typename make_index_sequence_t::type >::type {}; - -template<> -struct make_index_sequence_t<0> : index_sequence<> {}; - -template<> -struct make_index_sequence_t<1> : index_sequence<0> {}; - -template -using make_index_sequence = typename make_index_sequence_t::type; - -}}} // namespace boost::callable_traits::detail - -#endif // #ifndef BOOST_CLBL_TRTS_DETAIL_POLYFILLS_MAKE_INDEX_SEQUENCE_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/qualifier_flags.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/qualifier_flags.hpp deleted file mode 100644 index f69d246c4a..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/qualifier_flags.hpp +++ /dev/null @@ -1,123 +0,0 @@ -/* -Defines `qualifier_flags` - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_QUALIFIER_FLAGS_HPP -#define BOOST_CLBL_TRTS_QUALIFIER_FLAGS_HPP - -#include - -namespace boost { namespace callable_traits { namespace detail { - -//bit qualifier_flags used to signify cv/ref qualifiers -using qualifier_flags = std::uint32_t; - -/* - | && & V C | --------------------------------------------- -0 | 0 0 0 0 | default -1 | 0 0 0 1 | const -2 | 0 0 1 0 | volatile -3 | 0 0 1 1 | const volatile --------------------------------------------- -4 | 0 1 0 0 | & -5 | 0 1 0 1 | const & -6 | 0 1 1 0 | volatile & -7 | 0 1 1 1 | const volatile & --------------------------------------------- -8 | 1 0 0 0 | && -9 | 1 0 0 1 | const && -10 | 1 0 1 0 | volatile && -11 | 1 0 1 1 | const volatile && - -*/ - -// Flag representing the default qualifiers on a type -// or member function overload. -constexpr qualifier_flags default_ = 0; - -// Flag representing a const qualifier on a type or -// member function overload. -constexpr qualifier_flags const_ = 1; - -// Flag representing a volatile qualifier on a type -// or member function overload. -constexpr qualifier_flags volatile_ = 2; - -#ifdef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS - -constexpr qualifier_flags lref_ = default_; -constexpr qualifier_flags rref_ = default_; -#else - -// Flag representing an lvalue reference type, or -// an lvalue-reference-qualified member function -// overload. -constexpr qualifier_flags lref_ = 4; - -// Flag representing an lvalue reference type, or -// an rvalue-reference-qualified member function -// overload. -constexpr qualifier_flags rref_ = 8; - -#endif //#ifdef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS - -constexpr qualifier_flags cv_ = 3; - -template -using remove_const_flag = std::integral_constant< - qualifier_flags, Flags & ~const_>; - -template -using is_const = std::integral_constant; - -template -using remove_volatile_flag = std::integral_constant< - qualifier_flags, Flags & ~volatile_>; - -template::type> -using cv_of = std::integral_constant::value ? const_ : default_) - | (std::is_volatile::value ? volatile_ : default_)>; - -template -using ref_of = std::integral_constant::value ? rref_ - : (std::is_lvalue_reference::value ? lref_ - : default_)>; - -//bit-flag implementation of C++11 reference collapsing rules -template -using collapse_flags = std::integral_constant; - -template struct flag_map { static constexpr qualifier_flags value = default_; }; -template struct flag_map { static constexpr qualifier_flags value = lref_; }; -template struct flag_map { static constexpr qualifier_flags value = rref_; }; -template struct flag_map { static constexpr qualifier_flags value = const_; }; -template struct flag_map { static constexpr qualifier_flags value = const_ | lref_; }; -template struct flag_map { static constexpr qualifier_flags value = const_ | rref_; }; -template struct flag_map { static constexpr qualifier_flags value = volatile_; }; -template struct flag_map { static constexpr qualifier_flags value = volatile_ | lref_; }; -template struct flag_map { static constexpr qualifier_flags value = volatile_ | rref_; }; -template struct flag_map { static constexpr qualifier_flags value = const_ | volatile_; }; -template struct flag_map { static constexpr qualifier_flags value = const_ | volatile_ | lref_; }; -template struct flag_map { static constexpr qualifier_flags value = const_ | volatile_ | rref_; }; - -}}} // namespace boost::callable_traits::detail - -#endif // #ifndef BOOST_CLBL_TRTS_QUALIFIER_FLAGS_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/set_function_qualifiers.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/set_function_qualifiers.hpp deleted file mode 100644 index 9dc7f405a3..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/set_function_qualifiers.hpp +++ /dev/null @@ -1,120 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_DETAIL_SET_FUNCTION_QUALIFIERS_HPP -#define BOOST_CLBL_TRTS_DETAIL_SET_FUNCTION_QUALIFIERS_HPP - -#include - -#define BOOST_CLBL_TRTS_SET_FUNCTION_QUALIFIERS(QUAL) \ -template \ -struct set_function_qualifiers_t < \ - flag_map::value, false, false, Return, Args...> { \ - using type = Return(Args...) QUAL; \ -}; \ - \ -template \ -struct set_function_qualifiers_t < \ - flag_map::value, true, false, Return, Args...> { \ - using type = Return(Args...) QUAL \ - BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER; \ -}; \ - \ -template \ -struct set_function_qualifiers_t < \ - flag_map::value, false, true, Return, Args...> { \ - using type = Return(Args...) QUAL \ - BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER; \ -}; \ - \ -template \ -struct set_function_qualifiers_t < \ - flag_map::value, true, true, Return, Args...> { \ - using type = Return(Args...) QUAL \ - BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER \ - BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER; \ -}; \ - \ -template \ -struct set_varargs_function_qualifiers_t < \ - flag_map::value, false, false, Return, Args...> { \ - using type = Return(Args..., ...) QUAL; \ -}; \ - \ -template \ -struct set_varargs_function_qualifiers_t < \ - flag_map::value, true, false, Return, Args...> { \ - using type = Return(Args..., ...) QUAL \ - BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER; \ -}; \ - \ -template \ -struct set_varargs_function_qualifiers_t < \ - flag_map::value, false, true, Return, Args...> { \ - using type = Return(Args..., ...) QUAL \ - BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER; \ -}; \ - \ -template \ -struct set_varargs_function_qualifiers_t < \ - flag_map::value, true, true, Return, Args...> { \ - using type = Return(Args..., ...) QUAL \ - BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER \ - BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER; \ -} \ -/**/ - -namespace boost { namespace callable_traits { namespace detail { - - template - struct set_function_qualifiers_t { - using type = Return(Args...); - }; - - template - struct set_varargs_function_qualifiers_t { - using type = Return(Args..., ...); - }; - -#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS - - BOOST_CLBL_TRTS_SET_FUNCTION_QUALIFIERS(const); - BOOST_CLBL_TRTS_SET_FUNCTION_QUALIFIERS(volatile); - BOOST_CLBL_TRTS_SET_FUNCTION_QUALIFIERS(const volatile); - -#ifndef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS - - BOOST_CLBL_TRTS_SET_FUNCTION_QUALIFIERS(&); - BOOST_CLBL_TRTS_SET_FUNCTION_QUALIFIERS(&&); - BOOST_CLBL_TRTS_SET_FUNCTION_QUALIFIERS(const &); - BOOST_CLBL_TRTS_SET_FUNCTION_QUALIFIERS(const &&); - BOOST_CLBL_TRTS_SET_FUNCTION_QUALIFIERS(volatile &); - BOOST_CLBL_TRTS_SET_FUNCTION_QUALIFIERS(volatile &&); - BOOST_CLBL_TRTS_SET_FUNCTION_QUALIFIERS(const volatile &); - BOOST_CLBL_TRTS_SET_FUNCTION_QUALIFIERS(const volatile &&); - -#endif // #ifndef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS -#endif // #ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS - - template - using set_function_qualifiers = - typename set_function_qualifiers_t::type; - - template - using set_varargs_function_qualifiers = - typename set_varargs_function_qualifiers_t::type; - -}}} // namespace boost::callable_traits::detail - -#endif //BOOST_CLBL_TRTS_DETAIL_SET_FUNCTION_QUALIFIERS_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/sfinae_errors.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/sfinae_errors.hpp deleted file mode 100644 index 485d17259c..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/sfinae_errors.hpp +++ /dev/null @@ -1,89 +0,0 @@ -/* -@Copyright Barrett Adair 2016-2017 - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_SFINAE_ERRORS_HPP -#define BOOST_CLBL_TRTS_SFINAE_ERRORS_HPP - -#include - -namespace boost { namespace callable_traits { namespace detail { - - struct sfinae_error{}; - - template - struct success { - static constexpr bool value = true; - struct _ { using type = T; }; - }; - - template - struct fail_if : T { - static_assert(std::is_base_of::value, - "incorrect usage of fail_if"); - - static constexpr bool value = B; - }; - - template - using sfinae_try = typename BOOST_CLBL_TRTS_DISJUNCTION( - FailIfs..., success)::_::type; - - template - struct fail { - using type = typename std::conditional::value, - FailMsg, FailMsg>::type::_::type; - }; - -}}} // namespace boost::callable_traits::detail - -#define BOOST_CLBL_TRTS_PP_CAT_(x, y) x ## y -#define BOOST_CLBL_TRTS_PP_CAT(x, y) BOOST_CLBL_TRTS_PP_CAT_(x, y) - -#define BOOST_CLBL_TRTS_DEFINE_SFINAE_ERROR_ORIGIN(origin) \ -namespace error { \ - template \ - struct origin : \ - ::boost::callable_traits::detail::sfinae_error \ - { struct _ {}; }; \ -} \ -/**/ - -#define BOOST_CLBL_TRTS_SFINAE_MSG(origin, name) \ -struct BOOST_CLBL_TRTS_PP_CAT(name, _ ){}; \ -struct name : error::origin< \ - BOOST_CLBL_TRTS_PP_CAT(name, _ )>{}; \ -/**/ - -namespace boost { namespace callable_traits { - - BOOST_CLBL_TRTS_DEFINE_SFINAE_ERROR_ORIGIN(parameters) - BOOST_CLBL_TRTS_SFINAE_MSG(parameters, index_out_of_range_for_parameter_list) - BOOST_CLBL_TRTS_SFINAE_MSG(parameters, cannot_determine_parameters_for_this_type) - - BOOST_CLBL_TRTS_DEFINE_SFINAE_ERROR_ORIGIN(varargs) - BOOST_CLBL_TRTS_SFINAE_MSG(varargs, varargs_are_illegal_for_this_type) - - BOOST_CLBL_TRTS_DEFINE_SFINAE_ERROR_ORIGIN(member_qualifiers) - BOOST_CLBL_TRTS_SFINAE_MSG(member_qualifiers, member_qualifiers_are_illegal_for_this_type) - BOOST_CLBL_TRTS_SFINAE_MSG(member_qualifiers, this_compiler_doesnt_support_abominable_function_types) - - BOOST_CLBL_TRTS_DEFINE_SFINAE_ERROR_ORIGIN(transaction_safe_) - BOOST_CLBL_TRTS_SFINAE_MSG(transaction_safe_, transaction_safe_is_not_supported_by_this_configuration) - - BOOST_CLBL_TRTS_DEFINE_SFINAE_ERROR_ORIGIN(expand_args) - BOOST_CLBL_TRTS_SFINAE_MSG(expand_args, cannot_expand_the_parameter_list_of_first_template_argument) - - BOOST_CLBL_TRTS_DEFINE_SFINAE_ERROR_ORIGIN(member_pointer_required) - BOOST_CLBL_TRTS_SFINAE_MSG(member_pointer_required, type_is_not_a_member_pointer) - - BOOST_CLBL_TRTS_DEFINE_SFINAE_ERROR_ORIGIN(reference_error) - BOOST_CLBL_TRTS_SFINAE_MSG(reference_error, reference_type_not_supported_by_this_metafunction) - -}} // namespace boost::callable_traits - -#endif // #ifndef BOOST_CLBL_TRTS_SFINAE_ERRORS_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/traits.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/traits.hpp deleted file mode 100644 index e5a587f0b2..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/traits.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_DETAIL_TRAITS_HPP -#define BOOST_CLBL_TRTS_DETAIL_TRAITS_HPP - -#include -#include - -namespace boost { namespace callable_traits { namespace detail { - - // Here is where the magic happens - template - using traits = typename BOOST_CLBL_TRTS_DISJUNCTION( - function_object>, - function, - pmf, - pmd, - default_callable_traits - )::traits; - -}}} // namespace boost::callable_traits::detail - -#endif // #ifndef BOOST_CLBL_TRTS_DETAIL_TRAITS_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function.hpp deleted file mode 100644 index a1d32e90a2..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright (c) 2016 Barrett Adair - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -HEADER GUARDS INTENTIONALLY OMITTED -DO NOT INCLUDE THIS HEADER DIRECTLY -*/ - -#define BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE -#define BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE std::false_type -#include -#undef BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE -#undef BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE - -#ifdef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE -#define BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE std::true_type -#define BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE transaction_safe -#include -#undef BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE -#undef BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE -#endif // #ifdef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE \ No newline at end of file diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function_2.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function_2.hpp deleted file mode 100644 index 562b4e933d..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function_2.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright (c) 2016 Barrett Adair - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -HEADER GUARDS INTENTIONALLY OMITTED -DO NOT INCLUDE THIS HEADER DIRECTLY -*/ - -#define BOOST_CLBL_TRTS_NOEXCEPT_SPEC -#define BOOST_CLBL_TRTS_IS_NOEXCEPT std::false_type -#include -#undef BOOST_CLBL_TRTS_NOEXCEPT_SPEC -#undef BOOST_CLBL_TRTS_IS_NOEXCEPT - -#ifdef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES -#define BOOST_CLBL_TRTS_NOEXCEPT_SPEC noexcept -#define BOOST_CLBL_TRTS_IS_NOEXCEPT std::true_type -#include -#undef BOOST_CLBL_TRTS_NOEXCEPT_SPEC -#undef BOOST_CLBL_TRTS_IS_NOEXCEPT -#endif // #ifdef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES \ No newline at end of file diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function_3.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function_3.hpp deleted file mode 100644 index 2c329c411a..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function_3.hpp +++ /dev/null @@ -1,260 +0,0 @@ -/* -Copyright (c) 2016 Barrett Adair - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -HEADER GUARDS INTENTIONALLY OMITTED -DO NOT INCLUDE THIS HEADER DIRECTLY - -macros used: - -BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - the function-level qualifiers for the - current inclusion (combinations of `const` `volatile` `&` `&&`, or nothing) - -BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - the transaction_safe specifier for - the current include (`transaction_safe` or nothing) - -BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE - `std::true_type` or `std::false_type`, - tied on whether BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE is `transaction_safe` - -BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER - `transaction_safe` when - BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE is enabled, otherwise nothing - -BOOST_CLBL_TRTS_NOEXCEPT_SPEC - the noexcept specifier for - the current include (`noexcept` or nothing) - -BOOST_CLBL_TRTS_IS_NOEXCEPT - `std::true_type` or `std::false_type`, - tied on whether BOOST_CLBL_TRTS_NOEXCEPT_SPEC is `noexcept` - -BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER - `noexcept` if - BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES is defined, otherwise nothing - -*/ - -template -struct function - : default_callable_traits { - - static constexpr bool value = true; - - using traits = function; - - using return_type = Return; - - using arg_types = std::tuple; - using non_invoke_arg_types = arg_types; - - using type = Return(Args...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - using function_type = Return(Args...); - - using qualified_function_type = Return(Args...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - using remove_varargs = type; - - using add_varargs = Return (Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - using is_noexcept = BOOST_CLBL_TRTS_IS_NOEXCEPT; - - using remove_noexcept = Return(Args...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE; - - using add_noexcept = Return(Args...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER; - - using is_transaction_safe = BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE; - - using remove_transaction_safe = Return(Args...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - using add_transaction_safe = Return(Args...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - using qualifiers = default_callable_traits; - - template - using set_qualifiers = set_function_qualifiers; - - #ifdef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS - - using add_member_lvalue_reference = abominable_functions_not_supported_on_this_compiler; - using add_member_rvalue_reference = abominable_functions_not_supported_on_this_compiler; - using add_member_const = abominable_functions_not_supported_on_this_compiler; - using add_member_volatile = abominable_functions_not_supported_on_this_compiler; - using add_member_cv = abominable_functions_not_supported_on_this_compiler; - - #else - - using add_member_lvalue_reference = set_qualifiers< - collapse_flags::value>; - - using add_member_rvalue_reference = set_qualifiers< - collapse_flags::value>; - - using add_member_const = set_qualifiers; - - using add_member_volatile = set_qualifiers; - - using add_member_cv = set_qualifiers; - - #endif // #ifdef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS - - using remove_member_reference = set_qualifiers; - - using remove_member_const = set_qualifiers< - qualifiers::ref_flags | remove_const_flag::value>; - - using remove_member_volatile = set_qualifiers< - qualifiers::ref_flags | remove_volatile_flag::value>; - - using remove_member_cv = set_qualifiers; - - template - using apply_member_pointer = add_member_pointer; - - template - using apply_return = NewReturn(Args...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - template class Container> - using expand_args = Container; - - using is_member_pointer = std::false_type; -}; - - -template -struct function - : default_callable_traits { - - static constexpr bool value = true; - - using has_varargs = std::true_type; - using traits = function; - using return_type = Return; - using arg_types = std::tuple; - - using type = Return (Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - using function_type = Return(Args..., ...); - - using qualified_function_type = Return(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - using remove_varargs = Return (Args...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - using add_varargs = type; - - using is_noexcept = BOOST_CLBL_TRTS_IS_NOEXCEPT; - - using remove_noexcept = Return(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE; - - using add_noexcept = Return(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER; - - using is_transaction_safe = BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE; - - using remove_transaction_safe = Return(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - using add_transaction_safe = Return(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - using qualifiers = default_callable_traits; - - template - using set_qualifiers = set_varargs_function_qualifiers; - - #ifdef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS - - using add_member_lvalue_reference = abominable_functions_not_supported_on_this_compiler; - using add_member_rvalue_reference = abominable_functions_not_supported_on_this_compiler; - using add_member_const = abominable_functions_not_supported_on_this_compiler; - using add_member_volatile = abominable_functions_not_supported_on_this_compiler; - using add_member_cv = abominable_functions_not_supported_on_this_compiler; - - #else - - using add_member_lvalue_reference = set_qualifiers< - collapse_flags::value>; - - using add_member_rvalue_reference = set_qualifiers< - collapse_flags::value>; - - using add_member_const = set_qualifiers; - - using add_member_volatile = set_qualifiers; - - using add_member_cv = set_qualifiers; - - #endif // #ifdef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS - - using remove_member_reference = set_qualifiers; - - using remove_member_const = set_qualifiers< - qualifiers::ref_flags | remove_const_flag::value>; - - using remove_member_volatile = set_qualifiers< - qualifiers::ref_flags | remove_volatile_flag::value>; - - using remove_member_cv = set_qualifiers; - - template - using apply_member_pointer = - Return( BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC U::*)(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - template - using apply_return = NewReturn(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - template class Container> - using expand_args = Container; - - using is_member_pointer = std::false_type; -}; diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function_ptr.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function_ptr.hpp deleted file mode 100644 index 4aa8ad5936..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function_ptr.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright (c) 2016 Modified Work Barrett Adair - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -HEADER GUARDS INTENTIONALLY OMITTED -DO NOT INCLUDE THIS HEADER DIRECTLY -*/ - -#define BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE -#define BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE std::false_type -#include - -#undef BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE -#undef BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE - -#ifdef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE -#define BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE std::true_type -#define BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE transaction_safe -#include -#endif - -#undef BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE -#undef BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function_ptr_2.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function_ptr_2.hpp deleted file mode 100644 index b54f2ed804..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function_ptr_2.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright (c) 2016 Barrett Adair - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -HEADER GUARDS INTENTIONALLY OMITTED -DO NOT INCLUDE THIS HEADER DIRECTLY -*/ - -#define BOOST_CLBL_TRTS_NOEXCEPT_SPEC -#define BOOST_CLBL_TRTS_IS_NOEXCEPT std::false_type -#include -#undef BOOST_CLBL_TRTS_NOEXCEPT_SPEC -#undef BOOST_CLBL_TRTS_IS_NOEXCEPT - -#ifdef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES -#define BOOST_CLBL_TRTS_NOEXCEPT_SPEC noexcept -#define BOOST_CLBL_TRTS_IS_NOEXCEPT std::true_type -#include -#undef BOOST_CLBL_TRTS_NOEXCEPT_SPEC -#undef BOOST_CLBL_TRTS_IS_NOEXCEPT -#endif // #ifdef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES \ No newline at end of file diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function_ptr_3.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function_ptr_3.hpp deleted file mode 100644 index e657b57ef1..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function_ptr_3.hpp +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright (c) 2016 Modified Work Barrett Adair - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -HEADER GUARDS INTENTIONALLY OMITTED -DO NOT INCLUDE THIS HEADER DIRECTLY - -macros used: - -BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - the transaction_safe specifier for - the current include (`transaction_safe` or nothing) - -BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE - `std::true_type` or `std::false_type`, - tied on whether BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE is `transaction_safe` - -BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER - `transaction_safe` when - BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE is enabled, otherwise nothing - -BOOST_CLBL_TRTS_NOEXCEPT_SPEC - the noexcept specifier for - the current include (`noexcept` or nothing) - -BOOST_CLBL_TRTS_IS_NOEXCEPT - `std::true_type` or `std::false_type`, - tied on whether BOOST_CLBL_TRTS_NOEXCEPT_SPEC is `noexcept` - -BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER - `noexcept` if - BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES is defined, otherwise nothing -*/ - -template -struct function< - BOOST_CLBL_TRTS_ST Return(BOOST_CLBL_TRTS_CC *)(Args...) - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC> - : default_callable_traits<> { - - static constexpr bool value = true; - - using traits = function; - - using return_type = Return; - - using arg_types = std::tuple; - using non_invoke_arg_types = arg_types; - - using type = BOOST_CLBL_TRTS_ST Return(BOOST_CLBL_TRTS_CC *)(Args...) - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE; - - using function_type = Return(Args...); - using qualified_function_type = function_type; - using remove_varargs = type; - - using add_varargs = - BOOST_CLBL_TRTS_ST Return (BOOST_CLBL_TRTS_VARARGS_CC *)(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - using is_noexcept = BOOST_CLBL_TRTS_IS_NOEXCEPT; - - using remove_noexcept = Return(BOOST_CLBL_TRTS_CC *)(Args...) - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE; - - using add_noexcept = Return(BOOST_CLBL_TRTS_CC *)(Args...) - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER; - - using is_transaction_safe = BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE; - - using remove_transaction_safe = Return(BOOST_CLBL_TRTS_CC *)(Args...) - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - using add_transaction_safe = Return(BOOST_CLBL_TRTS_CC *)(Args...) - BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - template - using apply_member_pointer = - BOOST_CLBL_TRTS_ST Return(BOOST_CLBL_TRTS_CC U::*)(Args...) - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - template - using apply_return = - BOOST_CLBL_TRTS_ST NewReturn(BOOST_CLBL_TRTS_CC *)(Args...) - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - template class Container> - using expand_args = Container; - - using is_member_pointer = std::false_type; -}; - diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function_ptr_varargs.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function_ptr_varargs.hpp deleted file mode 100644 index 625f0d62ea..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function_ptr_varargs.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright (c) 2016 Modified Work Barrett Adair - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -HEADER GUARDS INTENTIONALLY OMITTED -DO NOT INCLUDE THIS HEADER DIRECTLY -*/ - -#define BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE -#define BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE std::false_type -#include -#undef BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE -#undef BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE - -#ifdef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE -#define BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE std::true_type -#define BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE transaction_safe -#include -#undef BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE -#undef BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE -#endif // #ifdef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE \ No newline at end of file diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function_ptr_varargs_2.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function_ptr_varargs_2.hpp deleted file mode 100644 index 9ed68fc132..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function_ptr_varargs_2.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright (c) 2016 Barrett Adair - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -HEADER GUARDS INTENTIONALLY OMITTED -DO NOT INCLUDE THIS HEADER DIRECTLY -*/ - -#define BOOST_CLBL_TRTS_NOEXCEPT_SPEC -#define BOOST_CLBL_TRTS_IS_NOEXCEPT std::false_type -#include -#undef BOOST_CLBL_TRTS_NOEXCEPT_SPEC -#undef BOOST_CLBL_TRTS_IS_NOEXCEPT - -#ifdef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES -#define BOOST_CLBL_TRTS_NOEXCEPT_SPEC noexcept -#define BOOST_CLBL_TRTS_IS_NOEXCEPT std::true_type -#include -#undef BOOST_CLBL_TRTS_NOEXCEPT_SPEC -#undef BOOST_CLBL_TRTS_IS_NOEXCEPT -#endif // #ifdef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES \ No newline at end of file diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function_ptr_varargs_3.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function_ptr_varargs_3.hpp deleted file mode 100644 index 42e22931ab..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/function_ptr_varargs_3.hpp +++ /dev/null @@ -1,98 +0,0 @@ -/* -Copyright (c) 2016 Modified Work Barrett Adair - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -HEADER GUARDS INTENTIONALLY OMITTED -DO NOT INCLUDE THIS HEADER DIRECTLY - -macros used: - -BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - the transaction_safe specifier for - the current include (`transaction_safe` or nothing) - -BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE - `std::true_type` or `std::false_type`, - tied on whether BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE is `transaction_safe` - -BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER - `transaction_safe` when - BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE is enabled, otherwise nothing - -BOOST_CLBL_TRTS_NOEXCEPT_SPEC - the noexcept specifier for - the current include (`noexcept` or nothing) - -BOOST_CLBL_TRTS_IS_NOEXCEPT - `std::true_type` or `std::false_type`, - tied on whether BOOST_CLBL_TRTS_NOEXCEPT_SPEC is `noexcept` - -BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER - `noexcept` if - BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES is defined, otherwise nothing -*/ - -template -struct function - : default_callable_traits<> { - - static constexpr bool value = true; - - using has_varargs = std::true_type; - - using traits = function; - - using return_type = Return; - - using arg_types = std::tuple; - using non_invoke_arg_types = arg_types; - - using type = - BOOST_CLBL_TRTS_ST Return(BOOST_CLBL_TRTS_VARARGS_CC *)(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - using function_type = Return(Args..., ...); - - using qualified_function_type = function_type; - - using remove_varargs = - BOOST_CLBL_TRTS_ST Return(BOOST_CLBL_TRTS_CC *)(Args...) - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE; - - using add_varargs = type; - - using is_noexcept = BOOST_CLBL_TRTS_IS_NOEXCEPT; - - using remove_noexcept = BOOST_CLBL_TRTS_ST Return(BOOST_CLBL_TRTS_CC *)(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE; - - using add_noexcept = BOOST_CLBL_TRTS_ST Return(BOOST_CLBL_TRTS_CC *)(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER; - - using is_transaction_safe = BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE; - - using remove_transaction_safe = Return(BOOST_CLBL_TRTS_VARARGS_CC *)(Args..., ...) - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - using add_transaction_safe = Return(BOOST_CLBL_TRTS_VARARGS_CC *)(Args..., ...) - BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - template - using apply_member_pointer = - BOOST_CLBL_TRTS_ST Return(BOOST_CLBL_TRTS_VARARGS_CC U::*)(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - template - using apply_return = - BOOST_CLBL_TRTS_ST NewReturn(BOOST_CLBL_TRTS_VARARGS_CC *)(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - template class Container> - using expand_args = Container; - - using is_member_pointer = std::false_type; -}; - diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/pmf.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/pmf.hpp deleted file mode 100644 index de9e7a34a1..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/pmf.hpp +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright (c) 2001 Peter Dimov and Multi Media Ltd. -Copyright (c) 2016 Modified Work Barrett Adair - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -HEADER GUARDS INTENTIONALLY OMITTED -DO NOT INCLUDE THIS HEADER DIRECTLY - -*/ - -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#undef BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#define BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#undef BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS const -#define BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS \ - BOOST_CLBL_TRTS_ABOMINABLE_CONST -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#undef BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS volatile -#define BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS \ - BOOST_CLBL_TRTS_ABOMINABLE_VOLATILE -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#undef BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS const volatile -#define BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS \ - BOOST_CLBL_TRTS_ABOMINABLE_CONST BOOST_CLBL_TRTS_ABOMINABLE_VOLATILE -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#undef BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - -#ifndef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS & -#define BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS & -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#undef BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS && -#define BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS && -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#undef BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS const & -#define BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS const & -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#undef BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS volatile & -#define BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS volatile & -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#undef BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS const volatile & -#define BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS const volatile & -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#undef BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS const && -#define BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS const && -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#undef BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS volatile && -#define BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS volatile && -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#undef BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS const volatile && -#define BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS const volatile && -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#undef BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - -#endif // #ifndef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/pmf_2.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/pmf_2.hpp deleted file mode 100644 index e3568fb14a..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/pmf_2.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/* -Copyright (c) 2016 Barrett Adair - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -HEADER GUARDS INTENTIONALLY OMITTED -DO NOT INCLUDE THIS HEADER DIRECTLY - -*/ - -template -struct set_member_function_qualifiers_t< - flag_map::value, - false, // IsTransactionSafe - false, // IsNoexcept - BOOST_CLBL_TRTS_CC_TAG, T, Return, Args...> { - - using type = Return(BOOST_CLBL_TRTS_CC T::*)(Args...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS; -}; - -template -struct set_member_function_qualifiers_t< - flag_map::value, - false, - true, - BOOST_CLBL_TRTS_CC_TAG, T, Return, Args...> { - - using type = Return(BOOST_CLBL_TRTS_CC T::*)(Args...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER; -}; - -template -struct set_member_function_qualifiers_t< - flag_map::value, - true, - false, - BOOST_CLBL_TRTS_CC_TAG, T, Return, Args...> { - - using type = Return(BOOST_CLBL_TRTS_CC T::*)(Args...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER; -}; - -template -struct set_member_function_qualifiers_t< - flag_map::value, - true, - true, - BOOST_CLBL_TRTS_CC_TAG, T, Return, Args...> { - - using type = Return(BOOST_CLBL_TRTS_CC T::*)(Args...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER - BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER; -}; - -#define BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE -#define BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE std::false_type -#include -#undef BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE -#undef BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE - -#ifdef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE - -#define BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE std::true_type -#define BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE transaction_safe -#include -#undef BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE -#undef BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE - -#endif diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/pmf_3.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/pmf_3.hpp deleted file mode 100644 index 62b34f2bc7..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/pmf_3.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright (c) 2016 Barrett Adair - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -HEADER GUARDS INTENTIONALLY OMITTED -DO NOT INCLUDE THIS HEADER DIRECTLY -*/ - -#define BOOST_CLBL_TRTS_NOEXCEPT_SPEC -#define BOOST_CLBL_TRTS_IS_NOEXCEPT std::false_type -#include -#undef BOOST_CLBL_TRTS_NOEXCEPT_SPEC -#undef BOOST_CLBL_TRTS_IS_NOEXCEPT - -#ifdef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES -#define BOOST_CLBL_TRTS_NOEXCEPT_SPEC noexcept -#define BOOST_CLBL_TRTS_IS_NOEXCEPT std::true_type -#include -#undef BOOST_CLBL_TRTS_NOEXCEPT_SPEC -#undef BOOST_CLBL_TRTS_IS_NOEXCEPT -#endif // #ifdef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES \ No newline at end of file diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/pmf_4.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/pmf_4.hpp deleted file mode 100644 index 5a1f48ce20..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/pmf_4.hpp +++ /dev/null @@ -1,147 +0,0 @@ -/* -Copyright (c) 2016 Barrett Adair - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -HEADER GUARDS INTENTIONALLY OMITTED -DO NOT INCLUDE THIS HEADER DIRECTLY - -BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - the function-level qualifiers for the - current inclusion (combinations of `const` `volatile` `&` `&&`, or nothing) - -BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - the transaction_safe specifier for - the current include (`transaction_safe` or nothing) - -BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE - `std::true_type` or `std::false_type`, - tied on whether BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE is `transaction_safe` - -BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER - `transaction_safe` when - BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE is defined, otherwise nothing - -BOOST_CLBL_TRTS_NOEXCEPT_SPEC - the noexcept specifier for - the current include (`noexcept` or nothing) - -BOOST_CLBL_TRTS_IS_NOEXCEPT - `std::true_type` or `std::false_type`, - tied on whether BOOST_CLBL_TRTS_NOEXCEPT_SPEC is `noexcept` - -BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER - `noexcept` if - BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES is defined, otherwise nothing -*/ - -template -struct pmf - : default_callable_traits { - - static constexpr bool value = true; - - using traits = pmf; - - using return_type = Return; - - using type = Return(BOOST_CLBL_TRTS_CC T::*)(Args...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - using invoke_type = typename std::conditional< - std::is_rvalue_reference::value, - T BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS, - typename std::add_lvalue_reference::type - >::type; - - using arg_types = std::tuple; - using non_invoke_arg_types = std::tuple; - - using function_object_signature = Return(Args...); - - using function_type = Return(invoke_type, Args...); - - using qualified_function_type = Return(Args...) - BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - using remove_varargs = type; - - using add_varargs = - Return(BOOST_CLBL_TRTS_VARARGS_CC T::*)(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - using is_noexcept = BOOST_CLBL_TRTS_IS_NOEXCEPT; - - using remove_noexcept = Return(BOOST_CLBL_TRTS_CC T::*)(Args...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE; - - using add_noexcept = Return(BOOST_CLBL_TRTS_CC T::*)(Args...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER; - - using is_transaction_safe = BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE; - - using remove_transaction_safe = Return(BOOST_CLBL_TRTS_CC T::*)(Args...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - using add_transaction_safe = Return(BOOST_CLBL_TRTS_CC T::*)(Args...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - using class_type = T; - - using qualifiers = default_callable_traits; - - template - using set_qualifiers = set_member_function_qualifiers< - Flags, is_transaction_safe::value, is_noexcept::value, - BOOST_CLBL_TRTS_CC_TAG, T, Return, Args...>; - - using remove_member_reference = set_qualifiers; - - using add_member_lvalue_reference = set_qualifiers< - collapse_flags::value>; - - using add_member_rvalue_reference = set_qualifiers< - collapse_flags::value>; - - using add_member_const = set_qualifiers; - - using add_member_volatile = set_qualifiers; - - using add_member_cv = set_qualifiers; - - using remove_member_const = set_qualifiers< - qualifiers::ref_flags | remove_const_flag::value>; - - using remove_member_volatile = set_qualifiers< - qualifiers::ref_flags | remove_volatile_flag::value>; - - using remove_member_cv = set_qualifiers; - - template - using apply_member_pointer = - Return(BOOST_CLBL_TRTS_CC U::*)(Args...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - template - using apply_return = - NewReturn(BOOST_CLBL_TRTS_CC T::*)(Args...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - template class Container> - using expand_args = Container; - - using is_member_pointer = std::true_type; -}; diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/pmf_varargs.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/pmf_varargs.hpp deleted file mode 100644 index bd40f2bdf2..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/pmf_varargs.hpp +++ /dev/null @@ -1,89 +0,0 @@ -/* -Copyright (c) 2016 Barrett Adair - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -HEADER GUARDS INTENTIONALLY OMITTED -DO NOT INCLUDE THIS HEADER DIRECTLY - -*/ - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#define BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#undef BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS const -#define BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS \ - BOOST_CLBL_TRTS_ABOMINABLE_CONST -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#undef BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS volatile -#define BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS \ - BOOST_CLBL_TRTS_ABOMINABLE_VOLATILE -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#undef BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS const volatile -#define BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS \ - BOOST_CLBL_TRTS_ABOMINABLE_CONST BOOST_CLBL_TRTS_ABOMINABLE_VOLATILE -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#undef BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - -#ifndef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS & -#define BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS & -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#undef BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS && -#define BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS && -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#undef BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS const & -#define BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS const & -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#undef BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS volatile & -#define BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS volatile & -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#undef BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS const volatile & -#define BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS const volatile & -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#undef BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS const && -#define BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS const && -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#undef BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS volatile && -#define BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS volatile && -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#undef BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - -#define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS const volatile && -#define BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS const volatile && -#include -#undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS -#undef BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - -#endif // #ifndef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS \ No newline at end of file diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/pmf_varargs_2.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/pmf_varargs_2.hpp deleted file mode 100644 index 5de0668190..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/pmf_varargs_2.hpp +++ /dev/null @@ -1,78 +0,0 @@ -/* -Copyright (c) 2016 Barrett Adair - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -HEADER GUARDS INTENTIONALLY OMITTED -DO NOT INCLUDE THIS HEADER DIRECTLY - -*/ - -template -struct set_varargs_member_function_qualifiers_t < - flag_map::value, - false, // IsTransactionSafe - false, // IsNoexcept - BOOST_CLBL_TRTS_CC_TAG, T, Return, Args...> { - - using type = - Return(BOOST_CLBL_TRTS_VARARGS_CC T::*)(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS; -}; - -template -struct set_varargs_member_function_qualifiers_t < - flag_map::value, - false, - true, - BOOST_CLBL_TRTS_CC_TAG, T, Return, Args...> { - - using type = - Return(BOOST_CLBL_TRTS_VARARGS_CC T::*)(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER; -}; - -template -struct set_varargs_member_function_qualifiers_t < - flag_map::value, - true, - false, - BOOST_CLBL_TRTS_CC_TAG, T, Return, Args...> { - - using type = - Return(BOOST_CLBL_TRTS_VARARGS_CC T::*)(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER; -}; - -template -struct set_varargs_member_function_qualifiers_t < - flag_map::value, - true, - true, - BOOST_CLBL_TRTS_CC_TAG, T, Return, Args...> { - - using type = - Return(BOOST_CLBL_TRTS_VARARGS_CC T::*)(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER - BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER; -}; - -#define BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE -#define BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE std::false_type -#include - -#undef BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE -#undef BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE - -#ifdef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE - -#define BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE std::true_type -#define BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE transaction_safe -#include -#endif - -#undef BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE -#undef BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/pmf_varargs_3.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/pmf_varargs_3.hpp deleted file mode 100644 index 905a5a6d92..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/pmf_varargs_3.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright (c) 2016 Barrett Adair - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -HEADER GUARDS INTENTIONALLY OMITTED -DO NOT INCLUDE THIS HEADER DIRECTLY -*/ - -#define BOOST_CLBL_TRTS_NOEXCEPT_SPEC -#define BOOST_CLBL_TRTS_IS_NOEXCEPT std::false_type -#include -#undef BOOST_CLBL_TRTS_NOEXCEPT_SPEC -#undef BOOST_CLBL_TRTS_IS_NOEXCEPT - -#ifdef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES -#define BOOST_CLBL_TRTS_NOEXCEPT_SPEC noexcept -#define BOOST_CLBL_TRTS_IS_NOEXCEPT std::true_type -#include -#undef BOOST_CLBL_TRTS_NOEXCEPT_SPEC -#undef BOOST_CLBL_TRTS_IS_NOEXCEPT -#endif // #ifdef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES \ No newline at end of file diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/pmf_varargs_4.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/pmf_varargs_4.hpp deleted file mode 100644 index ca33ebf96b..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/unguarded/pmf_varargs_4.hpp +++ /dev/null @@ -1,149 +0,0 @@ -/* -Copyright (c) 2016 Barrett Adair - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -HEADER GUARDS INTENTIONALLY OMITTED -DO NOT INCLUDE THIS HEADER DIRECTLY - -BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - the function-level qualifiers for the - current inclusion (combinations of `const` `volatile` `&` `&&`, or nothing) - -BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - the transaction_safe specifier for - the current include (`transaction_safe` or nothing) - -BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE - `std::true_type` or `std::false_type`, - tied on whether BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE is `transaction_safe` - -BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER - `transaction_safe` when - BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE is enabled, otherwise nothing - -BOOST_CLBL_TRTS_NOEXCEPT_SPEC - the noexcept specifier for - the current include (`noexcept` or nothing) - -BOOST_CLBL_TRTS_IS_NOEXCEPT - `std::true_type` or `std::false_type`, - tied on whether BOOST_CLBL_TRTS_NOEXCEPT_SPEC is `noexcept` - -BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER - `noexcept` if - BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES is defined, otherwise nothing -*/ - -template -struct pmf - : default_callable_traits { - - static constexpr bool value = true; - - using has_varargs = std::true_type; - - using traits = pmf; - - using return_type = Return; - - using type = Return(BOOST_CLBL_TRTS_VARARGS_CC T::*)(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - using invoke_type = typename std::conditional< - std::is_rvalue_reference::value, - T BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS, - typename std::add_lvalue_reference::type - >::type; - - using arg_types = std::tuple; - using non_invoke_arg_types = std::tuple; - - using function_object_signature = Return(Args..., ...); - - using function_type = Return(invoke_type, Args..., ...); - - using qualified_function_type = Return(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - using remove_varargs = - Return(BOOST_CLBL_TRTS_CC T::*)(Args...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - using add_varargs = type; - - using is_noexcept = BOOST_CLBL_TRTS_IS_NOEXCEPT; - - using remove_noexcept = Return(BOOST_CLBL_TRTS_CC T::*)(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE; - - using add_noexcept = Return(BOOST_CLBL_TRTS_CC T::*)(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER; - - using is_transaction_safe = BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE; - - using remove_transaction_safe = Return(BOOST_CLBL_TRTS_VARARGS_CC T::*)(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - using add_transaction_safe = Return(BOOST_CLBL_TRTS_VARARGS_CC T::*)(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - using class_type = T; - - using qualifiers = default_callable_traits; - - template - using set_qualifiers = set_varargs_member_function_qualifiers< - Flags, is_transaction_safe::value, is_noexcept::value, - BOOST_CLBL_TRTS_CC_TAG, T, Return, Args...>; - - using remove_member_reference = set_qualifiers; - - using add_member_lvalue_reference = set_qualifiers< - collapse_flags::value>; - - using add_member_rvalue_reference = set_qualifiers< - collapse_flags::value>; - - using add_member_const = set_qualifiers; - - using add_member_volatile = set_qualifiers; - - using add_member_cv = set_qualifiers; - - using remove_member_const = set_qualifiers< - qualifiers::ref_flags | remove_const_flag::value>; - - using remove_member_volatile = set_qualifiers< - qualifiers::ref_flags | remove_volatile_flag::value>; - - using remove_member_cv = set_qualifiers; - - template - using apply_member_pointer = - Return(BOOST_CLBL_TRTS_VARARGS_CC U::*)(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - template - using apply_return = - NewReturn(BOOST_CLBL_TRTS_VARARGS_CC T::*)(Args..., ...) - BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - BOOST_CLBL_TRTS_NOEXCEPT_SPEC; - - template class Container> - using expand_args = Container; - - using is_member_pointer = std::true_type; -}; diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/utility.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/detail/utility.hpp deleted file mode 100644 index d5a28cc3c6..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/detail/utility.hpp +++ /dev/null @@ -1,111 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_DETAIL_UTILITY_HPP -#define BOOST_CLBL_TRTS_DETAIL_UTILITY_HPP - -#include -#include -#include - -namespace boost { namespace callable_traits { namespace detail { - -struct cdecl_tag{}; -struct stdcall_tag{}; -struct fastcall_tag{}; -struct pascal_tag{}; - -struct invalid_type { invalid_type() = delete; }; -struct reference_error { reference_error() = delete; }; - -template -using error_type = typename std::conditional< - std::is_reference::value, reference_error, invalid_type>::type; - -#ifdef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS -struct abominable_functions_not_supported_on_this_compiler{}; -#endif - -// used to convey "this type doesn't matter" in code -struct dummy {}; - -// used as return type in failed SFINAE tests -struct substitution_failure : std::false_type{}; - -template -using bool_type = std::integral_constant; - -// shorthand for std::tuple_element -template -using at = typename std::tuple_element::type; - -template -using add_member_pointer = T Class::*; - -template - using fail_when_same = fail_if::value, ErrorType>; - -template::type> -using try_but_fail_if_invalid = sfinae_try, - fail_when_same>; - -template::type, - bool is_reference_error = std::is_same::value> -using fail_if_invalid = fail_if< - std::is_same::value || is_reference_error, - typename std::conditional::type>; - -template -using fallback_if_invalid = typename std::conditional< - std::is_same::value, Fallback, T>::type; - -template class Alias, typename U = Alias> -struct force_sfinae { - using type = U; -}; - -template -using shallow_decay = typename std::remove_cv< - typename std::remove_reference::type>::type; - -template -struct is_reference_wrapper_t { - using type = std::false_type; -}; - -template -struct is_reference_wrapper_t> { - using type = std::true_type; -}; - -template -using is_reference_wrapper = - typename is_reference_wrapper_t>::type; - -template -struct unwrap_reference_t { - using type = T; -}; - -template -struct unwrap_reference_t> { - using type = decltype(std::declval().get()); -}; - -// removes std::reference_wrapper -template -using unwrap_reference = typename unwrap_reference_t::type; - -}}} // namespace boost::callable_traits::detail - -#endif // #ifndef BOOST_CLBL_TRTS_DETAIL_UTILITY_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/function_type.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/function_type.hpp deleted file mode 100644 index a3305f7bfd..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/function_type.hpp +++ /dev/null @@ -1,97 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_FUNCTION_TYPE_HPP -#define BOOST_CLBL_TRTS_FUNCTION_TYPE_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ function_type_hpp -/*`[section:ref_function_type function_type] -[heading Header] -``#include `` -[heading Definition] -*/ - -template -using function_type_t = //see below -//<- - detail::try_but_fail_if_invalid>::function_type, - cannot_determine_parameters_for_this_type>; - -namespace detail { - - template - struct function_type_impl {}; - - template - struct function_type_impl , detail::dummy>::type> - { - using type = function_type_t; - }; -} - -//-> - -template -struct function_type : detail::function_type_impl {}; - -//<- -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* `T` must be one of the following: - * function - * function pointer - * function reference - * member function pointer - * member data pointer - * user-defined type with a non-overloaded `operator()` - * type of a non-generic lambda - -[heading Behavior] -* When the constraints are violated, a substitution failure occurs. -* When `T` is a function, the aliased type is identical to `T`, except that the aliased function type will not have member qualifiers or the `transaction_safe` specifier. -* When `T` is a function pointer, the aliased type is equivalent to `std::remove_pointer_t`. -* When `T` is a function reference, the aliased type is equivalent to `std::remove_reference_t`. -* When `T` is a function object, the aliased type is a function type with the same return type and parameter list as `T`'s `operator()`. -* When `T` is a member function pointer, the aliased type is a function type with the same return type as `T`, and the first parameter is a reference to the parent class of `T`, qualified according to the member qualifiers on `T`. The subsequent parameters, if any, are the parameter types of `T`. -* When `T` is a member data pointer, the aliased type is a function type returning the underlying member type of `T`, taking a single parameter, which is a `const` reference to the parent type of `T`. -* In all cases, the aliased function type will not have member qualifiers, and will not have the `transaction_safe` specifier. - -[heading Input/Output Examples] -[table - [[`T`] [`function_type_t`]] - [[`void(int)`] [`void(int)`]] - [[`void(int) const`] [`void(int)`]] - [[`void(int) transaction_safe`] [`void(int)`]] - [[`void(*const &)(int)`] [`void(int)`]] - [[`void(&)(int)`] [`void(int)`]] - [[`void(* volatile)()`] [`void()`]] - [[`int(foo::*)(int)`] [`int(foo&, int)`]] - [[`int(foo::*)(int) const`] [`int(const foo&, int)`]] - [[`void(foo::*)() volatile &&`] [`void(volatile foo&&)`]] - [[`int foo::*`] [`int(const foo&)`]] - [[`const int foo::*`] [`int(const foo&)`]] - [[`int`] [(substitution failure)]] -] - -[heading Example Program] -[import ../example/function_type.cpp] -[function_type] -[endsect] -*/ -//] - -#endif diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/has_member_qualifiers.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/has_member_qualifiers.hpp deleted file mode 100644 index 3ab44d3b09..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/has_member_qualifiers.hpp +++ /dev/null @@ -1,99 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_HAS_MEMBER_QUALIFIERS_HPP -#define BOOST_CLBL_TRTS_HAS_MEMBER_QUALIFIERS_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ has_member_qualifiers_hpp -/*`[section:ref_has_member_qualifiers has_member_qualifiers] -[heading Header] -``#include `` -[heading Definition] -*/ - -// inherits from either std::true_type or std::false_type -template -struct has_member_qualifiers; - -//<- -template -struct has_member_qualifiers : detail::traits< - detail::shallow_decay>::has_member_qualifiers { - - using type = typename detail::traits< - detail::shallow_decay>::has_member_qualifiers; -}; - -// older compilers don't support variable templates -#ifdef BOOST_CLBL_TRTS_DISABLE_VARIABLE_TEMPLATES - -template -struct has_member_qualifiers_v { - static_assert(std::is_same::value, - "Variable templates not supported on this compiler."); -}; - -#else -//-> -// only available when variable templates are supported -template -//<- -BOOST_CLBL_TRAITS_INLINE_VAR -//-> -constexpr bool has_member_qualifiers_v = //see below -//<- - detail::traits>::has_member_qualifiers::value; - -#endif - -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* none - -[heading Behavior] -* `std::false_type` is inherited by `has_member_qualifiers` and is aliased by `typename has_member_qualifiers::type`, except when one of the following criteria is met, in which case `std::true_type` would be similarly inherited and aliased: - * `T` is a function with member qualifiers - * `T` is a member function pointer with member qualifiers - * `T` is a function object with a member-qualified `operator()` -* On compilers that support variable templates, `has_member_qualifiers_v` is equivalent to `has_member_qualifiers::value`. - -[heading Input/Output Examples] -[table - [[`T`] [`has_member_qualifiers_v`]] - [[`void() const`] [`true`]] - [[`void() const transaction_safe`] [`true`]] - [[`void() volatile &&`] [`true`]] - [[`int(foo::*)() &`] [`true`]] - [[`void(foo::*)() const`] [`true`]] - [[`void(foo::*&)() const`] [`true`]] - [[`void(foo::* const)() const`] [`true`]] - [[`void()`] [`false`]] - [[`void() transaction_safe`] [`false`]] - [[`void(*)()`] [`false`]] - [[`void(*&)()`] [`false`]] - [[`int`] [`false`]] - [[`const int`] [`false`]] - [[`int foo::*`] [`false`]] - [[`const int foo::*`] [`false`]] -] - -[heading Example Program] -[import ../example/has_member_qualifiers.cpp] -[has_member_qualifiers] -[endsect] -*/ -//] - -#endif //BOOST_CLBL_TRTS_HAS_MEMBER_QUALIFIERS_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/has_varargs.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/has_varargs.hpp deleted file mode 100644 index 7f79824178..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/has_varargs.hpp +++ /dev/null @@ -1,94 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_HAS_VARARGS_HPP -#define BOOST_CLBL_TRTS_HAS_VARARGS_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ has_varargs_hpp -/*`[section:ref_has_varargs has_varargs] -[heading Header] -``#include `` -[heading Definition] -*/ - - -// inherits from either std::true_type or std::false_type -template -struct has_varargs; - -//<- -template -struct has_varargs : detail::traits< - detail::shallow_decay>::has_varargs { - - using type = typename detail::traits< - detail::shallow_decay>::has_varargs; -}; - -#ifdef BOOST_CLBL_TRTS_DISABLE_VARIABLE_TEMPLATES - -template -struct has_varargs_v { - static_assert(std::is_same::value, - "Variable templates not supported on this compiler."); -}; - -#else -//-> -// only available when variable templates are supported -template -//<- -BOOST_CLBL_TRAITS_INLINE_VAR -//-> -constexpr bool has_varargs_v = //see below -//<- - detail::traits>::has_varargs::value; - -#endif - -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* none - -[heading Behavior] -* `std::false_type` is inherited by `has_varargs` and is aliased by `typename has_varargs::type`, except when one of the following criteria is met, in which case `std::true_type` would be similarly inherited and aliased: - * `T` is a function, function pointer, or function reference where the function's parameter list includes C-style variadics. - * `T` is a pointer to a member function with C-style variadics in the parameter list. - * `T` is a function object with a non-overloaded `operator()`, which has C-style variadics in the parameter list of its `operator()`. -* On compilers that support variable templates, `has_varargs_v` is equivalent to `has_varargs::value`. - -[heading Input/Output Examples] -[table - [[`T`] [`has_varargs_v`]] - [[`void(...)`] [`true`]] - [[`void(int, ...) const`] [`true`]] - [[`void(* volatile)(...)`] [`true`]] - [[`void(&)(...)`] [`true`]] - [[`void(foo::*)(...) const`] [`true`]] - [[`void(*)()`] [`false`]] - [[`void(*&)()`] [`false`]] - [[`int`] [`false`]] - [[`const int`] [`false`]] - [[`int foo::*`] [`false`]] -] - -[heading Example Program] -[import ../example/has_varargs.cpp] -[has_varargs] -[endsect] -*/ -//] - -#endif diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/has_void_return.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/has_void_return.hpp deleted file mode 100644 index 06f80f3ddf..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/has_void_return.hpp +++ /dev/null @@ -1,93 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_HAS_VOID_RETURN_HPP -#define BOOST_CLBL_TRTS_HAS_VOID_RETURN_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ has_void_return_hpp -/*`[section:ref_has_void_return has_void_return] -[heading Header] -``#include `` -[heading Definition] -*/ - -// inherits from either std::true_type or std::false_type -template -struct has_void_return; - -//<- -template -struct has_void_return - : std::is_same>::return_type, void> {}; - -#ifdef BOOST_CLBL_TRTS_DISABLE_VARIABLE_TEMPLATES - -template -struct has_void_return_v { - static_assert(std::is_same::value, - "Variable templates not supported on this compiler."); -}; - -#else -//-> - -// only available when variable templates are supported -template -//<- -BOOST_CLBL_TRAITS_INLINE_VAR -//-> -constexpr bool has_void_return_v = //see below -//<- - std::is_same>::return_type, void>::value; - -#endif - -}} // namespace boost::callable_traits -//-> - - -/*` -[heading Constraints] -* none - -[heading Behavior] -* `std::false_type` is inherited by `has_void_return` and is aliased by `typename has_void_return::type`, except when one of the following criteria is met, in which case `std::true_type` would be similarly inherited and aliased: - * `T` is a function, function pointer, or function reference where the function's return type is `void`. - * `T` is a pointer to a member function whose return type is `void`. - * `T` is a function object with a non-overloaded `operator()`, where the `operator()` function returns `void`. -* On compilers that support variable templates, `has_void_return_v` is equivalent to `has_void_return::value`. - -[heading Input/Output Examples] -[table - [[`T`] [`has_void_return_v`]] - [[`void()`] [`true`]] - [[`void(int) const`] [`true`]] - [[`void(* const &)()`] [`true`]] - [[`void(&)()`] [`true`]] - [[`void(foo::*)() const`] [`true`]] - [[`int(*)()`] [`false`]] - [[`int(*&)()`] [`false`]] - [[`int`] [`false`]] - [[`int foo::*`] [`false`]] - [[`void* foo::*`] [`false`]] -] - -[heading Example Program] -[import ../example/has_void_return.cpp] -[has_void_return] -[endsect] -*/ -//] - -#endif diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/is_const_member.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/is_const_member.hpp deleted file mode 100644 index f0a7ad2525..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/is_const_member.hpp +++ /dev/null @@ -1,97 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_IS_CONST_MEMBER_HPP -#define BOOST_CLBL_TRTS_IS_CONST_MEMBER_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ is_const_member_hpp -/*`[section:ref_is_const_member is_const_member] -[heading Header] -``#include `` -[heading Definition] -*/ - -// inherits from either std::true_type or std::false_type -template -struct is_const_member; - -//<- -template -struct is_const_member - : detail::traits>::is_const_member { - using type = typename detail::traits< - detail::shallow_decay>::is_const_member; -}; - -#ifdef BOOST_CLBL_TRTS_DISABLE_VARIABLE_TEMPLATES - -template -struct is_const_member_v { - static_assert(std::is_same::value, - "Variable templates not supported on this compiler."); -}; - -#else -//-> -// only available when variable templates are supported -template -//<- -BOOST_CLBL_TRAITS_INLINE_VAR -//-> -constexpr bool is_const_member_v = //see below -//<- - detail::traits>::is_const_member::value; - -#endif - -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* none - -[heading Behavior] -* `is_const_member::value` is `true` when either: - * `T` is a function type with a `const` member qualifier - * `T` is a pointer to a member function with a `const` member qualifier - * `T` is a function object with a non-overloaded `operator()`, where the `operator()` has a `const` member qualifier -* On compilers that support variable templates, `is_const_member_v` is equivalent to `is_const_member::value`. - -[heading Input/Output Examples] -[table - [[`T`] [`is_const_member_v`]] - [[`int() const`] [`true`]] - [[`int() const volatile`] [`true`]] - [[`int() const & transaction_safe`] [`true`]] - [[`int() const &&`] [`true`]] - [[`int(foo::*&)() const`] [`true`]] - [[`int(foo::*)() const volatile`] [`true`]] - [[`int(foo::*)() const volatile &&`][`true`]] - [[`int(foo::* const)() const`] [`true`]] - [[`int()`] [`false`]] - [[`int() volatile`] [`false`]] - [[`int() &&`] [`false`]] - [[`int(*)()`] [`false`]] - [[`int`] [`false`]] - [[`int foo::*`] [`false`]] - [[`const int foo::*`] [`false`]] -] - -[heading Example Program] -[import ../example/is_const_member.cpp] -[is_const_member] -[endsect] -*/ -//] - -#endif // #ifndef BOOST_CLBL_TRTS_IS_CONST_MEMBER_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/is_cv_member.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/is_cv_member.hpp deleted file mode 100644 index 6e95545ee6..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/is_cv_member.hpp +++ /dev/null @@ -1,95 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_IS_CV_MEMBER_HPP -#define BOOST_CLBL_TRTS_IS_CV_MEMBER_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ is_cv_member_hpp -/*`[section:ref_is_cv_member is_cv_member] -[heading Header] -``#include `` -[heading Definition] -*/ - -// inherits from either std::true_type or std::false_type -template -struct is_cv_member; - -//<- -template -struct is_cv_member - : detail::traits>::is_cv_member { - using type = typename detail::traits< - detail::shallow_decay>::is_cv_member; -}; - -#ifdef BOOST_CLBL_TRTS_DISABLE_VARIABLE_TEMPLATES - -template -struct is_cv_member_v { - static_assert(std::is_same::value, - "Variable templates not supported on this compiler."); -}; - -#else -//-> -// only available when variable templates are supported -template -//<- -BOOST_CLBL_TRAITS_INLINE_VAR -//-> -constexpr bool is_cv_member_v = //see below -//<- - detail::traits>::is_cv_member::value; - -#endif - -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* none - -[heading Behavior] -* `is_cv_member::value` is `true` when either: - * `T` is a function type with both `const` and `volatile` member qualifiers - * `T` is a pointer to a member function with both `const` and `volatile` member qualifiers - * `T` is a function object with a non-overloaded `operator()`, where the `operator()` has both `const` and `volatile` member qualifiers -* On compilers that support variable templates, `is_cv_member_v` is equivalent to `is_cv_member::value`. - -[heading Input/Output Examples] -[table - [[`T`] [`is_cv_member_v`]] - [[`int() const volatile`] [`true`]] - [[`int() const volatile &`] [`true`]] - [[`int(foo::* const &)() const volatile`] [`true`]] - [[`int() const`] [`false`]] - [[`int() volatile`] [`false`]] - [[`int(foo::*)() const`] [`false`]] - [[`int() const`] [`false`]] - [[`int() volatile`] [`false`]] - [[`int() &&`] [`false`]] - [[`int(*)()`] [`false`]] - [[`int`] [`false`]] - [[`int foo::*`] [`false`]] - [[`const int foo::*`] [`false`]] -] - -[heading Example Program] -[import ../example/is_cv_member.cpp] -[is_cv_member] -[endsect] -*/ -//] - -#endif // #ifndef BOOST_CLBL_TRTS_IS_CV_MEMBER_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/is_invocable.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/is_invocable.hpp deleted file mode 100644 index 892d8fb717..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/is_invocable.hpp +++ /dev/null @@ -1,103 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_IS_INVOCABLE_HPP -#define BOOST_CLBL_TRTS_IS_INVOCABLE_HPP - -#include -#include - -namespace boost { namespace callable_traits { - -//[ is_invocable_hpp -/*`[section:ref_is_invocable is_invocable] -[heading Header] -``#include `` -[heading Definition] -*/ - -// inherits from either std::true_type or std::false_type -template -struct is_invocable; - -// inherits from either std::true_type or std::false_type -template -struct is_invocable_r; - -//<- -template -struct is_invocable : detail::is_invocable_impl::type { - using type = typename detail::is_invocable_impl::type; -}; - -template -struct is_invocable_r - : detail::is_invocable_r_impl< - typename detail::is_invocable_impl::type, Ret, T, Args...>::type -{ - using type = typename detail::is_invocable_r_impl< - typename detail::is_invocable_impl::type, Ret, T, Args...>::type; -}; - -#ifdef BOOST_CLBL_TRTS_DISABLE_VARIABLE_TEMPLATES - -template -struct is_invocable_v { - static_assert(std::is_same::value, - "Variable templates not supported on this compiler."); -}; - -template -struct is_invocable_r_v { - static_assert(std::is_same::value, - "Variable templates not supported on this compiler."); -}; - -#else -//-> -// only available when variable templates are supported -template -//<- -BOOST_CLBL_TRAITS_INLINE_VAR -//-> -constexpr bool is_invocable_v = //see below -//<- - detail::is_invocable_impl, Args...>::type::value; -//-> - -// only available when variable templates are supported -template -//<- -BOOST_CLBL_TRAITS_INLINE_VAR -//-> -constexpr bool is_invocable_r_v = //see below -//<- - detail::is_invocable_r_impl< - typename detail::is_invocable_impl::type, - Ret, T, Args...>::type::value; -#endif - -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* none - -[heading Behavior] -* standalone c++11 implementation of c++17 `std::is_invocable`, `std::is_invocable_r` -[note ref-qualified overloads of `operator()` with different signatures are not handled correctly yet.] - -[heading Example Program] -[import ../example/is_invocable.cpp] -[is_invocable] -[endsect] -*/ -//] - -#endif // #ifndef BOOST_CLBL_TRTS_IS_INVOCABLE_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/is_lvalue_reference_member.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/is_lvalue_reference_member.hpp deleted file mode 100644 index 89500cb93c..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/is_lvalue_reference_member.hpp +++ /dev/null @@ -1,95 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_IS_LVALUE_REFERENCE_MEMBER_HPP -#define BOOST_CLBL_TRTS_IS_LVALUE_REFERENCE_MEMBER_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ is_lvalue_reference_member_hpp -/*`[section:ref_is_lvalue_reference_member is_lvalue_reference_member] -[heading Header] -``#include `` -[heading Definition] -*/ - - -// inherits from either std::true_type or std::false_type -template -struct is_lvalue_reference_member; - -//<- -template -struct is_lvalue_reference_member - : detail::traits>::is_lvalue_reference_member { - using type = typename detail::traits< - detail::shallow_decay>::is_lvalue_reference_member; -}; - -#ifdef BOOST_CLBL_TRTS_DISABLE_VARIABLE_TEMPLATES - -template -struct is_lvalue_reference_member_v { - static_assert(std::is_same::value, - "Variable templates not supported on this compiler."); -}; - -#else -//-> -// only available when variable templates are supported -template -//<- -BOOST_CLBL_TRAITS_INLINE_VAR -//-> -constexpr bool is_lvalue_reference_member_v = //see below -//<- - detail::traits>::is_lvalue_reference_member::value; - -#endif - -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* none - -[heading Behavior] -* `is_lvalue_reference_member::value` is `true` when either: - * `T` is a function type with a '&' member qualifier - * `T` is a pointer to a member function with a '&' member qualifiers - * `T` is a function object with a non-overloaded `operator()`, where the `operator()` has a '&' member qualifier -* On compilers that support variable templates, `is_lvalue_reference_member_v` is equivalent to `is_lvalue_reference_member::value`. - -[heading Input/Output Examples] -[table - [[`T`] [`is_lvalue_reference_member_v`]] - [[`int() &`] [`true`]] - [[`int(foo::* const)() const &`] [`true`]] - [[`int() const`] [`false`]] - [[`int() volatile`] [`false`]] - [[`int(foo::*)() const`] [`false`]] - [[`int() const`] [`false`]] - [[`int() volatile`] [`false`]] - [[`int() &&`] [`false`]] - [[`int(*)()`] [`false`]] - [[`int`] [`false`]] - [[`int foo::*`] [`false`]] - [[`const int foo::*`] [`false`]] -] - -[heading Example Program] -[import ../example/is_lvalue_reference_member.cpp] -[is_lvalue_reference_member] -[endsect] -*/ -//] - -#endif // #ifndef BOOST_CLBL_TRTS_IS_LVALUE_REFERENCE_MEMBER_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/is_noexcept.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/is_noexcept.hpp deleted file mode 100644 index 36320f689a..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/is_noexcept.hpp +++ /dev/null @@ -1,95 +0,0 @@ -/* -@file is_noexcept - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_IS_NOEXCEPT_HPP -#define BOOST_CLBL_TRTS_IS_NOEXCEPT_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ is_noexcept_hpp -/*`[section:ref_is_noexcept is_noexcept] -[heading Header] -``#include `` -[heading Definition] -*/ - -// inherits from either std::true_type or std::false_type -template -struct is_noexcept; - -//<- -template -struct is_noexcept : detail::traits>::is_noexcept { - using type = typename detail::traits< - detail::shallow_decay>::is_noexcept; -}; - -#ifdef BOOST_CLBL_TRTS_DISABLE_VARIABLE_TEMPLATES - -template -struct is_noexcept_v { - static_assert(std::is_same::value, - "Variable templates not supported on this compiler."); -}; - -#else -//-> -// only available when variable templates are supported -template -//<- -BOOST_CLBL_TRAITS_INLINE_VAR -//-> -constexpr bool is_noexcept_v = //see below -//<- - detail::traits>::is_noexcept::value; - -#endif - -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* none -* -[heading Behavior] -* `is_noexcept::value` is `true` when either: - * `T` is a function type, function pointer type, function reference type, or member function pointer type where the function has a `noexcept` specifier - * `T` is a function object with a non-overloaded `operator()`, where the `operator()` has a `noexcept` specifier -* On compilers that support variable templates, `is_noexcept_v` is equivalent to `is_noexcept::value`. - -[heading Input/Output Examples] -[table - [[`T`] [`is_noexcept_v`]] - [[`int() const noexcept`] [`true`]] - [[`int(* const &)() noexcept`] [`true`]] - [[`int(&)() noexcept`] [`true`]] - [[`int(foo::*)() noexcept`] [`true`]] - [[`int() const`] [`false`]] - [[`int() volatile`] [`false`]] - [[`int(foo::*)() const`] [`false`]] - [[`int() const`] [`false`]] - [[`int() volatile`] [`false`]] - [[`int() &`] [`false`]] - [[`int(*)()`] [`false`]] - [[`int`] [`false`]] - [[`int foo::*`] [`false`]] - [[`const int foo::*`] [`false`]] -] - -[heading Example Program] -[import ../example/is_noexcept.cpp] -[is_noexcept] -[endsect] -*/ -//] - -#endif // #ifndef BOOST_CLBL_TRTS_IS_NOEXCEPT_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/is_reference_member.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/is_reference_member.hpp deleted file mode 100644 index ef893a04d4..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/is_reference_member.hpp +++ /dev/null @@ -1,98 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_IS_REFERENCE_MEMBER_HPP -#define BOOST_CLBL_TRTS_IS_REFERENCE_MEMBER_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ is_reference_member_hpp -/*`[section:ref_is_reference_member is_reference_member] -[heading Header] -``#include `` -[heading Definition] -*/ - - -// inherits from either std::true_type or std::false_type -template -struct is_reference_member; - -//<- -template -struct is_reference_member : detail::traits< - detail::shallow_decay>::is_reference_member { - - using type = typename detail::traits< - detail::shallow_decay>::is_reference_member; -}; - -#ifdef BOOST_CLBL_TRTS_DISABLE_VARIABLE_TEMPLATES - -template -struct is_reference_member_v { - static_assert(std::is_same::value, - "Variable templates not supported on this compiler."); -}; - -#else -//-> -// only available when variable templates are supported -template -//<- -BOOST_CLBL_TRAITS_INLINE_VAR -//-> -constexpr bool is_reference_member_v = //see below -//<- - detail::traits>::is_reference_member::value; - -#endif - -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* none - -[heading Behavior] -* `is_reference_member::value` is `true` when either: - * `T` is a function type with a '&' or '&&' member qualifier - * `T` is a pointer to a member function with a '&' or '&&' member qualifiers - * `T` is a function object with a non-overloaded `operator()`, where the `operator()` has a '&' or '&&' member qualifier -* On compilers that support variable templates, `is_reference_member_v` is equivalent to `is_reference_member::value`. - -[heading Input/Output Examples] -[table - [[`T`] [`is_reference_member_v`]] - [[`int() &`] [`true`]] - [[`int() const &&`] [`true`]] - [[`int(foo::* const)() &&`] [`true`]] - [[`int(foo::*)(...) volatile &`] [`true`]] - [[`int() const`] [`false`]] - [[`int() volatile`] [`false`]] - [[`int(foo::*)() const`] [`false`]] - [[`int() const`] [`false`]] - [[`int() volatile`] [`false`]] - [[`int(*)()`] [`false`]] - [[`int`] [`false`]] - [[`int foo::*`] [`false`]] - [[`const int foo::*`] [`false`]] -] - -[heading Example Program] -[import ../example/is_reference_member.cpp] -[is_reference_member] -[endsect] -*/ -//] - -#endif // #ifndef BOOST_CLBL_TRTS_IS_REFERENCE_MEMBER_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/is_rvalue_reference_member.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/is_rvalue_reference_member.hpp deleted file mode 100644 index a852ce6e11..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/is_rvalue_reference_member.hpp +++ /dev/null @@ -1,97 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_IS_RVALUE_REFERENCE_MEMBER_HPP -#define BOOST_CLBL_TRTS_IS_RVALUE_REFERENCE_MEMBER_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ is_rvalue_reference_member_hpp -/*`[section:ref_is_rvalue_reference_member is_rvalue_reference_member] -[heading Header] -``#include `` -[heading Definition] -*/ - - -// inherits from either std::true_type or std::false_type -template -struct is_rvalue_reference_member; - -//<- -template -struct is_rvalue_reference_member : detail::traits< - detail::shallow_decay>::is_rvalue_reference_member { - - using type = typename detail::traits< - detail::shallow_decay>::is_rvalue_reference_member; -}; - -#ifdef BOOST_CLBL_TRTS_DISABLE_VARIABLE_TEMPLATES - -template -struct is_rvalue_reference_member_v { - static_assert(std::is_same::value, - "Variable templates not supported on this compiler."); -}; - -#else -//-> -// only available when variable templates are supported -template -//<- -BOOST_CLBL_TRAITS_INLINE_VAR -//-> -constexpr bool is_rvalue_reference_member_v = //see below -//<- - detail::traits>::is_rvalue_reference_member::value; - -#endif - -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* none - -[heading Behavior] -* `is_rvalue_reference_member::value` is `true` when either: - * `T` is a function type with a '&&' member qualifier - * `T` is a pointer to a member function with a '&&' member qualifiers - * `T` is a function object with a non-overloaded `operator()`, where the `operator()` has a '&&' member qualifier -* On compilers that support variable templates, `is_rvalue_reference_member_v` is equivalent to `is_rvalue_reference_member::value`. - -[heading Input/Output Examples] -[table - [[`T`] [`is_rvalue_reference_member_v`]] - [[`int() const &&`] [`true`]] - [[`int(foo::*)() &&`] [`true`]] - [[`int() const`] [`false`]] - [[`int() volatile`] [`false`]] - [[`int(foo::* volatile)() const`] [`false`]] - [[`int() const`] [`false`]] - [[`int() volatile`] [`false`]] - [[`int() &`] [`false`]] - [[`int(*)()`] [`false`]] - [[`int`] [`false`]] - [[`int foo::*`] [`false`]] - [[`const int foo::*`] [`false`]] -] - -[heading Example Program] -[import ../example/is_rvalue_reference_member.cpp] -[is_rvalue_reference_member] -[endsect] -*/ -//] - -#endif // #ifndef BOOST_CLBL_TRTS_IS_RVALUE_REFERENCE_MEMBER_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/is_transaction_safe.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/is_transaction_safe.hpp deleted file mode 100644 index 51c98c53e3..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/is_transaction_safe.hpp +++ /dev/null @@ -1,98 +0,0 @@ -/* -@file is_transaction_safe - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE_HPP -#define BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ is_transaction_safe_hpp -/*`[section:ref_is_transaction_safe is_transaction_safe] -[heading Header] -``#include `` -[heading Definition] -*/ - - -// inherits from either std::true_type or std::false_type -template -struct is_transaction_safe; - -//<- -template -struct is_transaction_safe : detail::traits< - detail::shallow_decay>::is_transaction_safe { - - using type = typename detail::traits< - detail::shallow_decay>::is_transaction_safe; -}; - -#ifdef BOOST_CLBL_TRTS_DISABLE_VARIABLE_TEMPLATES - -template -struct is_transaction_safe_v { - static_assert(std::is_same::value, - "Variable templates not supported on this compiler."); -}; - -#else -//-> -// only available when variable templates are supported -template -//<- -BOOST_CLBL_TRAITS_INLINE_VAR -//-> -constexpr bool is_transaction_safe_v = //see below -//<- - detail::traits>::is_transaction_safe::value; - -#endif - -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* none -* -[heading Behavior] -* `is_transaction_safe::value` is `true` when either: - * `T` is a function type, function pointer type, function reference type, or member function pointer type where the function has a `transaction_safe` specifier - * `T` is a function object with a non-overloaded `operator()`, where the `operator()` has a `transaction_safe` specifier -* On compilers that support variable templates, `is_transaction_safe_v` is equivalent to `is_transaction_safe::value`. - -[heading Input/Output Examples] -[table - [[`T`] [`is_transaction_safe_v`]] - [[`int() const transaction_safe`] [`true`]] - [[`int(*)() transaction_safe`] [`true`]] - [[`int(&)() transaction_safe`] [`true`]] - [[`int(foo::* const)() transaction_safe`] [`true`]] - [[`int() const`] [`false`]] - [[`int() volatile`] [`false`]] - [[`int(foo::*)() const`] [`false`]] - [[`int() const`] [`false`]] - [[`int() volatile`] [`false`]] - [[`int() &`] [`false`]] - [[`int(*)()`] [`false`]] - [[`int`] [`false`]] - [[`int foo::*`] [`false`]] - [[`const int foo::*`] [`false`]] -] - -[heading Example Program] -[import ../example/is_transaction_safe.cpp] -[is_transaction_safe] -[endsect] -*/ -//] - -#endif // #ifndef BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/is_volatile_member.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/is_volatile_member.hpp deleted file mode 100644 index 2309eec622..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/is_volatile_member.hpp +++ /dev/null @@ -1,100 +0,0 @@ -/* - * -@Copyright Barrett Adair 2015-2017 - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_IS_VOLATILE_MEMBER_HPP -#define BOOST_CLBL_TRTS_IS_VOLATILE_MEMBER_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ is_volatile_member_hpp -/*`[section:ref_is_volatile_member is_volatile_member] -[heading Header] -``#include `` -[heading Definition] -*/ - - -// inherits from either std::true_type or std::false_type -template -struct is_volatile_member; - -//<- -template -struct is_volatile_member : detail::traits< - detail::shallow_decay>::is_volatile_member { - - using type = typename detail::traits< - detail::shallow_decay>::is_volatile_member; -}; - -#ifdef BOOST_CLBL_TRTS_DISABLE_VARIABLE_TEMPLATES - -template -struct is_volatile_member_v { - static_assert(std::is_same::value, - "Variable templates not supported on this compiler."); -}; - -#else -//-> -// only available when variable templates are supported -template -//<- -BOOST_CLBL_TRAITS_INLINE_VAR -//-> -constexpr bool is_volatile_member_v = //see below -//<- - detail::traits>::is_volatile_member::value; - -#endif - -}} // namespace boost::callable_traits -//-> - - -/*` -[heading Constraints] -* none - -[heading Behavior] -* `is_volatile_member::value` is `true` when either: - * `T` is a function type with a `volatile` member qualifier - * `T` is a pointer to a member function with a `volatile` member qualifier - * `T` is a function object with a non-overloaded `operator()`, where the `operator()` has a `volatile` member qualifier -* On compilers that support variable templates, `is_volatile_member_v` is equivalent to `is_volatile_member::value`. - -[heading Input/Output Examples] -[table - [[`T`] [`is_volatile_member_v`]] - [[`int() volatile`] [`true`]] - [[`int() const volatile`] [`true`]] - [[`int() volatile &&`] [`true`]] - [[`int(foo::*)() volatile`] [`true`]] - [[`int(foo::* const)() volatile`] [`true`]] - [[`int(foo::*)() const volatile`] [`true`]] - [[`int(foo::*)() const volatile &&`][`true`]] - [[`int()`] [`false`]] - [[`int() const`] [`false`]] - [[`int() &&`] [`false`]] - [[`int(*)()`] [`false`]] - [[`int`] [`false`]] - [[`int foo::*`] [`false`]] - [[`volatile int foo::*`] [`false`]] -] - -[heading Example Program] -[import ../example/is_volatile_member.cpp] -[is_volatile_member] -[endsect] -*/ -//] - -#endif // #ifndef BOOST_CLBL_TRTS_IS_VOLATILE_MEMBER_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/qualified_class_of.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/qualified_class_of.hpp deleted file mode 100644 index 9f9e581171..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/qualified_class_of.hpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_QUALIFIED_class_of_HPP -#define BOOST_CLBL_TRTS_QUALIFIED_class_of_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ qualified_class_of_hpp -/*` -[section:ref_qualified_class_of qualified_class_of] -[heading Header] -``#include `` -[heading Definition] -*/ - -template -using qualified_class_of_t = //see below -//<- - detail::try_but_fail_if_invalid< - typename detail::traits>::invoke_type, - type_is_not_a_member_pointer>; - -namespace detail { - - template - struct qualified_class_of_impl {}; - - template - struct qualified_class_of_impl , detail::dummy>::type> - { - using type = qualified_class_of_t; - }; -} - -//-> - -template -struct qualified_class_of : detail::qualified_class_of_impl {}; - -//<- -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* `T` must be a member pointer - -[heading Behavior] -* A substitution failure occurs if the constraints are violated. -* If `T` is a member function pointer, the aliased type is the parent class of the member, qualified according to the member qualifiers on `T`. If `T` does not have a member reference qualifier, then the aliased type will be an lvalue reference. -* If `T` is a member data pointer, the aliased type is equivalent to `ct::class_of const &`. - -[heading Input/Output Examples] -[table - [[`T`] [`qualified_class_of_t`]] - [[`void(foo::*)()`] [`foo &`]] - [[`void(foo::* volatile)() const`] [`foo const &`]] - [[`void(foo::*)() &&`] [`foo &&`]] - [[`void(foo::*&)() volatile &&`] [`foo volatile &&`]] - [[`int foo::*`] [`foo const &`]] - [[`const int foo::*`] [`foo const &`]] -] - -[heading Example Program] -[import ../example/qualified_class_of.cpp] -[qualified_class_of] -[endsect] -*/ -//] - -#endif // #ifndef BOOST_CLBL_TRTS_QUALIFIED_class_of_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/remove_member_const.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/remove_member_const.hpp deleted file mode 100644 index 1326800820..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/remove_member_const.hpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_REMOVE_MEMBER_CONST_HPP -#define BOOST_CLBL_TRTS_REMOVE_MEMBER_CONST_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ remove_member_const_hpp -/*` -[section:ref_remove_member_const remove_member_const] -[heading Header] -``#include `` -[heading Definition] -*/ - -template -using remove_member_const_t = //see below -//<- - detail::try_but_fail_if_invalid< - typename detail::traits::remove_member_const, - member_qualifiers_are_illegal_for_this_type>; - -namespace detail { - - template - struct remove_member_const_impl {}; - - template - struct remove_member_const_impl , detail::dummy>::type> - { - using type = remove_member_const_t; - }; -} - -//-> - -template -struct remove_member_const : detail::remove_member_const_impl {}; - -//<- -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* `T` must be a function type or a member function pointer type -* If `T` is a pointer, it may not be cv/ref qualified - -[heading Behavior] -* A substitution failure occurs if the constraints are violated. -* Removes the member `const` qualifier from `T`, if present. - -[heading Input/Output Examples] -[table - [[`T`] [`remove_member_const_t`]] - [[`int() const`] [`int()`]] - [[`int(foo::*)() const`] [`int(foo::*)()`]] - [[`int(foo::*)() const &`] [`int(foo::*)() &`]] - [[`int(foo::*)() const &&`] [`int(foo::*)() &&`]] - [[`int(foo::*)() const`] [`int(foo::*)()`]] - [[`int(foo::*)() const volatile`] [`int(foo::*)() volatile`]] - [[`int`] [(substitution failure)]] - [[`int (&)()`] [(substitution failure)]] - [[`int (*)()`] [(substitution failure)]] - [[`int foo::*`] [(substitution failure)]] - [[`int (foo::* const)()`] [(substitution failure)]] -] - -[heading Example Program] -[import ../example/remove_member_const.cpp] -[remove_member_const] -[endsect] -*/ -//] - -#endif // #ifndef BOOST_CLBL_TRTS_REMOVE_MEMBER_CONST_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/remove_member_cv.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/remove_member_cv.hpp deleted file mode 100644 index 30d99a0821..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/remove_member_cv.hpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_REMOVE_MEMBER_CV_HPP -#define BOOST_CLBL_TRTS_REMOVE_MEMBER_CV_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ remove_member_cv_hpp -/*` -[section:ref_remove_member_cv remove_member_cv] -[heading Header] -``#include `` -[heading Definition] -*/ - -template -using remove_member_cv_t = //see below -//<- - detail::try_but_fail_if_invalid< - typename detail::traits::remove_member_cv, - member_qualifiers_are_illegal_for_this_type>; - -namespace detail { - - template - struct remove_member_cv_impl {}; - - template - struct remove_member_cv_impl , detail::dummy>::type> - { - using type = remove_member_cv_t; - }; -} - -//-> - -template -struct remove_member_cv : detail::remove_member_cv_impl {}; - -//<- -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* `T` must be a function type or a member function pointer type -* If `T` is a pointer, it may not be cv/ref qualified - -[heading Behavior] -* A substitution failure occurs if the constraints are violated. -* Removes member `const` and/or `volatile` qualifiers from `T`, if present. - -[heading Input/Output Examples] -[table - [[`T`] [`remove_member_cv_t`]] - [[`int() const volatile`] [`int()`]] - [[`int(foo::*)() const volatile`] [`int(foo::*)()`]] - [[`int(foo::*)() volatile`] [`int(foo::*)()`]] - [[`int(foo::*)() const`] [`int(foo::*)()`]] - [[`int(foo::*)() const &`] [`int(foo::*)() &`]] - [[`int(foo::*)() const &&`] [`int(foo::*)() &&`]] - [[`int(foo::*)() const`] [`int(foo::*)()`]] - [[`int`] [(substitution failure)]] - [[`int (&)()`] [(substitution failure)]] - [[`int (*)()`] [(substitution failure)]] - [[`int foo::*`] [(substitution failure)]] - [[`int (foo::* const)()`] [(substitution failure)]] -] - -[heading Example Program] -[import ../example/remove_member_cv.cpp] -[remove_member_cv] -[endsect] -*/ -//] - -#endif // #ifndef BOOST_CLBL_TRTS_REMOVE_MEMBER_CV_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/remove_member_reference.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/remove_member_reference.hpp deleted file mode 100644 index d4e4b62cef..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/remove_member_reference.hpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_REMOVE_MEMBER_REFERENCE_HPP -#define BOOST_CLBL_TRTS_REMOVE_MEMBER_REFERENCE_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ remove_member_reference_hpp -/*` -[section:ref_remove_member_reference remove_member_reference] -[heading Header] -``#include `` -[heading Definition] -*/ - -template -using remove_member_reference_t = //see below -//<- - detail::try_but_fail_if_invalid< - typename detail::traits::remove_member_reference, - member_qualifiers_are_illegal_for_this_type>; - -namespace detail { - - template - struct remove_member_reference_impl {}; - - template - struct remove_member_reference_impl , detail::dummy>::type> - { - using type = remove_member_reference_t; - }; -} - -//-> - -template -struct remove_member_reference - : detail::remove_member_reference_impl {}; - -//<- -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* `T` must be a function type or a member function pointer type -* If `T` is a pointer, it may not be cv/ref qualified - -[heading Behavior] -* A substitution failure occuers if the constraints are violated. -* Removes member `&` or `&&` qualifiers from `T`, if present. - -[heading Input/Output Examples] -[table - [[`T`] [`remove_member_const_t`]] - [[`int() &`] [`int()`]] - [[`int(foo::*)() &`] [`int(foo::*)()`]] - [[`int(foo::*)() const &`] [`int(foo::*)() const`]] - [[`int(foo::*)() const &&`] [`int(foo::*)() const`]] - [[`int(foo::*)()`] [`int(foo::*)()`]] - [[`int`] [(substitution failure)]] - [[`int (&)()`] [(substitution failure)]] - [[`int (*)()`] [(substitution failure)]] - [[`int foo::*`] [(substitution failure)]] - [[`int (foo::* const)()`] [(substitution failure)]] -] - -[heading Example Program] -[import ../example/remove_member_reference.cpp] -[remove_member_reference] -[endsect] -*/ -//] - -#endif // #ifndef BOOST_CLBL_TRTS_REMOVE_MEMBER_REFERENCE_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/remove_member_volatile.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/remove_member_volatile.hpp deleted file mode 100644 index d20c796849..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/remove_member_volatile.hpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_REMOVE_MEMBER_VOLATILE_HPP -#define BOOST_CLBL_TRTS_REMOVE_MEMBER_VOLATILE_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ remove_member_volatile_hpp -/*` -[section:ref_remove_member_volatile remove_member_volatile] -[heading Header] -``#include `` -[heading Definition] -*/ - -template -using remove_member_volatile_t = //see below -//<- - detail::try_but_fail_if_invalid< - typename detail::traits::remove_member_volatile, - member_qualifiers_are_illegal_for_this_type>; - -namespace detail { - - template - struct remove_member_volatile_impl {}; - - template - struct remove_member_volatile_impl , detail::dummy>::type> - { - using type = remove_member_volatile_t; - }; -} - -//-> - -template -struct remove_member_volatile : detail::remove_member_volatile_impl {}; - -//<- -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* `T` must be a function type or a member function pointer type -* If `T` is a pointer, it may not be cv/ref qualified - -[heading Behavior] -* A substitution failure occurs if the constraints are violated. -* Removes the member `volatile` qualifier from `T`, if present. - -[heading Input/Output Examples] -[table - [[`T`] [`remove_member_volatile_t`]] - [[`int() volatile`] [`int()`]] - [[`int(foo::*)() volatile`] [`int(foo::*)()`]] - [[`int(foo::*)() volatile &`] [`int(foo::*)() &`]] - [[`int(foo::*)() volatile &&`] [`int(foo::*)() &&`]] - [[`int(foo::*)() volatile`] [`int(foo::*)()`]] - [[`int(foo::*)() const volatile`] [`int(foo::*)() const`]] - [[`int`] [(substitution failure)]] - [[`int (&)()`] [(substitution failure)]] - [[`int (*)()`] [(substitution failure)]] - [[`int foo::*`] [(substitution failure)]] - [[`int (foo::* const)()`] [(substitution failure)]] -] - -[heading Example Program] -[import ../example/remove_member_volatile.cpp] -[remove_member_volatile] -[endsect] -*/ -//] - -#endif // #ifndef BOOST_CLBL_TRTS_REMOVE_MEMBER_VOLATILE_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/remove_noexcept.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/remove_noexcept.hpp deleted file mode 100644 index 7b1fcb3474..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/remove_noexcept.hpp +++ /dev/null @@ -1,93 +0,0 @@ -/* -@file remove_noexcept - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_REMOVE_NOEXCEPT_HPP -#define BOOST_CLBL_TRTS_REMOVE_NOEXCEPT_HPP - -#include - -namespace boost { namespace callable_traits { - -BOOST_CLBL_TRTS_DEFINE_SFINAE_ERROR_ORIGIN(remove_noexcept) -BOOST_CLBL_TRTS_SFINAE_MSG(remove_noexcept, cannot_remove_noexcept_from_this_type) - -//[ remove_noexcept_hpp -/*` -[section:ref_remove_noexcept remove_noexcept] -[heading Header] -``#include `` -[heading Definition] -*/ - -template -using remove_noexcept_t = //see below -//<- - detail::try_but_fail_if_invalid< - typename detail::traits::remove_noexcept, - cannot_remove_noexcept_from_this_type>; - -namespace detail { - - template - struct remove_noexcept_impl {}; - - template - struct remove_noexcept_impl , detail::dummy>::type> - { - using type = remove_noexcept_t; - }; -} - -//-> - -template -struct remove_noexcept : detail::remove_noexcept_impl {}; - -//<- -}} // namespace boost::callable_traits -//-> - -/*` - -[heading Constraints] -* `T` must be one of the following: - * function type - * function pointer type - * function reference type - * member function pointer type -* If `T` is a pointer, it may not be cv/ref qualified - -[heading Behavior] -* A substitution failure occurs if the constraints are violated. -* Removes the `noexcept` specifier from `T`, if present. - -[heading Input/Output Examples] -[table - [[`T`] [`remove_noexcept_t`]] - [[`int() const noexcept`] [`int() const`]] - [[`int(*)() noexcept`] [`int(*)()`]] - [[`int(&)() noexcept`] [`int(&)()`]] - [[`int(foo::*)() noexcept`] [`int(foo::*)()`]] - [[`int() const`] [`int() const`]] - [[`int(*)()`] [`int(*)()`]] - [[`int(&)()`] [`int(&)()`]] - [[`int`] [(substitution failure)]] - [[`int foo::*`] [(substitution failure)]] - [[`int (foo::* const)()`] [(substitution failure)]] -] - -[heading Example Program] -[import ../example/remove_noexcept.cpp] -[remove_noexcept] -[endsect] -*/ -//] - -#endif // #ifndef BOOST_CLBL_TRTS_REMOVE_NOEXCEPT_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/remove_transaction_safe.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/remove_transaction_safe.hpp deleted file mode 100644 index 4e37a3666f..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/remove_transaction_safe.hpp +++ /dev/null @@ -1,93 +0,0 @@ -/* -@file remove_transaction_safe - -@Copyright Barrett Adair 2015-2017 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_REMOVE_TRANSACTION_SAFE_HPP -#define BOOST_CLBL_TRTS_REMOVE_TRANSACTION_SAFE_HPP - -#include - -namespace boost { namespace callable_traits { - -BOOST_CLBL_TRTS_DEFINE_SFINAE_ERROR_ORIGIN(remove_transaction_safe) -BOOST_CLBL_TRTS_SFINAE_MSG(remove_transaction_safe, cannot_remove_transaction_safe_from_this_type) - -//[ remove_transaction_safe_hpp -/*` -[section:ref_remove_transaction_safe remove_transaction_safe] -[heading Header] -``#include `` -[heading Definition] -*/ - -template -using remove_transaction_safe_t = //see below -//<- - detail::try_but_fail_if_invalid< - typename detail::traits::remove_transaction_safe, - cannot_remove_transaction_safe_from_this_type>; - -namespace detail { - - template - struct remove_transaction_safe_impl {}; - - template - struct remove_transaction_safe_impl , detail::dummy>::type> - { - using type = remove_transaction_safe_t; - }; -} - -//-> - -template -struct remove_transaction_safe : detail::remove_transaction_safe_impl {}; - -//<- -}} // namespace boost::callable_traits -//-> - -/*` - -[heading Constraints] -* `T` must be one of the following: - * function type - * function pointer type - * function reference type - * member function pointer type -* If `T` is a pointer, it may not be cv/ref qualified - -[heading Behavior] -* A substitution failure occurs if the constraints are violated. -* Removes the member `transaction_safe` specifier from `T`, if present. - -[heading Input/Output Examples] -[table - [[`T`] [`remove_transaction_safe_t`]] - [[`int() const transaction_safe`] [`int() const`]] - [[`int(*)() transaction_safe`] [`int(*)()`]] - [[`int(&)() transaction_safe`] [`int(&)()`]] - [[`int(foo::*)() transaction_safe`] [`int(foo::*)()`]] - [[`int() const`] [`int() const`]] - [[`int(*)()`] [`int(*)()`]] - [[`int(&)()`] [`int(&)()`]] - [[`int`] [(substitution failure)]] - [[`int foo::*`] [(substitution failure)]] - [[`int (foo::* const)()`] [(substitution failure)]] -] - -[heading Example Program] -[import ../example/remove_transaction_safe.cpp] -[remove_transaction_safe] -[endsect] -*/ -//] - -#endif // #ifndef BOOST_CLBL_TRTS_REMOVE_TRANSACTION_SAFE_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/remove_varargs.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/remove_varargs.hpp deleted file mode 100644 index 874651c60b..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/remove_varargs.hpp +++ /dev/null @@ -1,91 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_REMOVE_VARARGS_HPP -#define BOOST_CLBL_TRTS_REMOVE_VARARGS_HPP - -#include - -namespace boost { namespace callable_traits { - -//[ remove_varargs_hpp -/*` -[section:ref_remove_varargs remove_varargs] -[heading Header] -``#include `` -[heading Definition] -*/ - -template -using remove_varargs_t = //see below -//<- - detail::try_but_fail_if_invalid< - typename detail::traits::remove_varargs, - varargs_are_illegal_for_this_type>; - -namespace detail { - - template - struct remove_varargs_impl {}; - - template - struct remove_varargs_impl , detail::dummy>::type> - { - using type = remove_varargs_t; - }; -} - -//-> - -template -struct remove_varargs : detail::remove_varargs_impl {}; - -//<- -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* `T` must be one of the following: - * function type - * function pointer type - * function reference type - * member function pointer type -* If `T` is a pointer, it may not be cv/ref qualified - -[heading Behavior] -* A substitution failure occurs if the constraints are violated. -* Removes C-style variadics (`...`) from the signature of `T`, if present. - -[heading Input/Output Examples] -[table - [[`T`] [`remove_varargs_t`]] - [[`int(...)`] [`int()`]] - [[`int(int, ...)`] [`int(int)`]] - [[`int (&)(...)`] [`int(&)()`]] - [[`int (*)()`] [`int(*)()`]] - [[`int(foo::*)(...)`] [`int(foo::*)()`]] - [[`int(foo::*)(...) &`] [`int(foo::*)() &`]] - [[`int(foo::*)(...) &&`] [`int(foo::*)() &&`]] - [[`int(foo::*)(...) const`] [`int(foo::*)() const`]] - [[`int(foo::*)(...) transaction_safe`] [`int(foo::*)() transaction_safe`]] - [[`int`] [(substitution failure)]] - [[`int foo::*`] [(substitution failure)]] - [[`int (* const)()`] [(substitution failure)]] -] - -[heading Example Program] -[import ../example/remove_varargs.cpp] -[remove_varargs] -[endsect] -*/ -//] - -#endif // #ifndef BOOST_CLBL_TRTS_REMOVE_VARARGS_HPP diff --git a/vnpy/api/tap/vntap/include/boost/callable_traits/return_type.hpp b/vnpy/api/tap/vntap/include/boost/callable_traits/return_type.hpp deleted file mode 100644 index 586b0d2493..0000000000 --- a/vnpy/api/tap/vntap/include/boost/callable_traits/return_type.hpp +++ /dev/null @@ -1,90 +0,0 @@ -/* - -@Copyright Barrett Adair 2015-2017 - -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) - -*/ - -#ifndef BOOST_CLBL_TRTS_RESULT_OF_HPP -#define BOOST_CLBL_TRTS_RESULT_OF_HPP - -#include - -namespace boost { namespace callable_traits { - -BOOST_CLBL_TRTS_DEFINE_SFINAE_ERROR_ORIGIN(return_type) -BOOST_CLBL_TRTS_SFINAE_MSG(return_type, unable_to_determine_return_type) - -//[ return_type_hpp -/*` -[section:ref_return_type return_type] -[heading Header] -``#include `` -[heading Definition] -*/ - -template -using return_type_t = //see below -//<- - detail::try_but_fail_if_invalid< - typename detail::traits>::return_type, - unable_to_determine_return_type>; - -namespace detail { - - template - struct return_type_impl {}; - - template - struct return_type_impl , detail::dummy>::type> - { - using type = return_type_t; - }; -} - -//-> - -template -struct return_type : detail::return_type_impl {}; - -//<- -}} // namespace boost::callable_traits -//-> - -/*` -[heading Constraints] -* `T` must be one of the following: - * function - * function pointer - * function reference - * member function pointer - * member data pointer - * user-defined type with a non-overloaded `operator()` - * type of a non-generic lambda - -[heading Behavior] -* When the constraints are violated, a substitution failure occurs. -* The aliased type is the return type of `T`. - -[heading Input/Output Examples] -[table - [[`T`] [`return_type_t`]] - [[`void()`] [`void`]] - [[`float(*)()`] [`float`]] - [[`const char*(&)()`] [`const char *`]] - [[`int(foo::*)() const`] [`int`]] - [[`int`] [(substitution failure)]] - [[`int (*const)()`] [(substitution failure)]] -] - -[heading Example Program] -[import ../example/return_type.cpp] -[return_type] -[endsect] -*/ -//] - -#endif // #ifndef BOOST_CLBL_TRTS_RESULT_OF_HPP diff --git a/vnpy/api/tap/vntap/include/brigand/adapted.hpp b/vnpy/api/tap/vntap/include/brigand/adapted.hpp deleted file mode 100644 index 443196ec62..0000000000 --- a/vnpy/api/tap/vntap/include/brigand/adapted.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*! -@file - -@copyright Edouard Alligand and Joel Falcou 2015-2017 -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) -*/ -#ifndef BOOST_BRIGAND_ADAPTED_HPP -#define BOOST_BRIGAND_ADAPTED_HPP - -#include -#include -#include -#include - -#if !defined(BRIGAND_NO_BOOST_SUPPORT) -#include -#include -#endif -#endif diff --git a/vnpy/api/tap/vntap/include/brigand/adapted/fusion.hpp b/vnpy/api/tap/vntap/include/brigand/adapted/fusion.hpp deleted file mode 100644 index 93d793ed3c..0000000000 --- a/vnpy/api/tap/vntap/include/brigand/adapted/fusion.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*! -@file - -@copyright Edouard Alligand and Joel Falcou 2015-2017 -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) -*/ -#ifndef BOOST_BRIGAND_ADAPTED_FUSION_HPP -#define BOOST_BRIGAND_ADAPTED_FUSION_HPP - -#include -#include -#include -#include -#include - -namespace brigand -{ - template - using fusion_vector_wrapper = boost::fusion::vector; - - template - using fusion_list_wrapper = boost::fusion::list; - - template - using fusion_deque_wrapper = boost::fusion::deque; - - template - using fusion_set_wrapper = boost::fusion::set; - - template using as_fusion_vector = wrap; - template using as_fusion_deque = wrap; - template using as_fusion_list = wrap; - template using as_fusion_set = wrap; -} -#endif diff --git a/vnpy/api/tap/vntap/include/brigand/adapted/integral_list.hpp b/vnpy/api/tap/vntap/include/brigand/adapted/integral_list.hpp deleted file mode 100644 index 67ff452e9e..0000000000 --- a/vnpy/api/tap/vntap/include/brigand/adapted/integral_list.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/*! -@file - -@copyright Edouard Alligand and Joel Falcou 2015-2017 -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) -*/ -#ifndef BOOST_BRIGAND_ADAPTED_INTEGRAL_LIST_HPP -#define BOOST_BRIGAND_ADAPTED_INTEGRAL_LIST_HPP - -#include -#include - -namespace brigand -{ - -template -struct make_integral : brigand::integral_constant -{ -}; - -template -using as_integral_list = transform>; -} -#endif diff --git a/vnpy/api/tap/vntap/include/brigand/adapted/list.hpp b/vnpy/api/tap/vntap/include/brigand/adapted/list.hpp deleted file mode 100644 index bc7946d9b0..0000000000 --- a/vnpy/api/tap/vntap/include/brigand/adapted/list.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*! -@file - -@copyright Edouard Alligand and Joel Falcou 2015-2017 -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) -*/ -#ifndef BOOST_BRIGAND_ADAPTED_LIST_HPP -#define BOOST_BRIGAND_ADAPTED_LIST_HPP - -#include -#include - -namespace brigand -{ -namespace detail -{ - template class Sequence> - struct as_sequence_impl - { - using type = wrap; - }; -} // namespace detail - -template class Sequence> -using as_sequence = typename detail::as_sequence_impl::type; - -template -using as_list = as_sequence; - -} // namespace brigand -#endif diff --git a/vnpy/api/tap/vntap/include/brigand/adapted/pair.hpp b/vnpy/api/tap/vntap/include/brigand/adapted/pair.hpp deleted file mode 100644 index 067897af37..0000000000 --- a/vnpy/api/tap/vntap/include/brigand/adapted/pair.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*! -@file - -@copyright Edouard Alligand and Joel Falcou 2015-2017 -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) -*/ -#ifndef BOOST_BRIGAND_ADAPTED_PAIR_HPP -#define BOOST_BRIGAND_ADAPTED_PAIR_HPP - -#include -#include -#include - -namespace brigand -{ - template - struct pair_wrapper_ - { - static_assert (sizeof...(T) == 2 - , "as_pair requires a type list of exactly two types" - ); - - // type need to be defined or the error becomes a hard, non-static assert error - using type = no_such_type_; - }; - - template - struct pair_wrapper_ - { - using type = std::pair; - }; - - template - using pair_wrapper = typename pair_wrapper_::type; - - template - using as_pair = wrap; -} -#endif diff --git a/vnpy/api/tap/vntap/include/brigand/adapted/tuple.hpp b/vnpy/api/tap/vntap/include/brigand/adapted/tuple.hpp deleted file mode 100644 index 1c86c4d448..0000000000 --- a/vnpy/api/tap/vntap/include/brigand/adapted/tuple.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*! -@file - -@copyright Edouard Alligand and Joel Falcou 2015-2017 -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) -*/ -#ifndef BOOST_BRIGAND_ADAPTED_TUPLE_HPP -#define BOOST_BRIGAND_ADAPTED_TUPLE_HPP - -#include -#include - -namespace brigand -{ - template - using tuple_wrapper = typename std::tuple; - - template - using as_tuple = wrap; -} -#endif diff --git a/vnpy/api/tap/vntap/include/brigand/adapted/variant.hpp b/vnpy/api/tap/vntap/include/brigand/adapted/variant.hpp deleted file mode 100644 index 1df48cd0b5..0000000000 --- a/vnpy/api/tap/vntap/include/brigand/adapted/variant.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*! -@file - -@copyright Edouard Alligand and Joel Falcou 2015-2017 -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) -*/ -#ifndef BOOST_BRIGAND_ADAPTED_VARIANT_HPP -#define BOOST_BRIGAND_ADAPTED_VARIANT_HPP - -#include -#include - -namespace brigand -{ - template - using variant_wrapper = typename boost::variant; - - template - using as_variant = wrap; -} -#endif diff --git a/vnpy/api/tap/vntap/include/brigand/algorithms.hpp b/vnpy/api/tap/vntap/include/brigand/algorithms.hpp deleted file mode 100644 index 558989c53c..0000000000 --- a/vnpy/api/tap/vntap/include/brigand/algorithms.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*! -@file - -@copyright Edouard Alligand and Joel Falcou 2015-2017 -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) -*/ -#ifndef BOOST_BRIGAND_ALGORITHMS_HPP -#define BOOST_BRIGAND_ALGORITHMS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#endif diff --git a/vnpy/api/tap/vntap/include/brigand/algorithms/all.hpp b/vnpy/api/tap/vntap/include/brigand/algorithms/all.hpp deleted file mode 100644 index 827a0cdbb0..0000000000 --- a/vnpy/api/tap/vntap/include/brigand/algorithms/all.hpp +++ /dev/null @@ -1,91 +0,0 @@ -/*! -@file - -@copyright Edouard Alligand and Joel Falcou 2015-2017 -(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) -*/ -#ifndef BOOST_BRIGAND_ALGORITHMS_ALL_HPP -#define BOOST_BRIGAND_ALGORITHMS_ALL_HPP - -#include -#include -#include -#include -#include - -namespace brigand -{ -#if defined(BRIGAND_COMP_MSVC_2013) || defined(BRIGAND_COMP_CUDA) || defined(BRIGAND_COMP_INTEL) -namespace detail -{ - template - struct all_helper : ::brigand::apply - { - }; - - template - struct bools_ - { - }; - template - struct all_impl; - - template