Class: Ctp::CThostFtdcSpecificInstrumentField
- Inherits:
-
Object
- Object
- Ctp::CThostFtdcSpecificInstrumentField
- Defined in:
- ext/ctp/ctp.cxx
Instance Method Summary collapse
- #initialize(*args) ⇒ Object constructor
- #InstrumentID(*args) ⇒ Object
- #InstrumentID=(*args) ⇒ Object
Constructor Details
#initialize(*args) ⇒ Object
101617 101618 101619 101620 101621 101622 101623 101624 101625 101626 101627 101628 101629 101630 |
# File 'ext/ctp/ctp.cxx', line 101617
SWIGINTERN VALUE
_wrap_new_CThostFtdcSpecificInstrumentField(int argc, VALUE *argv, VALUE self) {
const char *classname SWIGUNUSED = "Ctp::CThostFtdcSpecificInstrumentField";
CThostFtdcSpecificInstrumentField *result = 0 ;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
result = (CThostFtdcSpecificInstrumentField *)new CThostFtdcSpecificInstrumentField();
DATA_PTR(self) = result;
return self;
fail:
return Qnil;
}
|
Instance Method Details
#InstrumentID(*args) ⇒ Object
101572 101573 101574 101575 101576 101577 101578 101579 101580 101581 101582 101583 101584 101585 101586 101587 101588 101589 101590 101591 101592 101593 101594 101595 101596 101597 101598 101599 |
# File 'ext/ctp/ctp.cxx', line 101572
SWIGINTERN VALUE
_wrap_CThostFtdcSpecificInstrumentField_InstrumentID_get(int argc, VALUE *argv, VALUE self) {
CThostFtdcSpecificInstrumentField *arg1 = (CThostFtdcSpecificInstrumentField *) 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_CThostFtdcSpecificInstrumentField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcSpecificInstrumentField *","InstrumentID", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcSpecificInstrumentField * >(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
101542 101543 101544 101545 101546 101547 101548 101549 101550 101551 101552 101553 101554 101555 101556 101557 101558 101559 101560 101561 101562 101563 101564 101565 101566 101567 101568 101569 |
# File 'ext/ctp/ctp.cxx', line 101542
SWIGINTERN VALUE
_wrap_CThostFtdcSpecificInstrumentField_InstrumentID_set(int argc, VALUE *argv, VALUE self) {
CThostFtdcSpecificInstrumentField *arg1 = (CThostFtdcSpecificInstrumentField *) 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_CThostFtdcSpecificInstrumentField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcSpecificInstrumentField *","InstrumentID", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcSpecificInstrumentField * >(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;
}
|