Method: Ctp::CThostFtdcInvestorPositionDetailField#HedgeFlag=

Defined in:
ext/ctp/ctp.cxx

#HedgeFlag=(*args) ⇒ Object



104004
104005
104006
104007
104008
104009
104010
104011
104012
104013
104014
104015
104016
104017
104018
104019
104020
104021
104022
104023
104024
104025
104026
104027
104028
104029
104030
# File 'ext/ctp/ctp.cxx', line 104004

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