Class: Ctp::CThostFtdcProductExchRateField

Inherits:
Object
  • Object
show all
Defined in:
ext/ctp/ctp.cxx

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Object



97468
97469
97470
97471
97472
97473
97474
97475
97476
97477
97478
97479
97480
97481
# File 'ext/ctp/ctp.cxx', line 97468

SWIGINTERN VALUE
_wrap_new_CThostFtdcProductExchRateField(int argc, VALUE *argv, VALUE self) {
  const char *classname SWIGUNUSED = "Ctp::CThostFtdcProductExchRateField";
  CThostFtdcProductExchRateField *result = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  result = (CThostFtdcProductExchRateField *)new CThostFtdcProductExchRateField();
  DATA_PTR(self) = result;
  return self;
fail:
  return Qnil;
}

Instance Method Details

#ExchangeRate(*args) ⇒ Object



97429
97430
97431
97432
97433
97434
97435
97436
97437
97438
97439
97440
97441
97442
97443
97444
97445
97446
97447
97448
97449
97450
# File 'ext/ctp/ctp.cxx', line 97429

SWIGINTERN VALUE
_wrap_CThostFtdcProductExchRateField_ExchangeRate_get(int argc, VALUE *argv, VALUE self) {
  CThostFtdcProductExchRateField *arg1 = (CThostFtdcProductExchRateField *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  TThostFtdcExchangeRateType result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcProductExchRateField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcProductExchRateField *","ExchangeRate", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcProductExchRateField * >(argp1);
  result = (TThostFtdcExchangeRateType) ((arg1)->ExchangeRate);
  vresult = SWIG_From_double(static_cast< double >(result));
  return vresult;
fail:
  return Qnil;
}

#ExchangeRate=(*args) ⇒ Object



97400
97401
97402
97403
97404
97405
97406
97407
97408
97409
97410
97411
97412
97413
97414
97415
97416
97417
97418
97419
97420
97421
97422
97423
97424
97425
97426
# File 'ext/ctp/ctp.cxx', line 97400

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

#ProductID(*args) ⇒ Object



97310
97311
97312
97313
97314
97315
97316
97317
97318
97319
97320
97321
97322
97323
97324
97325
97326
97327
97328
97329
97330
97331
97332
97333
97334
97335
97336
97337
# File 'ext/ctp/ctp.cxx', line 97310

SWIGINTERN VALUE
_wrap_CThostFtdcProductExchRateField_ProductID_get(int argc, VALUE *argv, VALUE self) {
  CThostFtdcProductExchRateField *arg1 = (CThostFtdcProductExchRateField *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcProductExchRateField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcProductExchRateField *","ProductID", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcProductExchRateField * >(argp1);
  result = (char *) ((arg1)->ProductID);
  {
    size_t size = SWIG_strnlen(result, 31);
    
    
    
    vresult = SWIG_FromCharPtrAndSize(result, size);
  }
  return vresult;
fail:
  return Qnil;
}

#ProductID=(*args) ⇒ Object



97280
97281
97282
97283
97284
97285
97286
97287
97288
97289
97290
97291
97292
97293
97294
97295
97296
97297
97298
97299
97300
97301
97302
97303
97304
97305
97306
97307
# File 'ext/ctp/ctp.cxx', line 97280

SWIGINTERN VALUE
_wrap_CThostFtdcProductExchRateField_ProductID_set(int argc, VALUE *argv, VALUE self) {
  CThostFtdcProductExchRateField *arg1 = (CThostFtdcProductExchRateField *) 0 ;
  char *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char temp2[31] ;
  int res2 ;
  
  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_CThostFtdcProductExchRateField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcProductExchRateField *","ProductID", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcProductExchRateField * >(argp1);
  res2 = SWIG_AsCharArray(argv[0], temp2, 31);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char [31]","ProductID", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(temp2);
  if (arg2) memcpy(arg1->ProductID,arg2,31*sizeof(char));
  else memset(arg1->ProductID,0,31*sizeof(char));
  return Qnil;
fail:
  return Qnil;
}

#QuoteCurrencyID(*args) ⇒ Object



97370
97371
97372
97373
97374
97375
97376
97377
97378
97379
97380
97381
97382
97383
97384
97385
97386
97387
97388
97389
97390
97391
97392
97393
97394
97395
97396
97397
# File 'ext/ctp/ctp.cxx', line 97370

SWIGINTERN VALUE
_wrap_CThostFtdcProductExchRateField_QuoteCurrencyID_get(int argc, VALUE *argv, VALUE self) {
  CThostFtdcProductExchRateField *arg1 = (CThostFtdcProductExchRateField *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CThostFtdcProductExchRateField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcProductExchRateField *","QuoteCurrencyID", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcProductExchRateField * >(argp1);
  result = (char *) ((arg1)->QuoteCurrencyID);
  {
    size_t size = SWIG_strnlen(result, 4);
    
    
    
    vresult = SWIG_FromCharPtrAndSize(result, size);
  }
  return vresult;
fail:
  return Qnil;
}

#QuoteCurrencyID=(*args) ⇒ Object



97340
97341
97342
97343
97344
97345
97346
97347
97348
97349
97350
97351
97352
97353
97354
97355
97356
97357
97358
97359
97360
97361
97362
97363
97364
97365
97366
97367
# File 'ext/ctp/ctp.cxx', line 97340

SWIGINTERN VALUE
_wrap_CThostFtdcProductExchRateField_QuoteCurrencyID_set(int argc, VALUE *argv, VALUE self) {
  CThostFtdcProductExchRateField *arg1 = (CThostFtdcProductExchRateField *) 0 ;
  char *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char temp2[4] ;
  int res2 ;
  
  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_CThostFtdcProductExchRateField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcProductExchRateField *","QuoteCurrencyID", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcProductExchRateField * >(argp1);
  res2 = SWIG_AsCharArray(argv[0], temp2, 4);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char [4]","QuoteCurrencyID", 2, argv[0] ));
  }
  arg2 = reinterpret_cast< char * >(temp2);
  if (arg2) memcpy(arg1->QuoteCurrencyID,arg2,4*sizeof(char));
  else memset(arg1->QuoteCurrencyID,0,4*sizeof(char));
  return Qnil;
fail:
  return Qnil;
}