Method: Ctp::CThostFtdcTradeField#Price=

Defined in:
ext/ctp/ctp.cxx

#Price=(*args) ⇒ Object



46300
46301
46302
46303
46304
46305
46306
46307
46308
46309
46310
46311
46312
46313
46314
46315
46316
46317
46318
46319
46320
46321
46322
46323
46324
46325
46326
# File 'ext/ctp/ctp.cxx', line 46300

SWIGINTERN VALUE
_wrap_CThostFtdcTradeField_Price_set(int argc, VALUE *argv, VALUE self) {
  CThostFtdcTradeField *arg1 = (CThostFtdcTradeField *) 0 ;
  TThostFtdcPriceType arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 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_CThostFtdcTradeField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcTradeField *","Price", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcTradeField * >(argp1);
  ecode2 = SWIG_AsVal_double(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TThostFtdcPriceType","Price", 2, argv[0] ));
  } 
  arg2 = static_cast< TThostFtdcPriceType >(val2);
  if (arg1) (arg1)->Price = arg2;
  return Qnil;
fail:
  return Qnil;
}