Method: Ctp::CThostFtdcTradingAccountField#CloseProfit=

Defined in:
ext/ctp/ctp.cxx

#CloseProfit=(*args) ⇒ Object



17920
17921
17922
17923
17924
17925
17926
17927
17928
17929
17930
17931
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942
17943
17944
17945
17946
# File 'ext/ctp/ctp.cxx', line 17920

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