Class: Ctp::CThostFtdcIndexPriceField
- Inherits:
-
Object
- Object
- Ctp::CThostFtdcIndexPriceField
- Defined in:
- ext/ctp/ctp.cxx
Instance Method Summary collapse
- #BrokerID(*args) ⇒ Object
- #BrokerID=(*args) ⇒ Object
- #ClosePrice(*args) ⇒ Object
- #ClosePrice=(*args) ⇒ Object
- #initialize(*args) ⇒ Object constructor
- #InstrumentID(*args) ⇒ Object
- #InstrumentID=(*args) ⇒ Object
Constructor Details
#initialize(*args) ⇒ Object
67814 67815 67816 67817 67818 67819 67820 67821 67822 67823 67824 67825 67826 67827 |
# File 'ext/ctp/ctp.cxx', line 67814
SWIGINTERN VALUE
_wrap_new_CThostFtdcIndexPriceField(int argc, VALUE *argv, VALUE self) {
const char *classname SWIGUNUSED = "Ctp::CThostFtdcIndexPriceField";
CThostFtdcIndexPriceField *result = 0 ;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
result = (CThostFtdcIndexPriceField *)new CThostFtdcIndexPriceField();
DATA_PTR(self) = result;
return self;
fail:
return Qnil;
}
|
Instance Method Details
#BrokerID(*args) ⇒ Object
67656 67657 67658 67659 67660 67661 67662 67663 67664 67665 67666 67667 67668 67669 67670 67671 67672 67673 67674 67675 67676 67677 67678 67679 67680 67681 67682 67683 |
# File 'ext/ctp/ctp.cxx', line 67656
SWIGINTERN VALUE
_wrap_CThostFtdcIndexPriceField_BrokerID_get(int argc, VALUE *argv, VALUE self) {
CThostFtdcIndexPriceField *arg1 = (CThostFtdcIndexPriceField *) 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_CThostFtdcIndexPriceField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcIndexPriceField *","BrokerID", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcIndexPriceField * >(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
67626 67627 67628 67629 67630 67631 67632 67633 67634 67635 67636 67637 67638 67639 67640 67641 67642 67643 67644 67645 67646 67647 67648 67649 67650 67651 67652 67653 |
# File 'ext/ctp/ctp.cxx', line 67626
SWIGINTERN VALUE
_wrap_CThostFtdcIndexPriceField_BrokerID_set(int argc, VALUE *argv, VALUE self) {
CThostFtdcIndexPriceField *arg1 = (CThostFtdcIndexPriceField *) 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_CThostFtdcIndexPriceField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcIndexPriceField *","BrokerID", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcIndexPriceField * >(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;
}
|
#ClosePrice(*args) ⇒ Object
67775 67776 67777 67778 67779 67780 67781 67782 67783 67784 67785 67786 67787 67788 67789 67790 67791 67792 67793 67794 67795 67796 |
# File 'ext/ctp/ctp.cxx', line 67775
SWIGINTERN VALUE
_wrap_CThostFtdcIndexPriceField_ClosePrice_get(int argc, VALUE *argv, VALUE self) {
CThostFtdcIndexPriceField *arg1 = (CThostFtdcIndexPriceField *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
TThostFtdcPriceType 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_CThostFtdcIndexPriceField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcIndexPriceField *","ClosePrice", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcIndexPriceField * >(argp1);
result = (TThostFtdcPriceType) ((arg1)->ClosePrice);
vresult = SWIG_From_double(static_cast< double >(result));
return vresult;
fail:
return Qnil;
}
|
#ClosePrice=(*args) ⇒ Object
67746 67747 67748 67749 67750 67751 67752 67753 67754 67755 67756 67757 67758 67759 67760 67761 67762 67763 67764 67765 67766 67767 67768 67769 67770 67771 67772 |
# File 'ext/ctp/ctp.cxx', line 67746
SWIGINTERN VALUE
_wrap_CThostFtdcIndexPriceField_ClosePrice_set(int argc, VALUE *argv, VALUE self) {
CThostFtdcIndexPriceField *arg1 = (CThostFtdcIndexPriceField *) 0 ;
TThostFtdcPriceType 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_CThostFtdcIndexPriceField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcIndexPriceField *","ClosePrice", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcIndexPriceField * >(argp1);
ecode2 = SWIG_AsVal_double(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TThostFtdcPriceType","ClosePrice", 2, argv[0] ));
}
arg2 = static_cast< TThostFtdcPriceType >(val2);
if (arg1) (arg1)->ClosePrice = arg2;
return Qnil;
fail:
return Qnil;
}
|
#InstrumentID(*args) ⇒ Object
67716 67717 67718 67719 67720 67721 67722 67723 67724 67725 67726 67727 67728 67729 67730 67731 67732 67733 67734 67735 67736 67737 67738 67739 67740 67741 67742 67743 |
# File 'ext/ctp/ctp.cxx', line 67716
SWIGINTERN VALUE
_wrap_CThostFtdcIndexPriceField_InstrumentID_get(int argc, VALUE *argv, VALUE self) {
CThostFtdcIndexPriceField *arg1 = (CThostFtdcIndexPriceField *) 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_CThostFtdcIndexPriceField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcIndexPriceField *","InstrumentID", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcIndexPriceField * >(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
67686 67687 67688 67689 67690 67691 67692 67693 67694 67695 67696 67697 67698 67699 67700 67701 67702 67703 67704 67705 67706 67707 67708 67709 67710 67711 67712 67713 |
# File 'ext/ctp/ctp.cxx', line 67686
SWIGINTERN VALUE
_wrap_CThostFtdcIndexPriceField_InstrumentID_set(int argc, VALUE *argv, VALUE self) {
CThostFtdcIndexPriceField *arg1 = (CThostFtdcIndexPriceField *) 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_CThostFtdcIndexPriceField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcIndexPriceField *","InstrumentID", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcIndexPriceField * >(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;
}
|