Class: Ctp::CThostFtdcUserRightField

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

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Object



107519
107520
107521
107522
107523
107524
107525
107526
107527
107528
107529
107530
107531
107532
# File 'ext/ctp/ctp.cxx', line 107519

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

Instance Method Details

#BrokerID(*args) ⇒ Object



107308
107309
107310
107311
107312
107313
107314
107315
107316
107317
107318
107319
107320
107321
107322
107323
107324
107325
107326
107327
107328
107329
107330
107331
107332
107333
107334
107335
# File 'ext/ctp/ctp.cxx', line 107308

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

#BrokerID=(*args) ⇒ Object



107278
107279
107280
107281
107282
107283
107284
107285
107286
107287
107288
107289
107290
107291
107292
107293
107294
107295
107296
107297
107298
107299
107300
107301
107302
107303
107304
107305
# File 'ext/ctp/ctp.cxx', line 107278

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

#IsForbidden(*args) ⇒ Object



107480
107481
107482
107483
107484
107485
107486
107487
107488
107489
107490
107491
107492
107493
107494
107495
107496
107497
107498
107499
107500
107501
# File 'ext/ctp/ctp.cxx', line 107480

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

#IsForbidden=(*args) ⇒ Object



107451
107452
107453
107454
107455
107456
107457
107458
107459
107460
107461
107462
107463
107464
107465
107466
107467
107468
107469
107470
107471
107472
107473
107474
107475
107476
107477
# File 'ext/ctp/ctp.cxx', line 107451

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

#UserID(*args) ⇒ Object



107368
107369
107370
107371
107372
107373
107374
107375
107376
107377
107378
107379
107380
107381
107382
107383
107384
107385
107386
107387
107388
107389
107390
107391
107392
107393
107394
107395
# File 'ext/ctp/ctp.cxx', line 107368

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

#UserID=(*args) ⇒ Object



107338
107339
107340
107341
107342
107343
107344
107345
107346
107347
107348
107349
107350
107351
107352
107353
107354
107355
107356
107357
107358
107359
107360
107361
107362
107363
107364
107365
# File 'ext/ctp/ctp.cxx', line 107338

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

#UserRightType(*args) ⇒ Object



107427
107428
107429
107430
107431
107432
107433
107434
107435
107436
107437
107438
107439
107440
107441
107442
107443
107444
107445
107446
107447
107448
# File 'ext/ctp/ctp.cxx', line 107427

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

#UserRightType=(*args) ⇒ Object



107398
107399
107400
107401
107402
107403
107404
107405
107406
107407
107408
107409
107410
107411
107412
107413
107414
107415
107416
107417
107418
107419
107420
107421
107422
107423
107424
# File 'ext/ctp/ctp.cxx', line 107398

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