Class: Quickfix::IntField

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



12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
# File 'ext/quickfix/QuickfixRuby.cpp', line 12373

SWIGINTERN VALUE _wrap_new_IntField(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[2];
  int ii;
  
  argc = nargs;
  if (argc > 2) 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_IntField__SWIG_1(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_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_IntField__SWIG_0(nargs, args, self);
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 2, "IntField.new", 
    "    IntField.new(int field, int data)\n"
    "    IntField.new(int field)\n");
  
  return Qnil;
}

Instance Method Details

#getValue(*args) ⇒ Object



12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
# File 'ext/quickfix/QuickfixRuby.cpp', line 12448

SWIGINTERN VALUE
_wrap_IntField_getValue(int argc, VALUE *argv, VALUE self) {
  FIX::IntField *arg1 = (FIX::IntField *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int 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__IntField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::IntField const *","getValue", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::IntField * >(argp1);
  try {
    result = (int)((FIX::IntField 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_int(static_cast< int >(result));
  return vresult;
fail:
  return Qnil;
}

#setValue(*args) ⇒ Object



12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
# File 'ext/quickfix/QuickfixRuby.cpp', line 12419

SWIGINTERN VALUE
_wrap_IntField_setValue(int argc, VALUE *argv, VALUE self) {
  FIX::IntField *arg1 = (FIX::IntField *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int 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_FIX__IntField, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FIX::IntField *","setValue", 1, self )); 
  }
  arg1 = reinterpret_cast< FIX::IntField * >(argp1);
  ecode2 = SWIG_AsVal_int(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","setValue", 2, argv[0] ));
  } 
  arg2 = static_cast< int >(val2);
  (arg1)->setValue(arg2);
  return Qnil;
fail:
  return Qnil;
}