Method: Ctp::CThostFtdcTraderApi#ReqQryInstrumentCommissionRate

Defined in:
ext/ctp/ctp.cxx

#ReqQryInstrumentCommissionRate(*args) ⇒ Object



200498
200499
200500
200501
200502
200503
200504
200505
200506
200507
200508
200509
200510
200511
200512
200513
200514
200515
200516
200517
200518
200519
200520
200521
200522
200523
200524
200525
200526
200527
200528
200529
200530
200531
200532
200533
200534
200535
# File 'ext/ctp/ctp.cxx', line 200498

SWIGINTERN VALUE
_wrap_CThostFtdcTraderApi_ReqQryInstrumentCommissionRate(int argc, VALUE *argv, VALUE self) {
  CThostFtdcTraderApi *arg1 = (CThostFtdcTraderApi *) 0 ;
  CThostFtdcQryInstrumentCommissionRateField *arg2 = (CThostFtdcQryInstrumentCommissionRateField *) 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_CThostFtdcTraderApi, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcTraderApi *","ReqQryInstrumentCommissionRate", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcTraderApi * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_CThostFtdcQryInstrumentCommissionRateField, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "CThostFtdcQryInstrumentCommissionRateField *","ReqQryInstrumentCommissionRate", 2, argv[0] )); 
  }
  arg2 = reinterpret_cast< CThostFtdcQryInstrumentCommissionRateField * >(argp2);
  ecode3 = SWIG_AsVal_int(argv[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","ReqQryInstrumentCommissionRate", 3, argv[1] ));
  } 
  arg3 = static_cast< int >(val3);
  result = (int)(arg1)->ReqQryInstrumentCommissionRate(arg2,arg3);
  vresult = SWIG_From_int(static_cast< int >(result));
  return vresult;
fail:
  return Qnil;
}