Method: Ctp::CThostFtdcTradeField#TradingRole=

Defined in:
ext/ctp/ctp.cxx

#TradingRole=(*args) ⇒ Object



46081
46082
46083
46084
46085
46086
46087
46088
46089
46090
46091
46092
46093
46094
46095
46096
46097
46098
46099
46100
46101
46102
46103
46104
46105
46106
46107
# File 'ext/ctp/ctp.cxx', line 46081

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