Class: Ctp::CThostFtdcMdApi
- Inherits:
-
Object
- Object
- Ctp::CThostFtdcMdApi
- Defined in:
- ext/ctp/ctp.cxx
Class Method Summary collapse
Instance Method Summary collapse
- #GetTradingDay(*args) ⇒ Object
- #Init(*args) ⇒ Object
- #Join(*args) ⇒ Object
- #RegisterFensUserInfo(*args) ⇒ Object
- #RegisterFront(*args) ⇒ Object
- #RegisterNameServer(*args) ⇒ Object
- #RegisterSpi(*args) ⇒ Object
- #Release(*args) ⇒ Object
- #ReqUserLogin(*args) ⇒ Object
- #ReqUserLogout(*args) ⇒ Object
- #SubscribeForQuoteRsp(*args) ⇒ Object
- #SubscribeMarketData(*args) ⇒ Object
- #UnSubscribeForQuoteRsp(*args) ⇒ Object
- #UnSubscribeMarketData(*args) ⇒ Object
Class Method Details
.CreateFtdcMdApi(*args, self) ⇒ Object
192399 192400 192401 192402 192403 192404 192405 192406 192407 192408 192409 192410 192411 192412 192413 192414 192415 192416 192417 192418 192419 192420 192421 192422 192423 192424 192425 192426 192427 192428 192429 192430 192431 192432 192433 192434 192435 192436 192437 192438 192439 192440 192441 192442 192443 192444 192445 192446 192447 192448 192449 192450 192451 192452 192453 192454 192455 192456 192457 192458 192459 192460 192461 192462 192463 |
# File 'ext/ctp/ctp.cxx', line 192399
SWIGINTERN VALUE _wrap_CThostFtdcMdApi_CreateFtdcMdApi(int nargs, VALUE *args, VALUE self) {
int argc;
VALUE argv[3];
int ii;
argc = nargs;
if (argc > 3) SWIG_fail;
for (ii = 0; (ii < argc); ++ii) {
argv[ii] = args[ii];
}
if (argc == 0) {
return _wrap_CThostFtdcMdApi_CreateFtdcMdApi__SWIG_3(nargs, args, self);
}
if (argc == 1) {
int _v;
int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_CThostFtdcMdApi_CreateFtdcMdApi__SWIG_2(nargs, args, self);
}
}
if (argc == 2) {
int _v;
int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_bool(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_CThostFtdcMdApi_CreateFtdcMdApi__SWIG_1(nargs, args, self);
}
}
}
if (argc == 3) {
int _v;
int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_bool(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
{
int res = SWIG_AsVal_bool(argv[2], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_CThostFtdcMdApi_CreateFtdcMdApi__SWIG_0(nargs, args, self);
}
}
}
}
fail:
Ruby_Format_OverloadedError( argc, 3, "CThostFtdcMdApi.CreateFtdcMdApi",
" CThostFtdcMdApi CThostFtdcMdApi.CreateFtdcMdApi(char const *pszFlowPath, bool const bIsUsingUdp, bool const bIsMulticast)\n"
" CThostFtdcMdApi CThostFtdcMdApi.CreateFtdcMdApi(char const *pszFlowPath, bool const bIsUsingUdp)\n"
" CThostFtdcMdApi CThostFtdcMdApi.CreateFtdcMdApi(char const *pszFlowPath)\n"
" CThostFtdcMdApi * CThostFtdcMdApi.CreateFtdcMdApi()\n");
return Qnil;
}
|
.GetApiVersion(*args) ⇒ Object
192466 192467 192468 192469 192470 192471 192472 192473 192474 192475 192476 192477 192478 192479 |
# File 'ext/ctp/ctp.cxx', line 192466
SWIGINTERN VALUE
_wrap_CThostFtdcMdApi_GetApiVersion(int argc, VALUE *argv, VALUE self) {
char *result = 0 ;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
result = (char *)CThostFtdcMdApi::GetApiVersion();
vresult = SWIG_FromCharPtr((const char *)result);
return vresult;
fail:
return Qnil;
}
|
Instance Method Details
#GetTradingDay(*args) ⇒ Object
192548 192549 192550 192551 192552 192553 192554 192555 192556 192557 192558 192559 192560 192561 192562 192563 192564 192565 192566 192567 192568 192569 |
# File 'ext/ctp/ctp.cxx', line 192548
SWIGINTERN VALUE
_wrap_CThostFtdcMdApi_GetTradingDay(int argc, VALUE *argv, VALUE self) {
CThostFtdcMdApi *arg1 = (CThostFtdcMdApi *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
char *result = 0 ;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcMdApi, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcMdApi *","GetTradingDay", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcMdApi * >(argp1);
result = (char *)(arg1)->GetTradingDay();
vresult = SWIG_FromCharPtr((const char *)result);
return vresult;
fail:
return Qnil;
}
|
#Init(*args) ⇒ Object
192503 192504 192505 192506 192507 192508 192509 192510 192511 192512 192513 192514 192515 192516 192517 192518 192519 192520 192521 |
# File 'ext/ctp/ctp.cxx', line 192503
SWIGINTERN VALUE
_wrap_CThostFtdcMdApi_Init(int argc, VALUE *argv, VALUE self) {
CThostFtdcMdApi *arg1 = (CThostFtdcMdApi *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcMdApi, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcMdApi *","Init", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcMdApi * >(argp1);
(arg1)->Init();
return Qnil;
fail:
return Qnil;
}
|
#Join(*args) ⇒ Object
192524 192525 192526 192527 192528 192529 192530 192531 192532 192533 192534 192535 192536 192537 192538 192539 192540 192541 192542 192543 192544 192545 |
# File 'ext/ctp/ctp.cxx', line 192524
SWIGINTERN VALUE
_wrap_CThostFtdcMdApi_Join(int argc, VALUE *argv, VALUE self) {
CThostFtdcMdApi *arg1 = (CThostFtdcMdApi *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcMdApi, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcMdApi *","Join", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcMdApi * >(argp1);
result = (int)(arg1)->Join();
vresult = SWIG_From_int(static_cast< int >(result));
return vresult;
fail:
return Qnil;
}
|
#RegisterFensUserInfo(*args) ⇒ Object
192636 192637 192638 192639 192640 192641 192642 192643 192644 192645 192646 192647 192648 192649 192650 192651 192652 192653 192654 192655 192656 192657 192658 192659 192660 192661 192662 |
# File 'ext/ctp/ctp.cxx', line 192636
SWIGINTERN VALUE
_wrap_CThostFtdcMdApi_RegisterFensUserInfo(int argc, VALUE *argv, VALUE self) {
CThostFtdcMdApi *arg1 = (CThostFtdcMdApi *) 0 ;
CThostFtdcFensUserInfoField *arg2 = (CThostFtdcFensUserInfoField *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcMdApi, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcMdApi *","RegisterFensUserInfo", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcMdApi * >(argp1);
res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_CThostFtdcFensUserInfoField, 0 | 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "CThostFtdcFensUserInfoField *","RegisterFensUserInfo", 2, argv[0] ));
}
arg2 = reinterpret_cast< CThostFtdcFensUserInfoField * >(argp2);
(arg1)->RegisterFensUserInfo(arg2);
return Qnil;
fail:
return Qnil;
}
|
#RegisterFront(*args) ⇒ Object
192572 192573 192574 192575 192576 192577 192578 192579 192580 192581 192582 192583 192584 192585 192586 192587 192588 192589 192590 192591 192592 192593 192594 192595 192596 192597 192598 192599 192600 192601 |
# File 'ext/ctp/ctp.cxx', line 192572
SWIGINTERN VALUE
_wrap_CThostFtdcMdApi_RegisterFront(int argc, VALUE *argv, VALUE self) {
CThostFtdcMdApi *arg1 = (CThostFtdcMdApi *) 0 ;
char *arg2 = (char *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
char *buf2 = 0 ;
int alloc2 = 0 ;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcMdApi, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcMdApi *","RegisterFront", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcMdApi * >(argp1);
res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","RegisterFront", 2, argv[0] ));
}
arg2 = reinterpret_cast< char * >(buf2);
(arg1)->RegisterFront(arg2);
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
return Qnil;
fail:
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
return Qnil;
}
|
#RegisterNameServer(*args) ⇒ Object
192604 192605 192606 192607 192608 192609 192610 192611 192612 192613 192614 192615 192616 192617 192618 192619 192620 192621 192622 192623 192624 192625 192626 192627 192628 192629 192630 192631 192632 192633 |
# File 'ext/ctp/ctp.cxx', line 192604
SWIGINTERN VALUE
_wrap_CThostFtdcMdApi_RegisterNameServer(int argc, VALUE *argv, VALUE self) {
CThostFtdcMdApi *arg1 = (CThostFtdcMdApi *) 0 ;
char *arg2 = (char *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
char *buf2 = 0 ;
int alloc2 = 0 ;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcMdApi, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcMdApi *","RegisterNameServer", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcMdApi * >(argp1);
res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","RegisterNameServer", 2, argv[0] ));
}
arg2 = reinterpret_cast< char * >(buf2);
(arg1)->RegisterNameServer(arg2);
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
return Qnil;
fail:
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
return Qnil;
}
|
#RegisterSpi(*args) ⇒ Object
192665 192666 192667 192668 192669 192670 192671 192672 192673 192674 192675 192676 192677 192678 192679 192680 192681 192682 192683 192684 192685 192686 192687 192688 192689 192690 192691 |
# File 'ext/ctp/ctp.cxx', line 192665
SWIGINTERN VALUE
_wrap_CThostFtdcMdApi_RegisterSpi(int argc, VALUE *argv, VALUE self) {
CThostFtdcMdApi *arg1 = (CThostFtdcMdApi *) 0 ;
CThostFtdcMdSpi *arg2 = (CThostFtdcMdSpi *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcMdApi, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcMdApi *","RegisterSpi", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcMdApi * >(argp1);
res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_CThostFtdcMdSpi, 0 | 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "CThostFtdcMdSpi *","RegisterSpi", 2, argv[0] ));
}
arg2 = reinterpret_cast< CThostFtdcMdSpi * >(argp2);
(arg1)->RegisterSpi(arg2);
return Qnil;
fail:
return Qnil;
}
|
#Release(*args) ⇒ Object
192482 192483 192484 192485 192486 192487 192488 192489 192490 192491 192492 192493 192494 192495 192496 192497 192498 192499 192500 |
# File 'ext/ctp/ctp.cxx', line 192482
SWIGINTERN VALUE
_wrap_CThostFtdcMdApi_Release(int argc, VALUE *argv, VALUE self) {
CThostFtdcMdApi *arg1 = (CThostFtdcMdApi *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcMdApi, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcMdApi *","Release", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcMdApi * >(argp1);
(arg1)->Release();
return Qnil;
fail:
return Qnil;
}
|
#ReqUserLogin(*args) ⇒ Object
192886 192887 192888 192889 192890 192891 192892 192893 192894 192895 192896 192897 192898 192899 192900 192901 192902 192903 192904 192905 192906 192907 192908 192909 192910 192911 192912 192913 192914 192915 192916 192917 192918 192919 192920 192921 192922 192923 |
# File 'ext/ctp/ctp.cxx', line 192886
SWIGINTERN VALUE
_wrap_CThostFtdcMdApi_ReqUserLogin(int argc, VALUE *argv, VALUE self) {
CThostFtdcMdApi *arg1 = (CThostFtdcMdApi *) 0 ;
CThostFtdcReqUserLoginField *arg2 = (CThostFtdcReqUserLoginField *) 0 ;
int arg3 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
int val3 ;
int ecode3 = 0 ;
int result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcMdApi, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcMdApi *","ReqUserLogin", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcMdApi * >(argp1);
res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_CThostFtdcReqUserLoginField, 0 | 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "CThostFtdcReqUserLoginField *","ReqUserLogin", 2, argv[0] ));
}
arg2 = reinterpret_cast< CThostFtdcReqUserLoginField * >(argp2);
ecode3 = SWIG_AsVal_int(argv[1], &val3);
if (!SWIG_IsOK(ecode3)) {
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","ReqUserLogin", 3, argv[1] ));
}
arg3 = static_cast< int >(val3);
result = (int)(arg1)->ReqUserLogin(arg2,arg3);
vresult = SWIG_From_int(static_cast< int >(result));
return vresult;
fail:
return Qnil;
}
|
#ReqUserLogout(*args) ⇒ Object
192926 192927 192928 192929 192930 192931 192932 192933 192934 192935 192936 192937 192938 192939 192940 192941 192942 192943 192944 192945 192946 192947 192948 192949 192950 192951 192952 192953 192954 192955 192956 192957 192958 192959 192960 192961 192962 192963 |
# File 'ext/ctp/ctp.cxx', line 192926
SWIGINTERN VALUE
_wrap_CThostFtdcMdApi_ReqUserLogout(int argc, VALUE *argv, VALUE self) {
CThostFtdcMdApi *arg1 = (CThostFtdcMdApi *) 0 ;
CThostFtdcUserLogoutField *arg2 = (CThostFtdcUserLogoutField *) 0 ;
int arg3 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
int val3 ;
int ecode3 = 0 ;
int result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcMdApi, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcMdApi *","ReqUserLogout", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcMdApi * >(argp1);
res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_CThostFtdcUserLogoutField, 0 | 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "CThostFtdcUserLogoutField *","ReqUserLogout", 2, argv[0] ));
}
arg2 = reinterpret_cast< CThostFtdcUserLogoutField * >(argp2);
ecode3 = SWIG_AsVal_int(argv[1], &val3);
if (!SWIG_IsOK(ecode3)) {
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","ReqUserLogout", 3, argv[1] ));
}
arg3 = static_cast< int >(val3);
result = (int)(arg1)->ReqUserLogout(arg2,arg3);
vresult = SWIG_From_int(static_cast< int >(result));
return vresult;
fail:
return Qnil;
}
|
#SubscribeForQuoteRsp(*args) ⇒ Object
192790 192791 192792 192793 192794 192795 192796 192797 192798 192799 192800 192801 192802 192803 192804 192805 192806 192807 192808 192809 192810 192811 192812 192813 192814 192815 192816 192817 192818 192819 192820 192821 192822 192823 192824 192825 192826 192827 192828 192829 192830 192831 192832 192833 192834 192835 |
# File 'ext/ctp/ctp.cxx', line 192790
SWIGINTERN VALUE
_wrap_CThostFtdcMdApi_SubscribeForQuoteRsp(int argc, VALUE *argv, VALUE self) {
CThostFtdcMdApi *arg1 = (CThostFtdcMdApi *) 0 ;
char **arg2 ;
int arg3 ;
void *argp1 = 0 ;
int res1 = 0 ;
int result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcMdApi, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcMdApi *","SubscribeForQuoteRsp", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcMdApi * >(argp1);
{
if (rb_obj_is_kind_of(argv[0], rb_cArray)) {
int size = RARRAY_LEN(argv[0]);
arg3 = (int)size;
arg2 = (char **)malloc((size+1)*sizeof(char *));
VALUE *ptr = RARRAY_PTR(argv[0]);
int i=0;
for (; i < size; i++, ptr++) {
arg2[i] = StringValuePtr(*ptr);
}
arg2[i] = 0;
} else {
arg2 = 0; arg3 = 0;
SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "char **ARRAY, int SIZE","SubscribeForQuoteRsp", 2, argv[0] ));
}
}
result = (int)(arg1)->SubscribeForQuoteRsp(arg2,arg3);
vresult = SWIG_From_int(static_cast< int >(result));
{
/* free((char *)arg2); */
}
return vresult;
fail:
{
/* free((char *)arg2); */
}
return Qnil;
}
|
#SubscribeMarketData(*args) ⇒ Object
192694 192695 192696 192697 192698 192699 192700 192701 192702 192703 192704 192705 192706 192707 192708 192709 192710 192711 192712 192713 192714 192715 192716 192717 192718 192719 192720 192721 192722 192723 192724 192725 192726 192727 192728 192729 192730 192731 192732 192733 192734 192735 192736 192737 192738 192739 |
# File 'ext/ctp/ctp.cxx', line 192694
SWIGINTERN VALUE
_wrap_CThostFtdcMdApi_SubscribeMarketData(int argc, VALUE *argv, VALUE self) {
CThostFtdcMdApi *arg1 = (CThostFtdcMdApi *) 0 ;
char **arg2 ;
int arg3 ;
void *argp1 = 0 ;
int res1 = 0 ;
int result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcMdApi, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcMdApi *","SubscribeMarketData", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcMdApi * >(argp1);
{
if (rb_obj_is_kind_of(argv[0], rb_cArray)) {
int size = RARRAY_LEN(argv[0]);
arg3 = (int)size;
arg2 = (char **)malloc((size+1)*sizeof(char *));
VALUE *ptr = RARRAY_PTR(argv[0]);
int i=0;
for (; i < size; i++, ptr++) {
arg2[i] = StringValuePtr(*ptr);
}
arg2[i] = 0;
} else {
arg2 = 0; arg3 = 0;
SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "char **ARRAY, int SIZE","SubscribeMarketData", 2, argv[0] ));
}
}
result = (int)(arg1)->SubscribeMarketData(arg2,arg3);
vresult = SWIG_From_int(static_cast< int >(result));
{
/* free((char *)arg2); */
}
return vresult;
fail:
{
/* free((char *)arg2); */
}
return Qnil;
}
|
#UnSubscribeForQuoteRsp(*args) ⇒ Object
192838 192839 192840 192841 192842 192843 192844 192845 192846 192847 192848 192849 192850 192851 192852 192853 192854 192855 192856 192857 192858 192859 192860 192861 192862 192863 192864 192865 192866 192867 192868 192869 192870 192871 192872 192873 192874 192875 192876 192877 192878 192879 192880 192881 192882 192883 |
# File 'ext/ctp/ctp.cxx', line 192838
SWIGINTERN VALUE
_wrap_CThostFtdcMdApi_UnSubscribeForQuoteRsp(int argc, VALUE *argv, VALUE self) {
CThostFtdcMdApi *arg1 = (CThostFtdcMdApi *) 0 ;
char **arg2 ;
int arg3 ;
void *argp1 = 0 ;
int res1 = 0 ;
int result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcMdApi, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcMdApi *","UnSubscribeForQuoteRsp", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcMdApi * >(argp1);
{
if (rb_obj_is_kind_of(argv[0], rb_cArray)) {
int size = RARRAY_LEN(argv[0]);
arg3 = (int)size;
arg2 = (char **)malloc((size+1)*sizeof(char *));
VALUE *ptr = RARRAY_PTR(argv[0]);
int i=0;
for (; i < size; i++, ptr++) {
arg2[i] = StringValuePtr(*ptr);
}
arg2[i] = 0;
} else {
arg2 = 0; arg3 = 0;
SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "char **ARRAY, int SIZE","UnSubscribeForQuoteRsp", 2, argv[0] ));
}
}
result = (int)(arg1)->UnSubscribeForQuoteRsp(arg2,arg3);
vresult = SWIG_From_int(static_cast< int >(result));
{
/* free((char *)arg2); */
}
return vresult;
fail:
{
/* free((char *)arg2); */
}
return Qnil;
}
|
#UnSubscribeMarketData(*args) ⇒ Object
192742 192743 192744 192745 192746 192747 192748 192749 192750 192751 192752 192753 192754 192755 192756 192757 192758 192759 192760 192761 192762 192763 192764 192765 192766 192767 192768 192769 192770 192771 192772 192773 192774 192775 192776 192777 192778 192779 192780 192781 192782 192783 192784 192785 192786 192787 |
# File 'ext/ctp/ctp.cxx', line 192742
SWIGINTERN VALUE
_wrap_CThostFtdcMdApi_UnSubscribeMarketData(int argc, VALUE *argv, VALUE self) {
CThostFtdcMdApi *arg1 = (CThostFtdcMdApi *) 0 ;
char **arg2 ;
int arg3 ;
void *argp1 = 0 ;
int res1 = 0 ;
int result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcMdApi, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcMdApi *","UnSubscribeMarketData", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcMdApi * >(argp1);
{
if (rb_obj_is_kind_of(argv[0], rb_cArray)) {
int size = RARRAY_LEN(argv[0]);
arg3 = (int)size;
arg2 = (char **)malloc((size+1)*sizeof(char *));
VALUE *ptr = RARRAY_PTR(argv[0]);
int i=0;
for (; i < size; i++, ptr++) {
arg2[i] = StringValuePtr(*ptr);
}
arg2[i] = 0;
} else {
arg2 = 0; arg3 = 0;
SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), Ruby_Format_TypeError( "", "char **ARRAY, int SIZE","UnSubscribeMarketData", 2, argv[0] ));
}
}
result = (int)(arg1)->UnSubscribeMarketData(arg2,arg3);
vresult = SWIG_From_int(static_cast< int >(result));
{
/* free((char *)arg2); */
}
return vresult;
fail:
{
/* free((char *)arg2); */
}
return Qnil;
}
|