Class: Ctp::CThostFtdcExchangeRateField
- Inherits:
-
Object
- Object
- Ctp::CThostFtdcExchangeRateField
- Defined in:
- ext/ctp/ctp.cxx
Instance Method Summary collapse
- #BrokerID(*args) ⇒ Object
- #BrokerID=(*args) ⇒ Object
- #ExchangeRate(*args) ⇒ Object
- #ExchangeRate=(*args) ⇒ Object
- #FromCurrencyID(*args) ⇒ Object
- #FromCurrencyID=(*args) ⇒ Object
- #FromCurrencyUnit(*args) ⇒ Object
- #FromCurrencyUnit=(*args) ⇒ Object
- #initialize(*args) ⇒ Object constructor
- #ToCurrencyID(*args) ⇒ Object
- #ToCurrencyID=(*args) ⇒ Object
Constructor Details
#initialize(*args) ⇒ Object
30296 30297 30298 30299 30300 30301 30302 30303 30304 30305 30306 30307 30308 30309 |
# File 'ext/ctp/ctp.cxx', line 30296
SWIGINTERN VALUE
_wrap_new_CThostFtdcExchangeRateField(int argc, VALUE *argv, VALUE self) {
const char *classname SWIGUNUSED = "Ctp::CThostFtdcExchangeRateField";
CThostFtdcExchangeRateField *result = 0 ;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
result = (CThostFtdcExchangeRateField *)new CThostFtdcExchangeRateField();
DATA_PTR(self) = result;
return self;
fail:
return Qnil;
}
|
Instance Method Details
#BrokerID(*args) ⇒ Object
30025 30026 30027 30028 30029 30030 30031 30032 30033 30034 30035 30036 30037 30038 30039 30040 30041 30042 30043 30044 30045 30046 30047 30048 30049 30050 30051 30052 |
# File 'ext/ctp/ctp.cxx', line 30025
SWIGINTERN VALUE
_wrap_CThostFtdcExchangeRateField_BrokerID_get(int argc, VALUE *argv, VALUE self) {
CThostFtdcExchangeRateField *arg1 = (CThostFtdcExchangeRateField *) 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_CThostFtdcExchangeRateField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcExchangeRateField *","BrokerID", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcExchangeRateField * >(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
29995 29996 29997 29998 29999 30000 30001 30002 30003 30004 30005 30006 30007 30008 30009 30010 30011 30012 30013 30014 30015 30016 30017 30018 30019 30020 30021 30022 |
# File 'ext/ctp/ctp.cxx', line 29995
SWIGINTERN VALUE
_wrap_CThostFtdcExchangeRateField_BrokerID_set(int argc, VALUE *argv, VALUE self) {
CThostFtdcExchangeRateField *arg1 = (CThostFtdcExchangeRateField *) 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_CThostFtdcExchangeRateField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcExchangeRateField *","BrokerID", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcExchangeRateField * >(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;
}
|
#ExchangeRate(*args) ⇒ Object
30257 30258 30259 30260 30261 30262 30263 30264 30265 30266 30267 30268 30269 30270 30271 30272 30273 30274 30275 30276 30277 30278 |
# File 'ext/ctp/ctp.cxx', line 30257
SWIGINTERN VALUE
_wrap_CThostFtdcExchangeRateField_ExchangeRate_get(int argc, VALUE *argv, VALUE self) {
CThostFtdcExchangeRateField *arg1 = (CThostFtdcExchangeRateField *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
TThostFtdcExchangeRateType 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_CThostFtdcExchangeRateField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcExchangeRateField *","ExchangeRate", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcExchangeRateField * >(argp1);
result = (TThostFtdcExchangeRateType) ((arg1)->ExchangeRate);
vresult = SWIG_From_double(static_cast< double >(result));
return vresult;
fail:
return Qnil;
}
|
#ExchangeRate=(*args) ⇒ Object
30228 30229 30230 30231 30232 30233 30234 30235 30236 30237 30238 30239 30240 30241 30242 30243 30244 30245 30246 30247 30248 30249 30250 30251 30252 30253 30254 |
# File 'ext/ctp/ctp.cxx', line 30228
SWIGINTERN VALUE
_wrap_CThostFtdcExchangeRateField_ExchangeRate_set(int argc, VALUE *argv, VALUE self) {
CThostFtdcExchangeRateField *arg1 = (CThostFtdcExchangeRateField *) 0 ;
TThostFtdcExchangeRateType 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_CThostFtdcExchangeRateField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcExchangeRateField *","ExchangeRate", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcExchangeRateField * >(argp1);
ecode2 = SWIG_AsVal_double(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TThostFtdcExchangeRateType","ExchangeRate", 2, argv[0] ));
}
arg2 = static_cast< TThostFtdcExchangeRateType >(val2);
if (arg1) (arg1)->ExchangeRate = arg2;
return Qnil;
fail:
return Qnil;
}
|
#FromCurrencyID(*args) ⇒ Object
30085 30086 30087 30088 30089 30090 30091 30092 30093 30094 30095 30096 30097 30098 30099 30100 30101 30102 30103 30104 30105 30106 30107 30108 30109 30110 30111 30112 |
# File 'ext/ctp/ctp.cxx', line 30085
SWIGINTERN VALUE
_wrap_CThostFtdcExchangeRateField_FromCurrencyID_get(int argc, VALUE *argv, VALUE self) {
CThostFtdcExchangeRateField *arg1 = (CThostFtdcExchangeRateField *) 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_CThostFtdcExchangeRateField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcExchangeRateField *","FromCurrencyID", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcExchangeRateField * >(argp1);
result = (char *) ((arg1)->FromCurrencyID);
{
size_t size = SWIG_strnlen(result, 4);
vresult = SWIG_FromCharPtrAndSize(result, size);
}
return vresult;
fail:
return Qnil;
}
|
#FromCurrencyID=(*args) ⇒ Object
30055 30056 30057 30058 30059 30060 30061 30062 30063 30064 30065 30066 30067 30068 30069 30070 30071 30072 30073 30074 30075 30076 30077 30078 30079 30080 30081 30082 |
# File 'ext/ctp/ctp.cxx', line 30055
SWIGINTERN VALUE
_wrap_CThostFtdcExchangeRateField_FromCurrencyID_set(int argc, VALUE *argv, VALUE self) {
CThostFtdcExchangeRateField *arg1 = (CThostFtdcExchangeRateField *) 0 ;
char *arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
char temp2[4] ;
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_CThostFtdcExchangeRateField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcExchangeRateField *","FromCurrencyID", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcExchangeRateField * >(argp1);
res2 = SWIG_AsCharArray(argv[0], temp2, 4);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char [4]","FromCurrencyID", 2, argv[0] ));
}
arg2 = reinterpret_cast< char * >(temp2);
if (arg2) memcpy(arg1->FromCurrencyID,arg2,4*sizeof(char));
else memset(arg1->FromCurrencyID,0,4*sizeof(char));
return Qnil;
fail:
return Qnil;
}
|
#FromCurrencyUnit(*args) ⇒ Object
30144 30145 30146 30147 30148 30149 30150 30151 30152 30153 30154 30155 30156 30157 30158 30159 30160 30161 30162 30163 30164 30165 |
# File 'ext/ctp/ctp.cxx', line 30144
SWIGINTERN VALUE
_wrap_CThostFtdcExchangeRateField_FromCurrencyUnit_get(int argc, VALUE *argv, VALUE self) {
CThostFtdcExchangeRateField *arg1 = (CThostFtdcExchangeRateField *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
TThostFtdcCurrencyUnitType 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_CThostFtdcExchangeRateField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcExchangeRateField *","FromCurrencyUnit", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcExchangeRateField * >(argp1);
result = (TThostFtdcCurrencyUnitType) ((arg1)->FromCurrencyUnit);
vresult = SWIG_From_double(static_cast< double >(result));
return vresult;
fail:
return Qnil;
}
|
#FromCurrencyUnit=(*args) ⇒ Object
30115 30116 30117 30118 30119 30120 30121 30122 30123 30124 30125 30126 30127 30128 30129 30130 30131 30132 30133 30134 30135 30136 30137 30138 30139 30140 30141 |
# File 'ext/ctp/ctp.cxx', line 30115
SWIGINTERN VALUE
_wrap_CThostFtdcExchangeRateField_FromCurrencyUnit_set(int argc, VALUE *argv, VALUE self) {
CThostFtdcExchangeRateField *arg1 = (CThostFtdcExchangeRateField *) 0 ;
TThostFtdcCurrencyUnitType 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_CThostFtdcExchangeRateField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcExchangeRateField *","FromCurrencyUnit", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcExchangeRateField * >(argp1);
ecode2 = SWIG_AsVal_double(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TThostFtdcCurrencyUnitType","FromCurrencyUnit", 2, argv[0] ));
}
arg2 = static_cast< TThostFtdcCurrencyUnitType >(val2);
if (arg1) (arg1)->FromCurrencyUnit = arg2;
return Qnil;
fail:
return Qnil;
}
|
#ToCurrencyID(*args) ⇒ Object
30198 30199 30200 30201 30202 30203 30204 30205 30206 30207 30208 30209 30210 30211 30212 30213 30214 30215 30216 30217 30218 30219 30220 30221 30222 30223 30224 30225 |
# File 'ext/ctp/ctp.cxx', line 30198
SWIGINTERN VALUE
_wrap_CThostFtdcExchangeRateField_ToCurrencyID_get(int argc, VALUE *argv, VALUE self) {
CThostFtdcExchangeRateField *arg1 = (CThostFtdcExchangeRateField *) 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_CThostFtdcExchangeRateField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcExchangeRateField *","ToCurrencyID", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcExchangeRateField * >(argp1);
result = (char *) ((arg1)->ToCurrencyID);
{
size_t size = SWIG_strnlen(result, 4);
vresult = SWIG_FromCharPtrAndSize(result, size);
}
return vresult;
fail:
return Qnil;
}
|
#ToCurrencyID=(*args) ⇒ Object
30168 30169 30170 30171 30172 30173 30174 30175 30176 30177 30178 30179 30180 30181 30182 30183 30184 30185 30186 30187 30188 30189 30190 30191 30192 30193 30194 30195 |
# File 'ext/ctp/ctp.cxx', line 30168
SWIGINTERN VALUE
_wrap_CThostFtdcExchangeRateField_ToCurrencyID_set(int argc, VALUE *argv, VALUE self) {
CThostFtdcExchangeRateField *arg1 = (CThostFtdcExchangeRateField *) 0 ;
char *arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
char temp2[4] ;
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_CThostFtdcExchangeRateField, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CThostFtdcExchangeRateField *","ToCurrencyID", 1, self ));
}
arg1 = reinterpret_cast< CThostFtdcExchangeRateField * >(argp1);
res2 = SWIG_AsCharArray(argv[0], temp2, 4);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char [4]","ToCurrencyID", 2, argv[0] ));
}
arg2 = reinterpret_cast< char * >(temp2);
if (arg2) memcpy(arg1->ToCurrencyID,arg2,4*sizeof(char));
else memset(arg1->ToCurrencyID,0,4*sizeof(char));
return Qnil;
fail:
return Qnil;
}
|