Method: Ctp::CThostFtdcExchangeRateField#FromCurrencyUnit=

Defined in:
ext/ctp/ctp.cxx

#FromCurrencyUnit=(*args) ⇒ Object



30115
30116
30117
30118
30119
30120
30121
30122
30123
30124
30125
30126
30127
30128
30129
30130
30131
30132
30133
30134
30135
30136
30137
30138
30139
30140
30141
# File 'ext/ctp/ctp.cxx', line 30115

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