-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathctp.i
72 lines (55 loc) · 1.82 KB
/
ctp.i
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#if defined(SWIGPYTHON) || defined(SWIGRUBY)
%module(directors="1") ctp
#else
%module(directors="1") Ctp
#endif
%include "typemaps.i"
%{
#ifdef SWIGPYTHON
#define SWIG_FILE_WITH_INIT
#endif
#include "ThostFtdcUserApiDataType.h"
#include "ThostFtdcUserApiStruct.h"
#include "ThostFtdcTraderApi.h"
#include "ThostFtdcMdApi.h"
%}
/* These symbols are NEVER used in original files */
%ignore TThostFtdcVirementTradeCodeType;
%ignore THOST_FTDC_VTC_BankBankToFuture;
%ignore THOST_FTDC_VTC_BankFutureToBank;
%ignore THOST_FTDC_VTC_FutureBankToFuture;
%ignore THOST_FTDC_VTC_FutureFutureToBank;
%ignore TThostFtdcFBTTradeCodeEnumType;
%ignore THOST_FTDC_FTC_BankLaunchBankToBroker;
%ignore THOST_FTDC_FTC_BrokerLaunchBankToBroker;
%ignore THOST_FTDC_FTC_BankLaunchBrokerToBank;
%ignore THOST_FTDC_FTC_BrokerLaunchBrokerToBank;
#ifdef SWIGJAVA
%rename(ThostTeResumeType) THOST_TE_RESUME_TYPE;
%rename("%(lowercamelcase)s", %$isfunction) "";
%include "various.i"
%apply char **STRING_ARRAY { char *ppInstrumentID[] };
%javaconst(1);
#endif
#ifdef SWIGCSHARP
%include "arrays_csharp.i"
%rename(ThostTeResumeType) THOST_TE_RESUME_TYPE;
%csconst(1);
CSHARP_ARRAYS(char *, string)
%typemap(imtype, inattributes="[In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0, ArraySubType=UnmanagedType.LPStr)]") char *INPUT[] "string[]"
%apply char *INPUT[] { char *ppInstrumentID[] };
#endif
#ifdef SWIGRUBY
%include "ruby/char_array.i"
%apply (char **ARRAY, int SIZE) { (char *ppInstrumentID[], int nCount) };
#endif
#ifdef SWIGPYTHON
%include "python/char_array.i"
%apply (char **ARRAY, int SIZE) { (char *ppInstrumentID[], int nCount) };
#endif
%include "ThostFtdcUserApiDataType.h"
%include "ThostFtdcUserApiStruct.h"
%feature("director") CThostFtdcMdSpi;
%include "ThostFtdcMdApi.h"
%feature("director") CThostFtdcTraderSpi;
%include "ThostFtdcTraderApi.h"