Class: Ctp::CThostFtdcDiscountField
- Inherits:
-
Object
- Object
- Ctp::CThostFtdcDiscountField
- Defined in:
- ext/ctp/ctp.cxx
Instance Method Summary collapse
- #BrokerID(*args) ⇒ Object
- #BrokerID=(*args) ⇒ Object
- #Discount(*args) ⇒ Object
- #Discount=(*args) ⇒ Object
- #initialize(*args) ⇒ Object constructor
- #InvestorID(*args) ⇒ Object
- #InvestorID=(*args) ⇒ Object
- #InvestorRange(*args) ⇒ Object
- #InvestorRange=(*args) ⇒ Object
Constructor Details
#initialize(*args) ⇒ Object
103150 103151 103152 103153 103154 103155 103156 103157 103158 103159 103160 103161 103162 103163 |
# File 'ext/ctp/ctp.cxx', line 103150
SWIGINTERN VALUE
_wrap_new_CThostFtdcDiscountField(int argc, VALUE *argv, VALUE self) {
const char *classname SWIGUNUSED = "Ctp::CThostFtdcDiscountField";
CThostFtdcDiscountField *result = 0 ;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
result = (CThostFtdcDiscountField *)new CThostFtdcDiscountField();
DATA_PTR(self) = result;
return self;
fail:
return Qnil;
}
|
Instance Method Details
#BrokerID(*args) ⇒ Object
102939 102940 102941 102942 102943 102944 102945 102946 102947 102948 102949 102950 102951 102952 102953 102954 102955 102956 102957 102958 102959 102960 102961 102962 102963 102964 102965 102966 |
# File 'ext/ctp/ctp.cxx', line 102939
SWIGINTERN VALUE
_wrap_CThostFtdcDiscountField_BrokerID_get(int argc, VALUE *argv, VALUE self) {
CThostFtdcDiscountField *arg1 = (CThostFtdcDiscountField *) 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_CThostFtdcDiscountField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcDiscountField *","BrokerID", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcDiscountField * >(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
102909 102910 102911 102912 102913 102914 102915 102916 102917 102918 102919 102920 102921 102922 102923 102924 102925 102926 102927 102928 102929 102930 102931 102932 102933 102934 102935 102936 |
# File 'ext/ctp/ctp.cxx', line 102909
SWIGINTERN VALUE
_wrap_CThostFtdcDiscountField_BrokerID_set(int argc, VALUE *argv, VALUE self) {
CThostFtdcDiscountField *arg1 = (CThostFtdcDiscountField *) 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_CThostFtdcDiscountField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcDiscountField *","BrokerID", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcDiscountField * >(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;
}
|
#Discount(*args) ⇒ Object
103111 103112 103113 103114 103115 103116 103117 103118 103119 103120 103121 103122 103123 103124 103125 103126 103127 103128 103129 103130 103131 103132 |
# File 'ext/ctp/ctp.cxx', line 103111
SWIGINTERN VALUE
_wrap_CThostFtdcDiscountField_Discount_get(int argc, VALUE *argv, VALUE self) {
CThostFtdcDiscountField *arg1 = (CThostFtdcDiscountField *) 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_CThostFtdcDiscountField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcDiscountField *","Discount", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcDiscountField * >(argp1);
result = (TThostFtdcRatioType) ((arg1)->Discount);
vresult = SWIG_From_double(static_cast< double >(result));
return vresult;
fail:
return Qnil;
}
|
#Discount=(*args) ⇒ Object
103082 103083 103084 103085 103086 103087 103088 103089 103090 103091 103092 103093 103094 103095 103096 103097 103098 103099 103100 103101 103102 103103 103104 103105 103106 103107 103108 |
# File 'ext/ctp/ctp.cxx', line 103082
SWIGINTERN VALUE
_wrap_CThostFtdcDiscountField_Discount_set(int argc, VALUE *argv, VALUE self) {
CThostFtdcDiscountField *arg1 = (CThostFtdcDiscountField *) 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_CThostFtdcDiscountField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcDiscountField *","Discount", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcDiscountField * >(argp1);
ecode2 = SWIG_AsVal_double(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TThostFtdcRatioType","Discount", 2, argv[0] ));
}
arg2 = static_cast< TThostFtdcRatioType >(val2);
if (arg1) (arg1)->Discount = arg2;
return Qnil;
fail:
return Qnil;
}
|
#InvestorID(*args) ⇒ Object
103052 103053 103054 103055 103056 103057 103058 103059 103060 103061 103062 103063 103064 103065 103066 103067 103068 103069 103070 103071 103072 103073 103074 103075 103076 103077 103078 103079 |
# File 'ext/ctp/ctp.cxx', line 103052
SWIGINTERN VALUE
_wrap_CThostFtdcDiscountField_InvestorID_get(int argc, VALUE *argv, VALUE self) {
CThostFtdcDiscountField *arg1 = (CThostFtdcDiscountField *) 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_CThostFtdcDiscountField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcDiscountField *","InvestorID", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcDiscountField * >(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
103022 103023 103024 103025 103026 103027 103028 103029 103030 103031 103032 103033 103034 103035 103036 103037 103038 103039 103040 103041 103042 103043 103044 103045 103046 103047 103048 103049 |
# File 'ext/ctp/ctp.cxx', line 103022
SWIGINTERN VALUE
_wrap_CThostFtdcDiscountField_InvestorID_set(int argc, VALUE *argv, VALUE self) {
CThostFtdcDiscountField *arg1 = (CThostFtdcDiscountField *) 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_CThostFtdcDiscountField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcDiscountField *","InvestorID", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcDiscountField * >(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
102998 102999 103000 103001 103002 103003 103004 103005 103006 103007 103008 103009 103010 103011 103012 103013 103014 103015 103016 103017 103018 103019 |
# File 'ext/ctp/ctp.cxx', line 102998
SWIGINTERN VALUE
_wrap_CThostFtdcDiscountField_InvestorRange_get(int argc, VALUE *argv, VALUE self) {
CThostFtdcDiscountField *arg1 = (CThostFtdcDiscountField *) 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_CThostFtdcDiscountField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcDiscountField *","InvestorRange", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcDiscountField * >(argp1);
result = (TThostFtdcInvestorRangeType) ((arg1)->InvestorRange);
vresult = SWIG_From_char(static_cast< char >(result));
return vresult;
fail:
return Qnil;
}
|
#InvestorRange=(*args) ⇒ Object
102969 102970 102971 102972 102973 102974 102975 102976 102977 102978 102979 102980 102981 102982 102983 102984 102985 102986 102987 102988 102989 102990 102991 102992 102993 102994 102995 |
# File 'ext/ctp/ctp.cxx', line 102969
SWIGINTERN VALUE
_wrap_CThostFtdcDiscountField_InvestorRange_set(int argc, VALUE *argv, VALUE self) {
CThostFtdcDiscountField *arg1 = (CThostFtdcDiscountField *) 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_CThostFtdcDiscountField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcDiscountField *","InvestorRange", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcDiscountField * >(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;
}
|