Class: Ctp::CThostFtdcOptionInstrDeltaField

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

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Object



92375
92376
92377
92378
92379
92380
92381
92382
92383
92384
92385
92386
92387
92388
# File 'ext/ctp/ctp.cxx', line 92375

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

Instance Method Details

#BrokerID(*args) ⇒ Object



92217
92218
92219
92220
92221
92222
92223
92224
92225
92226
92227
92228
92229
92230
92231
92232
92233
92234
92235
92236
92237
92238
92239
92240
92241
92242
92243
92244
# File 'ext/ctp/ctp.cxx', line 92217

SWIGINTERN VALUE
_wrap_CThostFtdcOptionInstrDeltaField_BrokerID_get(int argc, VALUE *argv, VALUE self) {
  CThostFtdcOptionInstrDeltaField *arg1 = (CThostFtdcOptionInstrDeltaField *) 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_CThostFtdcOptionInstrDeltaField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcOptionInstrDeltaField *","BrokerID", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcOptionInstrDeltaField * >(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



92187
92188
92189
92190
92191
92192
92193
92194
92195
92196
92197
92198
92199
92200
92201
92202
92203
92204
92205
92206
92207
92208
92209
92210
92211
92212
92213
92214
# File 'ext/ctp/ctp.cxx', line 92187

SWIGINTERN VALUE
_wrap_CThostFtdcOptionInstrDeltaField_BrokerID_set(int argc, VALUE *argv, VALUE self) {
  CThostFtdcOptionInstrDeltaField *arg1 = (CThostFtdcOptionInstrDeltaField *) 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_CThostFtdcOptionInstrDeltaField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcOptionInstrDeltaField *","BrokerID", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcOptionInstrDeltaField * >(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;
}

#Delta(*args) ⇒ Object



92336
92337
92338
92339
92340
92341
92342
92343
92344
92345
92346
92347
92348
92349
92350
92351
92352
92353
92354
92355
92356
92357
# File 'ext/ctp/ctp.cxx', line 92336

SWIGINTERN VALUE
_wrap_CThostFtdcOptionInstrDeltaField_Delta_get(int argc, VALUE *argv, VALUE self) {
  CThostFtdcOptionInstrDeltaField *arg1 = (CThostFtdcOptionInstrDeltaField *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  TThostFtdcRatioType 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_CThostFtdcOptionInstrDeltaField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcOptionInstrDeltaField *","Delta", 1, self )); 
  }
  arg1 = reinterpret_cast< CThostFtdcOptionInstrDeltaField * >(argp1);
  result = (TThostFtdcRatioType) ((arg1)->Delta);
  vresult = SWIG_From_double(static_cast< double >(result));
  return vresult;
fail:
  return Qnil;
}

#Delta=(*args) ⇒ Object



92307
92308
92309
92310
92311
92312
92313
92314
92315
92316
92317
92318
92319
92320
92321
92322
92323
92324
92325
92326
92327
92328
92329
92330
92331
92332
92333
# File 'ext/ctp/ctp.cxx', line 92307

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

#InstrumentID(*args) ⇒ Object



92104
92105
92106
92107
92108
92109
92110
92111
92112
92113
92114
92115
92116
92117
92118
92119
92120
92121
92122
92123
92124
92125
92126
92127
92128
92129
92130
92131
# File 'ext/ctp/ctp.cxx', line 92104

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

#InstrumentID=(*args) ⇒ Object



92074
92075
92076
92077
92078
92079
92080
92081
92082
92083
92084
92085
92086
92087
92088
92089
92090
92091
92092
92093
92094
92095
92096
92097
92098
92099
92100
92101
# File 'ext/ctp/ctp.cxx', line 92074

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

#InvestorID(*args) ⇒ Object



92277
92278
92279
92280
92281
92282
92283
92284
92285
92286
92287
92288
92289
92290
92291
92292
92293
92294
92295
92296
92297
92298
92299
92300
92301
92302
92303
92304
# File 'ext/ctp/ctp.cxx', line 92277

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

#InvestorID=(*args) ⇒ Object



92247
92248
92249
92250
92251
92252
92253
92254
92255
92256
92257
92258
92259
92260
92261
92262
92263
92264
92265
92266
92267
92268
92269
92270
92271
92272
92273
92274
# File 'ext/ctp/ctp.cxx', line 92247

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

#InvestorRange(*args) ⇒ Object



92163
92164
92165
92166
92167
92168
92169
92170
92171
92172
92173
92174
92175
92176
92177
92178
92179
92180
92181
92182
92183
92184
# File 'ext/ctp/ctp.cxx', line 92163

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

#InvestorRange=(*args) ⇒ Object



92134
92135
92136
92137
92138
92139
92140
92141
92142
92143
92144
92145
92146
92147
92148
92149
92150
92151
92152
92153
92154
92155
92156
92157
92158
92159
92160
# File 'ext/ctp/ctp.cxx', line 92134

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