Class: Ctp::CThostFtdcExchangeMarginRateField
- Inherits:
-
Object
- Object
- Ctp::CThostFtdcExchangeMarginRateField
- Defined in:
- ext/ctp/ctp.cxx
Instance Method Summary collapse
- #BrokerID(*args) ⇒ Object
- #BrokerID=(*args) ⇒ Object
- #HedgeFlag(*args) ⇒ Object
- #HedgeFlag=(*args) ⇒ Object
- #initialize(*args) ⇒ Object constructor
- #InstrumentID(*args) ⇒ Object
- #InstrumentID=(*args) ⇒ Object
- #LongMarginRatioByMoney(*args) ⇒ Object
- #LongMarginRatioByMoney=(*args) ⇒ Object
- #LongMarginRatioByVolume(*args) ⇒ Object
- #LongMarginRatioByVolume=(*args) ⇒ Object
- #ShortMarginRatioByMoney(*args) ⇒ Object
- #ShortMarginRatioByMoney=(*args) ⇒ Object
- #ShortMarginRatioByVolume(*args) ⇒ Object
- #ShortMarginRatioByVolume=(*args) ⇒ Object
Constructor Details
#initialize(*args) ⇒ Object
29123 29124 29125 29126 29127 29128 29129 29130 29131 29132 29133 29134 29135 29136 |
# File 'ext/ctp/ctp.cxx', line 29123
SWIGINTERN VALUE
_wrap_new_CThostFtdcExchangeMarginRateField(int argc, VALUE *argv, VALUE self) {
const char *classname SWIGUNUSED = "Ctp::CThostFtdcExchangeMarginRateField";
CThostFtdcExchangeMarginRateField *result = 0 ;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
result = (CThostFtdcExchangeMarginRateField *)new CThostFtdcExchangeMarginRateField();
DATA_PTR(self) = result;
return self;
fail:
return Qnil;
}
|
Instance Method Details
#BrokerID(*args) ⇒ Object
28753 28754 28755 28756 28757 28758 28759 28760 28761 28762 28763 28764 28765 28766 28767 28768 28769 28770 28771 28772 28773 28774 28775 28776 28777 28778 28779 28780 |
# File 'ext/ctp/ctp.cxx', line 28753
SWIGINTERN VALUE
_wrap_CThostFtdcExchangeMarginRateField_BrokerID_get(int argc, VALUE *argv, VALUE self) {
CThostFtdcExchangeMarginRateField *arg1 = (CThostFtdcExchangeMarginRateField *) 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_CThostFtdcExchangeMarginRateField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcExchangeMarginRateField *","BrokerID", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcExchangeMarginRateField * >(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
28723 28724 28725 28726 28727 28728 28729 28730 28731 28732 28733 28734 28735 28736 28737 28738 28739 28740 28741 28742 28743 28744 28745 28746 28747 28748 28749 28750 |
# File 'ext/ctp/ctp.cxx', line 28723
SWIGINTERN VALUE
_wrap_CThostFtdcExchangeMarginRateField_BrokerID_set(int argc, VALUE *argv, VALUE self) {
CThostFtdcExchangeMarginRateField *arg1 = (CThostFtdcExchangeMarginRateField *) 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_CThostFtdcExchangeMarginRateField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcExchangeMarginRateField *","BrokerID", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcExchangeMarginRateField * >(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;
}
|
#HedgeFlag(*args) ⇒ Object
28872 28873 28874 28875 28876 28877 28878 28879 28880 28881 28882 28883 28884 28885 28886 28887 28888 28889 28890 28891 28892 28893 |
# File 'ext/ctp/ctp.cxx', line 28872
SWIGINTERN VALUE
_wrap_CThostFtdcExchangeMarginRateField_HedgeFlag_get(int argc, VALUE *argv, VALUE self) {
CThostFtdcExchangeMarginRateField *arg1 = (CThostFtdcExchangeMarginRateField *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
TThostFtdcHedgeFlagType 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_CThostFtdcExchangeMarginRateField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcExchangeMarginRateField *","HedgeFlag", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcExchangeMarginRateField * >(argp1);
result = (TThostFtdcHedgeFlagType) ((arg1)->HedgeFlag);
vresult = SWIG_From_char(static_cast< char >(result));
return vresult;
fail:
return Qnil;
}
|
#HedgeFlag=(*args) ⇒ Object
28843 28844 28845 28846 28847 28848 28849 28850 28851 28852 28853 28854 28855 28856 28857 28858 28859 28860 28861 28862 28863 28864 28865 28866 28867 28868 28869 |
# File 'ext/ctp/ctp.cxx', line 28843
SWIGINTERN VALUE
_wrap_CThostFtdcExchangeMarginRateField_HedgeFlag_set(int argc, VALUE *argv, VALUE self) {
CThostFtdcExchangeMarginRateField *arg1 = (CThostFtdcExchangeMarginRateField *) 0 ;
TThostFtdcHedgeFlagType 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_CThostFtdcExchangeMarginRateField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcExchangeMarginRateField *","HedgeFlag", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcExchangeMarginRateField * >(argp1);
ecode2 = SWIG_AsVal_char(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TThostFtdcHedgeFlagType","HedgeFlag", 2, argv[0] ));
}
arg2 = static_cast< TThostFtdcHedgeFlagType >(val2);
if (arg1) (arg1)->HedgeFlag = arg2;
return Qnil;
fail:
return Qnil;
}
|
#InstrumentID(*args) ⇒ Object
28813 28814 28815 28816 28817 28818 28819 28820 28821 28822 28823 28824 28825 28826 28827 28828 28829 28830 28831 28832 28833 28834 28835 28836 28837 28838 28839 28840 |
# File 'ext/ctp/ctp.cxx', line 28813
SWIGINTERN VALUE
_wrap_CThostFtdcExchangeMarginRateField_InstrumentID_get(int argc, VALUE *argv, VALUE self) {
CThostFtdcExchangeMarginRateField *arg1 = (CThostFtdcExchangeMarginRateField *) 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_CThostFtdcExchangeMarginRateField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcExchangeMarginRateField *","InstrumentID", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcExchangeMarginRateField * >(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
28783 28784 28785 28786 28787 28788 28789 28790 28791 28792 28793 28794 28795 28796 28797 28798 28799 28800 28801 28802 28803 28804 28805 28806 28807 28808 28809 28810 |
# File 'ext/ctp/ctp.cxx', line 28783
SWIGINTERN VALUE
_wrap_CThostFtdcExchangeMarginRateField_InstrumentID_set(int argc, VALUE *argv, VALUE self) {
CThostFtdcExchangeMarginRateField *arg1 = (CThostFtdcExchangeMarginRateField *) 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_CThostFtdcExchangeMarginRateField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcExchangeMarginRateField *","InstrumentID", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcExchangeMarginRateField * >(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;
}
|
#LongMarginRatioByMoney(*args) ⇒ Object
28925 28926 28927 28928 28929 28930 28931 28932 28933 28934 28935 28936 28937 28938 28939 28940 28941 28942 28943 28944 28945 28946 |
# File 'ext/ctp/ctp.cxx', line 28925
SWIGINTERN VALUE
_wrap_CThostFtdcExchangeMarginRateField_LongMarginRatioByMoney_get(int argc, VALUE *argv, VALUE self) {
CThostFtdcExchangeMarginRateField *arg1 = (CThostFtdcExchangeMarginRateField *) 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_CThostFtdcExchangeMarginRateField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcExchangeMarginRateField *","LongMarginRatioByMoney", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcExchangeMarginRateField * >(argp1);
result = (TThostFtdcRatioType) ((arg1)->LongMarginRatioByMoney);
vresult = SWIG_From_double(static_cast< double >(result));
return vresult;
fail:
return Qnil;
}
|
#LongMarginRatioByMoney=(*args) ⇒ Object
28896 28897 28898 28899 28900 28901 28902 28903 28904 28905 28906 28907 28908 28909 28910 28911 28912 28913 28914 28915 28916 28917 28918 28919 28920 28921 28922 |
# File 'ext/ctp/ctp.cxx', line 28896
SWIGINTERN VALUE
_wrap_CThostFtdcExchangeMarginRateField_LongMarginRatioByMoney_set(int argc, VALUE *argv, VALUE self) {
CThostFtdcExchangeMarginRateField *arg1 = (CThostFtdcExchangeMarginRateField *) 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_CThostFtdcExchangeMarginRateField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcExchangeMarginRateField *","LongMarginRatioByMoney", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcExchangeMarginRateField * >(argp1);
ecode2 = SWIG_AsVal_double(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TThostFtdcRatioType","LongMarginRatioByMoney", 2, argv[0] ));
}
arg2 = static_cast< TThostFtdcRatioType >(val2);
if (arg1) (arg1)->LongMarginRatioByMoney = arg2;
return Qnil;
fail:
return Qnil;
}
|
#LongMarginRatioByVolume(*args) ⇒ Object
28978 28979 28980 28981 28982 28983 28984 28985 28986 28987 28988 28989 28990 28991 28992 28993 28994 28995 28996 28997 28998 28999 |
# File 'ext/ctp/ctp.cxx', line 28978
SWIGINTERN VALUE
_wrap_CThostFtdcExchangeMarginRateField_LongMarginRatioByVolume_get(int argc, VALUE *argv, VALUE self) {
CThostFtdcExchangeMarginRateField *arg1 = (CThostFtdcExchangeMarginRateField *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
TThostFtdcMoneyType 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_CThostFtdcExchangeMarginRateField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcExchangeMarginRateField *","LongMarginRatioByVolume", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcExchangeMarginRateField * >(argp1);
result = (TThostFtdcMoneyType) ((arg1)->LongMarginRatioByVolume);
vresult = SWIG_From_double(static_cast< double >(result));
return vresult;
fail:
return Qnil;
}
|
#LongMarginRatioByVolume=(*args) ⇒ Object
28949 28950 28951 28952 28953 28954 28955 28956 28957 28958 28959 28960 28961 28962 28963 28964 28965 28966 28967 28968 28969 28970 28971 28972 28973 28974 28975 |
# File 'ext/ctp/ctp.cxx', line 28949
SWIGINTERN VALUE
_wrap_CThostFtdcExchangeMarginRateField_LongMarginRatioByVolume_set(int argc, VALUE *argv, VALUE self) {
CThostFtdcExchangeMarginRateField *arg1 = (CThostFtdcExchangeMarginRateField *) 0 ;
TThostFtdcMoneyType 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_CThostFtdcExchangeMarginRateField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcExchangeMarginRateField *","LongMarginRatioByVolume", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcExchangeMarginRateField * >(argp1);
ecode2 = SWIG_AsVal_double(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TThostFtdcMoneyType","LongMarginRatioByVolume", 2, argv[0] ));
}
arg2 = static_cast< TThostFtdcMoneyType >(val2);
if (arg1) (arg1)->LongMarginRatioByVolume = arg2;
return Qnil;
fail:
return Qnil;
}
|
#ShortMarginRatioByMoney(*args) ⇒ Object
29031 29032 29033 29034 29035 29036 29037 29038 29039 29040 29041 29042 29043 29044 29045 29046 29047 29048 29049 29050 29051 29052 |
# File 'ext/ctp/ctp.cxx', line 29031
SWIGINTERN VALUE
_wrap_CThostFtdcExchangeMarginRateField_ShortMarginRatioByMoney_get(int argc, VALUE *argv, VALUE self) {
CThostFtdcExchangeMarginRateField *arg1 = (CThostFtdcExchangeMarginRateField *) 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_CThostFtdcExchangeMarginRateField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcExchangeMarginRateField *","ShortMarginRatioByMoney", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcExchangeMarginRateField * >(argp1);
result = (TThostFtdcRatioType) ((arg1)->ShortMarginRatioByMoney);
vresult = SWIG_From_double(static_cast< double >(result));
return vresult;
fail:
return Qnil;
}
|
#ShortMarginRatioByMoney=(*args) ⇒ Object
29002 29003 29004 29005 29006 29007 29008 29009 29010 29011 29012 29013 29014 29015 29016 29017 29018 29019 29020 29021 29022 29023 29024 29025 29026 29027 29028 |
# File 'ext/ctp/ctp.cxx', line 29002
SWIGINTERN VALUE
_wrap_CThostFtdcExchangeMarginRateField_ShortMarginRatioByMoney_set(int argc, VALUE *argv, VALUE self) {
CThostFtdcExchangeMarginRateField *arg1 = (CThostFtdcExchangeMarginRateField *) 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_CThostFtdcExchangeMarginRateField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcExchangeMarginRateField *","ShortMarginRatioByMoney", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcExchangeMarginRateField * >(argp1);
ecode2 = SWIG_AsVal_double(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TThostFtdcRatioType","ShortMarginRatioByMoney", 2, argv[0] ));
}
arg2 = static_cast< TThostFtdcRatioType >(val2);
if (arg1) (arg1)->ShortMarginRatioByMoney = arg2;
return Qnil;
fail:
return Qnil;
}
|
#ShortMarginRatioByVolume(*args) ⇒ Object
29084 29085 29086 29087 29088 29089 29090 29091 29092 29093 29094 29095 29096 29097 29098 29099 29100 29101 29102 29103 29104 29105 |
# File 'ext/ctp/ctp.cxx', line 29084
SWIGINTERN VALUE
_wrap_CThostFtdcExchangeMarginRateField_ShortMarginRatioByVolume_get(int argc, VALUE *argv, VALUE self) {
CThostFtdcExchangeMarginRateField *arg1 = (CThostFtdcExchangeMarginRateField *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
TThostFtdcMoneyType 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_CThostFtdcExchangeMarginRateField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcExchangeMarginRateField *","ShortMarginRatioByVolume", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcExchangeMarginRateField * >(argp1);
result = (TThostFtdcMoneyType) ((arg1)->ShortMarginRatioByVolume);
vresult = SWIG_From_double(static_cast< double >(result));
return vresult;
fail:
return Qnil;
}
|
#ShortMarginRatioByVolume=(*args) ⇒ Object
29055 29056 29057 29058 29059 29060 29061 29062 29063 29064 29065 29066 29067 29068 29069 29070 29071 29072 29073 29074 29075 29076 29077 29078 29079 29080 29081 |
# File 'ext/ctp/ctp.cxx', line 29055
SWIGINTERN VALUE
_wrap_CThostFtdcExchangeMarginRateField_ShortMarginRatioByVolume_set(int argc, VALUE *argv, VALUE self) {
CThostFtdcExchangeMarginRateField *arg1 = (CThostFtdcExchangeMarginRateField *) 0 ;
TThostFtdcMoneyType 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_CThostFtdcExchangeMarginRateField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcExchangeMarginRateField *","ShortMarginRatioByVolume", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcExchangeMarginRateField * >(argp1);
ecode2 = SWIG_AsVal_double(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TThostFtdcMoneyType","ShortMarginRatioByVolume", 2, argv[0] ));
}
arg2 = static_cast< TThostFtdcMoneyType >(val2);
if (arg1) (arg1)->ShortMarginRatioByVolume = arg2;
return Qnil;
fail:
return Qnil;
}
|