Class: Quickfix::DoubleField

Inherits:
((swig_class *) SWIGTYPE_p_FIX__FieldBase->clientdata)->klass
  • Object
show all
Defined in:
ext/quickfix/QuickfixRuby.cpp

Instance Method Summary collapse

Constructor Details

#initialize(*args, self) ⇒ Object



12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
# File 'ext/quickfix/QuickfixRuby.cpp', line 12072

SWIGINTERN VALUE _wrap_new_DoubleField(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[3];
  int ii;
  
  argc = nargs;
  if (argc > 3) SWIG_fail;
  for (ii = 0; (ii < argc); ++ii) {
    argv[ii] = args[ii];
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_DoubleField__SWIG_2(nargs, args, self);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_DoubleField__SWIG_1(nargs, args, self);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new_DoubleField__SWIG_0(nargs, args, self);
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 3, "DoubleField.new", 
    "    DoubleField.new(int field, double data, int padding)\n"
    "    DoubleField.new(int field, double data)\n"
    "    DoubleField.new(int field)\n");
  
  return Qnil;
}

Instance Method Details

#getValue(*args) ⇒ Object



12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
# File 'ext/quickfix/QuickfixRuby.cpp', line 12264

SWIGINTERN VALUE
_wrap_DoubleField_getValue(int argc, VALUE *argv, VALUE self) {
  FIX::DoubleField *arg1 = (FIX::DoubleField *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double 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_FIX__DoubleField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::DoubleField const *","getValue", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::DoubleField * >(argp1);
  try {
    result = (double)((FIX::DoubleField const *)arg1)->getValue();
  }
  catch(FIX::IncorrectDataFormat &_e) {
    rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_FIX__IncorrectDataFormat, SWIG_NewPointerObj((new FIX::IncorrectDataFormat(static_cast< const FIX::IncorrectDataFormat& >(_e))),SWIGTYPE_p_FIX__IncorrectDataFormat,SWIG_POINTER_OWN))); SWIG_fail;
  }
  
  vresult = SWIG_From_double(static_cast< double >(result));
  return vresult;
fail:
  return Qnil;
}

#setValue(*args, self) ⇒ Object



12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
# File 'ext/quickfix/QuickfixRuby.cpp', line 12207

SWIGINTERN VALUE _wrap_DoubleField_setValue(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[4];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 4) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FIX__DoubleField, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_DoubleField_setValue__SWIG_1(nargs, args, self);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FIX__DoubleField, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_DoubleField_setValue__SWIG_0(nargs, args, self);
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 4, "DoubleField.setValue", 
    "    void DoubleField.setValue(double value, int padding)\n"
    "    void DoubleField.setValue(double value)\n");
  
  return Qnil;
}