Class: Ctp::CThostFtdcCombinationLegField

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

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Object



109660
109661
109662
109663
109664
109665
109666
109667
109668
109669
109670
109671
109672
109673
# File 'ext/ctp/ctp.cxx', line 109660

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

Instance Method Details

#CombInstrumentID(*args) ⇒ Object



109343
109344
109345
109346
109347
109348
109349
109350
109351
109352
109353
109354
109355
109356
109357
109358
109359
109360
109361
109362
109363
109364
109365
109366
109367
109368
109369
109370
# File 'ext/ctp/ctp.cxx', line 109343

SWIGINTERN VALUE
_wrap_CThostFtdcCombinationLegField_CombInstrumentID_get(int argc, VALUE *argv, VALUE self) {
  CThostFtdcCombinationLegField *arg1 = (CThostFtdcCombinationLegField *) 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_CThostFtdcCombinationLegField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcCombinationLegField *","CombInstrumentID", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcCombinationLegField * >(argp1);
  result = (char *) ((arg1)->CombInstrumentID);
  {
    size_t size = SWIG_strnlen(result, 31);
    
    
    
    vresult = SWIG_FromCharPtrAndSize(result, size);
  }
  return vresult;
fail:
  return Qnil;
}

#CombInstrumentID=(*args) ⇒ Object



109313
109314
109315
109316
109317
109318
109319
109320
109321
109322
109323
109324
109325
109326
109327
109328
109329
109330
109331
109332
109333
109334
109335
109336
109337
109338
109339
109340
# File 'ext/ctp/ctp.cxx', line 109313

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

#Direction(*args) ⇒ Object



109515
109516
109517
109518
109519
109520
109521
109522
109523
109524
109525
109526
109527
109528
109529
109530
109531
109532
109533
109534
109535
109536
# File 'ext/ctp/ctp.cxx', line 109515

SWIGINTERN VALUE
_wrap_CThostFtdcCombinationLegField_Direction_get(int argc, VALUE *argv, VALUE self) {
  CThostFtdcCombinationLegField *arg1 = (CThostFtdcCombinationLegField *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  TThostFtdcDirectionType 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_CThostFtdcCombinationLegField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcCombinationLegField *","Direction", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcCombinationLegField * >(argp1);
  result = (TThostFtdcDirectionType) ((arg1)->Direction);
  vresult = SWIG_From_char(static_cast< char >(result));
  return vresult;
fail:
  return Qnil;
}

#Direction=(*args) ⇒ Object



109486
109487
109488
109489
109490
109491
109492
109493
109494
109495
109496
109497
109498
109499
109500
109501
109502
109503
109504
109505
109506
109507
109508
109509
109510
109511
109512
# File 'ext/ctp/ctp.cxx', line 109486

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

#ImplyLevel(*args) ⇒ Object



109621
109622
109623
109624
109625
109626
109627
109628
109629
109630
109631
109632
109633
109634
109635
109636
109637
109638
109639
109640
109641
109642
# File 'ext/ctp/ctp.cxx', line 109621

SWIGINTERN VALUE
_wrap_CThostFtdcCombinationLegField_ImplyLevel_get(int argc, VALUE *argv, VALUE self) {
  CThostFtdcCombinationLegField *arg1 = (CThostFtdcCombinationLegField *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  TThostFtdcImplyLevelType 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_CThostFtdcCombinationLegField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcCombinationLegField *","ImplyLevel", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcCombinationLegField * >(argp1);
  result = (TThostFtdcImplyLevelType) ((arg1)->ImplyLevel);
  vresult = SWIG_From_int(static_cast< int >(result));
  return vresult;
fail:
  return Qnil;
}

#ImplyLevel=(*args) ⇒ Object



109592
109593
109594
109595
109596
109597
109598
109599
109600
109601
109602
109603
109604
109605
109606
109607
109608
109609
109610
109611
109612
109613
109614
109615
109616
109617
109618
# File 'ext/ctp/ctp.cxx', line 109592

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

#LegID(*args) ⇒ Object



109402
109403
109404
109405
109406
109407
109408
109409
109410
109411
109412
109413
109414
109415
109416
109417
109418
109419
109420
109421
109422
109423
# File 'ext/ctp/ctp.cxx', line 109402

SWIGINTERN VALUE
_wrap_CThostFtdcCombinationLegField_LegID_get(int argc, VALUE *argv, VALUE self) {
  CThostFtdcCombinationLegField *arg1 = (CThostFtdcCombinationLegField *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  TThostFtdcLegIDType 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_CThostFtdcCombinationLegField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcCombinationLegField *","LegID", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcCombinationLegField * >(argp1);
  result = (TThostFtdcLegIDType) ((arg1)->LegID);
  vresult = SWIG_From_int(static_cast< int >(result));
  return vresult;
fail:
  return Qnil;
}

#LegID=(*args) ⇒ Object



109373
109374
109375
109376
109377
109378
109379
109380
109381
109382
109383
109384
109385
109386
109387
109388
109389
109390
109391
109392
109393
109394
109395
109396
109397
109398
109399
# File 'ext/ctp/ctp.cxx', line 109373

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

#LegInstrumentID(*args) ⇒ Object



109456
109457
109458
109459
109460
109461
109462
109463
109464
109465
109466
109467
109468
109469
109470
109471
109472
109473
109474
109475
109476
109477
109478
109479
109480
109481
109482
109483
# File 'ext/ctp/ctp.cxx', line 109456

SWIGINTERN VALUE
_wrap_CThostFtdcCombinationLegField_LegInstrumentID_get(int argc, VALUE *argv, VALUE self) {
  CThostFtdcCombinationLegField *arg1 = (CThostFtdcCombinationLegField *) 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_CThostFtdcCombinationLegField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcCombinationLegField *","LegInstrumentID", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcCombinationLegField * >(argp1);
  result = (char *) ((arg1)->LegInstrumentID);
  {
    size_t size = SWIG_strnlen(result, 31);
    
    
    
    vresult = SWIG_FromCharPtrAndSize(result, size);
  }
  return vresult;
fail:
  return Qnil;
}

#LegInstrumentID=(*args) ⇒ Object



109426
109427
109428
109429
109430
109431
109432
109433
109434
109435
109436
109437
109438
109439
109440
109441
109442
109443
109444
109445
109446
109447
109448
109449
109450
109451
109452
109453
# File 'ext/ctp/ctp.cxx', line 109426

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

#LegMultiple(*args) ⇒ Object



109568
109569
109570
109571
109572
109573
109574
109575
109576
109577
109578
109579
109580
109581
109582
109583
109584
109585
109586
109587
109588
109589
# File 'ext/ctp/ctp.cxx', line 109568

SWIGINTERN VALUE
_wrap_CThostFtdcCombinationLegField_LegMultiple_get(int argc, VALUE *argv, VALUE self) {
  CThostFtdcCombinationLegField *arg1 = (CThostFtdcCombinationLegField *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  TThostFtdcLegMultipleType 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_CThostFtdcCombinationLegField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcCombinationLegField *","LegMultiple", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcCombinationLegField * >(argp1);
  result = (TThostFtdcLegMultipleType) ((arg1)->LegMultiple);
  vresult = SWIG_From_int(static_cast< int >(result));
  return vresult;
fail:
  return Qnil;
}

#LegMultiple=(*args) ⇒ Object



109539
109540
109541
109542
109543
109544
109545
109546
109547
109548
109549
109550
109551
109552
109553
109554
109555
109556
109557
109558
109559
109560
109561
109562
109563
109564
109565
# File 'ext/ctp/ctp.cxx', line 109539

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